OLD | NEW |
1 // Copyright 2009 The Go Authors. All rights reserved. | 1 // Copyright 2009 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 // Cgo; see gmp.go for an overview. | 5 // Cgo; see gmp.go for an overview. |
6 | 6 |
7 // TODO(rsc): | 7 // TODO(rsc): |
8 // Emit correct line number annotations. | 8 // Emit correct line number annotations. |
9 // Make 6g understand the annotations. | 9 // Make 6g understand the annotations. |
10 | 10 |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 } | 125 } |
126 | 126 |
127 var ptrSizeMap = map[string]int64{ | 127 var ptrSizeMap = map[string]int64{ |
128 "386": 4, | 128 "386": 4, |
129 "amd64": 8, | 129 "amd64": 8, |
130 "arm": 4, | 130 "arm": 4, |
131 } | 131 } |
132 | 132 |
133 var intSizeMap = map[string]int64{ | 133 var intSizeMap = map[string]int64{ |
134 "386": 4, | 134 "386": 4, |
135 » "amd64": 4, | 135 » "amd64": 8, |
136 "arm": 4, | 136 "arm": 4, |
137 } | 137 } |
138 | 138 |
139 var cPrefix string | 139 var cPrefix string |
140 | 140 |
141 var fset = token.NewFileSet() | 141 var fset = token.NewFileSet() |
142 | 142 |
143 var dynobj = flag.String("dynimport", "", "if non-empty, print dynamic import da
ta for that file") | 143 var dynobj = flag.String("dynimport", "", "if non-empty, print dynamic import da
ta for that file") |
144 var dynout = flag.String("dynout", "", "write -dynobj output to this file") | 144 var dynout = flag.String("dynout", "", "write -dynobj output to this file") |
145 | 145 |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
336 } | 336 } |
337 } | 337 } |
338 } | 338 } |
339 | 339 |
340 if f.ExpFunc != nil { | 340 if f.ExpFunc != nil { |
341 p.ExpFunc = append(p.ExpFunc, f.ExpFunc...) | 341 p.ExpFunc = append(p.ExpFunc, f.ExpFunc...) |
342 p.Preamble += "\n" + f.Preamble | 342 p.Preamble += "\n" + f.Preamble |
343 } | 343 } |
344 p.Decl = append(p.Decl, f.AST.Decls...) | 344 p.Decl = append(p.Decl, f.AST.Decls...) |
345 } | 345 } |
OLD | NEW |