File tree Expand file tree Collapse file tree 3 files changed +7
-7
lines changed
src/main/java/org/truffleruby Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change 34
34
import org .truffleruby .language .arguments .MissingArgumentBehavior ;
35
35
import org .truffleruby .language .arguments .NotProvidedNode ;
36
36
import org .truffleruby .language .arguments .ProfileArgumentNodeGen ;
37
- import org .truffleruby .language .arguments .ReadBlockNode ;
37
+ import org .truffleruby .language .arguments .ReadBlockFromCurrentFrameArgumentsNode ;
38
38
import org .truffleruby .language .arguments .ReadKeywordArgumentNode ;
39
39
import org .truffleruby .language .arguments .ReadPreArgumentNode ;
40
40
import org .truffleruby .language .arguments .ReadRemainingArgumentsNode ;
@@ -254,7 +254,7 @@ public static RubyNode createCoreMethodNode(NodeFactory<? extends RubyNode> node
254
254
}
255
255
256
256
if (method .needsBlock ()) {
257
- argumentsNodes [i ++] = new ReadBlockNode (NotProvided .INSTANCE );
257
+ argumentsNodes [i ++] = new ReadBlockFromCurrentFrameArgumentsNode (NotProvided .INSTANCE );
258
258
}
259
259
260
260
if (!method .keywordAsOptional ().isEmpty ()) {
Original file line number Diff line number Diff line change 16
16
import org .truffleruby .Layouts ;
17
17
import org .truffleruby .language .RubyNode ;
18
18
19
- public class ReadBlockNode extends RubyNode {
19
+ public class ReadBlockFromCurrentFrameArgumentsNode extends RubyNode {
20
20
21
21
private final Object valueIfAbsent ;
22
22
23
23
private final ConditionProfile nullProfile = ConditionProfile .createBinaryProfile ();
24
24
25
- public ReadBlockNode (Object valueIfAbsent ) {
25
+ public ReadBlockFromCurrentFrameArgumentsNode (Object valueIfAbsent ) {
26
26
this .valueIfAbsent = valueIfAbsent ;
27
27
}
28
28
Original file line number Diff line number Diff line change 25
25
import org .truffleruby .language .arguments .MissingArgumentBehavior ;
26
26
import org .truffleruby .language .arguments .MissingKeywordArgumentNode ;
27
27
import org .truffleruby .language .arguments .ProfileArgumentNodeGen ;
28
- import org .truffleruby .language .arguments .ReadBlockNode ;
28
+ import org .truffleruby .language .arguments .ReadBlockFromCurrentFrameArgumentsNode ;
29
29
import org .truffleruby .language .arguments .ReadKeywordArgumentNode ;
30
30
import org .truffleruby .language .arguments .ReadKeywordRestArgumentNode ;
31
31
import org .truffleruby .language .arguments .ReadOptionalArgumentNode ;
@@ -343,14 +343,14 @@ public RubyNode visitRestArgNode(RestArgParseNode node) {
343
343
}
344
344
345
345
public RubyNode saveMethodBlockArg () {
346
- final RubyNode readNode = new ReadBlockNode (context .getCoreLibrary ().getNil ());
346
+ final RubyNode readNode = new ReadBlockFromCurrentFrameArgumentsNode (context .getCoreLibrary ().getNil ());
347
347
final FrameSlot slot = methodBodyTranslator .getEnvironment ().getFrameDescriptor ().findOrAddFrameSlot (TranslatorEnvironment .METHOD_BLOCK_NAME );
348
348
return new WriteLocalVariableNode (slot , readNode );
349
349
}
350
350
351
351
@ Override
352
352
public RubyNode visitBlockArgNode (BlockArgParseNode node ) {
353
- final RubyNode readNode = new ReadBlockNode (context .getCoreLibrary ().getNil ());
353
+ final RubyNode readNode = new ReadBlockFromCurrentFrameArgumentsNode (context .getCoreLibrary ().getNil ());
354
354
final FrameSlot slot = methodBodyTranslator .getEnvironment ().getFrameDescriptor ().findFrameSlot (node .getName ());
355
355
return new WriteLocalVariableNode (slot , readNode );
356
356
}
You can’t perform that action at this time.
0 commit comments