LEFT | RIGHT |
(no file at all) | |
1 // Copyright 2011 The Go Authors. All rights reserved. | 1 // Copyright 2011 The Go Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style | 2 // Use of this source code is governed by a BSD-style |
3 // license that can be found in the LICENSE file. | 3 // license that can be found in the LICENSE file. |
4 | 4 |
5 // +build api_tool | 5 // +build api_tool |
6 | 6 |
7 // Binary api computes the exported API of a set of Go packages. | 7 // Binary api computes the exported API of a set of Go packages. |
8 package main | 8 package main |
9 | 9 |
10 import ( | 10 import ( |
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
378 } | 378 } |
379 if w.context != nil && file == fmt.Sprintf("zruntime_defs_%s_%s.go", w.c
ontext.GOOS, w.context.GOARCH) { | 379 if w.context != nil && file == fmt.Sprintf("zruntime_defs_%s_%s.go", w.c
ontext.GOOS, w.context.GOARCH) { |
380 // Just enough to keep the api checker happy. | 380 // Just enough to keep the api checker happy. |
381 src := "package runtime; type (" + | 381 src := "package runtime; type (" + |
382 " maptype struct{}; _type struct{}; alg struct{};" + | 382 " maptype struct{}; _type struct{}; alg struct{};" + |
383 " mspan struct{}; m struct{}; lock struct{}; slicetype s
truct{};" + | 383 " mspan struct{}; m struct{}; lock struct{}; slicetype s
truct{};" + |
384 " iface struct{}; eface struct{}; interfacetype struct{}
; itab struct{};" + | 384 " iface struct{}; eface struct{}; interfacetype struct{}
; itab struct{};" + |
385 " mcache struct{}; bucket struct{}; sudog struct{}; g st
ruct{};" + | 385 " mcache struct{}; bucket struct{}; sudog struct{}; g st
ruct{};" + |
386 " hchan struct{}; chantype struct{}; waitq struct{};" + | 386 " hchan struct{}; chantype struct{}; waitq struct{};" + |
387 " note struct{}; wincallbackcontext struct{};" + | 387 " note struct{}; wincallbackcontext struct{};" + |
| 388 " gobuf struct{}; funcval struct{};" + |
388 "); " + | 389 "); " + |
389 "const ( cb_max = 2000 )" | 390 "const ( cb_max = 2000 )" |
390 f, err = parser.ParseFile(fset, filename, src, 0) | 391 f, err = parser.ParseFile(fset, filename, src, 0) |
391 if err != nil { | 392 if err != nil { |
392 log.Fatalf("incorrect generated file: %s", err) | 393 log.Fatalf("incorrect generated file: %s", err) |
393 } | 394 } |
394 } | 395 } |
395 | 396 |
396 if f == nil { | 397 if f == nil { |
397 f, err = parser.ParseFile(fset, filename, nil, 0) | 398 f, err = parser.ParseFile(fset, filename, nil, 0) |
(...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
865 | 866 |
866 if _, dup := w.features[f]; dup { | 867 if _, dup := w.features[f]; dup { |
867 panic("duplicate feature inserted: " + f) | 868 panic("duplicate feature inserted: " + f) |
868 } | 869 } |
869 w.features[f] = true | 870 w.features[f] = true |
870 | 871 |
871 if *verbose { | 872 if *verbose { |
872 log.Printf("feature: %s", f) | 873 log.Printf("feature: %s", f) |
873 } | 874 } |
874 } | 875 } |
LEFT | RIGHT |