Skip to content

Commit da2f423

Browse files
committed
Don't create excessive NilLiteralNode at parameters translation
1 parent 901be68 commit da2f423

16 files changed

+9
-134
lines changed

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

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -203,30 +203,6 @@ ast: |
203203
flags = 0
204204
frameSlot = 3
205205
type = FRAME_LOCAL
206-
IfElseNodeGen
207-
attributes:
208-
flags = 0
209-
children:
210-
condition =
211-
ArrayIsAtLeastAsLargeAsNode
212-
attributes:
213-
flags = 0
214-
requiredSize = 1
215-
children:
216-
child =
217-
ReadLocalVariableNode
218-
attributes:
219-
flags = 0
220-
frameSlot = 3
221-
type = FRAME_LOCAL
222-
elseBody =
223-
NilLiteralNode
224-
attributes:
225-
flags = 0
226-
thenBody =
227-
NilLiteralNode
228-
attributes:
229-
flags = 0
230206
]
231207
NilLiteralNode
232208
attributes:

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -279,9 +279,6 @@ ast: |
279279
flags = 0
280280
frameSlot = 2
281281
type = FRAME_LOCAL
282-
NilLiteralNode
283-
attributes:
284-
flags = 0
285282
]
286283
ReadLocalVariableNode
287284
attributes:

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -291,9 +291,6 @@ ast: |
291291
flags = 0
292292
frameSlot = 4
293293
type = FRAME_LOCAL
294-
NilLiteralNode
295-
attributes:
296-
flags = 0
297294
]
298295
NilLiteralNode
299296
attributes:

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -245,9 +245,6 @@ ast: |
245245
flags = 0
246246
frameSlot = 4
247247
type = FRAME_LOCAL
248-
NilLiteralNode
249-
attributes:
250-
flags = 0
251248
]
252249
NilLiteralNode
253250
attributes:

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

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -203,30 +203,6 @@ ast: |
203203
flags = 0
204204
frameSlot = 3
205205
type = FRAME_LOCAL
206-
IfElseNodeGen
207-
attributes:
208-
flags = 0
209-
children:
210-
condition =
211-
ArrayIsAtLeastAsLargeAsNode
212-
attributes:
213-
flags = 0
214-
requiredSize = 1
215-
children:
216-
child =
217-
ReadLocalVariableNode
218-
attributes:
219-
flags = 0
220-
frameSlot = 3
221-
type = FRAME_LOCAL
222-
elseBody =
223-
NilLiteralNode
224-
attributes:
225-
flags = 0
226-
thenBody =
227-
NilLiteralNode
228-
attributes:
229-
flags = 0
230206
]
231207
NilLiteralNode
232208
attributes:

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -284,9 +284,6 @@ ast: |
284284
flags = 0
285285
frameSlot = 2
286286
type = FRAME_LOCAL
287-
NilLiteralNode
288-
attributes:
289-
flags = 0
290287
]
291288
ReadLocalVariableNode
292289
attributes:

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -295,9 +295,6 @@ ast: |
295295
flags = 0
296296
frameSlot = 4
297297
type = FRAME_LOCAL
298-
NilLiteralNode
299-
attributes:
300-
flags = 0
301298
]
302299
NilLiteralNode
303300
attributes:

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -249,9 +249,6 @@ ast: |
249249
flags = 0
250250
frameSlot = 4
251251
type = FRAME_LOCAL
252-
NilLiteralNode
253-
attributes:
254-
flags = 0
255252
]
256253
NilLiteralNode
257254
attributes:

spec/truffle/parsing/fixtures/block/destructuring_array_argument/destructure/when_no_rest_positional_parameter_but_multiple_optional_ones.yaml

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -284,30 +284,6 @@ ast: |
284284
flags = 0
285285
frameSlot = 3
286286
type = FRAME_LOCAL
287-
IfElseNodeGen
288-
attributes:
289-
flags = 0
290-
children:
291-
condition =
292-
ArrayIsAtLeastAsLargeAsNode
293-
attributes:
294-
flags = 0
295-
requiredSize = 0
296-
children:
297-
child =
298-
ReadLocalVariableNode
299-
attributes:
300-
flags = 0
301-
frameSlot = 3
302-
type = FRAME_LOCAL
303-
elseBody =
304-
NilLiteralNode
305-
attributes:
306-
flags = 0
307-
thenBody =
308-
NilLiteralNode
309-
attributes:
310-
flags = 0
311287
]
312288
NilLiteralNode
313289
attributes:

spec/truffle/parsing/fixtures/block/destructuring_array_argument/destructure/when_no_rest_positional_parameter_but_multiple_required_ones.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -229,9 +229,6 @@ ast: |
229229
flags = 0
230230
frameSlot = 3
231231
type = FRAME_LOCAL
232-
NilLiteralNode
233-
attributes:
234-
flags = 0
235232
]
236233
NilLiteralNode
237234
attributes:

0 commit comments

Comments
 (0)