Skip to content

Commit 5f78ee1

Browse files
committed
System.identityHashCode() no longer needs a TruffleBoundary
* It used to be needed on SubstrateVM, but not anymore. (cherry picked from commit 55171c9)
1 parent 0d0b612 commit 5f78ee1

File tree

2 files changed

+0
-6
lines changed

2 files changed

+0
-6
lines changed

src/main/java/org/truffleruby/core/kernel/KernelNodes.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -965,19 +965,16 @@ protected long hashBignum(RubyBignum value) {
965965
return HashOperations.hashBignum(value, getContext(), this);
966966
}
967967

968-
@TruffleBoundary
969968
@Specialization
970969
protected int hash(Nil self) {
971970
return System.identityHashCode(self);
972971
}
973972

974-
@TruffleBoundary
975973
@Specialization
976974
protected int hashEncoding(RubyEncoding self) {
977975
return System.identityHashCode(self);
978976
}
979977

980-
@TruffleBoundary
981978
@Specialization(guards = "!isRubyBignum(self)")
982979
protected int hash(RubyDynamicObject self) {
983980
return System.identityHashCode(self);

src/main/java/org/truffleruby/debug/TruffleDebugNodes.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -549,13 +549,11 @@ public abstract static class ForeignObjectNode extends CoreMethodArrayArgumentsN
549549

550550
@ExportLibrary(InteropLibrary.class)
551551
public static class ForeignObject implements TruffleObject {
552-
@TruffleBoundary
553552
@ExportMessage
554553
protected TriState isIdenticalOrUndefined(Object other) {
555554
return other instanceof ForeignObject ? TriState.valueOf(this == other) : TriState.UNDEFINED;
556555
}
557556

558-
@TruffleBoundary
559557
@ExportMessage
560558
protected int identityHashCode() {
561559
return System.identityHashCode(this);
@@ -567,7 +565,6 @@ protected String toDisplayString(boolean allowSideEffects) {
567565
}
568566
}
569567

570-
@TruffleBoundary
571568
@Specialization
572569
protected Object foreignObject() {
573570
return new ForeignObject();

0 commit comments

Comments
 (0)