< prev index next >

src/share/vm/interpreter/interpreter.cpp

Print this page




 217 
 218   // Method handle primitive?
 219   if (m->is_method_handle_intrinsic()) {
 220     vmIntrinsics::ID id = m->intrinsic_id();
 221     assert(MethodHandles::is_signature_polymorphic(id), "must match an intrinsic");
 222     MethodKind kind = (MethodKind)( method_handle_invoke_FIRST +
 223                                     ((int)id - vmIntrinsics::FIRST_MH_SIG_POLY) );
 224     assert(kind <= method_handle_invoke_LAST, "parallel enum ranges");
 225     return kind;
 226   }
 227 
 228 #ifndef CC_INTERP
 229   if (UseCRC32Intrinsics && m->is_native()) {
 230     // Use optimized stub code for CRC32 native methods.
 231     switch (m->intrinsic_id()) {
 232       case vmIntrinsics::_updateCRC32            : return java_util_zip_CRC32_update;
 233       case vmIntrinsics::_updateBytesCRC32       : return java_util_zip_CRC32_updateBytes;
 234       case vmIntrinsics::_updateByteBufferCRC32  : return java_util_zip_CRC32_updateByteBuffer;
 235     }
 236   }







 237 
 238   switch(m->intrinsic_id()) {
 239   case vmIntrinsics::_intBitsToFloat:      return java_lang_Float_intBitsToFloat;
 240   case vmIntrinsics::_floatToRawIntBits:   return java_lang_Float_floatToRawIntBits;
 241   case vmIntrinsics::_longBitsToDouble:    return java_lang_Double_longBitsToDouble;
 242   case vmIntrinsics::_doubleToRawLongBits: return java_lang_Double_doubleToRawLongBits;
 243   }
 244 
 245 #endif // CC_INTERP
 246 
 247   // Native method?
 248   // Note: This test must come _before_ the test for intrinsic
 249   //       methods. See also comments below.
 250   if (m->is_native()) {
 251     assert(!m->is_method_handle_intrinsic(), "overlapping bits here, watch out");
 252     return m->is_synchronized() ? native_synchronized : native;
 253   }
 254 
 255   // Synchronized?
 256   if (m->is_synchronized()) {


 332 #ifndef PRODUCT
 333 void AbstractInterpreter::print_method_kind(MethodKind kind) {
 334   switch (kind) {
 335     case zerolocals             : tty->print("zerolocals"             ); break;
 336     case zerolocals_synchronized: tty->print("zerolocals_synchronized"); break;
 337     case native                 : tty->print("native"                 ); break;
 338     case native_synchronized    : tty->print("native_synchronized"    ); break;
 339     case empty                  : tty->print("empty"                  ); break;
 340     case accessor               : tty->print("accessor"               ); break;
 341     case abstract               : tty->print("abstract"               ); break;
 342     case java_lang_math_sin     : tty->print("java_lang_math_sin"     ); break;
 343     case java_lang_math_cos     : tty->print("java_lang_math_cos"     ); break;
 344     case java_lang_math_tan     : tty->print("java_lang_math_tan"     ); break;
 345     case java_lang_math_abs     : tty->print("java_lang_math_abs"     ); break;
 346     case java_lang_math_sqrt    : tty->print("java_lang_math_sqrt"    ); break;
 347     case java_lang_math_log     : tty->print("java_lang_math_log"     ); break;
 348     case java_lang_math_log10   : tty->print("java_lang_math_log10"   ); break;
 349     case java_util_zip_CRC32_update           : tty->print("java_util_zip_CRC32_update"); break;
 350     case java_util_zip_CRC32_updateBytes      : tty->print("java_util_zip_CRC32_updateBytes"); break;
 351     case java_util_zip_CRC32_updateByteBuffer : tty->print("java_util_zip_CRC32_updateByteBuffer"); break;


 352     default:
 353       if (kind >= method_handle_invoke_FIRST &&
 354           kind <= method_handle_invoke_LAST) {
 355         const char* kind_name = vmIntrinsics::name_at(method_handle_intrinsic(kind));
 356         if (kind_name[0] == '_')  kind_name = &kind_name[1];  // '_invokeExact' => 'invokeExact'
 357         tty->print("method_handle_%s", kind_name);
 358         break;
 359       }
 360       ShouldNotReachHere();
 361       break;
 362   }
 363 }
 364 #endif // PRODUCT
 365 
 366 
 367 //------------------------------------------------------------------------------------------------------------------------
 368 // Deoptimization support
 369 
 370 /**
 371  * If a deoptimization happens, this function returns the point of next bytecode to continue execution.




 217 
 218   // Method handle primitive?
 219   if (m->is_method_handle_intrinsic()) {
 220     vmIntrinsics::ID id = m->intrinsic_id();
 221     assert(MethodHandles::is_signature_polymorphic(id), "must match an intrinsic");
 222     MethodKind kind = (MethodKind)( method_handle_invoke_FIRST +
 223                                     ((int)id - vmIntrinsics::FIRST_MH_SIG_POLY) );
 224     assert(kind <= method_handle_invoke_LAST, "parallel enum ranges");
 225     return kind;
 226   }
 227 
 228 #ifndef CC_INTERP
 229   if (UseCRC32Intrinsics && m->is_native()) {
 230     // Use optimized stub code for CRC32 native methods.
 231     switch (m->intrinsic_id()) {
 232       case vmIntrinsics::_updateCRC32            : return java_util_zip_CRC32_update;
 233       case vmIntrinsics::_updateBytesCRC32       : return java_util_zip_CRC32_updateBytes;
 234       case vmIntrinsics::_updateByteBufferCRC32  : return java_util_zip_CRC32_updateByteBuffer;
 235     }
 236   }
 237   if (UseCRC32CIntrinsics) {
 238     // Use optimized stub code for CRC32C methods.
 239     switch (m->intrinsic_id()) {
 240       case vmIntrinsics::_updateBytesCRC32C             : return java_util_zip_CRC32C_updateBytes;
 241       case vmIntrinsics::_updateDirectByteBufferCRC32C  : return java_util_zip_CRC32C_updateDirectByteBuffer;
 242     }
 243   }
 244 
 245   switch(m->intrinsic_id()) {
 246   case vmIntrinsics::_intBitsToFloat:      return java_lang_Float_intBitsToFloat;
 247   case vmIntrinsics::_floatToRawIntBits:   return java_lang_Float_floatToRawIntBits;
 248   case vmIntrinsics::_longBitsToDouble:    return java_lang_Double_longBitsToDouble;
 249   case vmIntrinsics::_doubleToRawLongBits: return java_lang_Double_doubleToRawLongBits;
 250   }
 251 
 252 #endif // CC_INTERP
 253 
 254   // Native method?
 255   // Note: This test must come _before_ the test for intrinsic
 256   //       methods. See also comments below.
 257   if (m->is_native()) {
 258     assert(!m->is_method_handle_intrinsic(), "overlapping bits here, watch out");
 259     return m->is_synchronized() ? native_synchronized : native;
 260   }
 261 
 262   // Synchronized?
 263   if (m->is_synchronized()) {


 339 #ifndef PRODUCT
 340 void AbstractInterpreter::print_method_kind(MethodKind kind) {
 341   switch (kind) {
 342     case zerolocals             : tty->print("zerolocals"             ); break;
 343     case zerolocals_synchronized: tty->print("zerolocals_synchronized"); break;
 344     case native                 : tty->print("native"                 ); break;
 345     case native_synchronized    : tty->print("native_synchronized"    ); break;
 346     case empty                  : tty->print("empty"                  ); break;
 347     case accessor               : tty->print("accessor"               ); break;
 348     case abstract               : tty->print("abstract"               ); break;
 349     case java_lang_math_sin     : tty->print("java_lang_math_sin"     ); break;
 350     case java_lang_math_cos     : tty->print("java_lang_math_cos"     ); break;
 351     case java_lang_math_tan     : tty->print("java_lang_math_tan"     ); break;
 352     case java_lang_math_abs     : tty->print("java_lang_math_abs"     ); break;
 353     case java_lang_math_sqrt    : tty->print("java_lang_math_sqrt"    ); break;
 354     case java_lang_math_log     : tty->print("java_lang_math_log"     ); break;
 355     case java_lang_math_log10   : tty->print("java_lang_math_log10"   ); break;
 356     case java_util_zip_CRC32_update           : tty->print("java_util_zip_CRC32_update"); break;
 357     case java_util_zip_CRC32_updateBytes      : tty->print("java_util_zip_CRC32_updateBytes"); break;
 358     case java_util_zip_CRC32_updateByteBuffer : tty->print("java_util_zip_CRC32_updateByteBuffer"); break;
 359     case java_util_zip_CRC32C_updateBytes     : tty->print("java_util_zip_CRC32C_updateBytes"); break;
 360     case java_util_zip_CRC32C_updateDirectByteBuffer: tty->print("java_util_zip_CRC32C_updateDirectByteByffer"); break;
 361     default:
 362       if (kind >= method_handle_invoke_FIRST &&
 363           kind <= method_handle_invoke_LAST) {
 364         const char* kind_name = vmIntrinsics::name_at(method_handle_intrinsic(kind));
 365         if (kind_name[0] == '_')  kind_name = &kind_name[1];  // '_invokeExact' => 'invokeExact'
 366         tty->print("method_handle_%s", kind_name);
 367         break;
 368       }
 369       ShouldNotReachHere();
 370       break;
 371   }
 372 }
 373 #endif // PRODUCT
 374 
 375 
 376 //------------------------------------------------------------------------------------------------------------------------
 377 // Deoptimization support
 378 
 379 /**
 380  * If a deoptimization happens, this function returns the point of next bytecode to continue execution.


< prev index next >