@@ -4,10 +4,9 @@ notes: >
4
4
Method parameters are described (as ArgumentDescriptor[]) in the following way:
5
5
- ArgumentDescriptor(name = a, type = keyreq)
6
6
- ArgumentDescriptor(name = b, type = keyreq)
7
- - ArgumentDescriptor(name = %kwrest, type = keyrest )
7
+ - ArgumentDescriptor(name = %kwrest, type = anonkeyrest )
8
8
9
- So the rest keyword arguments are described as a `keyrest` variable with surrogate name `%kwrest`.
10
- # TODO: why not anonrest?
9
+ So the rest keyword arguments are described as a `anonkeyrest` variable with surrogate name `%kwrest`.
11
10
focused_on_node : " org.truffleruby.language.methods.LiteralMethodDefinitionNode"
12
11
ruby : |
13
12
def foo(a:, b:, **)
19
18
flags = 1
20
19
isDefSingleton = false
21
20
name = "foo"
22
- sharedMethodInfo = SharedMethodInfo(sourceSection = SourceSection(source=<parse_ast> [1 - 2], index=0, length=23, characters=def foo(a:, b:, **)\nend), staticLexicalScope = :: Object, arity = Arity{preRequired = 0, optional = 0, hasRest = false, postRequired = 0, keywordArguments = [a, b], requiredKeywordArgumentsCount = 2, hasKeywordsRest = true}, originName = foo, blockDepth = 0, parseName = Object#foo, notes = null, argumentDescriptors = [ArgumentDescriptor(name = a, type = keyreq), ArgumentDescriptor(name = b, type = keyreq), ArgumentDescriptor(name = %kwrest, type = keyrest )])
21
+ sharedMethodInfo = SharedMethodInfo(sourceSection = SourceSection(source=<parse_ast> [1 - 2], index=0, length=23, characters=def foo(a:, b:, **)\nend), staticLexicalScope = :: Object, arity = Arity{preRequired = 0, optional = 0, hasRest = false, postRequired = 0, keywordArguments = [a, b], requiredKeywordArgumentsCount = 2, hasKeywordsRest = true}, originName = foo, blockDepth = 0, parseName = Object#foo, notes = null, argumentDescriptors = [ArgumentDescriptor(name = a, type = keyreq), ArgumentDescriptor(name = b, type = keyreq), ArgumentDescriptor(name = %kwrest, type = anonkeyrest )])
23
22
call targets:
24
23
RubyMethodRootNode
25
24
attributes:
36
35
polyglotRef = org.truffleruby.RubyLanguage@...
37
36
retryProfile = false
38
37
returnID = org.truffleruby.language.control.ReturnID@...
39
- sharedMethodInfo = SharedMethodInfo(sourceSection = SourceSection(source=<parse_ast> [1 - 2], index=0, length=23, characters=def foo(a:, b:, **)\nend), staticLexicalScope = :: Object, arity = Arity{preRequired = 0, optional = 0, hasRest = false, postRequired = 0, keywordArguments = [a, b], requiredKeywordArgumentsCount = 2, hasKeywordsRest = true}, originName = foo, blockDepth = 0, parseName = Object#foo, notes = null, argumentDescriptors = [ArgumentDescriptor(name = a, type = keyreq), ArgumentDescriptor(name = b, type = keyreq), ArgumentDescriptor(name = %kwrest, type = keyrest )])
38
+ sharedMethodInfo = SharedMethodInfo(sourceSection = SourceSection(source=<parse_ast> [1 - 2], index=0, length=23, characters=def foo(a:, b:, **)\nend), staticLexicalScope = :: Object, arity = Arity{preRequired = 0, optional = 0, hasRest = false, postRequired = 0, keywordArguments = [a, b], requiredKeywordArgumentsCount = 2, hasKeywordsRest = true}, originName = foo, blockDepth = 0, parseName = Object#foo, notes = null, argumentDescriptors = [ArgumentDescriptor(name = a, type = keyreq), ArgumentDescriptor(name = b, type = keyreq), ArgumentDescriptor(name = %kwrest, type = anonkeyrest )])
40
39
sourceSection = SourceSection(source=<parse_ast> [1 - 2], index=0, length=23, characters=def foo(a:, b:, **)\nend)
41
40
split = HEURISTIC
42
41
children:
0 commit comments