Skip to content

Commit 36ef931

Browse files
committed
[GR-45043] Translate more nodes in YARPTranslator
PullRequest: truffleruby/4065
2 parents 8e0054c + d063e40 commit 36ef931

File tree

201 files changed

+2015
-932
lines changed

Some content is hidden

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

201 files changed

+2015
-932
lines changed

spec/tags/truffle/parsing/parsing_tags.txt

Lines changed: 6 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,13 @@ fails:Parsing a BEGIN block (BEGIN { ... }) case is parsed correctly
22
fails:Parsing a END block (END { ... }) case is parsed correctly
33
fails:Parsing a Encoding keyword (__ENCODING__ keyword) case is parsed correctly
44
fails:Parsing a begin ... end block (with multiple expressions inside a block) case is parsed correctly
5-
65
# issue with implicit rest parameters is tracked here:
76
# - https://bugs.ruby-lang.org/issues/19971
87
# - https://github.com/ruby/prism/issues/1722
98
fails:Parsing a Block (Argument descriptors / with implicit rest parameter (|a,|)) case is parsed correctly
109
fails:Parsing a Block (Arity / with implicit rest parameter (|a,|)) case is parsed correctly
11-
12-
fails:Parsing a class << (reopen an object singleton class) case is parsed correctly
1310
fails:Parsing a Complex number (Complex literal `bri` (without real part) where b is Float is represented as `Complext.convert(0, Rational.convert(b*100, 100))` where 100 is some power of 10 to convert b to Integer) case is parsed correctly
14-
fails:Parsing a Complex number (Complex literal `bri` (without real part) where b is Integer is represented as `Complext.convert(0, Rational.convert(b, 1))`) case is parsed correctly
15-
fails:Parsing a Complex number (Complex literal in format of a + bi is represented as `a + Complex.convert(0, b)`) case is parsed correctly
16-
fails:Parsing a Def (Name / Non singleton / in an anonymous module) case is parsed correctly
17-
fails:Parsing a Def (Name / Singleton / in an anonymous module) case is parsed correctly
18-
fails:Parsing a defined? (with yield in a method body (defined? yield)) case is parsed correctly
19-
fails:Parsing a Ensure keyword (ensure in a method) case is parsed correctly
2011
fails:Parsing a For operator (for ... in ... operator) case is parsed correctly
21-
fails:Parsing a Integer (when doesn't fit into Java Long (>= 64 bits)) case is parsed correctly
22-
fails:Parsing a Method call (super / in a method body with explicit arguments) case is parsed correctly
23-
fails:Parsing a Method call (super / in a method body without explicit arguments) case is parsed correctly
24-
fails:Parsing a Method call (super / outside a method body with explicit arguments) case is parsed correctly
25-
fails:Parsing a Method call (super / outside a method body without explicit arguments) case is parsed correctly
26-
fails:Parsing a Method call (super / in a method body with explicit arguments) case is parsed correctly
27-
fails:Parsing a Method call (super / in a method body without explicit arguments) case is parsed correctly
28-
fails:Parsing a Method call (super / outside a method body with explicit arguments) case is parsed correctly
29-
fails:Parsing a Method call (super / outside a method body without explicit arguments) case is parsed correctly
3012
fails:Parsing a &&= (Assign an attribute local variable (a.b &&= c)) case is parsed correctly
3113
fails:Parsing a &&= (Assign an referenced element (a[b] &&= c)) case is parsed correctly
3214
fails:Parsing a &&= (Assign an element referenced with multiple indexes (a[b, c, d] &&= e)) case is parsed correctly
@@ -36,44 +18,22 @@ fails:Parsing a &&= (Variable assignment/fully qualified constant (::A &&= b)) c
3618
fails:Parsing a &&= (Variable assignment/global variable ($a &&= b)) case is parsed correctly
3719
fails:Parsing a &&= (Variable assignment/instance variable (@a &&= b)) case is parsed correctly
3820
fails:Parsing a &&= (Variable assignment/local variable (a &&= b)) case is parsed correctly
39-
fails:Parsing a Match (=~ operator) case is parsed correctly
40-
fails:Parsing a Match (=~ operator/with Regexp literal as a RHS) case is parsed correctly
41-
fails:Parsing a Match (=~ operator/with Regexp literal as a LHS (without named capture groups)) case is parsed correctly
4221
fails:Parsing a Match (=~ operator/with Regexp literal as a LHS without interpolation and with named capture groups) case is parsed correctly
4322
fails:Parsing a Parentheses operator (empty) case is parsed correctly
4423
fails:Parsing a Parentheses operator (with multiple expressions, e.g. (1; 2; 3)) case is parsed correctly
4524
fails:Parsing a Parentheses operator (with single expression) case is parsed correctly
4625
fails:Parsing a ||= (Assign an attribute of a local variable (a.b ||= c)) case is parsed correctly
4726
fails:Parsing a ||= (Assign an referenced element (a[b] ||= c)) case is parsed correctly
4827
fails:Parsing a ||= (Assign an element referenced with multiple indexes (a[b, c, d] ||= e)) case is parsed correctly
49-
fails:Parsing a ||= (Variable assignment/class variable (@@a ||= b)) case is parsed correctly
5028
fails:Parsing a ||= (Variable assignment/constant (A ||= b)) case is parsed correctly
5129
fails:Parsing a ||= (Variable assignment/fully qualified constant (::A ||= b)) case is parsed correctly
52-
fails:Parsing a ||= (Variable assignment/global variable ($a ||= b)) case is parsed correctly
53-
fails:Parsing a ||= (Variable assignment/instance variable (@a ||= b)) case is parsed correctly
54-
fails:Parsing a ||= (Variable assignment/local variable (a ||= b)) case is parsed correctly
55-
fails:Parsing a Range (Beginningless Range literal ..b) case is parsed correctly
56-
fails:Parsing a Range (Endless Range literal a..) case is parsed correctly
57-
fails:Parsing a Range (Range literal a...b (with excluded end)) case is parsed correctly
58-
fails:Parsing a Range (Range literal a..b (with included end)) case is parsed correctly
59-
fails:Parsing a Range (When Range boundaries are Integer values) case is parsed correctly
60-
fails:Parsing a Range (When Range boundaries are big Integer values (that don't fit into Java int, so > 2**32)) case is parsed correctly
6130
fails:Parsing a Rational number (with big Integer value (>= 2^64).) case is parsed correctly
6231
fails:Parsing a Rational number (with Float value) case is parsed correctly
63-
fails:Parsing a Rational number (with Integer value) case is parsed correctly
64-
fails:Parsing a Rational number (with negative value) case is parsed correctly
6532
fails:Parsing a Regexp (Regexp literal in boolean context (e.g. condition in if, while, etc)) case is parsed correctly
6633
fails:Parsing a Regexp (Regexp literal in boolean context with interpolation (e.g. condition in if, while, etc)) case is parsed correctly
67-
fails:Parsing a Regexp (a literal) case is parsed correctly
68-
fails:Parsing a Regexp (a literal with interpolation (with #{...})) case is parsed correctly
69-
fails:Parsing a Regexp (a literal with interpolation but without expression (#{})) case is parsed correctly
70-
fails:Parsing a Regexp (a literal with options (e.g. i, x, m, o)) case is parsed correctly
71-
fails:Parsing a Regexp (with named captured group (/(?<a>b)/)) case is parsed correctly
7234
fails:Parsing a Rescue keyword (backtrace optimization / disabled / when rescue section is Range (... rescue 1..3)) case is parsed correctly
7335
fails:Parsing a Rescue keyword (backtrace optimization / disabled / when rescue section is Regexp (... rescue /a/)) case is parsed correctly
7436
fails:Parsing a Rescue keyword (backtrace optimization / enabled / when rescue section is __FILE__ constant (... rescue __FILE__)) case is parsed correctly
75-
fails:Parsing a Rescue keyword (backtrace optimization / enabled / when rescue section is local variable defined in outer scope (... rescue a)) case is parsed correctly
76-
fails:Parsing a Rescue keyword (rescue in a method) case is parsed correctly
7737
fails:Parsing a Rescue keyword (modifier / backtrace optimization / disabled / when rescue section is Range (... rescue 1..3)) case is parsed correctly
7838
fails:Parsing a Rescue keyword (modifier / backtrace optimization / disabled / when rescue section is Regexp (... rescue /a/)) case is parsed correctly
7939
fails:Parsing a Rescue keyword (modifier / backtrace optimization / enabled / when rescue section is __FILE__ constant (... rescue __FILE__)) case is parsed correctly
@@ -87,14 +47,14 @@ fails:Parsing a String (Literal with interpolation when expressions are Strings)
8747
fails:Parsing a Symbol (Literal with interpolation when expressions are % String literals) case is parsed correctly
8848
fails:Parsing a Symbol (Literal with interpolation when expressions are Strings) case is parsed correctly
8949
fails:Parsing a Undef (with multiple Symbols) case is parsed correctly
90-
fails:Parsing a Yield (yield operator with arguments) case is parsed correctly
91-
fails:Parsing a Yield (yield operator with keyword arguments) case is parsed correctly
92-
fails:Parsing a Yield (yield operator with double splat operator (yield **a)) case is parsed correctly
9350
fails:Parsing a Yield (yield operator with splat operator (yield *a)) case is parsed correctly
9451
fails:Parsing a Yield (yield operator with splat operator with multiple following positional arguments (yield *a, b, c)) case is parsed correctly
9552
fails:Parsing a Yield (yield operator with splat operator with multiple preceding and following positional arguments (yield a, *b, c)) case is parsed correctly
96-
fails:Parsing a Yield (yield operator with splat operator with multiple preceding positional arguments (yield a, b, *c)) case is parsed correctly
9753
fails:Parsing a Yield (yield operator with splat operator with a single following positional argument (yield *a, b)) case is parsed correctly
9854
fails:Parsing a Yield (yield operator with splat operator with a single preceding and following positional argument (yield a, *b, c)) case is parsed correctly
99-
fails:Parsing a Yield (yield operator with splat operator with a single preceding positional argument (yield a, *b)) case is parsed correctly
100-
fails:Parsing a Yield (yield operator without arguments) case is parsed correctly
55+
fails:Parsing a Method call (super / outside a method body without explicit arguments) case is parsed correctly
56+
fails:Parsing a += (Assign an attribute local variable (a.b += c)) case is parsed correctly
57+
fails:Parsing a += (Assign an referenced element (a[b] += c)) case is parsed correctly
58+
fails:Parsing a += (Assign an element referenced with multiple indexes (a[b, c, d] += e)) case is parsed correctly
59+
fails:Parsing a += (Variable assignment/constant (A += b)) case is parsed correctly
60+
fails:Parsing a += (Variable assignment/fully qualified constant (::A += b)) case is parsed correctly

spec/truffle/parsing/fixtures/BEGIN.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ ast: |
1919
WriteLocalVariableNode
2020
attributes:
2121
flags = 0
22-
frameSlot = 0
22+
frameSlot = 0 # (self)
2323
children:
2424
valueNode =
2525
ProfileArgumentNodeGen

spec/truffle/parsing/fixtures/END.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ ast: |
3030
child =
3131
RubyCallNode
3232
attributes:
33-
descriptor = org.truffleruby.language.arguments.NoKeywordArgumentsDescriptor@...
33+
descriptor = NoKeywordArgumentsDescriptor
3434
dispatchConfig = PROTECTED
3535
emptyKeywordsProfile = false
3636
flags = 0
@@ -82,7 +82,7 @@ ast: |
8282
WriteLocalVariableNode
8383
attributes:
8484
flags = 0
85-
frameSlot = 0
85+
frameSlot = 0 # (self)
8686
children:
8787
valueNode =
8888
ProfileArgumentNodeGen

spec/truffle/parsing/fixtures/begin_end_block.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ ast: |
2121
WriteLocalVariableNode
2222
attributes:
2323
flags = 0
24-
frameSlot = 0
24+
frameSlot = 0 # (self)
2525
children:
2626
valueNode =
2727
ProfileArgumentNodeGen

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

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ ast: |
5959
WriteLocalVariableNode
6060
attributes:
6161
flags = 0
62-
frameSlot = 3
62+
frameSlot = 3 # %destructure_1
6363
children:
6464
valueNode =
6565
SplatCastNodeGen
@@ -94,7 +94,7 @@ ast: |
9494
ReadLocalVariableNode
9595
attributes:
9696
flags = 0
97-
frameSlot = 3
97+
frameSlot = 3 # %destructure_1
9898
type = FRAME_LOCAL
9999
]
100100
elseBody =
@@ -106,7 +106,7 @@ ast: |
106106
WriteLocalVariableNode
107107
attributes:
108108
flags = 0
109-
frameSlot = 0
109+
frameSlot = 0 # (self)
110110
children:
111111
valueNode =
112112
ProfileArgumentNodeGen
@@ -120,7 +120,7 @@ ast: |
120120
WriteLocalVariableNode
121121
attributes:
122122
flags = 0
123-
frameSlot = 1
123+
frameSlot = 1 # a
124124
children:
125125
valueNode =
126126
ProfileArgumentNodeGen
@@ -137,7 +137,7 @@ ast: |
137137
WriteLocalVariableNode
138138
attributes:
139139
flags = 0
140-
frameSlot = 2
140+
frameSlot = 2 # %anonymous_rest
141141
children:
142142
valueNode =
143143
ReadRestArgumentNode
@@ -157,7 +157,7 @@ ast: |
157157
WriteLocalVariableNode
158158
attributes:
159159
flags = 0
160-
frameSlot = 0
160+
frameSlot = 0 # (self)
161161
children:
162162
valueNode =
163163
ProfileArgumentNodeGen
@@ -171,7 +171,7 @@ ast: |
171171
WriteLocalVariableNode
172172
attributes:
173173
flags = 0
174-
frameSlot = 1
174+
frameSlot = 1 # a
175175
children:
176176
valueNode =
177177
ArrayIndexNodesFactory$ReadConstantIndexNodeGen
@@ -183,12 +183,12 @@ ast: |
183183
ReadLocalVariableNode
184184
attributes:
185185
flags = 0
186-
frameSlot = 3
186+
frameSlot = 3 # %destructure_1
187187
type = FRAME_LOCAL
188188
WriteLocalVariableNode
189189
attributes:
190190
flags = 0
191-
frameSlot = 2
191+
frameSlot = 2 # %anonymous_rest
192192
children:
193193
valueNode =
194194
ArraySliceNodeGen
@@ -201,7 +201,7 @@ ast: |
201201
ReadLocalVariableNode
202202
attributes:
203203
flags = 0
204-
frameSlot = 3
204+
frameSlot = 3 # %destructure_1
205205
type = FRAME_LOCAL
206206
]
207207
NilLiteralNode

0 commit comments

Comments
 (0)