Skip to content

Commit f2bd2d2

Browse files
committed
Don't instantiate SourceIndexLength in translators where it's not needed
1 parent 061ab63 commit f2bd2d2

17 files changed

+76
-99
lines changed

spec/truffle/parsing/fixtures/case/with_expression_and_when/with_else_branch.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,8 @@ ast: |
9595
attributes:
9696
flags = 0
9797
frameSlot = 2 # %case_0
98-
sourceCharIndex = 0
99-
sourceLength = 89
98+
sourceCharIndex = -1
99+
sourceLength = 0
100100
type = FRAME_LOCAL
101101
elseBody =
102102
IfElseNodeGen
@@ -127,8 +127,8 @@ ast: |
127127
attributes:
128128
flags = 0
129129
frameSlot = 2 # %case_0
130-
sourceCharIndex = 0
131-
sourceLength = 89
130+
sourceCharIndex = -1
131+
sourceLength = 0
132132
type = FRAME_LOCAL
133133
elseBody =
134134
StringLiteralNode

spec/truffle/parsing/fixtures/case/with_expression_and_when/with_multiple_values.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,8 @@ ast: |
9595
attributes:
9696
flags = 0
9797
frameSlot = 2 # %case_0
98-
sourceCharIndex = 0
99-
sourceLength = 39
98+
sourceCharIndex = -1
99+
sourceLength = 0
100100
type = FRAME_LOCAL
101101
right =
102102
InlinedCaseEqualNodeGen
@@ -120,8 +120,8 @@ ast: |
120120
attributes:
121121
flags = 0
122122
frameSlot = 2 # %case_0
123-
sourceCharIndex = 0
124-
sourceLength = 39
123+
sourceCharIndex = -1
124+
sourceLength = 0
125125
type = FRAME_LOCAL
126126
elseBody =
127127
NilLiteralNode

spec/truffle/parsing/fixtures/case/with_expression_and_when/with_single_value.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,8 @@ ast: |
9494
attributes:
9595
flags = 0
9696
frameSlot = 2 # %case_0
97-
sourceCharIndex = 0
98-
sourceLength = 74
97+
sourceCharIndex = -1
98+
sourceLength = 0
9999
type = FRAME_LOCAL
100100
elseBody =
101101
IfElseNodeGen
@@ -126,8 +126,8 @@ ast: |
126126
attributes:
127127
flags = 0
128128
frameSlot = 2 # %case_0
129-
sourceCharIndex = 0
130-
sourceLength = 74
129+
sourceCharIndex = -1
130+
sourceLength = 0
131131
type = FRAME_LOCAL
132132
elseBody =
133133
NilLiteralNode

spec/truffle/parsing/fixtures/case/with_expression_and_when/with_splat_operator.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ ast: |
7171
attributes:
7272
flags = 0
7373
frameSlot = 2 # %case_0
74-
sourceCharIndex = 0
75-
sourceLength = 28
74+
sourceCharIndex = -1
75+
sourceLength = 0
7676
type = FRAME_LOCAL
7777
]
7878
receiver =

spec/truffle/parsing/fixtures/case/with_expression_and_when/with_splat_operator_and_following_element.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,8 @@ ast: |
9494
attributes:
9595
flags = 0
9696
frameSlot = 2 # %case_0
97-
sourceCharIndex = 0
98-
sourceLength = 32
97+
sourceCharIndex = -1
98+
sourceLength = 0
9999
type = FRAME_LOCAL
100100
]
101101
receiver =

spec/truffle/parsing/fixtures/case/with_expression_and_when/with_splat_operator_and_following_elements.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,8 @@ ast: |
100100
attributes:
101101
flags = 0
102102
frameSlot = 2 # %case_0
103-
sourceCharIndex = 0
104-
sourceLength = 40
103+
sourceCharIndex = -1
104+
sourceLength = 0
105105
type = FRAME_LOCAL
106106
]
107107
receiver =

spec/truffle/parsing/fixtures/case/with_expression_and_when/with_splat_operator_and_preceding_and_following_element.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,8 @@ ast: |
109109
attributes:
110110
flags = 0
111111
frameSlot = 2 # %case_0
112-
sourceCharIndex = 0
113-
sourceLength = 40
112+
sourceCharIndex = -1
113+
sourceLength = 0
114114
type = FRAME_LOCAL
115115
]
116116
receiver =

spec/truffle/parsing/fixtures/case/with_expression_and_when/with_splat_operator_and_preceding_and_following_elements.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,8 @@ ast: |
123123
attributes:
124124
flags = 0
125125
frameSlot = 2 # %case_0
126-
sourceCharIndex = 0
127-
sourceLength = 54
126+
sourceCharIndex = -1
127+
sourceLength = 0
128128
type = FRAME_LOCAL
129129
]
130130
receiver =

spec/truffle/parsing/fixtures/case/with_expression_and_when/with_splat_operator_and_preceding_element.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,8 @@ ast: |
9494
attributes:
9595
flags = 0
9696
frameSlot = 2 # %case_0
97-
sourceCharIndex = 0
98-
sourceLength = 32
97+
sourceCharIndex = -1
98+
sourceLength = 0
9999
type = FRAME_LOCAL
100100
]
101101
receiver =

spec/truffle/parsing/fixtures/case/with_expression_and_when/with_splat_operator_and_preceding_elements.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,8 @@ ast: |
100100
attributes:
101101
flags = 0
102102
frameSlot = 2 # %case_0
103-
sourceCharIndex = 0
104-
sourceLength = 40
103+
sourceCharIndex = -1
104+
sourceLength = 0
105105
type = FRAME_LOCAL
106106
]
107107
receiver =

0 commit comments

Comments
 (0)