< 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 "prims/jvmtiThreadState.hpp"
  63 #include "runtime/atomic.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");


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




  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.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");


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





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 >