< prev index next >

src/hotspot/share/jvmci/jvmciCompiler.hpp

Print this page

        

@@ -53,14 +53,17 @@
   static void exit_on_pending_exception(oop exception, const char* message);
 
 public:
   JVMCICompiler();
 
-  static JVMCICompiler* instance(TRAPS) {
+  static JVMCICompiler* instance(bool require_non_null, TRAPS) {
     if (!EnableJVMCI) {
       THROW_MSG_NULL(vmSymbols::java_lang_InternalError(), "JVMCI is not enabled")
     }
+    if (_instance == NULL && require_non_null) {
+      THROW_MSG_NULL(vmSymbols::java_lang_InternalError(), "The JVMCI compiler instance has not been created");
+    }
     return _instance;
   }
 
   virtual const char* name() { return "JVMCI"; }
 
< prev index next >