@@ -25,34 +25,35 @@ import (
25
25
26
26
// Interpreter node structure for AST and CFG.
27
27
type node struct {
28
- debug * nodeDebugData // debug info
29
- child []* node // child subtrees (AST)
30
- anc * node // ancestor (AST)
31
- param []* itype // generic parameter nodes (AST)
32
- start * node // entry point in subtree (CFG)
33
- tnext * node // true branch successor (CFG)
34
- fnext * node // false branch successor (CFG)
35
- interp * Interpreter // interpreter context
36
- frame * frame // frame pointer used for closures only (TODO: suppress this)
37
- index int64 // node index (dot display)
38
- findex int // index of value in frame or frame size (func def, type def)
39
- level int // number of frame indirections to access value
40
- nleft int // number of children in left part (assign) or indicates preceding type (compositeLit)
41
- nright int // number of children in right part (assign)
42
- kind nkind // kind of node
43
- pos token.Pos // position in source code, relative to fset
44
- sym * symbol // associated symbol
45
- typ * itype // type of value in frame, or nil
46
- recv * receiver // method receiver node for call, or nil
47
- types []reflect.Type // frame types, used by function literals only
48
- scope * scope // frame scope
49
- action action // action
50
- exec bltn // generated function to execute
51
- gen bltnGenerator // generator function to produce above bltn
52
- val interface {} // static generic value (CFG execution)
53
- rval reflect.Value // reflection value to let runtime access interpreter (CFG)
54
- ident string // set if node is a var or func
55
- meta interface {} // meta stores meta information between gta runs, like errors
28
+ debug * nodeDebugData // debug info
29
+ child []* node // child subtrees (AST)
30
+ anc * node // ancestor (AST)
31
+ param []* itype // generic parameter nodes (AST)
32
+ start * node // entry point in subtree (CFG)
33
+ tnext * node // true branch successor (CFG)
34
+ fnext * node // false branch successor (CFG)
35
+ interp * Interpreter // interpreter context
36
+ frame * frame // frame pointer used for closures only (TODO: suppress this)
37
+ index int64 // node index (dot display)
38
+ findex int // index of value in frame or frame size (func def, type def)
39
+ level int // number of frame indirections to access value
40
+ nleft int // number of children in left part (assign) or indicates preceding type (compositeLit)
41
+ nright int // number of children in right part (assign)
42
+ kind nkind // kind of node
43
+ pos token.Pos // position in source code, relative to fset
44
+ sym * symbol // associated symbol
45
+ typ * itype // type of value in frame, or nil
46
+ recv * receiver // method receiver node for call, or nil
47
+ types []reflect.Type // frame types, used by function literals only
48
+ scope * scope // frame scope
49
+ action action // action
50
+ exec bltn // generated function to execute
51
+ gen bltnGenerator // generator function to produce above bltn
52
+ val interface {} // static generic value (CFG execution)
53
+ rval reflect.Value // reflection value to let runtime access interpreter (CFG)
54
+ ident string // set if node is a var or func
55
+ redeclared bool // set if node is a redeclared variable (CFG)
56
+ meta interface {} // meta stores meta information between gta runs, like errors
56
57
}
57
58
58
59
func (n * node ) shouldBreak () bool {
@@ -105,7 +106,7 @@ type receiver struct {
105
106
type frame struct {
106
107
// id is an atomic counter used for cancellation, only accessed
107
108
// via newFrame/runid/setrunid/clone.
108
- // Located at start of struct to ensure proper aligment .
109
+ // Located at start of struct to ensure proper alignment .
109
110
id uint64
110
111
111
112
debug * frameDebugData
0 commit comments