Skip to content

Commit 40030ac

Browse files
committed
Add ReadPointerNode.getUncached
1 parent 0aa1a4d commit 40030ac

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/cext/capi/transitions/CApiTransitions.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -380,8 +380,8 @@ public static void pollReferenceQueue() {
380380
threadState.clearCurrentException();
381381
Object nativeThreadState = PThreadState.getNativeThreadState(threadState);
382382
if (nativeThreadState != null) {
383-
savedNativeException = CStructAccess.ReadPointerNode.getUncached().read(nativeThreadState, CFields.PyThreadState__curexc_type);
384-
CStructAccess.WritePointerNode.getUncached().write(nativeThreadState, CFields.PyThreadState__curexc_type, 0L);
383+
savedNativeException = CStructAccess.ReadPointerNode.readUncached(nativeThreadState, CFields.PyThreadState__curexc_type);
384+
CStructAccess.WritePointerNode.writeUncached(nativeThreadState, CFields.PyThreadState__curexc_type, 0L);
385385
}
386386
}
387387
try {
@@ -449,7 +449,7 @@ public static void pollReferenceQueue() {
449449
threadState.setCurrentException(savedException, savedTraceback);
450450
Object nativeThreadState = PThreadState.getNativeThreadState(threadState);
451451
if (nativeThreadState != null) {
452-
CStructAccess.WritePointerNode.getUncached().write(nativeThreadState, CFields.PyThreadState__curexc_type, savedNativeException);
452+
CStructAccess.WritePointerNode.writeUncached(nativeThreadState, CFields.PyThreadState__curexc_type, savedNativeException);
453453
}
454454
}
455455
}

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/cext/structs/CStructAccess.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -677,6 +677,10 @@ public final Object read(Object pointer, CFields field) {
677677
return execute(pointer, field.offset());
678678
}
679679

680+
public static Object readUncached(Object pointer, CFields field) {
681+
return getUncached().read(pointer, field);
682+
}
683+
680684
public final Object readFromObj(PythonNativeObject self, CFields field) {
681685
return read(self.getPtr(), field);
682686
}

0 commit comments

Comments
 (0)