src/hotspot/share/jvmci/jvmciEnv.hpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File
*** old/src/hotspot/share/jvmci/jvmciEnv.hpp	Sat May  4 16:22:24 2019
--- new/src/hotspot/share/jvmci/jvmciEnv.hpp	Sat May  4 16:22:23 2019

*** 34,52 **** --- 34,43 ---- class JVMCIObjectArray; class JVMCIPrimitiveArray; class JVMCICompiler; class JVMCIRuntime; // Bring the JVMCI compiler thread into the VM state. #define JVMCI_VM_ENTRY_MARK \ JavaThread* thread = JavaThread::current(); \ ThreadInVMfromNative __tiv(thread); \ ResetNoHandleMark rnhm; \ HandleMarkCleaner __hm(thread); \ Thread* THREAD = thread; \ debug_only(VMNativeEntryWrapper __vew;) #define JVMCI_EXCEPTION_CONTEXT \ JavaThread* thread=JavaThread::current(); \ Thread* THREAD = thread; // Helper to log more context on a JNI exception
*** 152,174 **** --- 143,166 ---- static char* _shared_library_path; // argument to os:dll_load static void* _shared_library_handle; // result of os::dll_load static JavaVM* _shared_library_javavm; // result of calling JNI_CreateJavaVM in shared library // Attaches the current thread to the JavaVM in the shared library, // initializing the shared library VM first if necessary. // Returns the JNI interface pointer of the current thread. // The _shared_library_* fields are initialized by the first // call to this method. static JNIEnv* attach_shared_library(); + // Initializes the shared library JavaVM if not already initialized. + // Returns the JNI interface pointer for the current thread + // if initialization was performed by this call, NULL if + // initialization was performed by a previous call. + static JNIEnv* init_shared_library(JavaThread* thread); // Initializes the _env, _mode and _runtime fields. ! void init_env_mode_runtime(JavaThread* thread, JNIEnv* parent_env); ! void init(JavaThread* thread, bool is_hotspot, const char* file, int line); JNIEnv* _env; // JNI env for calling into shared library + bool _pop_frame_on_close; // Must pop frame on close? + bool _detach_on_close; // Must detach on close? JVMCIRuntime* _runtime; // Access to a HotSpotJVMCIRuntime bool _is_hotspot; // Which heap is the HotSpotJVMCIRuntime in bool _throw_to_caller; // Propagate an exception raised in this env to the caller? const char* _file; // The file and ... int _line; // ... line where this JNIEnv was created
*** 183,219 **** --- 175,211 ---- // Opens a JVMCIEnv scope for a Java to VM call (e.g., via CompilerToVM). // An exception occurring within the scope is left pending when the // scope closes so that it will be propagated back to Java. // The JVMCIEnv destructor translates the exception object for the // Java runtime if necessary. ! JVMCIEnv(JavaThread* thread, JNIEnv* env, const char* file, int line); // Opens a JVMCIEnv scope for a compilation scheduled by the CompileBroker. // An exception occurring within the scope must not be propagated back to // the CompileBroker. ! JVMCIEnv(JavaThread* thread, JVMCICompileState* compile_state, const char* file, int line); // Opens a JNIEnv scope for a call from within the VM. An exception occurring // within the scope must not be propagated back to the caller. JVMCIEnv(JavaThread* env, const char* file, int line); // Opens a JNIEnv scope for accessing `for_object`. An exception occurring // within the scope must not be propagated back to the caller. ! JVMCIEnv(JavaThread* thread, JVMCIObject for_object, const char* file, int line) { // A JNI call to access an object in the shared library heap // can block or take a long time so do not allow such access // on the VM thread. assert(for_object.is_hotspot() || !Thread::current()->is_VM_thread(), "cannot open JVMCIEnv scope when in the VM thread for accessing a shared library heap object"); ! init(thread, for_object.is_hotspot(), file, line); } // Opens a JNIEnv scope for the HotSpot runtime if `is_hotspot` is true // otherwise for the shared library runtime. An exception occurring // within the scope must not be propagated back to the caller. ! JVMCIEnv(JavaThread* thread, bool is_hotspot, const char* file, int line) { ! init(thread, is_hotspot, file, line); } ~JVMCIEnv(); JVMCIRuntime* runtime() {
*** 245,256 **** --- 237,250 ---- void put_int_at(JVMCIPrimitiveArray array, int index, jint value); long get_long_at(JVMCIPrimitiveArray array, int index); void put_long_at(JVMCIPrimitiveArray array, int index, jlong value); ! void copy_bytes_to(JVMCIPrimitiveArray src, jbyte* dest, int offset, int size_in_bytes); ! void copy_bytes_from(jbyte* src, JVMCIPrimitiveArray dest, int offset, int size_in_bytes); ! void copy_bytes_to(JVMCIPrimitiveArray src, jbyte* dest, int offset, jsize length); ! void copy_bytes_from(jbyte* src, JVMCIPrimitiveArray dest, int offset, jsize length); + + void copy_longs_from(jlong* src, JVMCIPrimitiveArray dest, int offset, jsize length); JVMCIObjectArray initialize_intrinsics(JVMCI_TRAPS); jboolean is_boxing_object(BasicType type, JVMCIObject object);
*** 321,330 **** --- 315,326 ---- DO_THROW(IllegalStateException) DO_THROW(NullPointerException) DO_THROW(IllegalArgumentException) DO_THROW(InvalidInstalledCodeException) DO_THROW(UnsatisfiedLinkError) + DO_THROW(UnsupportedOperationException) + DO_THROW(ClassNotFoundException) #undef DO_THROW void fthrow_error(const char* file, int line, const char* format, ...) ATTRIBUTE_PRINTF(4, 5);

src/hotspot/share/jvmci/jvmciEnv.hpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File