src/share/vm/interpreter/interpreter.cpp

Print this page
rev 2161 : [mq]: initial-intrinsification-changes


 191     return m->is_synchronized() ? native_synchronized : native;
 192   }
 193 
 194   // Synchronized?
 195   if (m->is_synchronized()) {
 196     return zerolocals_synchronized;
 197   }
 198 
 199   if (RegisterFinalizersAtInit && m->code_size() == 1 &&
 200       m->intrinsic_id() == vmIntrinsics::_Object_init) {
 201     // We need to execute the special return bytecode to check for
 202     // finalizer registration so create a normal frame.
 203     return zerolocals;
 204   }
 205 
 206   // Empty method?
 207   if (m->is_empty_method()) {
 208     return empty;
 209   }
 210 
 211   // Accessor method?
 212   if (m->is_accessor()) {
 213     assert(m->size_of_parameters() == 1, "fast code for accessors assumes parameter size = 1");
 214     return accessor;
 215   }
 216 
 217   // Special intrinsic method?
 218   // Note: This test must come _after_ the test for native methods,
 219   //       otherwise we will run into problems with JDK 1.2, see also
 220   //       AbstractInterpreterGenerator::generate_method_entry() for
 221   //       for details.
 222   switch (m->intrinsic_id()) {
 223     case vmIntrinsics::_dsin  : return java_lang_math_sin  ;
 224     case vmIntrinsics::_dcos  : return java_lang_math_cos  ;
 225     case vmIntrinsics::_dtan  : return java_lang_math_tan  ;
 226     case vmIntrinsics::_dabs  : return java_lang_math_abs  ;
 227     case vmIntrinsics::_dsqrt : return java_lang_math_sqrt ;
 228     case vmIntrinsics::_dlog  : return java_lang_math_log  ;
 229     case vmIntrinsics::_dlog10: return java_lang_math_log10;









 230   }
 231 
 232   // Note: for now: zero locals for all non-empty methods
 233   return zerolocals;
 234 }
 235 
 236 
 237 // Return true if the interpreter can prove that the given bytecode has
 238 // not yet been executed (in Java semantics, not in actual operation).
 239 bool AbstractInterpreter::is_not_reached(methodHandle method, int bci) {
 240   Bytecodes::Code code = method()->code_at(bci);
 241 
 242   if (!Bytecodes::must_rewrite(code)) {
 243     // might have been reached
 244     return false;
 245   }
 246 
 247   // the bytecode might not be rewritten if the method is an accessor, etc.
 248   address ientry = method->interpreter_entry();
 249   if (ientry != entry_for_kind(AbstractInterpreter::zerolocals) &&




 191     return m->is_synchronized() ? native_synchronized : native;
 192   }
 193 
 194   // Synchronized?
 195   if (m->is_synchronized()) {
 196     return zerolocals_synchronized;
 197   }
 198 
 199   if (RegisterFinalizersAtInit && m->code_size() == 1 &&
 200       m->intrinsic_id() == vmIntrinsics::_Object_init) {
 201     // We need to execute the special return bytecode to check for
 202     // finalizer registration so create a normal frame.
 203     return zerolocals;
 204   }
 205 
 206   // Empty method?
 207   if (m->is_empty_method()) {
 208     return empty;
 209   }
 210 






 211   // Special intrinsic method?
 212   // Note: This test must come _after_ the test for native methods,
 213   //       otherwise we will run into problems with JDK 1.2, see also
 214   //       AbstractInterpreterGenerator::generate_method_entry() for
 215   //       for details.
 216   switch (m->intrinsic_id()) {
 217     case vmIntrinsics::_dsin  : return java_lang_math_sin  ;
 218     case vmIntrinsics::_dcos  : return java_lang_math_cos  ;
 219     case vmIntrinsics::_dtan  : return java_lang_math_tan  ;
 220     case vmIntrinsics::_dabs  : return java_lang_math_abs  ;
 221     case vmIntrinsics::_dsqrt : return java_lang_math_sqrt ;
 222     case vmIntrinsics::_dlog  : return java_lang_math_log  ;
 223     case vmIntrinsics::_dlog10: return java_lang_math_log10;
 224 
 225     case vmIntrinsics::_Reference_get:
 226                                 return java_lang_ref_reference_get;
 227   }
 228 
 229   // Accessor method?
 230   if (m->is_accessor()) {
 231     assert(m->size_of_parameters() == 1, "fast code for accessors assumes parameter size = 1");
 232     return accessor;
 233   }
 234 
 235   // Note: for now: zero locals for all non-empty methods
 236   return zerolocals;
 237 }
 238 
 239 
 240 // Return true if the interpreter can prove that the given bytecode has
 241 // not yet been executed (in Java semantics, not in actual operation).
 242 bool AbstractInterpreter::is_not_reached(methodHandle method, int bci) {
 243   Bytecodes::Code code = method()->code_at(bci);
 244 
 245   if (!Bytecodes::must_rewrite(code)) {
 246     // might have been reached
 247     return false;
 248   }
 249 
 250   // the bytecode might not be rewritten if the method is an accessor, etc.
 251   address ientry = method->interpreter_entry();
 252   if (ientry != entry_for_kind(AbstractInterpreter::zerolocals) &&