181 182 private: 183 184 // Implicit exception support 185 static void throw_null_exception_C(JavaThread* thread); 186 187 // Exception handling 188 static address handle_exception_C (JavaThread* thread); 189 static address handle_exception_C_helper(JavaThread* thread, nmethod*& nm); 190 static address rethrow_C (oopDesc* exception, JavaThread *thread, address return_pc ); 191 static void deoptimize_caller_frame (JavaThread *thread); 192 static void deoptimize_caller_frame (JavaThread *thread, bool doit); 193 static bool is_deoptimized_caller_frame (JavaThread *thread); 194 195 // CodeBlob support 196 // =================================================================== 197 198 static ExceptionBlob* _exception_blob; 199 static void generate_exception_blob(); 200 201 static void register_finalizer(oopDesc* obj, JavaThread* thread); 202 203 // zaping dead locals, either from Java frames or from native frames 204 # ifdef ENABLE_ZAP_DEAD_LOCALS 205 static void zap_dead_Java_locals_C( JavaThread* thread); 206 static void zap_dead_native_locals_C( JavaThread* thread); 207 208 static void zap_dead_java_or_native_locals( JavaThread*, bool (*)(frame*)); 209 210 public: 211 static int ZapDeadCompiledLocals_count; 212 213 # endif 214 215 216 public: 217 218 static bool is_callee_saved_register(MachRegisterNumbers reg); 219 220 // One time only generate runtime code stubs. Returns true 234 static address multianewarray4_Java() { return _multianewarray4_Java; } 235 static address multianewarray5_Java() { return _multianewarray5_Java; } 236 static address multianewarrayN_Java() { return _multianewarrayN_Java; } 237 static address g1_wb_pre_Java() { return _g1_wb_pre_Java; } 238 static address g1_wb_post_Java() { return _g1_wb_post_Java; } 239 static address vtable_must_compile_stub() { return _vtable_must_compile_Java; } 240 static address complete_monitor_locking_Java() { return _complete_monitor_locking_Java; } 241 242 static address slow_arraycopy_Java() { return _slow_arraycopy_Java; } 243 static address register_finalizer_Java() { return _register_finalizer_Java; } 244 245 246 # ifdef ENABLE_ZAP_DEAD_LOCALS 247 static address zap_dead_locals_stub(bool is_native) { return is_native 248 ? _zap_dead_native_locals_Java 249 : _zap_dead_Java_locals_Java; } 250 static MachNode* node_to_call_zap_dead_locals(Node* n, int block_num, bool is_native); 251 # endif 252 253 static ExceptionBlob* exception_blob() { return _exception_blob; } 254 255 // Leaf routines helping with method data update 256 static void profile_receiver_type_C(DataLayout* data, oopDesc* receiver); 257 258 // Implicit exception support 259 static void throw_div0_exception_C (JavaThread* thread); 260 static void throw_stack_overflow_error_C(JavaThread* thread); 261 262 // Exception handling 263 static address rethrow_stub() { return _rethrow_Java; } 264 265 266 // Type functions 267 // ====================================================== 268 269 static const TypeFunc* new_instance_Type(); // object allocation (slow case) 270 static const TypeFunc* new_array_Type (); // [a]newarray (slow case) 271 static const TypeFunc* multianewarray_Type(int ndim); // multianewarray 272 static const TypeFunc* multianewarray2_Type(); // multianewarray 273 static const TypeFunc* multianewarray3_Type(); // multianewarray | 181 182 private: 183 184 // Implicit exception support 185 static void throw_null_exception_C(JavaThread* thread); 186 187 // Exception handling 188 static address handle_exception_C (JavaThread* thread); 189 static address handle_exception_C_helper(JavaThread* thread, nmethod*& nm); 190 static address rethrow_C (oopDesc* exception, JavaThread *thread, address return_pc ); 191 static void deoptimize_caller_frame (JavaThread *thread); 192 static void deoptimize_caller_frame (JavaThread *thread, bool doit); 193 static bool is_deoptimized_caller_frame (JavaThread *thread); 194 195 // CodeBlob support 196 // =================================================================== 197 198 static ExceptionBlob* _exception_blob; 199 static void generate_exception_blob(); 200 201 static RuntimeStub* _complete_monitor_unlocking_wrapper; 202 static void generate_complete_monitor_unlocking_wrapper(); 203 204 static void register_finalizer(oopDesc* obj, JavaThread* thread); 205 206 // zaping dead locals, either from Java frames or from native frames 207 # ifdef ENABLE_ZAP_DEAD_LOCALS 208 static void zap_dead_Java_locals_C( JavaThread* thread); 209 static void zap_dead_native_locals_C( JavaThread* thread); 210 211 static void zap_dead_java_or_native_locals( JavaThread*, bool (*)(frame*)); 212 213 public: 214 static int ZapDeadCompiledLocals_count; 215 216 # endif 217 218 219 public: 220 221 static bool is_callee_saved_register(MachRegisterNumbers reg); 222 223 // One time only generate runtime code stubs. Returns true 237 static address multianewarray4_Java() { return _multianewarray4_Java; } 238 static address multianewarray5_Java() { return _multianewarray5_Java; } 239 static address multianewarrayN_Java() { return _multianewarrayN_Java; } 240 static address g1_wb_pre_Java() { return _g1_wb_pre_Java; } 241 static address g1_wb_post_Java() { return _g1_wb_post_Java; } 242 static address vtable_must_compile_stub() { return _vtable_must_compile_Java; } 243 static address complete_monitor_locking_Java() { return _complete_monitor_locking_Java; } 244 245 static address slow_arraycopy_Java() { return _slow_arraycopy_Java; } 246 static address register_finalizer_Java() { return _register_finalizer_Java; } 247 248 249 # ifdef ENABLE_ZAP_DEAD_LOCALS 250 static address zap_dead_locals_stub(bool is_native) { return is_native 251 ? _zap_dead_native_locals_Java 252 : _zap_dead_Java_locals_Java; } 253 static MachNode* node_to_call_zap_dead_locals(Node* n, int block_num, bool is_native); 254 # endif 255 256 static ExceptionBlob* exception_blob() { return _exception_blob; } 257 258 static RuntimeStub* complete_monitor_unlocking_wrapper() { return _complete_monitor_unlocking_wrapper; } 259 260 // Leaf routines helping with method data update 261 static void profile_receiver_type_C(DataLayout* data, oopDesc* receiver); 262 263 // Implicit exception support 264 static void throw_div0_exception_C (JavaThread* thread); 265 static void throw_stack_overflow_error_C(JavaThread* thread); 266 267 // Exception handling 268 static address rethrow_stub() { return _rethrow_Java; } 269 270 271 // Type functions 272 // ====================================================== 273 274 static const TypeFunc* new_instance_Type(); // object allocation (slow case) 275 static const TypeFunc* new_array_Type (); // [a]newarray (slow case) 276 static const TypeFunc* multianewarray_Type(int ndim); // multianewarray 277 static const TypeFunc* multianewarray2_Type(); // multianewarray 278 static const TypeFunc* multianewarray3_Type(); // multianewarray |