Skip to content

Commit 315e774

Browse files
committed
[GR-17457] Refactor nodes to get rid of CreateCast (part 2)
PullRequest: truffleruby/3882
2 parents 5ac34e6 + cb78ce8 commit 315e774

File tree

187 files changed

+2800
-3123
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

187 files changed

+2800
-3123
lines changed

spec/truffle/parsing/fixtures/and.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ focused_on_node: "org.truffleruby.language.control.AndNode"
44
ruby: |
55
1 and 2
66
ast: |
7-
AndNode
7+
AndNodeGen
88
attributes:
99
flags = 1
1010
children:

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

Lines changed: 55 additions & 67 deletions
Large diffs are not rendered by default.

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

Lines changed: 37 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -45,73 +45,67 @@ ast: |
4545
flags = 12
4646
children:
4747
body = [
48-
IfElseNode
48+
IfElseNodeGen
4949
attributes:
5050
flags = 0
5151
children:
5252
condition =
53-
BooleanCastNodeGen
53+
AndNodeGen
54+
attributes:
55+
flags = 0
5456
children:
55-
valueNode_ =
56-
AndNode
57+
left =
58+
ShouldDestructureNode
59+
attributes:
60+
flags = 0
61+
keywordArguments = false
62+
right =
63+
SequenceNode
5764
attributes:
5865
flags = 0
5966
children:
60-
left =
61-
ShouldDestructureNode
62-
attributes:
63-
flags = 0
64-
keywordArguments = false
65-
right =
66-
SequenceNode
67+
body = [
68+
WriteLocalVariableNode
6769
attributes:
6870
flags = 0
71+
frameSlot = 4
6972
children:
70-
body = [
71-
WriteLocalVariableNode
73+
valueNode =
74+
SplatCastNodeGen
7275
attributes:
76+
conversionMethod = :to_ary
77+
copy = false
7378
flags = 0
74-
frameSlot = 4
79+
nilBehavior = NIL
7580
children:
76-
valueNode =
77-
SplatCastNodeGen
81+
childNode_ =
82+
ProfileArgumentNodeGen
7883
attributes:
79-
conversionMethod = :to_ary
80-
copy = false
8184
flags = 0
82-
nilBehavior = NIL
8385
children:
8486
childNode_ =
85-
ProfileArgumentNodeGen
87+
ReadPreArgumentNode
8688
attributes:
8789
flags = 0
88-
children:
89-
childNode_ =
90-
ReadPreArgumentNode
91-
attributes:
92-
flags = 0
93-
index = 0
94-
keywordArguments = false
95-
missingArgumentBehavior = RUNTIME_ERROR
96-
NotNode
90+
index = 0
91+
keywordArguments = false
92+
missingArgumentBehavior = RUNTIME_ERROR
93+
NotNodeGen
94+
attributes:
95+
flags = 0
96+
children:
97+
child =
98+
IsNilNode
9799
attributes:
98100
flags = 0
99101
children:
100102
child =
101-
BooleanCastNodeGen
102-
children:
103-
valueNode_ =
104-
IsNilNode
105-
attributes:
106-
flags = 0
107-
children:
108-
child =
109-
ReadLocalVariableNode
110-
attributes:
111-
flags = 0
112-
frameSlot = 4
113-
type = FRAME_LOCAL
114-
]
103+
ReadLocalVariableNode
104+
attributes:
105+
flags = 0
106+
frameSlot = 4
107+
type = FRAME_LOCAL
108+
]
115109
elseBody =
116110
SequenceNode
117111
attributes:

0 commit comments

Comments
 (0)