Skip to content

Commit bc873c8

Browse files
committed
Improve printing Truffle AST and print names of special ReturnID and BreakID
1 parent cd47fe8 commit bc873c8

24 files changed

+47
-25
lines changed

spec/truffle/parsing/fixtures/class <<.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ ast: |
3434
instrumentationBits = 0
3535
lock = java.util.concurrent.locks.ReentrantLock@...[Unlocked]
3636
polyglotRef = org.truffleruby.RubyLanguage@...
37-
returnID = org.truffleruby.language.control.ReturnID@...
37+
returnID = MODULE_BODY
3838
sharedMethodInfo = SharedMethodInfo(staticLexicalScope = :: null :: Object, arity = Arity{preRequired = 0, optional = 0, hasRest = false, postRequired = 0, keywordArguments = [], requiredKeywordArgumentsCount = 0, hasKeywordsRest = false}, originName = <singleton class>, blockDepth = 0, parseName = <singleton class>, notes = null, argumentDescriptors = null)
3939
split = NEVER
4040
children:

spec/truffle/parsing/fixtures/classes/class.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ ast: |
4040
instrumentationBits = 0
4141
lock = java.util.concurrent.locks.ReentrantLock@...[Unlocked]
4242
polyglotRef = org.truffleruby.RubyLanguage@...
43-
returnID = org.truffleruby.language.control.ReturnID@...
43+
returnID = MODULE_BODY
4444
sharedMethodInfo = SharedMethodInfo(staticLexicalScope = :: null :: Object, arity = Arity{preRequired = 0, optional = 0, hasRest = false, postRequired = 0, keywordArguments = [], requiredKeywordArgumentsCount = 0, hasKeywordsRest = false}, originName = <class:Foo>, blockDepth = 0, parseName = <class:Foo>, notes = null, argumentDescriptors = null)
4545
split = NEVER
4646
children:

spec/truffle/parsing/fixtures/classes/class_fully_qualified.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ ast: |
3535
instrumentationBits = 0
3636
lock = java.util.concurrent.locks.ReentrantLock@...[Unlocked]
3737
polyglotRef = org.truffleruby.RubyLanguage@...
38-
returnID = org.truffleruby.language.control.ReturnID@...
38+
returnID = MODULE_BODY
3939
sharedMethodInfo = SharedMethodInfo(staticLexicalScope = :: null :: Object, arity = Arity{preRequired = 0, optional = 0, hasRest = false, postRequired = 0, keywordArguments = [], requiredKeywordArgumentsCount = 0, hasKeywordsRest = false}, originName = <class:Foo>, blockDepth = 0, parseName = <class:Foo>, notes = null, argumentDescriptors = null)
4040
split = NEVER
4141
children:

spec/truffle/parsing/fixtures/classes/class_fully_qualified_with_lexical_parent.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ ast: |
3939
instrumentationBits = 0
4040
lock = java.util.concurrent.locks.ReentrantLock@...[Unlocked]
4141
polyglotRef = org.truffleruby.RubyLanguage@...
42-
returnID = org.truffleruby.language.control.ReturnID@...
42+
returnID = MODULE_BODY
4343
sharedMethodInfo = SharedMethodInfo(staticLexicalScope = :: null :: Object, arity = Arity{preRequired = 0, optional = 0, hasRest = false, postRequired = 0, keywordArguments = [], requiredKeywordArgumentsCount = 0, hasKeywordsRest = false}, originName = <class:Bar>, blockDepth = 0, parseName = <class:Bar>, notes = null, argumentDescriptors = null)
4444
split = NEVER
4545
children:

spec/truffle/parsing/fixtures/classes/class_with_empty_body.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ ast: |
4040
instrumentationBits = 0
4141
lock = java.util.concurrent.locks.ReentrantLock@...[Unlocked]
4242
polyglotRef = org.truffleruby.RubyLanguage@...
43-
returnID = org.truffleruby.language.control.ReturnID@...
43+
returnID = MODULE_BODY
4444
sharedMethodInfo = SharedMethodInfo(staticLexicalScope = :: null :: Object, arity = Arity{preRequired = 0, optional = 0, hasRest = false, postRequired = 0, keywordArguments = [], requiredKeywordArgumentsCount = 0, hasKeywordsRest = false}, originName = <class:Foo>, blockDepth = 0, parseName = <class:Foo>, notes = null, argumentDescriptors = null)
4545
split = NEVER
4646
children:

spec/truffle/parsing/fixtures/classes/class_with_lexical_parent.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ ast: |
4343
instrumentationBits = 0
4444
lock = java.util.concurrent.locks.ReentrantLock@...[Unlocked]
4545
polyglotRef = org.truffleruby.RubyLanguage@...
46-
returnID = org.truffleruby.language.control.ReturnID@...
46+
returnID = MODULE_BODY
4747
sharedMethodInfo = SharedMethodInfo(staticLexicalScope = :: null :: Object, arity = Arity{preRequired = 0, optional = 0, hasRest = false, postRequired = 0, keywordArguments = [], requiredKeywordArgumentsCount = 0, hasKeywordsRest = false}, originName = <class:Bar>, blockDepth = 0, parseName = <class:Bar>, notes = null, argumentDescriptors = null)
4848
split = NEVER
4949
children:

spec/truffle/parsing/fixtures/classes/class_with_not_empty_body.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ ast: |
3535
instrumentationBits = 0
3636
lock = java.util.concurrent.locks.ReentrantLock@...[Unlocked]
3737
polyglotRef = org.truffleruby.RubyLanguage@...
38-
returnID = org.truffleruby.language.control.ReturnID@...
38+
returnID = MODULE_BODY
3939
sharedMethodInfo = SharedMethodInfo(staticLexicalScope = :: null :: Object, arity = Arity{preRequired = 0, optional = 0, hasRest = false, postRequired = 0, keywordArguments = [], requiredKeywordArgumentsCount = 0, hasKeywordsRest = false}, originName = <class:Foo>, blockDepth = 0, parseName = <class:Foo>, notes = null, argumentDescriptors = null)
4040
split = NEVER
4141
children:

spec/truffle/parsing/fixtures/classes/class_with_parent.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ ast: |
4747
instrumentationBits = 0
4848
lock = java.util.concurrent.locks.ReentrantLock@...[Unlocked]
4949
polyglotRef = org.truffleruby.RubyLanguage@...
50-
returnID = org.truffleruby.language.control.ReturnID@...
50+
returnID = MODULE_BODY
5151
sharedMethodInfo = SharedMethodInfo(staticLexicalScope = :: null :: Object, arity = Arity{preRequired = 0, optional = 0, hasRest = false, postRequired = 0, keywordArguments = [], requiredKeywordArgumentsCount = 0, hasKeywordsRest = false}, originName = <class:Foo>, blockDepth = 0, parseName = <class:Foo>, notes = null, argumentDescriptors = null)
5252
split = NEVER
5353
children:

spec/truffle/parsing/fixtures/def/name/non_singleton/in_module.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ ast: |
3737
instrumentationBits = 0
3838
lock = java.util.concurrent.locks.ReentrantLock@...[Unlocked]
3939
polyglotRef = org.truffleruby.RubyLanguage@...
40-
returnID = org.truffleruby.language.control.ReturnID@...
40+
returnID = MODULE_BODY
4141
sharedMethodInfo = SharedMethodInfo(staticLexicalScope = :: null :: Object, arity = Arity{preRequired = 0, optional = 0, hasRest = false, postRequired = 0, keywordArguments = [], requiredKeywordArgumentsCount = 0, hasKeywordsRest = false}, originName = <module:A>, blockDepth = 0, parseName = <module:A>, notes = null, argumentDescriptors = null)
4242
split = NEVER
4343
children:

spec/truffle/parsing/fixtures/def/name/singleton/in_module.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ ast: |
3838
instrumentationBits = 0
3939
lock = java.util.concurrent.locks.ReentrantLock@...[Unlocked]
4040
polyglotRef = org.truffleruby.RubyLanguage@...
41-
returnID = org.truffleruby.language.control.ReturnID@...
41+
returnID = MODULE_BODY
4242
sharedMethodInfo = SharedMethodInfo(staticLexicalScope = :: null :: Object, arity = Arity{preRequired = 0, optional = 0, hasRest = false, postRequired = 0, keywordArguments = [], requiredKeywordArgumentsCount = 0, hasKeywordsRest = false}, originName = <module:A>, blockDepth = 0, parseName = <module:A>, notes = null, argumentDescriptors = null)
4343
split = NEVER
4444
children:

0 commit comments

Comments
 (0)