< prev index next >

src/share/vm/ci/bcEscapeAnalyzer.cpp

Print this page
rev 9028 : 8218201: Failures when vmIntrinsics::_getClass is not inlined
Summary: Fix BCEscapeAnalyzer to correctly handle _getClass intrinsic.
Reviewed-by: kvn, dlong, redestad, neliasso

@@ -1168,37 +1168,36 @@
         worklist.push(succ);
     }
   }
 }
 
-bool BCEscapeAnalyzer::do_analysis() {
+void BCEscapeAnalyzer::do_analysis() {
   Arena* arena = CURRENT_ENV->arena();
   // identify basic blocks
   _methodBlocks = _method->get_method_blocks();
 
   iterate_blocks(arena);
-  // TEMPORARY
-  return true;
 }
 
 vmIntrinsics::ID BCEscapeAnalyzer::known_intrinsic() {
   vmIntrinsics::ID iid = method()->intrinsic_id();
-
   if (iid == vmIntrinsics::_getClass ||
       iid ==  vmIntrinsics::_fillInStackTrace ||
-      iid == vmIntrinsics::_hashCode)
+      iid == vmIntrinsics::_hashCode) {
     return iid;
-  else
+  } else {
     return vmIntrinsics::_none;
+  }
 }
 
-bool BCEscapeAnalyzer::compute_escape_for_intrinsic(vmIntrinsics::ID iid) {
+void BCEscapeAnalyzer::compute_escape_for_intrinsic(vmIntrinsics::ID iid) {
   ArgumentMap arg;
   arg.clear();
   switch (iid) {
   case vmIntrinsics::_getClass:
     _return_local = false;
+      _return_allocated = false;
     break;
   case vmIntrinsics::_fillInStackTrace:
     arg.set(0); // 'this'
     set_returned(arg);
     break;

@@ -1206,11 +1205,10 @@
     // initialized state is correct
     break;
   default:
     assert(false, "unexpected intrinsic");
   }
-  return true;
 }
 
 void BCEscapeAnalyzer::initialize() {
   int i;
 

@@ -1310,12 +1308,10 @@
       tty->print(" intrinsic");
     method()->print_short_name();
     tty->print_cr(" (%d bytes)", method()->code_size());
   }
 
-  bool success;
-
   initialize();
 
   // Do not scan method if it has no object parameters and
   // does not returns an object (_return_allocated is set in initialize()).
   if (_arg_local.Size() == 0 && !_return_allocated) {

@@ -1327,13 +1323,13 @@
     methodData()->set_eflag(MethodData::estimated);
     return;
   }
 
   if (iid != vmIntrinsics::_none)
-    success = compute_escape_for_intrinsic(iid);
+    compute_escape_for_intrinsic(iid);
   else {
-    success = do_analysis();
+    do_analysis();
   }
 
   // don't store interprocedural escape information if it introduces
   // dependencies or if method data is empty
   //
< prev index next >