hotspot/src/share/vm/compiler/abstractCompiler.hpp
changeset 32085 d869c505b624
parent 31962 d05e0a4d1b43
child 33160 c59f1676d27e
--- a/hotspot/src/share/vm/compiler/abstractCompiler.hpp	Wed Mar 18 16:16:30 2015 +0100
+++ b/hotspot/src/share/vm/compiler/abstractCompiler.hpp	Mon Aug 03 09:39:29 2015 +0200
@@ -75,8 +75,8 @@
   //
   // The second parameter, 'compilation_context', is needed to implement functionality
   // related to the DisableIntrinsic command-line flag. The DisableIntrinsic flag can
-  // be used to prohibit the C2 compiler (but not the C1 compiler) to use an intrinsic.
-  // There are three ways to disable an intrinsic using the DisableIntrinsic flag:
+  // be used to prohibit the compilers to use an intrinsic. There are three ways to
+  // disable an intrinsic using the DisableIntrinsic flag:
   //
   // (1) -XX:DisableIntrinsic=_hashCode,_getClass
   //     Disables intrinsification of _hashCode and _getClass globally
@@ -96,7 +96,8 @@
   // compilation context is aClass::aMethod and java.lang.ref.Reference::get,
   // respectively.
   virtual bool is_intrinsic_available(methodHandle method, methodHandle compilation_context) {
-    return false;
+    return is_intrinsic_supported(method) &&
+           !vmIntrinsics::is_disabled_by_flags(method, compilation_context);
   }
 
   // Determines if an intrinsic is supported by the compiler, that is,
@@ -111,13 +112,6 @@
     return false;
   }
 
-  // Implements compiler-specific processing of command-line flags.
-  // Processing of command-line flags common to all compilers is implemented
-  // in vmIntrinsicss::is_disabled_by_flag.
-  virtual bool is_intrinsic_disabled_by_flag(methodHandle method) {
-    return false;
-  }
-
   // Compiler type queries.
   bool is_c1()                                   { return _type == c1; }
   bool is_c2()                                   { return _type == c2; }