diff options
| author | Russ Cox <rsc@golang.org> | 2014-09-02 15:12:53 -0400 |
|---|---|---|
| committer | Russ Cox <rsc@golang.org> | 2014-09-02 15:12:53 -0400 |
| commit | fa2af441f1d7f2daccf40e1e350e8a8bfdcfb9e8 (patch) | |
| tree | 2595445d11d3cb30ff2a2a054178d8311fc7919d /src/cmd/api/goapi.go | |
| parent | 8e89f87158eb364330e4334d7084e290e07c66a8 (diff) | |
| download | go-fa2af441f1d7f2daccf40e1e350e8a8bfdcfb9e8.tar.xz | |
runtime: convert traceback*.c to Go
The two converted files were nearly identical.
Instead of continuing that duplication, I merged them
into a single traceback.go.
Tested on arm, amd64, amd64p32, and 386.
LGTM=r
R=golang-codereviews, remyoudompheng, dave, r
CC=dvyukov, golang-codereviews, iant, khr
https://golang.org/cl/134200044
Diffstat (limited to 'src/cmd/api/goapi.go')
| -rw-r--r-- | src/cmd/api/goapi.go | 31 |
1 files changed, 24 insertions, 7 deletions
diff --git a/src/cmd/api/goapi.go b/src/cmd/api/goapi.go index 99d41c9d69..715e9f6ad8 100644 --- a/src/cmd/api/goapi.go +++ b/src/cmd/api/goapi.go @@ -379,13 +379,30 @@ func (w *Walker) parseFile(dir, file string) (*ast.File, error) { if w.context != nil && file == fmt.Sprintf("zruntime_defs_%s_%s.go", w.context.GOOS, w.context.GOARCH) { // Just enough to keep the api checker happy. src := "package runtime; type (" + - " maptype struct{}; _type struct{}; alg struct{};" + - " mspan struct{}; m struct{}; mutex struct{}; slicetype struct{};" + - " iface struct{}; eface struct{}; interfacetype struct{}; itab struct{};" + - " mcache struct{}; sudog struct{}; g struct{};" + - " hchan struct{}; chantype struct{}; waitq struct{};" + - " note struct{}; wincallbackcontext struct{};" + - " gobuf struct{}; funcval struct{}; _func struct{};" + + " _func struct{};" + + " _type struct{};" + + " alg struct{};" + + " chantype struct{};" + + " context struct{};" + // windows + " eface struct{};" + + " funcval struct{};" + + " g struct{};" + + " gobuf struct{};" + + " hchan struct{};" + + " iface struct{};" + + " interfacetype struct{};" + + " itab struct{};" + + " m struct{};" + + " maptype struct{};" + + " mcache struct{};" + + " mspan struct{};" + + " mutex struct{};" + + " note struct{};" + + " slicetype struct{};" + + " stkframe struct{};" + + " sudog struct{};" + + " waitq struct{};" + + " wincallbackcontext struct{};" + "); " + "const ( cb_max = 2000 )" f, err = parser.ParseFile(fset, filename, src, 0) |
