static void enter(ClosureData user) { CEntryPointActions.enterIsolate(user.isolate()); } }
static void enter(NativeTruffleContext context) { CEntryPointActions.enterIsolate(context.isolate()); } }
static void enter(Isolate isolate) { int code = CEntryPointActions.enterIsolate(isolate); if (code != 0) { CEntryPointActions.failFatally(code, errorMessage.get()); } } }
static void enter(NativeTruffleContext context) { if (CEntryPointActions.enterIsolate(context.isolate()) != 0) { CEntryPointActions.bailoutInPrologue(WordFactory.nullPointer()); } } }
@Uninterruptible(reason = UNINTERRUPTIBLE_REASON) @CEntryPoint(name = "get_current_thread", documentation = { "Given an isolate to which the current thread is attached, returns the address of", "the thread's associated isolate thread structure. If the current thread is not", "attached to the passed isolate or if another error occurs, returns NULL."}) @CEntryPointOptions(prologue = NoPrologue.class, epilogue = NoEpilogue.class, nameTransformation = NameTransformation.class) public static IsolateThread getCurrentThread(Isolate isolate) { int result = CEntryPointActions.enterIsolate(isolate); if (result != 0) { return WordFactory.nullPointer(); } IsolateThread thread = CurrentIsolate.getCurrentThread(); if (CEntryPointActions.leave() != 0) { thread = WordFactory.nullPointer(); } return thread; }
@Uninterruptible(reason = UNINTERRUPTIBLE_REASON) @CEntryPoint @CEntryPointOptions(prologue = NoPrologue.class, epilogue = NoEpilogue.class, publishAs = Publish.NotPublished) @CEntryPointBuiltinImplementation(builtin = Builtin.GET_CURRENT_THREAD) public static IsolateThread getCurrentThread(Isolate isolate) { int status = CEntryPointActions.enterIsolate(isolate); if (status != 0) { return WordFactory.nullPointer(); } IsolateThread thread = CurrentIsolate.getCurrentThread(); if (CEntryPointActions.leave() != 0) { thread = WordFactory.nullPointer(); } return thread; }
static void enter(JNIJavaVMPointer vmBuf, JNIEnvironmentPointer penv, JNIJavaVMInitArgs vmArgs) { if (!SubstrateOptions.SpawnIsolates.getValue()) { int error = CEntryPointActions.enterIsolate((Isolate) CEntryPointSetup.SINGLE_ISOLATE_SENTINEL); if (error != CEntryPointErrors.UNINITIALIZED_ISOLATE) { if (error == CEntryPointErrors.NO_ERROR) { CEntryPointActions.leave(); } CEntryPointActions.bailoutInPrologue(JNIErrors.JNI_EEXIST()); } } if (CEntryPointActions.enterCreateIsolate(WordFactory.nullPointer()) != 0) { CEntryPointActions.bailoutInPrologue(JNIErrors.JNI_ERR()); } } }
static void enter(JNIJavaVM vm, WordPointer env, int version) { if (vm.isNull() || env.isNull()) { CEntryPointActions.bailoutInPrologue(JNIErrors.JNI_ERR()); } if (version != JNI_VERSION_1_8() && version != JNI_VERSION_1_6() && version != JNI_VERSION_1_4() && version != JNI_VERSION_1_2() && version != JNI_VERSION_1_1()) { env.write(WordFactory.nullPointer()); CEntryPointActions.bailoutInPrologue(JNIErrors.JNI_EVERSION()); } if (!CEntryPointActions.isCurrentThreadAttachedTo(vm.getFunctions().getIsolate())) { env.write(WordFactory.nullPointer()); CEntryPointActions.bailoutInPrologue(JNIErrors.JNI_EDETACHED()); } if (CEntryPointActions.enterIsolate(vm.getFunctions().getIsolate()) != 0) { CEntryPointActions.bailoutInPrologue(JNIErrors.JNI_ERR()); } } }