522 // Continuation point for throwing of implicit exceptions that are
523 // not handled in the current activation. Fabricates an exception
524 // oop and initiates normal exception dispatching in this
525 // frame. Since we need to preserve callee-saved values (currently
526 // only for C2, but done for C1 as well) we need a callee-saved oop
527 // map and therefore have to make these stubs into RuntimeStubs
528 // rather than BufferBlobs. If the compiler needs all registers to
529 // be preserved between the fault point and the exception handler
530 // then it must assume responsibility for that in
531 // AbstractCompiler::continuation_for_implicit_null_exception or
532 // continuation_for_implicit_division_by_zero_exception. All other
533 // implicit exceptions (e.g., NullPointerException or
534 // AbstractMethodError on entry) are either at call sites or
535 // otherwise assume that stack unwinding will be initiated, so
536 // caller saved registers were assumed volatile in the compiler.
537 address generate_throw_exception(const char* name,
538 address runtime_entry,
539 Register arg1 = noreg,
540 Register arg2 = noreg);
541
542 void create_control_words();
543
544 // Initialization
545 void generate_initial();
546 void generate_phase1();
547 void generate_all();
548
549 public:
550 StubGenerator(CodeBuffer* code, int phase) : StubCodeGenerator(code) {
551 DEBUG_ONLY( _regs_in_thread = false; )
552 if (phase == 0) {
553 generate_initial();
554 } else if (phase == 1) {
555 generate_phase1(); // stubs that must be available for the interpreter
556 } else {
557 generate_all();
558 }
559 }
560 };
561
|
522 // Continuation point for throwing of implicit exceptions that are
523 // not handled in the current activation. Fabricates an exception
524 // oop and initiates normal exception dispatching in this
525 // frame. Since we need to preserve callee-saved values (currently
526 // only for C2, but done for C1 as well) we need a callee-saved oop
527 // map and therefore have to make these stubs into RuntimeStubs
528 // rather than BufferBlobs. If the compiler needs all registers to
529 // be preserved between the fault point and the exception handler
530 // then it must assume responsibility for that in
531 // AbstractCompiler::continuation_for_implicit_null_exception or
532 // continuation_for_implicit_division_by_zero_exception. All other
533 // implicit exceptions (e.g., NullPointerException or
534 // AbstractMethodError on entry) are either at call sites or
535 // otherwise assume that stack unwinding will be initiated, so
536 // caller saved registers were assumed volatile in the compiler.
537 address generate_throw_exception(const char* name,
538 address runtime_entry,
539 Register arg1 = noreg,
540 Register arg2 = noreg);
541
542 // interpreter or compiled code marshalling registers to/from inline type instance
543 address generate_return_value_stub(address destination, const char* name, bool has_res);
544
545 void create_control_words();
546
547 // Initialization
548 void generate_initial();
549 void generate_phase1();
550 void generate_all();
551
552 public:
553 StubGenerator(CodeBuffer* code, int phase) : StubCodeGenerator(code) {
554 DEBUG_ONLY( _regs_in_thread = false; )
555 if (phase == 0) {
556 generate_initial();
557 } else if (phase == 1) {
558 generate_phase1(); // stubs that must be available for the interpreter
559 } else {
560 generate_all();
561 }
562 }
563 };
564
|