< prev index next >

src/share/vm/opto/runtime.cpp

Print this page




  42 #include "interpreter/bytecode.hpp"
  43 #include "interpreter/interpreter.hpp"
  44 #include "interpreter/linkResolver.hpp"
  45 #include "logging/log.hpp"
  46 #include "memory/oopFactory.hpp"
  47 #include "memory/resourceArea.hpp"
  48 #include "oops/objArrayKlass.hpp"
  49 #include "oops/oop.inline.hpp"
  50 #include "oops/typeArrayOop.inline.hpp"
  51 #include "opto/ad.hpp"
  52 #include "opto/addnode.hpp"
  53 #include "opto/callnode.hpp"
  54 #include "opto/cfgnode.hpp"
  55 #include "opto/graphKit.hpp"
  56 #include "opto/machnode.hpp"
  57 #include "opto/matcher.hpp"
  58 #include "opto/memnode.hpp"
  59 #include "opto/mulnode.hpp"
  60 #include "opto/runtime.hpp"
  61 #include "opto/subnode.hpp"

  62 #include "runtime/atomic.inline.hpp"
  63 #include "runtime/fprofiler.hpp"
  64 #include "runtime/handles.inline.hpp"
  65 #include "runtime/interfaceSupport.hpp"
  66 #include "runtime/javaCalls.hpp"
  67 #include "runtime/sharedRuntime.hpp"
  68 #include "runtime/signature.hpp"
  69 #include "runtime/threadCritical.hpp"
  70 #include "runtime/vframe.hpp"
  71 #include "runtime/vframeArray.hpp"
  72 #include "runtime/vframe_hp.hpp"
  73 #include "utilities/copy.hpp"
  74 #include "utilities/preserveException.hpp"
  75 
  76 
  77 // For debugging purposes:
  78 //  To force FullGCALot inside a runtime function, add the following two lines
  79 //
  80 //  Universe::release_fullgc_alot_dummy();
  81 //  MarkSweep::invoke(0, "Debugging");


1433 //       to handle deoptimized blobs
1434 //
1435 // However, there needs to be a safepoint check in the middle!  So compiled
1436 // safepoints are completely watertight.
1437 //
1438 // Thus, it cannot be a leaf since it contains the NoGCVerifier.
1439 //
1440 // *THIS IS NOT RECOMMENDED PROGRAMMING STYLE*
1441 //
1442 address OptoRuntime::rethrow_C(oopDesc* exception, JavaThread* thread, address ret_pc) {
1443 #ifndef PRODUCT
1444   SharedRuntime::_rethrow_ctr++;               // count rethrows
1445 #endif
1446   assert (exception != NULL, "should have thrown a NULLPointerException");
1447 #ifdef ASSERT
1448   if (!(exception->is_a(SystemDictionary::Throwable_klass()))) {
1449     // should throw an exception here
1450     ShouldNotReachHere();
1451   }
1452 #endif





1453 
1454   thread->set_vm_result(exception);
1455   // Frame not compiled (handles deoptimization blob)
1456   return SharedRuntime::raw_exception_handler_for_return_address(thread, ret_pc);
1457 }
1458 
1459 
1460 const TypeFunc *OptoRuntime::rethrow_Type() {
1461   // create input type (domain)
1462   const Type **fields = TypeTuple::fields(1);
1463   fields[TypeFunc::Parms+0] = TypeInstPtr::NOTNULL; // Exception oop
1464   const TypeTuple *domain = TypeTuple::make(TypeFunc::Parms+1,fields);
1465 
1466   // create result type (range)
1467   fields = TypeTuple::fields(1);
1468   fields[TypeFunc::Parms+0] = TypeInstPtr::NOTNULL; // Exception oop
1469   const TypeTuple *range = TypeTuple::make(TypeFunc::Parms+1, fields);
1470 
1471   return TypeFunc::make(domain, range);
1472 }




  42 #include "interpreter/bytecode.hpp"
  43 #include "interpreter/interpreter.hpp"
  44 #include "interpreter/linkResolver.hpp"
  45 #include "logging/log.hpp"
  46 #include "memory/oopFactory.hpp"
  47 #include "memory/resourceArea.hpp"
  48 #include "oops/objArrayKlass.hpp"
  49 #include "oops/oop.inline.hpp"
  50 #include "oops/typeArrayOop.inline.hpp"
  51 #include "opto/ad.hpp"
  52 #include "opto/addnode.hpp"
  53 #include "opto/callnode.hpp"
  54 #include "opto/cfgnode.hpp"
  55 #include "opto/graphKit.hpp"
  56 #include "opto/machnode.hpp"
  57 #include "opto/matcher.hpp"
  58 #include "opto/memnode.hpp"
  59 #include "opto/mulnode.hpp"
  60 #include "opto/runtime.hpp"
  61 #include "opto/subnode.hpp"
  62 #include "prims/jvmtiThreadState.hpp"
  63 #include "runtime/atomic.inline.hpp"
  64 #include "runtime/fprofiler.hpp"
  65 #include "runtime/handles.inline.hpp"
  66 #include "runtime/interfaceSupport.hpp"
  67 #include "runtime/javaCalls.hpp"
  68 #include "runtime/sharedRuntime.hpp"
  69 #include "runtime/signature.hpp"
  70 #include "runtime/threadCritical.hpp"
  71 #include "runtime/vframe.hpp"
  72 #include "runtime/vframeArray.hpp"
  73 #include "runtime/vframe_hp.hpp"
  74 #include "utilities/copy.hpp"
  75 #include "utilities/preserveException.hpp"
  76 
  77 
  78 // For debugging purposes:
  79 //  To force FullGCALot inside a runtime function, add the following two lines
  80 //
  81 //  Universe::release_fullgc_alot_dummy();
  82 //  MarkSweep::invoke(0, "Debugging");


1434 //       to handle deoptimized blobs
1435 //
1436 // However, there needs to be a safepoint check in the middle!  So compiled
1437 // safepoints are completely watertight.
1438 //
1439 // Thus, it cannot be a leaf since it contains the NoGCVerifier.
1440 //
1441 // *THIS IS NOT RECOMMENDED PROGRAMMING STYLE*
1442 //
1443 address OptoRuntime::rethrow_C(oopDesc* exception, JavaThread* thread, address ret_pc) {
1444 #ifndef PRODUCT
1445   SharedRuntime::_rethrow_ctr++;               // count rethrows
1446 #endif
1447   assert (exception != NULL, "should have thrown a NULLPointerException");
1448 #ifdef ASSERT
1449   if (!(exception->is_a(SystemDictionary::Throwable_klass()))) {
1450     // should throw an exception here
1451     ShouldNotReachHere();
1452   }
1453 #endif
1454 
1455   JvmtiThreadState *state = thread->jvmti_thread_state();
1456   if (state != NULL) {
1457     state->set_exception_detected();
1458   }
1459 
1460   thread->set_vm_result(exception);
1461   // Frame not compiled (handles deoptimization blob)
1462   return SharedRuntime::raw_exception_handler_for_return_address(thread, ret_pc);
1463 }
1464 
1465 
1466 const TypeFunc *OptoRuntime::rethrow_Type() {
1467   // create input type (domain)
1468   const Type **fields = TypeTuple::fields(1);
1469   fields[TypeFunc::Parms+0] = TypeInstPtr::NOTNULL; // Exception oop
1470   const TypeTuple *domain = TypeTuple::make(TypeFunc::Parms+1,fields);
1471 
1472   // create result type (range)
1473   fields = TypeTuple::fields(1);
1474   fields[TypeFunc::Parms+0] = TypeInstPtr::NOTNULL; // Exception oop
1475   const TypeTuple *range = TypeTuple::make(TypeFunc::Parms+1, fields);
1476 
1477   return TypeFunc::make(domain, range);
1478 }


< prev index next >