@SubstrateForeignCallTarget private static int tearDownIsolate() { try { RuntimeSupport.executeTearDownHooks(); if (!JavaThreads.singleton().tearDownVM()) { return CEntryPointErrors.UNSPECIFIED; } return Isolates.tearDownCurrent(); } catch (Throwable t) { logException(t); return CEntryPointErrors.UNCAUGHT_EXCEPTION; } }