770 // code) |
770 // code) |
771 volatile oop _exception_oop; // Exception thrown in compiled code |
771 volatile oop _exception_oop; // Exception thrown in compiled code |
772 volatile address _exception_pc; // PC where exception happened |
772 volatile address _exception_pc; // PC where exception happened |
773 volatile address _exception_handler_pc; // PC for handler of exception |
773 volatile address _exception_handler_pc; // PC for handler of exception |
774 volatile int _exception_stack_size; // Size of frame where exception happened |
774 volatile int _exception_stack_size; // Size of frame where exception happened |
775 volatile int _is_method_handle_exception; // True if the current exception PC is at a MethodHandle call. |
775 volatile int _is_method_handle_return; // true (== 1) if the current exception PC is a MethodHandle call site. |
776 |
776 |
777 // support for compilation |
777 // support for compilation |
778 bool _is_compiling; // is true if a compilation is active inthis thread (one compilation per thread possible) |
778 bool _is_compiling; // is true if a compilation is active inthis thread (one compilation per thread possible) |
779 |
779 |
780 // support for JNI critical regions |
780 // support for JNI critical regions |
1106 // Exception handling for compiled methods |
1106 // Exception handling for compiled methods |
1107 oop exception_oop() const { return _exception_oop; } |
1107 oop exception_oop() const { return _exception_oop; } |
1108 int exception_stack_size() const { return _exception_stack_size; } |
1108 int exception_stack_size() const { return _exception_stack_size; } |
1109 address exception_pc() const { return _exception_pc; } |
1109 address exception_pc() const { return _exception_pc; } |
1110 address exception_handler_pc() const { return _exception_handler_pc; } |
1110 address exception_handler_pc() const { return _exception_handler_pc; } |
1111 int is_method_handle_exception() const { return _is_method_handle_exception; } |
1111 bool is_method_handle_return() const { return _is_method_handle_return == 1; } |
1112 |
1112 |
1113 void set_exception_oop(oop o) { _exception_oop = o; } |
1113 void set_exception_oop(oop o) { _exception_oop = o; } |
1114 void set_exception_pc(address a) { _exception_pc = a; } |
1114 void set_exception_pc(address a) { _exception_pc = a; } |
1115 void set_exception_handler_pc(address a) { _exception_handler_pc = a; } |
1115 void set_exception_handler_pc(address a) { _exception_handler_pc = a; } |
1116 void set_exception_stack_size(int size) { _exception_stack_size = size; } |
1116 void set_exception_stack_size(int size) { _exception_stack_size = size; } |
1117 void set_is_method_handle_exception(int value) { _is_method_handle_exception = value; } |
1117 void set_is_method_handle_return(bool value) { _is_method_handle_return = value ? 1 : 0; } |
1118 |
1118 |
1119 // Stack overflow support |
1119 // Stack overflow support |
1120 inline size_t stack_available(address cur_sp); |
1120 inline size_t stack_available(address cur_sp); |
1121 address stack_yellow_zone_base() |
1121 address stack_yellow_zone_base() |
1122 { return (address)(stack_base() - (stack_size() - (stack_red_zone_size() + stack_yellow_zone_size()))); } |
1122 { return (address)(stack_base() - (stack_size() - (stack_red_zone_size() + stack_yellow_zone_size()))); } |
1186 static ByteSize osthread_offset() { return byte_offset_of(JavaThread, _osthread ); } |
1186 static ByteSize osthread_offset() { return byte_offset_of(JavaThread, _osthread ); } |
1187 static ByteSize exception_oop_offset() { return byte_offset_of(JavaThread, _exception_oop ); } |
1187 static ByteSize exception_oop_offset() { return byte_offset_of(JavaThread, _exception_oop ); } |
1188 static ByteSize exception_pc_offset() { return byte_offset_of(JavaThread, _exception_pc ); } |
1188 static ByteSize exception_pc_offset() { return byte_offset_of(JavaThread, _exception_pc ); } |
1189 static ByteSize exception_handler_pc_offset() { return byte_offset_of(JavaThread, _exception_handler_pc); } |
1189 static ByteSize exception_handler_pc_offset() { return byte_offset_of(JavaThread, _exception_handler_pc); } |
1190 static ByteSize exception_stack_size_offset() { return byte_offset_of(JavaThread, _exception_stack_size); } |
1190 static ByteSize exception_stack_size_offset() { return byte_offset_of(JavaThread, _exception_stack_size); } |
1191 static ByteSize is_method_handle_exception_offset() { return byte_offset_of(JavaThread, _is_method_handle_exception); } |
1191 static ByteSize is_method_handle_return_offset() { return byte_offset_of(JavaThread, _is_method_handle_return); } |
1192 static ByteSize stack_guard_state_offset() { return byte_offset_of(JavaThread, _stack_guard_state ); } |
1192 static ByteSize stack_guard_state_offset() { return byte_offset_of(JavaThread, _stack_guard_state ); } |
1193 static ByteSize suspend_flags_offset() { return byte_offset_of(JavaThread, _suspend_flags ); } |
1193 static ByteSize suspend_flags_offset() { return byte_offset_of(JavaThread, _suspend_flags ); } |
1194 |
1194 |
1195 static ByteSize do_not_unlock_if_synchronized_offset() { return byte_offset_of(JavaThread, _do_not_unlock_if_synchronized); } |
1195 static ByteSize do_not_unlock_if_synchronized_offset() { return byte_offset_of(JavaThread, _do_not_unlock_if_synchronized); } |
1196 static ByteSize should_post_on_exceptions_flag_offset() { |
1196 static ByteSize should_post_on_exceptions_flag_offset() { |