File tree Expand file tree Collapse file tree 1 file changed +16
-5
lines changed
spec/truffle/parsing/fixtures Expand file tree Collapse file tree 1 file changed +16
-5
lines changed Original file line number Diff line number Diff line change @@ -35,9 +35,12 @@ notes: >
35
35
1)) # frameSlot
36
36
37
37
(NilLiteralNode)
38
+
39
+ Note that both i and any local variable in the `for`'s body are declared in the outer scope.
38
40
focused_on_node : " org.truffleruby.language.dispatch.RubyCallNode"
39
41
ruby : |
40
42
for i in [42, 100500]
43
+ inner = 1
41
44
end
42
45
ast : |
43
46
RubyCallNode
88
91
WriteLocalVariableNode
89
92
attributes:
90
93
flags = 0
91
- frameSlot = 0
94
+ frameSlot = 0 # (self)
92
95
children:
93
96
valueNode =
94
97
ProfileArgumentNodeGen
@@ -102,7 +105,7 @@ ast: |
102
105
WriteLocalVariableNode
103
106
attributes:
104
107
flags = 0
105
- frameSlot = 1
108
+ frameSlot = 1 # %for_0
106
109
children:
107
110
valueNode =
108
111
ProfileArgumentNodeGen
@@ -126,11 +129,19 @@ ast: |
126
129
ReadLocalVariableNode
127
130
attributes:
128
131
flags = 0
129
- frameSlot = 1
132
+ frameSlot = 1 # %for_0
130
133
type = FRAME_LOCAL
131
- NilLiteralNode
134
+ WriteDeclarationVariableNode
132
135
attributes:
133
- flags = 0
136
+ flags = 1
137
+ frameDepth = 1
138
+ frameSlot = 5
139
+ children:
140
+ valueNode =
141
+ IntegerFixnumLiteralNode
142
+ attributes:
143
+ flags = 0
144
+ value = 1
134
145
]
135
146
receiver =
136
147
ArrayLiteralNode$UninitialisedArrayLiteralNode
You can’t perform that action at this time.
0 commit comments