Skip to content

Commit 0e46662

Browse files
committed
[Truffle] Removed compilation guards.
Since moving to Rubinius's Enumerable, these are hot paths that PE in benchmarks.
1 parent 9a0f6da commit 0e46662

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

core/src/main/java/org/jruby/truffle/nodes/core/KernelNodes.java

-2
Original file line numberDiff line numberDiff line change
@@ -339,8 +339,6 @@ public BlockGivenNode(BlockGivenNode prev) {
339339

340340
@Specialization
341341
public boolean blockGiven() {
342-
notDesignedForCompilation();
343-
344342
return RubyArguments.getBlock(Truffle.getRuntime().getCallerFrame().getFrame(FrameInstance.FrameAccess.READ_ONLY, false).getArguments()) != null;
345343
}
346344
}

core/src/main/java/org/jruby/truffle/nodes/rubinius/RubiniusSingleBlockArgNode.java

+1-3
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ public RubiniusSingleBlockArgNode(RubyContext context, SourceSection sourceSecti
2828

2929
@Override
3030
public Object execute(VirtualFrame frame) {
31-
notDesignedForCompilation();
32-
3331
/**
3432
* This is our implementation of Rubinius.single_block_arg.
3533
*
@@ -52,7 +50,7 @@ public Object execute(VirtualFrame frame) {
5250
} else {
5351
Object[] extractedArguments = RubyArguments.extractUserArguments(frame.getArguments());
5452

55-
return RubyArray.fromObjects(getContext().getCoreLibrary().getArrayClass(), extractedArguments);
53+
return new RubyArray(getContext().getCoreLibrary().getArrayClass(), extractedArguments, userArgumentCount);
5654
}
5755
}
5856
}

0 commit comments

Comments
 (0)