-
Notifications
You must be signed in to change notification settings - Fork 185
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[GR-45043] Integrate YARP parser [Part 3]
PullRequest: truffleruby/3907
- Loading branch information
Showing
109 changed files
with
2,515 additions
and
400 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
spec/truffle/parsing/fixtures/break/with_multiple_arguments.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...parsing/fixtures/break/with_argument.yaml → .../fixtures/break/with_single_argument.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
66 changes: 66 additions & 0 deletions
66
spec/truffle/parsing/fixtures/break/with_splat_operator_and_following_argument.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
subject: "Break" | ||
description: "with splat operator and following argument (break *a, b)" | ||
notes: > | ||
Arguments are represented with combination of: | ||
- ArrayConcatNode | ||
- SplatCastNodeGen | ||
- ArrayLiteralNode$UninitialisedArrayLiteralNode | ||
nodes | ||
yarp_specific: true # Simplified AST and replaced ArrayAppendOneNodeGen by concatenating with array of one element | ||
focused_on_node: "org.truffleruby.language.control.BreakNode" | ||
ruby: | | ||
while true | ||
break *foo, 42 | ||
end | ||
ast: | | ||
BreakNode | ||
attributes: | ||
breakID = org.truffleruby.language.control.BreakID@... | ||
flags = 1 | ||
ignoreMarker = true | ||
children: | ||
child = | ||
ArrayConcatNode | ||
attributes: | ||
flags = 0 | ||
children: | ||
children = [ | ||
SplatCastNodeGen | ||
attributes: | ||
conversionMethod = :to_a | ||
copy = true | ||
flags = 0 | ||
nilBehavior = CONVERT | ||
children: | ||
childNode_ = | ||
RubyCallNode | ||
attributes: | ||
descriptor = org.truffleruby.language.arguments.EmptyArgumentsDescriptor@... | ||
dispatchConfig = PRIVATE | ||
emptyKeywordsProfile = false | ||
flags = 0 | ||
isAttrAssign = false | ||
isSafeNavigation = false | ||
isSplatted = false | ||
isVCall = true | ||
lastArgIsNotHashProfile = false | ||
methodName = "foo" | ||
notEmptyKeywordsProfile = false | ||
notRuby2KeywordsHashProfile = false | ||
children: | ||
receiver = | ||
SelfNode | ||
attributes: | ||
flags = 0 | ||
ArrayLiteralNode$UninitialisedArrayLiteralNode | ||
attributes: | ||
flags = 0 | ||
language = org.truffleruby.RubyLanguage@... | ||
children: | ||
values = [ | ||
IntegerFixnumLiteralNode | ||
attributes: | ||
flags = 0 | ||
value = 42 | ||
] | ||
] |
71 changes: 71 additions & 0 deletions
71
spec/truffle/parsing/fixtures/break/with_splat_operator_and_following_arguments.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
subject: "Break" | ||
description: "with splat operator and following arguments (break *a, b, ...)" | ||
notes: > | ||
Arguments are represented with combination of: | ||
- ArrayConcatNode | ||
- SplatCastNodeGen | ||
- ArrayLiteralNode$UninitialisedArrayLiteralNode | ||
nodes | ||
yarp_specific: true # Removed excessive SplatCastNodeGen: | ||
# SplatCastNodeGen(UninitialisedArrayLiteralNode) -> UninitialisedArrayLiteralNode | ||
focused_on_node: "org.truffleruby.language.control.BreakNode" | ||
ruby: | | ||
while true | ||
break *foo, 42, 100500 | ||
end | ||
ast: | | ||
BreakNode | ||
attributes: | ||
breakID = org.truffleruby.language.control.BreakID@... | ||
flags = 1 | ||
ignoreMarker = true | ||
children: | ||
child = | ||
ArrayConcatNode | ||
attributes: | ||
flags = 0 | ||
children: | ||
children = [ | ||
SplatCastNodeGen | ||
attributes: | ||
conversionMethod = :to_a | ||
copy = true | ||
flags = 0 | ||
nilBehavior = CONVERT | ||
children: | ||
childNode_ = | ||
RubyCallNode | ||
attributes: | ||
descriptor = org.truffleruby.language.arguments.EmptyArgumentsDescriptor@... | ||
dispatchConfig = PRIVATE | ||
emptyKeywordsProfile = false | ||
flags = 0 | ||
isAttrAssign = false | ||
isSafeNavigation = false | ||
isSplatted = false | ||
isVCall = true | ||
lastArgIsNotHashProfile = false | ||
methodName = "foo" | ||
notEmptyKeywordsProfile = false | ||
notRuby2KeywordsHashProfile = false | ||
children: | ||
receiver = | ||
SelfNode | ||
attributes: | ||
flags = 0 | ||
ArrayLiteralNode$UninitialisedArrayLiteralNode | ||
attributes: | ||
flags = 0 | ||
language = org.truffleruby.RubyLanguage@... | ||
children: | ||
values = [ | ||
IntegerFixnumLiteralNode | ||
attributes: | ||
flags = 0 | ||
value = 42 | ||
IntegerFixnumLiteralNode | ||
attributes: | ||
flags = 0 | ||
value = 100500 | ||
] | ||
] |
Oops, something went wrong.