Skip to content

Commit

Permalink
[Truffle] Removed compilation guards.
Browse files Browse the repository at this point in the history
Since moving to Rubinius's Enumerable, these are hot paths that PE in benchmarks.
  • Loading branch information
nirvdrum committed Jan 12, 2015
1 parent 9a0f6da commit 0e46662
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
Expand Up @@ -339,8 +339,6 @@ public BlockGivenNode(BlockGivenNode prev) {

@Specialization
public boolean blockGiven() {
notDesignedForCompilation();

return RubyArguments.getBlock(Truffle.getRuntime().getCallerFrame().getFrame(FrameInstance.FrameAccess.READ_ONLY, false).getArguments()) != null;
}
}
Expand Down
Expand Up @@ -28,8 +28,6 @@ public RubiniusSingleBlockArgNode(RubyContext context, SourceSection sourceSecti

@Override
public Object execute(VirtualFrame frame) {
notDesignedForCompilation();

/**
* This is our implementation of Rubinius.single_block_arg.
*
Expand All @@ -52,7 +50,7 @@ public Object execute(VirtualFrame frame) {
} else {
Object[] extractedArguments = RubyArguments.extractUserArguments(frame.getArguments());

return RubyArray.fromObjects(getContext().getCoreLibrary().getArrayClass(), extractedArguments);
return new RubyArray(getContext().getCoreLibrary().getArrayClass(), extractedArguments, userArgumentCount);
}
}
}
Expand Down

0 comments on commit 0e46662

Please sign in to comment.