hotspot/src/share/vm/prims/whitebox.cpp
changeset 35563 d5ac28780cda
parent 35232 76aed99c0ddd
child 35571 63e185035789
--- a/hotspot/src/share/vm/prims/whitebox.cpp	Thu Jan 14 09:30:31 2016 +0100
+++ b/hotspot/src/share/vm/prims/whitebox.cpp	Thu Jan 14 13:24:03 2016 +0100
@@ -565,14 +565,15 @@
   methodHandle mh(THREAD, Method::checked_resolve_jmethod_id(method_id));
 
   DirectiveSet* directive;
+  AbstractCompiler* comp = CompileBroker::compiler((int)compLevel);
   if (compilation_context != NULL) {
     compilation_context_id = reflected_method_to_jmid(thread, env, compilation_context);
     CHECK_JNI_EXCEPTION_(env, JNI_FALSE);
     methodHandle cch(THREAD, Method::checked_resolve_jmethod_id(compilation_context_id));
-    directive = DirectivesStack::getMatchingDirective(cch, CompileBroker::compiler((int)compLevel));
+    directive = DirectivesStack::getMatchingDirective(cch, comp);
   } else {
     // Calling with NULL matches default directive
-    directive = DirectivesStack::getDefaultDirective(CompileBroker::compiler((int)compLevel));
+    directive = DirectivesStack::getDefaultDirective(comp);
   }
   bool result = CompileBroker::compiler(compLevel)->is_intrinsic_available(mh, directive);
   DirectivesStack::release(directive);