< prev index next >

src/share/vm/opto/runtime.cpp

Print this page




1366 }
1367 
1368 //------------------------------rethrow----------------------------------------
1369 // We get here after compiled code has executed a 'RethrowNode'.  The callee
1370 // is either throwing or rethrowing an exception.  The callee-save registers
1371 // have been restored, synchronized objects have been unlocked and the callee
1372 // stack frame has been removed.  The return address was passed in.
1373 // Exception oop is passed as the 1st argument.  This routine is then called
1374 // from the stub.  On exit, we know where to jump in the caller's code.
1375 // After this C code exits, the stub will pop his frame and end in a jump
1376 // (instead of a return).  We enter the caller's default handler.
1377 //
1378 // This must be JRT_LEAF:
1379 //     - caller will not change its state as we cannot block on exit,
1380 //       therefore raw_exception_handler_for_return_address is all it takes
1381 //       to handle deoptimized blobs
1382 //
1383 // However, there needs to be a safepoint check in the middle!  So compiled
1384 // safepoints are completely watertight.
1385 //
1386 // Thus, it cannot be a leaf since it contains the No_GC_Verifier.
1387 //
1388 // *THIS IS NOT RECOMMENDED PROGRAMMING STYLE*
1389 //
1390 address OptoRuntime::rethrow_C(oopDesc* exception, JavaThread* thread, address ret_pc) {
1391 #ifndef PRODUCT
1392   SharedRuntime::_rethrow_ctr++;               // count rethrows
1393 #endif
1394   assert (exception != NULL, "should have thrown a NULLPointerException");
1395 #ifdef ASSERT
1396   if (!(exception->is_a(SystemDictionary::Throwable_klass()))) {
1397     // should throw an exception here
1398     ShouldNotReachHere();
1399   }
1400 #endif
1401 
1402   thread->set_vm_result(exception);
1403   // Frame not compiled (handles deoptimization blob)
1404   return SharedRuntime::raw_exception_handler_for_return_address(thread, ret_pc);
1405 }
1406 




1366 }
1367 
1368 //------------------------------rethrow----------------------------------------
1369 // We get here after compiled code has executed a 'RethrowNode'.  The callee
1370 // is either throwing or rethrowing an exception.  The callee-save registers
1371 // have been restored, synchronized objects have been unlocked and the callee
1372 // stack frame has been removed.  The return address was passed in.
1373 // Exception oop is passed as the 1st argument.  This routine is then called
1374 // from the stub.  On exit, we know where to jump in the caller's code.
1375 // After this C code exits, the stub will pop his frame and end in a jump
1376 // (instead of a return).  We enter the caller's default handler.
1377 //
1378 // This must be JRT_LEAF:
1379 //     - caller will not change its state as we cannot block on exit,
1380 //       therefore raw_exception_handler_for_return_address is all it takes
1381 //       to handle deoptimized blobs
1382 //
1383 // However, there needs to be a safepoint check in the middle!  So compiled
1384 // safepoints are completely watertight.
1385 //
1386 // Thus, it cannot be a leaf since it contains the NoGCVerifier.
1387 //
1388 // *THIS IS NOT RECOMMENDED PROGRAMMING STYLE*
1389 //
1390 address OptoRuntime::rethrow_C(oopDesc* exception, JavaThread* thread, address ret_pc) {
1391 #ifndef PRODUCT
1392   SharedRuntime::_rethrow_ctr++;               // count rethrows
1393 #endif
1394   assert (exception != NULL, "should have thrown a NULLPointerException");
1395 #ifdef ASSERT
1396   if (!(exception->is_a(SystemDictionary::Throwable_klass()))) {
1397     // should throw an exception here
1398     ShouldNotReachHere();
1399   }
1400 #endif
1401 
1402   thread->set_vm_result(exception);
1403   // Frame not compiled (handles deoptimization blob)
1404   return SharedRuntime::raw_exception_handler_for_return_address(thread, ret_pc);
1405 }
1406 


< prev index next >