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 debug_info->describe_scope(pc_offset, scope->method(), s_bci, false);
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) {
|