src/share/vm/interpreter/interpreter.cpp

Print this page




 283   // Note: This test must come _after_ the test for native methods,
 284   //       otherwise we will run into problems with JDK 1.2, see also
 285   //       InterpreterGenerator::generate_method_entry() for
 286   //       for details.
 287   switch (m->intrinsic_id()) {
 288     case vmIntrinsics::_dsin  : return java_lang_math_sin  ;
 289     case vmIntrinsics::_dcos  : return java_lang_math_cos  ;
 290     case vmIntrinsics::_dtan  : return java_lang_math_tan  ;
 291     case vmIntrinsics::_dabs  : return java_lang_math_abs  ;
 292     case vmIntrinsics::_dsqrt : return java_lang_math_sqrt ;
 293     case vmIntrinsics::_dlog  : return java_lang_math_log  ;
 294     case vmIntrinsics::_dlog10: return java_lang_math_log10;
 295     case vmIntrinsics::_dpow  : return java_lang_math_pow  ;
 296     case vmIntrinsics::_dexp  : return java_lang_math_exp  ;
 297 
 298     case vmIntrinsics::_Reference_get:
 299                                 return java_lang_ref_reference_get;
 300   }
 301 
 302   // Accessor method?
 303   if (m->is_accessor()) {



 304     assert(m->size_of_parameters() == 1, "fast code for accessors assumes parameter size = 1");
 305     return accessor;
 306   }
 307 
 308   // Note: for now: zero locals for all non-empty methods
 309   return zerolocals;
 310 }
 311 
 312 
 313 void AbstractInterpreter::set_entry_for_kind(AbstractInterpreter::MethodKind kind, address entry) {
 314   assert(kind >= method_handle_invoke_FIRST &&
 315          kind <= method_handle_invoke_LAST, "late initialization only for MH entry points");
 316   assert(_entry_table[kind] == _entry_table[abstract], "previous value must be AME entry");
 317   _entry_table[kind] = entry;
 318 }
 319 
 320 
 321 // Return true if the interpreter can prove that the given bytecode has
 322 // not yet been executed (in Java semantics, not in actual operation).
 323 bool AbstractInterpreter::is_not_reached(methodHandle method, int bci) {




 283   // Note: This test must come _after_ the test for native methods,
 284   //       otherwise we will run into problems with JDK 1.2, see also
 285   //       InterpreterGenerator::generate_method_entry() for
 286   //       for details.
 287   switch (m->intrinsic_id()) {
 288     case vmIntrinsics::_dsin  : return java_lang_math_sin  ;
 289     case vmIntrinsics::_dcos  : return java_lang_math_cos  ;
 290     case vmIntrinsics::_dtan  : return java_lang_math_tan  ;
 291     case vmIntrinsics::_dabs  : return java_lang_math_abs  ;
 292     case vmIntrinsics::_dsqrt : return java_lang_math_sqrt ;
 293     case vmIntrinsics::_dlog  : return java_lang_math_log  ;
 294     case vmIntrinsics::_dlog10: return java_lang_math_log10;
 295     case vmIntrinsics::_dpow  : return java_lang_math_pow  ;
 296     case vmIntrinsics::_dexp  : return java_lang_math_exp  ;
 297 
 298     case vmIntrinsics::_Reference_get:
 299                                 return java_lang_ref_reference_get;
 300   }
 301 
 302   // Accessor method?
 303   if (m->is_getter()) {
 304     // TODO: We should have used ::is_accessor above, but fast accessors in Zero expect only getters.
 305     // See CppInterpreter::accessor_entry in cppInterpreter_zero.cpp. This should be fixed in Zero,
 306     // then the call above updated to ::is_accessor
 307     assert(m->size_of_parameters() == 1, "fast code for accessors assumes parameter size = 1");
 308     return accessor;
 309   }
 310 
 311   // Note: for now: zero locals for all non-empty methods
 312   return zerolocals;
 313 }
 314 
 315 
 316 void AbstractInterpreter::set_entry_for_kind(AbstractInterpreter::MethodKind kind, address entry) {
 317   assert(kind >= method_handle_invoke_FIRST &&
 318          kind <= method_handle_invoke_LAST, "late initialization only for MH entry points");
 319   assert(_entry_table[kind] == _entry_table[abstract], "previous value must be AME entry");
 320   _entry_table[kind] = entry;
 321 }
 322 
 323 
 324 // Return true if the interpreter can prove that the given bytecode has
 325 // not yet been executed (in Java semantics, not in actual operation).
 326 bool AbstractInterpreter::is_not_reached(methodHandle method, int bci) {