Skip to content

Commit d81e9c3

Browse files
committed
review by Tim
1 parent e3f84e4 commit d81e9c3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/modules/ctypes/CtypesModuleBuiltins.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -803,15 +803,15 @@ Object py_dl_sym(VirtualFrame frame, Object obj, Object name,
803803
@Builtin(name = "_dyld_shared_cache_contains_path", minNumOfPositionalArgs = 1)
804804
@GenerateNodeFactory
805805
protected abstract static class DyldSharedCacheConstainsPath extends PythonBinaryBuiltinNode {
806-
private static boolean hasDynamicLoaderCacheValue = false;
807-
private static boolean hasDynamicLoaderCacheInit = false;
806+
@CompilationFinal private static boolean hasDynamicLoaderCacheValue = false;
807+
@CompilationFinal private static boolean hasDynamicLoaderCacheInit = false;
808808

809809
private static boolean hasDynamicLoaderCache() {
810810
if (hasDynamicLoaderCacheInit) {
811811
return hasDynamicLoaderCacheValue;
812812
}
813813

814-
CompilerDirectives.transferToInterpreter();
814+
CompilerDirectives.transferToInterpreterAndInvalidate();
815815
if (System.getProperty("os.name").contains("Mac")) {
816816
String osVersion = System.getProperty("os.version");
817817
// dynamic linker cache support on os.version >= 11.x
@@ -848,7 +848,7 @@ Object py_dyld_shared_cache_contains_path(VirtualFrame frame, String path,
848848
try {
849849
if (cachedFunction == null) {
850850
String name = "_dyld_shared_cache_contains_path";
851-
CompilerDirectives.transferToInterpreter();
851+
CompilerDirectives.transferToInterpreterAndInvalidate();
852852
DLHandler handle = DlOpenNode.loadNFILibrary(getContext(), NFIBackend.NATIVE, "", RTLD_LOCAL.getValueIfDefined());
853853
Object sym = ilib.readMember(handle.getLibrary(), name);
854854
// bool _dyld_shared_cache_contains_path(const char* path)

0 commit comments

Comments
 (0)