|
89 | 89 | import com.oracle.truffle.api.interop.UnsupportedMessageException;
|
90 | 90 | import com.oracle.truffle.api.profiles.BranchProfile;
|
91 | 91 | import com.oracle.truffle.api.profiles.ConditionProfile;
|
92 |
| -import com.oracle.truffle.llvm.spi.ReferenceLibrary; |
93 | 92 |
|
94 | 93 | public final class CApiContext extends CExtContext {
|
95 | 94 | private static final TruffleLogger LOGGER = PythonLanguage.getLogger(CApiContext.class);
|
@@ -119,7 +118,7 @@ public final class CApiContext extends CExtContext {
|
119 | 118 | @CompilationFinal(dimensions = 1) private final PrimitiveNativeWrapper[] primitiveNativeWrapperCache;
|
120 | 119 |
|
121 | 120 | /** Just used for integrity checks if assertions are enabled. */
|
122 |
| - @CompilationFinal private ReferenceLibrary referenceLibrary; |
| 121 | + @CompilationFinal private InteropLibrary interoplibrary; |
123 | 122 |
|
124 | 123 | /**
|
125 | 124 | * Required to emulate PyLongObject's ABI; number of bits per digit (equal to
|
@@ -523,14 +522,14 @@ PythonAbstractNativeObject createPythonAbstractNativeObject(TruffleObject native
|
523 | 522 |
|
524 | 523 | /**
|
525 | 524 | * Checks if the given {@link NativeObjectReference} objects point to the same native object.
|
526 |
| - * This method lazily initializes {@link #referenceLibrary} as a side-effect. |
| 525 | + * This method lazily initializes {@link #interoplibrary} as a side-effect. |
527 | 526 | */
|
528 | 527 | private boolean isReferenceToSameNativeObject(NativeObjectReference old, NativeObjectReference ref) {
|
529 |
| - if (referenceLibrary == null) { |
| 528 | + if (interoplibrary == null) { |
530 | 529 | CompilerDirectives.transferToInterpreterAndInvalidate();
|
531 |
| - referenceLibrary = ReferenceLibrary.getFactory().getUncached(old.ptrObject); |
| 530 | + interoplibrary = InteropLibrary.getFactory().getUncached(); |
532 | 531 | }
|
533 |
| - return referenceLibrary.isSame(old.ptrObject, ref.ptrObject); |
| 532 | + return interoplibrary.isIdentical(old.ptrObject, ref.ptrObject, interoplibrary); |
534 | 533 | }
|
535 | 534 |
|
536 | 535 | static int idFromRefCnt(long refCnt) {
|
|
0 commit comments