comparison src/share/vm/interpreter/interpreter.cpp @ 7154:5d0bb7d52783

changes to support Graal co-existing with the other HotSpot compiler(s) and being used for explicit compilation requests and code installation via the Graal API
author Doug Simon <doug.simon@oracle.com>
date Wed, 12 Dec 2012 21:36:40 +0100
parents 1baf7f1e3f23
children 291ffc492eb6
comparison
equal deleted inserted replaced
7153:c421c19b7bf8 7154:5d0bb7d52783
391 return Interpreter::rethrow_exception_entry(); 391 return Interpreter::rethrow_exception_entry();
392 } 392 }
393 #endif /* COMPILER1 */ 393 #endif /* COMPILER1 */
394 return Interpreter::deopt_entry(vtos, 0); 394 return Interpreter::deopt_entry(vtos, 0);
395 } 395 }
396
397 #ifdef GRAAL
398
399
400 // If deoptimization happens, the interpreter should reexecute these bytecodes.
401 // This function mainly helps the compilers to set up the reexecute bit.
402 bool AbstractInterpreter::bytecode_should_reexecute(Bytecodes::Code code) {
403 switch (code) {
404 case Bytecodes::_invokedynamic:
405 case Bytecodes::_invokevirtual:
406 case Bytecodes::_invokeinterface:
407 case Bytecodes::_invokespecial:
408 case Bytecodes::_invokestatic:
409 return false;
410 default:
411 return true;
412 }
413 return true;
414 }
415 #else
416 396
417 // If deoptimization happens, the interpreter should reexecute these bytecodes. 397 // If deoptimization happens, the interpreter should reexecute these bytecodes.
418 // This function mainly helps the compilers to set up the reexecute bit. 398 // This function mainly helps the compilers to set up the reexecute bit.
419 bool AbstractInterpreter::bytecode_should_reexecute(Bytecodes::Code code) { 399 bool AbstractInterpreter::bytecode_should_reexecute(Bytecodes::Code code) {
420 switch (code) { 400 switch (code) {
450 case Bytecodes::_getfield : 430 case Bytecodes::_getfield :
451 case Bytecodes::_putfield : 431 case Bytecodes::_putfield :
452 case Bytecodes::_getstatic : 432 case Bytecodes::_getstatic :
453 case Bytecodes::_putstatic : 433 case Bytecodes::_putstatic :
454 case Bytecodes::_aastore : 434 case Bytecodes::_aastore :
455 #if defined(COMPILER1) || defined(GRAAL) 435 #if defined(COMPILER1)
456 436
457 //special case of reexecution 437 //special case of reexecution
458 case Bytecodes::_athrow : 438 case Bytecodes::_athrow :
459 #endif 439 #endif
460 return true; 440 return true;
461 441
462 default: 442 default:
463 return false; 443 return false;
464 } 444 }
465 } 445 }
466 #endif
467 446
468 void AbstractInterpreterGenerator::bang_stack_shadow_pages(bool native_call) { 447 void AbstractInterpreterGenerator::bang_stack_shadow_pages(bool native_call) {
469 // Quick & dirty stack overflow checking: bang the stack & handle trap. 448 // Quick & dirty stack overflow checking: bang the stack & handle trap.
470 // Note that we do the banging after the frame is setup, since the exception 449 // Note that we do the banging after the frame is setup, since the exception
471 // handling code expects to find a valid interpreter frame on the stack. 450 // handling code expects to find a valid interpreter frame on the stack.