388 }
389 }
390
391 void LIR_Assembler::record_non_safepoint_debug_info() {
392 int pc_offset = _pending_non_safepoint_offset;
393 ValueStack* vstack = debug_info(_pending_non_safepoint);
394 int bci = vstack->bci();
395
396 DebugInformationRecorder* debug_info = compilation()->debug_info_recorder();
397 assert(debug_info->recording_non_safepoints(), "sanity");
398
399 debug_info->add_non_safepoint(pc_offset);
400
401 // Visit scopes from oldest to youngest.
402 for (int n = 0; ; n++) {
403 int s_bci = bci;
404 ValueStack* s = nth_oldest(vstack, n, s_bci);
405 if (s == NULL) break;
406 IRScope* scope = s->scope();
407 //Always pass false for reexecute since these ScopeDescs are never used for deopt
408 debug_info->describe_scope(pc_offset, scope->method(), s->bci(), false/*reexecute*/);
409 }
410
411 debug_info->end_non_safepoint(pc_offset);
412 }
413
414
415 void LIR_Assembler::add_debug_info_for_null_check_here(CodeEmitInfo* cinfo) {
416 add_debug_info_for_null_check(code_offset(), cinfo);
417 }
418
419 void LIR_Assembler::add_debug_info_for_null_check(int pc_offset, CodeEmitInfo* cinfo) {
420 ImplicitNullCheckStub* stub = new ImplicitNullCheckStub(pc_offset, cinfo);
421 append_code_stub(stub);
422 }
423
424 void LIR_Assembler::add_debug_info_for_div0_here(CodeEmitInfo* info) {
425 add_debug_info_for_div0(code_offset(), info);
426 }
427
428 void LIR_Assembler::add_debug_info_for_div0(int pc_offset, CodeEmitInfo* cinfo) {
|
388 }
389 }
390
391 void LIR_Assembler::record_non_safepoint_debug_info() {
392 int pc_offset = _pending_non_safepoint_offset;
393 ValueStack* vstack = debug_info(_pending_non_safepoint);
394 int bci = vstack->bci();
395
396 DebugInformationRecorder* debug_info = compilation()->debug_info_recorder();
397 assert(debug_info->recording_non_safepoints(), "sanity");
398
399 debug_info->add_non_safepoint(pc_offset);
400
401 // Visit scopes from oldest to youngest.
402 for (int n = 0; ; n++) {
403 int s_bci = bci;
404 ValueStack* s = nth_oldest(vstack, n, s_bci);
405 if (s == NULL) break;
406 IRScope* scope = s->scope();
407 //Always pass false for reexecute since these ScopeDescs are never used for deopt
408 methodHandle null_mh;
409 debug_info->describe_scope(pc_offset, null_mh, scope->method(), s->bci(), false/*reexecute*/);
410 }
411
412 debug_info->end_non_safepoint(pc_offset);
413 }
414
415
416 void LIR_Assembler::add_debug_info_for_null_check_here(CodeEmitInfo* cinfo) {
417 add_debug_info_for_null_check(code_offset(), cinfo);
418 }
419
420 void LIR_Assembler::add_debug_info_for_null_check(int pc_offset, CodeEmitInfo* cinfo) {
421 ImplicitNullCheckStub* stub = new ImplicitNullCheckStub(pc_offset, cinfo);
422 append_code_stub(stub);
423 }
424
425 void LIR_Assembler::add_debug_info_for_div0_here(CodeEmitInfo* info) {
426 add_debug_info_for_div0(code_offset(), info);
427 }
428
429 void LIR_Assembler::add_debug_info_for_div0(int pc_offset, CodeEmitInfo* cinfo) {
|