362 s = s->caller_state();
363 }
364 }
365
366 void LIR_Assembler::record_non_safepoint_debug_info() {
367 int pc_offset = _pending_non_safepoint_offset;
368 ValueStack* vstack = debug_info(_pending_non_safepoint);
369 int bci = _pending_non_safepoint->bci();
370
371 DebugInformationRecorder* debug_info = compilation()->debug_info_recorder();
372 assert(debug_info->recording_non_safepoints(), "sanity");
373
374 debug_info->add_non_safepoint(pc_offset);
375
376 // Visit scopes from oldest to youngest.
377 for (int n = 0; ; n++) {
378 int s_bci = bci;
379 ValueStack* s = nth_oldest(vstack, n, s_bci);
380 if (s == NULL) break;
381 IRScope* scope = s->scope();
382 debug_info->describe_scope(pc_offset, scope->method(), s_bci);
383 }
384
385 debug_info->end_non_safepoint(pc_offset);
386 }
387
388
389 void LIR_Assembler::add_debug_info_for_null_check_here(CodeEmitInfo* cinfo) {
390 add_debug_info_for_null_check(code_offset(), cinfo);
391 }
392
393 void LIR_Assembler::add_debug_info_for_null_check(int pc_offset, CodeEmitInfo* cinfo) {
394 ImplicitNullCheckStub* stub = new ImplicitNullCheckStub(pc_offset, cinfo);
395 emit_code_stub(stub);
396 }
397
398 void LIR_Assembler::add_debug_info_for_div0_here(CodeEmitInfo* info) {
399 add_debug_info_for_div0(code_offset(), info);
400 }
401
402 void LIR_Assembler::add_debug_info_for_div0(int pc_offset, CodeEmitInfo* cinfo) {
|
362 s = s->caller_state();
363 }
364 }
365
366 void LIR_Assembler::record_non_safepoint_debug_info() {
367 int pc_offset = _pending_non_safepoint_offset;
368 ValueStack* vstack = debug_info(_pending_non_safepoint);
369 int bci = _pending_non_safepoint->bci();
370
371 DebugInformationRecorder* debug_info = compilation()->debug_info_recorder();
372 assert(debug_info->recording_non_safepoints(), "sanity");
373
374 debug_info->add_non_safepoint(pc_offset);
375
376 // Visit scopes from oldest to youngest.
377 for (int n = 0; ; n++) {
378 int s_bci = bci;
379 ValueStack* s = nth_oldest(vstack, n, s_bci);
380 if (s == NULL) break;
381 IRScope* scope = s->scope();
382 //Always pass false for reexecute since these ScopeDescs are never used for deopt
383 debug_info->describe_scope(pc_offset, scope->method(), s_bci, false/*reexecute*/);
384 }
385
386 debug_info->end_non_safepoint(pc_offset);
387 }
388
389
390 void LIR_Assembler::add_debug_info_for_null_check_here(CodeEmitInfo* cinfo) {
391 add_debug_info_for_null_check(code_offset(), cinfo);
392 }
393
394 void LIR_Assembler::add_debug_info_for_null_check(int pc_offset, CodeEmitInfo* cinfo) {
395 ImplicitNullCheckStub* stub = new ImplicitNullCheckStub(pc_offset, cinfo);
396 emit_code_stub(stub);
397 }
398
399 void LIR_Assembler::add_debug_info_for_div0_here(CodeEmitInfo* info) {
400 add_debug_info_for_div0(code_offset(), info);
401 }
402
403 void LIR_Assembler::add_debug_info_for_div0(int pc_offset, CodeEmitInfo* cinfo) {
|