Skip to content

Commit

Permalink
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -127,8 +127,7 @@ public ReferenceEqualNode(ReferenceEqualNode prev) {
super(prev);
}

// The @CreateCast is not applied when using this, so the caller needs to unbox itself.
protected abstract boolean executeEqualWithUnboxed(VirtualFrame frame, Object a, Object b);
protected abstract boolean executeReferenceEqual(VirtualFrame frame, Object a, Object b);

@Specialization public boolean equal(boolean a, boolean b) { return a == b; }
@Specialization public boolean equal(int a, int b) { return a == b; }
Original file line number Diff line number Diff line change
@@ -65,7 +65,7 @@ protected boolean areSame(VirtualFrame frame, Object left, Object right) {
CompilerDirectives.transferToInterpreterAndInvalidate();
referenceEqualNode = insert(BasicObjectNodesFactory.ReferenceEqualNodeFactory.create(getContext(), getSourceSection(), new RubyNode[]{null, null}));
}
return referenceEqualNode.executeEqualWithUnboxed(frame, left, right);
return referenceEqualNode.executeReferenceEqual(frame, left, right);
}

protected boolean areEqual(VirtualFrame frame, Object left, Object right) {

0 comments on commit 35814ff

Please sign in to comment.