Skip to content

Commit

Permalink
[Truffle] Keep the same terminology: ignoreVisibility instead of obsc…
Browse files Browse the repository at this point in the history
…ure fcall.

* There is also vcall so fcall is just not good enough.
  • Loading branch information
eregon committed Oct 10, 2014
1 parent 8ec4a4a commit 467c5e3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions core/src/main/java/org/jruby/truffle/nodes/RubyCallNode.java
Expand Up @@ -50,13 +50,13 @@ public class RubyCallNode extends RubyNode {
@Child protected DispatchHeadNode respondToMissing;
@Child protected BooleanCastNode respondToMissingCast;

private final boolean fcall;
private final boolean ignoreVisibility;

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);
}

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

this.methodName = methodName;
Expand All @@ -72,11 +72,11 @@ public RubyCallNode(RubyContext context, SourceSection section, String methodNam
this.arguments = arguments;
this.isSplatted = isSplatted;

dispatchHead = new DispatchHeadNode(context, fcall, rubiniusPrimitive, Dispatch.MissingBehavior.CALL_METHOD_MISSING);
respondToMissing = new DispatchHeadNode(context, fcall, Dispatch.MissingBehavior.RETURN_MISSING);
dispatchHead = new DispatchHeadNode(context, ignoreVisibility, rubiniusPrimitive, Dispatch.MissingBehavior.CALL_METHOD_MISSING);
respondToMissing = new DispatchHeadNode(context, ignoreVisibility, Dispatch.MissingBehavior.RETURN_MISSING);
respondToMissingCast = BooleanCastNodeFactory.create(context, section, null);

this.fcall = fcall;
this.ignoreVisibility = ignoreVisibility;
}

@Override
Expand Down Expand Up @@ -204,7 +204,7 @@ public Object isDefined(VirtualFrame frame) {
}
} else if (method.isUndefined()) {
return NilPlaceholder.INSTANCE;
} else if (!fcall && !method.isVisibleTo(this, self)) {
} else if (!ignoreVisibility && !method.isVisibleTo(this, self)) {
return NilPlaceholder.INSTANCE;
}

Expand Down
Expand Up @@ -277,7 +277,7 @@ public RubyNode visitCallNode(CallNode node) {
/**
* See translateDummyAssignment to understand what this is for.
*/
public RubyNode visitCallNodeExtraArgument(CallNode node, RubyNode extraArgument, boolean fcall) {
public RubyNode visitCallNodeExtraArgument(CallNode node, RubyNode extraArgument, boolean ignoreVisibility) {
final SourceSection sourceSection = translate(node.getPosition());

final RubyNode receiverTranslated = node.getReceiverNode().accept(this);
Expand All @@ -300,7 +300,7 @@ public RubyNode visitCallNodeExtraArgument(CallNode node, RubyNode extraArgument
new RescueNode[] {new RescueAnyNode(context, sourceSection, new NilLiteralNode(context, sourceSection))},
new NilLiteralNode(context, sourceSection));
} else {
translated = new RubyCallNode(context, sourceSection, node.getName(), receiverTranslated, argumentsAndBlock.getBlock(), argumentsAndBlock.isSplatted(), fcall, false, argumentsAndBlock.getArguments());
translated = new RubyCallNode(context, sourceSection, node.getName(), receiverTranslated, argumentsAndBlock.getBlock(), argumentsAndBlock.isSplatted(), ignoreVisibility, false, argumentsAndBlock.getArguments());
}

// return instrumenter.instrumentAsCall(translated, node.getName());
Expand Down

0 comments on commit 467c5e3

Please sign in to comment.