Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[Truffle] Document and simplify a few cases dealing with visibility i…
…n dispath.
  • Loading branch information
eregon committed Oct 8, 2014
1 parent 5d2e051 commit 89b288b
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 2 deletions.
Expand Up @@ -27,7 +27,7 @@ public abstract class ArrayCastNode extends RubyNode {

public ArrayCastNode(RubyContext context, SourceSection sourceSection) {
super(context, sourceSection);
toArrayNode = new DispatchHeadNode(context, false, Dispatch.MissingBehavior.RETURN_MISSING);
toArrayNode = new DispatchHeadNode(context, Dispatch.MissingBehavior.RETURN_MISSING);
}

public ArrayCastNode(ArrayCastNode prev) {
Expand Down
Expand Up @@ -37,6 +37,7 @@ public static enum NilBehavior {
public SplatCastNode(RubyContext context, SourceSection sourceSection, NilBehavior nilBehavior) {
super(context, sourceSection);
this.nilBehavior = nilBehavior;
// Calling private #to_a is allowed for the *splat operator.
toA = new DispatchHeadNode(context, true, Dispatch.MissingBehavior.RETURN_MISSING);
}

Expand Down
Expand Up @@ -1829,7 +1829,7 @@ public abstract static class InjectNode extends YieldingArrayCoreMethodNode {

public InjectNode(RubyContext context, SourceSection sourceSection) {
super(context, sourceSection);
dispatch = new DispatchHeadNode(context, false, Dispatch.MissingBehavior.CALL_METHOD_MISSING);
dispatch = new DispatchHeadNode(context, Dispatch.MissingBehavior.CALL_METHOD_MISSING);
}

public InjectNode(InjectNode prev) {
Expand Down
Expand Up @@ -455,6 +455,7 @@ public abstract static class DupNode extends CoreMethodNode {

public DupNode(RubyContext context, SourceSection sourceSection) {
super(context, sourceSection);
// Calls private initialize_dup on the new copy.
initializeDupNode = new DispatchHeadNode(context, true, Dispatch.MissingBehavior.CALL_METHOD_MISSING);
}

Expand Down

0 comments on commit 89b288b

Please sign in to comment.