Skip to content

Commit

Permalink
[Truffle] Simplify constructors of RubyCallNode.
Browse files Browse the repository at this point in the history
* rubiniusPrimitive is no more used.
  • Loading branch information
eregon committed Apr 17, 2015
1 parent 073d772 commit 7b6475d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
Expand Up @@ -69,14 +69,14 @@ public class RubyCallNode extends RubyNode {
@CompilerDirectives.CompilationFinal private boolean cannotOptimize;

public RubyCallNode(RubyContext context, SourceSection section, String methodName, RubyNode receiver, RubyNode block, boolean isSplatted, RubyNode... arguments) {
this(context, section, methodName, receiver, block, isSplatted, false, false, arguments);
this(context, section, methodName, receiver, block, isSplatted, false, arguments);
}

public RubyCallNode(RubyContext context, SourceSection section, String methodName, RubyNode receiver, RubyNode block, boolean isSplatted, boolean ignoreVisibility, boolean rubiniusPrimitive, RubyNode... arguments) {
this(context, section, methodName, receiver, block, isSplatted, false, ignoreVisibility, rubiniusPrimitive, arguments);
public RubyCallNode(RubyContext context, SourceSection section, String methodName, RubyNode receiver, RubyNode block, boolean isSplatted, boolean ignoreVisibility, RubyNode... arguments) {
this(context, section, methodName, receiver, block, isSplatted, ignoreVisibility, false, arguments);
}

public RubyCallNode(RubyContext context, SourceSection section, String methodName, RubyNode receiver, RubyNode block, boolean isSplatted, boolean isVCall, boolean ignoreVisibility, boolean rubiniusPrimitive, RubyNode... arguments) {
public RubyCallNode(RubyContext context, SourceSection section, String methodName, RubyNode receiver, RubyNode block, boolean isSplatted, boolean ignoreVisibility, boolean isVCall, RubyNode... arguments) {
super(context, section);

this.methodName = methodName;
Expand Down
Expand Up @@ -558,7 +558,7 @@ private RubyNode translateRubiniusCheckFrozen(SourceSection sourceSection) {
null, false,
new StringLiteralNode(context, sourceSection, ByteList.create("FrozenError: can't modify frozen TODO"), StringSupport.CR_UNKNOWN));

final RubyNode raise = new RubyCallNode(context, sourceSection, "raise", new SelfNode(context, sourceSection), null, false, true, false, constructException);
final RubyNode raise = new RubyCallNode(context, sourceSection, "raise", new SelfNode(context, sourceSection), null, false, true, constructException);

return new IfNode(context, sourceSection,
frozen,
Expand All @@ -584,7 +584,9 @@ public RubyNode visitCallNodeExtraArgument(CallNode node, RubyNode extraArgument

final ArgumentsAndBlockTranslation argumentsAndBlock = translateArgumentsAndBlock(sourceSection, block, args, extraArgument, node.getName());

RubyNode translated = new RubyCallNode(context, sourceSection, node.getName(), receiverTranslated, argumentsAndBlock.getBlock(), argumentsAndBlock.isSplatted(), isVCall, privately || ignoreVisibility, false, argumentsAndBlock.getArguments());
RubyNode translated = new RubyCallNode(context, sourceSection,
node.getName(), receiverTranslated, argumentsAndBlock.getBlock(), argumentsAndBlock.isSplatted(),
privately || ignoreVisibility, isVCall, argumentsAndBlock.getArguments());

// return instrumenter.instrumentAsCall(translated, node.getName());
return translated;
Expand Down Expand Up @@ -2375,8 +2377,7 @@ private RubyNode translateRationalComplex(SourceSection sourceSection, String na
return new RubyCallNode(
context, sourceSection, "convert",
new ReadConstantNode(context, sourceSection, name, moduleNode, lexicalScope),
null, false, true, false,
new RubyNode[]{a, b});
null, false, true, new RubyNode[]{a, b});
}

@Override
Expand Down

0 comments on commit 7b6475d

Please sign in to comment.