< prev index next >

src/share/vm/ci/ciMethod.cpp

Print this page
rev 8471 : [mq]: dont_profile.8074551


  54 #include "ci/ciTypeFlow.hpp"
  55 #include "oops/method.hpp"
  56 #endif
  57 #ifdef SHARK
  58 #include "ci/ciTypeFlow.hpp"
  59 #include "oops/method.hpp"
  60 #endif
  61 
  62 // ciMethod
  63 //
  64 // This class represents a Method* in the HotSpot virtual
  65 // machine.
  66 
  67 
  68 // ------------------------------------------------------------------
  69 // ciMethod::ciMethod
  70 //
  71 // Loaded method.
  72 ciMethod::ciMethod(methodHandle h_m, ciInstanceKlass* holder) :
  73   ciMetadata(h_m()),
  74   _holder(holder),
  75   _has_injected_profile(false)
  76 {
  77   assert(h_m() != NULL, "no null method");
  78 
  79   // These fields are always filled in in loaded methods.
  80   _flags = ciFlags(h_m()->access_flags());
  81 
  82   // Easy to compute, so fill them in now.
  83   _max_stack          = h_m()->max_stack();
  84   _max_locals         = h_m()->max_locals();
  85   _code_size          = h_m()->code_size();
  86   _intrinsic_id       = h_m()->intrinsic_id();
  87   _handler_count      = h_m()->exception_table_length();
  88   _size_of_parameters = h_m()->size_of_parameters();
  89   _uses_monitors      = h_m()->access_flags().has_monitor_bytecodes();
  90   _balanced_monitors  = !_uses_monitors || h_m()->access_flags().is_monitor_matching();
  91   _is_c1_compilable   = !h_m()->is_not_c1_compilable();
  92   _is_c2_compilable   = !h_m()->is_not_c2_compilable();
  93   // Lazy fields, filled in on demand.  Require allocation.
  94   _code               = NULL;
  95   _exception_handlers = NULL;


 153   }
 154 #endif
 155 }
 156 
 157 
 158 // ------------------------------------------------------------------
 159 // ciMethod::ciMethod
 160 //
 161 // Unloaded method.
 162 ciMethod::ciMethod(ciInstanceKlass* holder,
 163                    ciSymbol*        name,
 164                    ciSymbol*        signature,
 165                    ciInstanceKlass* accessor) :
 166   ciMetadata((Metadata*)NULL),
 167   _name(                   name),
 168   _holder(                 holder),
 169   _intrinsic_id(           vmIntrinsics::_none),
 170   _liveness(               NULL),
 171   _can_be_statically_bound(false),
 172   _method_blocks(          NULL),
 173   _method_data(            NULL),
 174   _has_injected_profile(   false)
 175 #if defined(COMPILER2) || defined(SHARK)
 176   ,
 177   _flow(                   NULL),
 178   _bcea(                   NULL),
 179   _instructions_size(-1)
 180 #endif // COMPILER2 || SHARK
 181 {
 182   // Usually holder and accessor are the same type but in some cases
 183   // the holder has the wrong class loader (e.g. invokedynamic call
 184   // sites) so we pass the accessor.
 185   _signature = new (CURRENT_ENV->arena()) ciSignature(accessor, constantPoolHandle(), signature);
 186 }
 187 
 188 
 189 // ------------------------------------------------------------------
 190 // ciMethod::load_code
 191 //
 192 // Load the bytecodes and exception handler table for this method.
 193 void ciMethod::load_code() {
 194   VM_ENTRY_MARK;




  54 #include "ci/ciTypeFlow.hpp"
  55 #include "oops/method.hpp"
  56 #endif
  57 #ifdef SHARK
  58 #include "ci/ciTypeFlow.hpp"
  59 #include "oops/method.hpp"
  60 #endif
  61 
  62 // ciMethod
  63 //
  64 // This class represents a Method* in the HotSpot virtual
  65 // machine.
  66 
  67 
  68 // ------------------------------------------------------------------
  69 // ciMethod::ciMethod
  70 //
  71 // Loaded method.
  72 ciMethod::ciMethod(methodHandle h_m, ciInstanceKlass* holder) :
  73   ciMetadata(h_m()),
  74   _holder(holder)

  75 {
  76   assert(h_m() != NULL, "no null method");
  77 
  78   // These fields are always filled in in loaded methods.
  79   _flags = ciFlags(h_m()->access_flags());
  80 
  81   // Easy to compute, so fill them in now.
  82   _max_stack          = h_m()->max_stack();
  83   _max_locals         = h_m()->max_locals();
  84   _code_size          = h_m()->code_size();
  85   _intrinsic_id       = h_m()->intrinsic_id();
  86   _handler_count      = h_m()->exception_table_length();
  87   _size_of_parameters = h_m()->size_of_parameters();
  88   _uses_monitors      = h_m()->access_flags().has_monitor_bytecodes();
  89   _balanced_monitors  = !_uses_monitors || h_m()->access_flags().is_monitor_matching();
  90   _is_c1_compilable   = !h_m()->is_not_c1_compilable();
  91   _is_c2_compilable   = !h_m()->is_not_c2_compilable();
  92   // Lazy fields, filled in on demand.  Require allocation.
  93   _code               = NULL;
  94   _exception_handlers = NULL;


 152   }
 153 #endif
 154 }
 155 
 156 
 157 // ------------------------------------------------------------------
 158 // ciMethod::ciMethod
 159 //
 160 // Unloaded method.
 161 ciMethod::ciMethod(ciInstanceKlass* holder,
 162                    ciSymbol*        name,
 163                    ciSymbol*        signature,
 164                    ciInstanceKlass* accessor) :
 165   ciMetadata((Metadata*)NULL),
 166   _name(                   name),
 167   _holder(                 holder),
 168   _intrinsic_id(           vmIntrinsics::_none),
 169   _liveness(               NULL),
 170   _can_be_statically_bound(false),
 171   _method_blocks(          NULL),
 172   _method_data(            NULL)

 173 #if defined(COMPILER2) || defined(SHARK)
 174   ,
 175   _flow(                   NULL),
 176   _bcea(                   NULL),
 177   _instructions_size(-1)
 178 #endif // COMPILER2 || SHARK
 179 {
 180   // Usually holder and accessor are the same type but in some cases
 181   // the holder has the wrong class loader (e.g. invokedynamic call
 182   // sites) so we pass the accessor.
 183   _signature = new (CURRENT_ENV->arena()) ciSignature(accessor, constantPoolHandle(), signature);
 184 }
 185 
 186 
 187 // ------------------------------------------------------------------
 188 // ciMethod::load_code
 189 //
 190 // Load the bytecodes and exception handler table for this method.
 191 void ciMethod::load_code() {
 192   VM_ENTRY_MARK;


< prev index next >