< prev index next >

src/share/vm/interpreter/abstractInterpreter.hpp

Print this page
rev 13167 : 8183232: Avoid resolving method_kind in AbstractInterpreter::can_be_compiled
Reviewed-by: coleenp

@@ -148,11 +148,30 @@
   // used for bootstrapping method handles:
   static void       set_entry_for_kind(MethodKind k, address e);
 
   static void       print_method_kind(MethodKind kind)          PRODUCT_RETURN;
 
-  static bool       can_be_compiled(methodHandle m);
+  // These should never be compiled since the interpreter will prefer
+  // the compiled version to the intrinsic version.
+  static bool       can_be_compiled(methodHandle m) {
+    switch (m->intrinsic_id()) {
+      case vmIntrinsics::_dsin  : // fall thru
+      case vmIntrinsics::_dcos  : // fall thru
+      case vmIntrinsics::_dtan  : // fall thru
+      case vmIntrinsics::_dabs  : // fall thru
+      case vmIntrinsics::_dsqrt : // fall thru
+      case vmIntrinsics::_dlog  : // fall thru
+      case vmIntrinsics::_dlog10: // fall thru
+      case vmIntrinsics::_dpow  : // fall thru
+      case vmIntrinsics::_dexp  : // fall thru
+      case vmIntrinsics::_fmaD  : // fall thru
+      case vmIntrinsics::_fmaF  : // fall thru
+        return false;
+      default:
+        return true;
+    }
+  }
 
   // Runtime support
 
   // length = invoke bytecode length (to advance to next bytecode)
   static address deopt_entry(TosState state, int length) { ShouldNotReachHere(); return NULL; }
< prev index next >