Skip to content

Commit 83803b1

Browse files
committed
Change order of declaration local variables for a method/block parameters
1 parent 7875f72 commit 83803b1

16 files changed

+78
-71
lines changed

spec/truffle/parsing/fixtures/block/argument_descriptors/with_double_splat_operator.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ ast: |
2424
RubyProcRootNode
2525
attributes:
2626
callTarget = block in <top (required)>
27-
frameDescriptor = FrameDescriptor@...{#0:(self), #1:other, #2:a, #3:b}
27+
frameDescriptor = FrameDescriptor@...{#0:(self), #1:a, #2:b, #3:other}
2828
instrumentationBits = 0
2929
lock = java.util.concurrent.locks.ReentrantLock@...[Unlocked]
3030
nextProfile = false
@@ -59,7 +59,7 @@ ast: |
5959
WriteLocalVariableNode
6060
attributes:
6161
flags = 0
62-
frameSlot = 2
62+
frameSlot = 1
6363
children:
6464
valueNode =
6565
ReadKeywordArgumentNodeGen
@@ -72,7 +72,7 @@ ast: |
7272
WriteLocalVariableNode
7373
attributes:
7474
flags = 0
75-
frameSlot = 3
75+
frameSlot = 2
7676
children:
7777
valueNode =
7878
ReadKeywordArgumentNodeGen
@@ -85,7 +85,7 @@ ast: |
8585
WriteLocalVariableNode
8686
attributes:
8787
flags = 0
88-
frameSlot = 1
88+
frameSlot = 3
8989
children:
9090
valueNode =
9191
ReadKeywordRestArgumentNode

spec/truffle/parsing/fixtures/block/argument_descriptors/with_double_splat_operator_without_name.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ ast: |
2525
RubyProcRootNode
2626
attributes:
2727
callTarget = block in <top (required)>
28-
frameDescriptor = FrameDescriptor@...{#0:(self), #1:%kwrest, #2:a, #3:b}
28+
frameDescriptor = FrameDescriptor@...{#0:(self), #1:a, #2:b, #3:%kwrest}
2929
instrumentationBits = 0
3030
lock = java.util.concurrent.locks.ReentrantLock@...[Unlocked]
3131
nextProfile = false
@@ -60,7 +60,7 @@ ast: |
6060
WriteLocalVariableNode
6161
attributes:
6262
flags = 0
63-
frameSlot = 2
63+
frameSlot = 1
6464
children:
6565
valueNode =
6666
ReadKeywordArgumentNodeGen
@@ -73,7 +73,7 @@ ast: |
7373
WriteLocalVariableNode
7474
attributes:
7575
flags = 0
76-
frameSlot = 3
76+
frameSlot = 2
7777
children:
7878
valueNode =
7979
ReadKeywordArgumentNodeGen
@@ -86,7 +86,7 @@ ast: |
8686
WriteLocalVariableNode
8787
attributes:
8888
flags = 0
89-
frameSlot = 1
89+
frameSlot = 3
9090
children:
9191
valueNode =
9292
ReadKeywordRestArgumentNode

spec/truffle/parsing/fixtures/block/arity/with_double_splat_operator.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ ast: |
2828
RubyProcRootNode
2929
attributes:
3030
callTarget = block in <top (required)>
31-
frameDescriptor = FrameDescriptor@...{#0:(self), #1:other, #2:a, #3:b}
31+
frameDescriptor = FrameDescriptor@...{#0:(self), #1:a, #2:b, #3:other}
3232
instrumentationBits = 0
3333
lock = java.util.concurrent.locks.ReentrantLock@...[Unlocked]
3434
nextProfile = false
@@ -63,7 +63,7 @@ ast: |
6363
WriteLocalVariableNode
6464
attributes:
6565
flags = 0
66-
frameSlot = 2
66+
frameSlot = 1
6767
children:
6868
valueNode =
6969
ReadKeywordArgumentNodeGen
@@ -76,7 +76,7 @@ ast: |
7676
WriteLocalVariableNode
7777
attributes:
7878
flags = 0
79-
frameSlot = 3
79+
frameSlot = 2
8080
children:
8181
valueNode =
8282
ReadKeywordArgumentNodeGen
@@ -89,7 +89,7 @@ ast: |
8989
WriteLocalVariableNode
9090
attributes:
9191
flags = 0
92-
frameSlot = 1
92+
frameSlot = 3
9393
children:
9494
valueNode =
9595
ReadKeywordRestArgumentNode

spec/truffle/parsing/fixtures/block/parameters_to_local_variables/with_double_splat_operator.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ ast: |
2727
RubyProcRootNode
2828
attributes:
2929
callTarget = block in <top (required)>
30-
frameDescriptor = FrameDescriptor@...{#0:(self), #1:other, #2:a, #3:b}
30+
frameDescriptor = FrameDescriptor@...{#0:(self), #1:a, #2:b, #3:other}
3131
instrumentationBits = 0
3232
lock = java.util.concurrent.locks.ReentrantLock@...[Unlocked]
3333
nextProfile = false
@@ -62,7 +62,7 @@ ast: |
6262
WriteLocalVariableNode
6363
attributes:
6464
flags = 0
65-
frameSlot = 2
65+
frameSlot = 1
6666
children:
6767
valueNode =
6868
ReadKeywordArgumentNodeGen
@@ -75,7 +75,7 @@ ast: |
7575
WriteLocalVariableNode
7676
attributes:
7777
flags = 0
78-
frameSlot = 3
78+
frameSlot = 2
7979
children:
8080
valueNode =
8181
ReadKeywordArgumentNodeGen
@@ -88,7 +88,7 @@ ast: |
8888
WriteLocalVariableNode
8989
attributes:
9090
flags = 0
91-
frameSlot = 1
91+
frameSlot = 3
9292
children:
9393
valueNode =
9494
ReadKeywordRestArgumentNode

spec/truffle/parsing/fixtures/def/argument_descriptors/with_double_splat_operator.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ ast: |
2525
arityForCheck = Arity{preRequired = 0, optional = 0, hasRest = false, postRequired = 0, keywordArguments = [a, b], requiredKeywordArgumentsCount = 2, hasKeywordsRest = true}
2626
callTarget = Object#foo
2727
checkArityProfile = false
28-
frameDescriptor = FrameDescriptor@...{#0:(self), #1:%$~_, #2:other, #3:%method_block_arg, #4:a, #5:b}
28+
frameDescriptor = FrameDescriptor@...{#0:(self), #1:%$~_, #2:a, #3:b, #4:other, #5:%method_block_arg}
2929
instrumentationBits = 0
3030
keywordArguments = true
3131
localReturnProfile = false
@@ -62,11 +62,11 @@ ast: |
6262
SaveMethodBlockNode
6363
attributes:
6464
flags = 0
65-
slot = 3
65+
slot = 5
6666
WriteLocalVariableNode
6767
attributes:
6868
flags = 0
69-
frameSlot = 4
69+
frameSlot = 2
7070
children:
7171
valueNode =
7272
ReadKeywordArgumentNodeGen
@@ -79,7 +79,7 @@ ast: |
7979
WriteLocalVariableNode
8080
attributes:
8181
flags = 0
82-
frameSlot = 5
82+
frameSlot = 3
8383
children:
8484
valueNode =
8585
ReadKeywordArgumentNodeGen
@@ -92,7 +92,7 @@ ast: |
9292
WriteLocalVariableNode
9393
attributes:
9494
flags = 0
95-
frameSlot = 2
95+
frameSlot = 4
9696
children:
9797
valueNode =
9898
ReadKeywordRestArgumentNode

spec/truffle/parsing/fixtures/def/argument_descriptors/with_double_splat_operator_without_name.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ ast: |
2626
arityForCheck = Arity{preRequired = 0, optional = 0, hasRest = false, postRequired = 0, keywordArguments = [a, b], requiredKeywordArgumentsCount = 2, hasKeywordsRest = true}
2727
callTarget = Object#foo
2828
checkArityProfile = false
29-
frameDescriptor = FrameDescriptor@...{#0:(self), #1:%$~_, #2:%kwrest, #3:%method_block_arg, #4:a, #5:b}
29+
frameDescriptor = FrameDescriptor@...{#0:(self), #1:%$~_, #2:a, #3:b, #4:%kwrest, #5:%method_block_arg}
3030
instrumentationBits = 0
3131
keywordArguments = true
3232
localReturnProfile = false
@@ -63,11 +63,11 @@ ast: |
6363
SaveMethodBlockNode
6464
attributes:
6565
flags = 0
66-
slot = 3
66+
slot = 5
6767
WriteLocalVariableNode
6868
attributes:
6969
flags = 0
70-
frameSlot = 4
70+
frameSlot = 2
7171
children:
7272
valueNode =
7373
ReadKeywordArgumentNodeGen
@@ -80,7 +80,7 @@ ast: |
8080
WriteLocalVariableNode
8181
attributes:
8282
flags = 0
83-
frameSlot = 5
83+
frameSlot = 3
8484
children:
8585
valueNode =
8686
ReadKeywordArgumentNodeGen
@@ -93,7 +93,7 @@ ast: |
9393
WriteLocalVariableNode
9494
attributes:
9595
flags = 0
96-
frameSlot = 2
96+
frameSlot = 4
9797
children:
9898
valueNode =
9999
ReadKeywordRestArgumentNode

spec/truffle/parsing/fixtures/def/argument_descriptors/with_keyword_arguments.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ ast: |
2424
arityForCheck = Arity{preRequired = 0, optional = 0, hasRest = false, postRequired = 0, keywordArguments = [a, b], requiredKeywordArgumentsCount = 2, hasKeywordsRest = false}
2525
callTarget = Object#foo
2626
checkArityProfile = false
27-
frameDescriptor = FrameDescriptor@...{#0:(self), #1:%$~_, #2:%method_block_arg, #3:a, #4:b}
27+
frameDescriptor = FrameDescriptor@...{#0:(self), #1:%$~_, #2:a, #3:b, #4:%method_block_arg}
2828
instrumentationBits = 0
2929
keywordArguments = true
3030
localReturnProfile = false
@@ -61,11 +61,11 @@ ast: |
6161
SaveMethodBlockNode
6262
attributes:
6363
flags = 0
64-
slot = 2
64+
slot = 4
6565
WriteLocalVariableNode
6666
attributes:
6767
flags = 0
68-
frameSlot = 3
68+
frameSlot = 2
6969
children:
7070
valueNode =
7171
ReadKeywordArgumentNodeGen
@@ -78,7 +78,7 @@ ast: |
7878
WriteLocalVariableNode
7979
attributes:
8080
flags = 0
81-
frameSlot = 4
81+
frameSlot = 3
8282
children:
8383
valueNode =
8484
ReadKeywordArgumentNodeGen

spec/truffle/parsing/fixtures/def/argument_descriptors/with_optional_keyword_arguments.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ ast: |
2626
arityForCheck = Arity{preRequired = 0, optional = 0, hasRest = false, postRequired = 0, keywordArguments = [a, c, b, d], requiredKeywordArgumentsCount = 2, hasKeywordsRest = false}
2727
callTarget = Object#foo
2828
checkArityProfile = false
29-
frameDescriptor = FrameDescriptor@...{#0:(self), #1:%$~_, #2:%method_block_arg, #3:a, #4:b, #5:c, #6:d}
29+
frameDescriptor = FrameDescriptor@...{#0:(self), #1:%$~_, #2:a, #3:b, #4:c, #5:d, #6:%method_block_arg}
3030
instrumentationBits = 0
3131
keywordArguments = true
3232
localReturnProfile = false
@@ -63,11 +63,11 @@ ast: |
6363
SaveMethodBlockNode
6464
attributes:
6565
flags = 0
66-
slot = 2
66+
slot = 6
6767
WriteLocalVariableNode
6868
attributes:
6969
flags = 0
70-
frameSlot = 3
70+
frameSlot = 2
7171
children:
7272
valueNode =
7373
ReadKeywordArgumentNodeGen
@@ -80,7 +80,7 @@ ast: |
8080
WriteLocalVariableNode
8181
attributes:
8282
flags = 0
83-
frameSlot = 4
83+
frameSlot = 3
8484
children:
8585
valueNode =
8686
ReadKeywordArgumentNodeGen
@@ -98,7 +98,7 @@ ast: |
9898
WriteLocalVariableNode
9999
attributes:
100100
flags = 0
101-
frameSlot = 5
101+
frameSlot = 4
102102
children:
103103
valueNode =
104104
ReadKeywordArgumentNodeGen
@@ -111,7 +111,7 @@ ast: |
111111
WriteLocalVariableNode
112112
attributes:
113113
flags = 0
114-
frameSlot = 6
114+
frameSlot = 5
115115
children:
116116
valueNode =
117117
ReadKeywordArgumentNodeGen

spec/truffle/parsing/fixtures/def/arity/with_double_splat_operator.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ ast: |
2929
arityForCheck = Arity{preRequired = 0, optional = 0, hasRest = false, postRequired = 0, keywordArguments = [a, b], requiredKeywordArgumentsCount = 2, hasKeywordsRest = true}
3030
callTarget = Object#foo
3131
checkArityProfile = false
32-
frameDescriptor = FrameDescriptor@...{#0:(self), #1:%$~_, #2:other, #3:%method_block_arg, #4:a, #5:b}
32+
frameDescriptor = FrameDescriptor@...{#0:(self), #1:%$~_, #2:a, #3:b, #4:other, #5:%method_block_arg}
3333
instrumentationBits = 0
3434
keywordArguments = true
3535
localReturnProfile = false
@@ -66,11 +66,11 @@ ast: |
6666
SaveMethodBlockNode
6767
attributes:
6868
flags = 0
69-
slot = 3
69+
slot = 5
7070
WriteLocalVariableNode
7171
attributes:
7272
flags = 0
73-
frameSlot = 4
73+
frameSlot = 2
7474
children:
7575
valueNode =
7676
ReadKeywordArgumentNodeGen
@@ -83,7 +83,7 @@ ast: |
8383
WriteLocalVariableNode
8484
attributes:
8585
flags = 0
86-
frameSlot = 5
86+
frameSlot = 3
8787
children:
8888
valueNode =
8989
ReadKeywordArgumentNodeGen
@@ -96,7 +96,7 @@ ast: |
9696
WriteLocalVariableNode
9797
attributes:
9898
flags = 0
99-
frameSlot = 2
99+
frameSlot = 4
100100
children:
101101
valueNode =
102102
ReadKeywordRestArgumentNode

0 commit comments

Comments
 (0)