...
Source file src/pkg/cmd/compile/internal/gc/bimport.go
1
2
3
4
5 package gc
6
7 import (
8 "cmd/compile/internal/types"
9 "cmd/internal/src"
10 )
11
12
13
14
15
16 var numImport = make(map[string]int)
17
18 func idealType(typ *types.Type) *types.Type {
19 switch typ {
20 case types.Idealint, types.Idealrune, types.Idealfloat, types.Idealcomplex:
21
22 typ = types.Types[TIDEAL]
23 }
24 return typ
25 }
26
27 func npos(pos src.XPos, n *Node) *Node {
28 n.Pos = pos
29 return n
30 }
31
32 func builtinCall(op Op) *Node {
33 return nod(OCALL, mkname(builtinpkg.Lookup(goopnames[op])), nil)
34 }
35
View as plain text