Skip to content

Commit ef95f46

Browse files
committed
YAML fixtures - update flip-flop operator fixtures to avoid local variables declaration ordering change
1 parent befc299 commit ef95f46

File tree

1 file changed

+22
-16
lines changed
  • spec/truffle/parsing/fixtures/operators/flip_flop_operator

1 file changed

+22
-16
lines changed

spec/truffle/parsing/fixtures/operators/flip_flop_operator/in_method.yaml

Lines changed: 22 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ notes: >
44
An additional node InitFlipFlopSlotNode is created
55
focused_on_node: "org.truffleruby.language.methods.LiteralMethodDefinitionNode"
66
ruby: |
7-
def foo
8-
x = 42
7+
def foo(x)
98
1 if (x) .. (x)
109
end
1110
ast: |
@@ -15,14 +14,14 @@ ast: |
1514
flags = 1
1615
isDefSingleton = false
1716
name = "foo"
18-
sharedMethodInfo = SharedMethodInfo(staticLexicalScope = :: Object, arity = Arity{preRequired = 0, optional = 0, hasRest = false, postRequired = 0, keywordArguments = [], requiredKeywordArgumentsCount = 0, hasKeywordsRest = false}, originName = foo, blockDepth = 0, parseName = Object#foo, notes = null, argumentDescriptors = [])
17+
sharedMethodInfo = SharedMethodInfo(staticLexicalScope = :: Object, arity = Arity{preRequired = 1, optional = 0, hasRest = false, postRequired = 0, keywordArguments = [], requiredKeywordArgumentsCount = 0, hasKeywordsRest = false}, originName = foo, blockDepth = 0, parseName = Object#foo, notes = null, argumentDescriptors = [ArgumentDescriptor(name = x, type = req)])
1918
call targets:
2019
RubyMethodRootNode
2120
attributes:
22-
arityForCheck = Arity{preRequired = 0, optional = 0, hasRest = false, postRequired = 0, keywordArguments = [], requiredKeywordArgumentsCount = 0, hasKeywordsRest = false}
21+
arityForCheck = Arity{preRequired = 1, optional = 0, hasRest = false, postRequired = 0, keywordArguments = [], requiredKeywordArgumentsCount = 0, hasKeywordsRest = false}
2322
callTarget = Object#foo
2423
checkArityProfile = false
25-
frameDescriptor = FrameDescriptor@...{#0:(self), #1:%$~_, #2:%method_block_arg, #3:x, #4:%flipflop_0}
24+
frameDescriptor = FrameDescriptor@...{#0:(self), #1:%$~_, #2:x, #3:%method_block_arg, #4:%flipflop_0}
2625
instrumentationBits = 0
2726
keywordArguments = false
2827
localReturnProfile = false
@@ -32,7 +31,7 @@ ast: |
3231
polyglotRef = org.truffleruby.RubyLanguage@...
3332
retryProfile = false
3433
returnID = org.truffleruby.language.control.ReturnID@...
35-
sharedMethodInfo = SharedMethodInfo(staticLexicalScope = :: Object, arity = Arity{preRequired = 0, optional = 0, hasRest = false, postRequired = 0, keywordArguments = [], requiredKeywordArgumentsCount = 0, hasKeywordsRest = false}, originName = foo, blockDepth = 0, parseName = Object#foo, notes = null, argumentDescriptors = [])
34+
sharedMethodInfo = SharedMethodInfo(staticLexicalScope = :: Object, arity = Arity{preRequired = 1, optional = 0, hasRest = false, postRequired = 0, keywordArguments = [], requiredKeywordArgumentsCount = 0, hasKeywordsRest = false}, originName = foo, blockDepth = 0, parseName = Object#foo, notes = null, argumentDescriptors = [ArgumentDescriptor(name = x, type = req)])
3635
split = HEURISTIC
3736
children:
3837
body =
@@ -59,20 +58,27 @@ ast: |
5958
ReadSelfNode
6059
attributes:
6160
flags = 0
62-
SaveMethodBlockNode
63-
attributes:
64-
flags = 0
65-
slot = 2
6661
WriteLocalVariableNode
6762
attributes:
68-
flags = 1
69-
frameSlot = 3
63+
flags = 0
64+
frameSlot = 2
7065
children:
7166
valueNode =
72-
IntegerFixnumLiteralNode
67+
ProfileArgumentNodeGen
7368
attributes:
7469
flags = 0
75-
value = 42
70+
children:
71+
childNode_ =
72+
ReadPreArgumentNode
73+
attributes:
74+
flags = 0
75+
index = 0
76+
keywordArguments = false
77+
missingArgumentBehavior = RUNTIME_ERROR
78+
SaveMethodBlockNode
79+
attributes:
80+
flags = 0
81+
slot = 3
7682
IfNodeGen
7783
attributes:
7884
flags = 0
@@ -89,13 +95,13 @@ ast: |
8995
ReadLocalVariableNode
9096
attributes:
9197
flags = 1
92-
frameSlot = 3
98+
frameSlot = 2
9399
type = FRAME_LOCAL
94100
end =
95101
ReadLocalVariableNode
96102
attributes:
97103
flags = 1
98-
frameSlot = 3
104+
frameSlot = 2
99105
type = FRAME_LOCAL
100106
thenBody =
101107
IntegerFixnumLiteralNode

0 commit comments

Comments
 (0)