@@ -23,32 +23,6 @@ type Node struct {
23
23
List * NodeList
24
24
Rlist * NodeList
25
25
26
- Op uint8
27
- Nointerface bool
28
- Ullman uint8 // sethi/ullman number
29
- Addable bool // addressable
30
- Etype uint8 // op for OASOP, etype for OTYPE, exclam for export, 6g saved reg
31
- Bounded bool // bounds check unnecessary
32
- Class uint8 // PPARAM, PAUTO, PEXTERN, etc
33
- Embedded uint8 // ODCLFIELD embedded type
34
- Colas bool // OAS resulting from :=
35
- Diag uint8 // already printed error about this
36
- Noescape bool // func arguments do not escape; TODO(rsc): move Noescape to Func struct (see CL 7360)
37
- Walkdef uint8
38
- Typecheck uint8
39
- Local bool
40
- Dodata uint8
41
- Initorder uint8
42
- Used bool
43
- Isddd bool // is the argument variadic
44
- Implicit bool
45
- Addrtaken bool // address taken, even if not moved to heap
46
- Assigned bool // is the variable ever assigned to
47
- Likely int8 // likeliness of if statement
48
- Hasbreak bool // has break statement
49
- Esc uint16 // EscXXX
50
- Funcdepth int32
51
-
52
26
// most nodes
53
27
Type * Type
54
28
Orig * Node // original form, for printing, and tracking copies of ONAMEs
@@ -57,12 +31,6 @@ type Node struct {
57
31
// func
58
32
Func * Func
59
33
60
- // OLITERAL
61
- Val Val
62
-
63
- // OREGISTER, OINDREG
64
- Reg int16
65
-
66
34
// ONAME
67
35
Name * Name
68
36
Defn * Node // ONAME: initializing assignment; OLABEL: labeled statement
@@ -79,19 +47,59 @@ type Node struct {
79
47
Initplan * InitPlan
80
48
81
49
// Escape analysis.
82
- Escflowsrc * NodeList // flow(this, src)
83
- Escretval * NodeList // on OCALLxxx, list of dummy return values
84
- Escloopdepth int32 // -1: global, 0: return variables, 1:function top level, increased inside function for every loop or label to mark scopes
50
+ Escflowsrc * NodeList // flow(this, src)
51
+ Escretval * NodeList // on OCALLxxx, list of dummy return values
52
+
53
+ Sym * Sym // various
54
+
55
+ Opt interface {} // for optimization passes
56
+
57
+ // OLITERAL
58
+ Val Val
85
59
86
- Sym * Sym // various
87
- Vargen int32 // unique name for OTYPE/ONAME within a function. Function outputs are numbered starting at one.
88
- Lineno int32
89
60
Xoffset int64
90
61
Stkdelta int64 // offset added by stack frame compaction phase.
91
- Iota int32
92
- Walkgen uint32
62
+
63
+ // Escape analysis.
64
+ Escloopdepth int32 // -1: global, 0: return variables, 1:function top level, increased inside function for every loop or label to mark scopes
65
+
66
+ Vargen int32 // unique name for OTYPE/ONAME within a function. Function outputs are numbered starting at one.
67
+ Lineno int32
68
+ Iota int32
69
+ Walkgen uint32
70
+
71
+ Funcdepth int32
72
+
73
+ // OREGISTER, OINDREG
74
+ Reg int16
75
+
76
+ // most nodes - smaller fields
93
77
Esclevel Level
94
- Opt interface {} // for optimization passes
78
+ Esc uint16 // EscXXX
79
+
80
+ Op uint8
81
+ Nointerface bool
82
+ Ullman uint8 // sethi/ullman number
83
+ Addable bool // addressable
84
+ Etype uint8 // op for OASOP, etype for OTYPE, exclam for export, 6g saved reg
85
+ Bounded bool // bounds check unnecessary
86
+ Class uint8 // PPARAM, PAUTO, PEXTERN, etc
87
+ Embedded uint8 // ODCLFIELD embedded type
88
+ Colas bool // OAS resulting from :=
89
+ Diag uint8 // already printed error about this
90
+ Noescape bool // func arguments do not escape; TODO(rsc): move Noescape to Func struct (see CL 7360)
91
+ Walkdef uint8
92
+ Typecheck uint8
93
+ Local bool
94
+ Dodata uint8
95
+ Initorder uint8
96
+ Used bool
97
+ Isddd bool // is the argument variadic
98
+ Implicit bool
99
+ Addrtaken bool // address taken, even if not moved to heap
100
+ Assigned bool // is the variable ever assigned to
101
+ Likely int8 // likeliness of if statement
102
+ Hasbreak bool // has break statement
95
103
}
96
104
97
105
// Name holds Node fields used only by ONAME nodes.
0 commit comments