--- a/src/hotspot/share/jvmci/jvmciCompiler.hpp Mon Nov 06 17:56:29 2017 +0100
+++ b/src/hotspot/share/jvmci/jvmciCompiler.hpp Mon Nov 06 21:38:42 2017 +0100
@@ -55,10 +55,13 @@
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;
}