Mercurial > hg > truffle
diff src/share/vm/c1/c1_LIRAssembler.cpp @ 1819:f02a8bbe6ed4
6986046: C1 valuestack cleanup
Summary: fixes an historical oddity in C1 with inlining where all of the expression stacks are kept in the topmost ValueStack instead of being in their respective ValueStacks.
Reviewed-by: never
Contributed-by: Christian Wimmer <cwimmer@uci.edu>
author | roland |
---|---|
date | Tue, 29 Dec 2009 19:08:54 +0100 |
parents | d5d065957597 |
children | f95d63e2154a |
line wrap: on
line diff
--- a/src/share/vm/c1/c1_LIRAssembler.cpp Wed Sep 22 23:51:03 2010 -0700 +++ b/src/share/vm/c1/c1_LIRAssembler.cpp Tue Dec 29 19:08:54 2009 +0100 @@ -35,7 +35,7 @@ append_patching_stub(patch); #ifdef ASSERT - Bytecodes::Code code = info->scope()->method()->java_code_at_bci(info->bci()); + Bytecodes::Code code = info->scope()->method()->java_code_at_bci(info->stack()->bci()); if (patch->id() == PatchingStub::access_field_id) { switch (code) { case Bytecodes::_putstatic: @@ -221,7 +221,7 @@ #ifndef PRODUCT if (CommentedAssembly) { stringStream st; - st.print_cr(" block B%d [%d, %d]", block->block_id(), block->bci(), block->end()->bci()); + st.print_cr(" block B%d [%d, %d]", block->block_id(), block->bci(), block->end()->printable_bci()); _masm->block_comment(st.as_string()); } #endif @@ -312,7 +312,7 @@ static ValueStack* debug_info(Instruction* ins) { StateSplit* ss = ins->as_StateSplit(); if (ss != NULL) return ss->state(); - return ins->lock_stack(); + return ins->state_before(); } void LIR_Assembler::process_debug_info(LIR_Op* op) { @@ -327,8 +327,7 @@ if (vstack == NULL) return; if (_pending_non_safepoint != NULL) { // Got some old debug info. Get rid of it. - if (_pending_non_safepoint->bci() == src->bci() && - debug_info(_pending_non_safepoint) == vstack) { + if (debug_info(_pending_non_safepoint) == vstack) { _pending_non_safepoint_offset = pc_offset; return; } @@ -358,7 +357,7 @@ ValueStack* tc = t->caller_state(); if (tc == NULL) return s; t = tc; - bci_result = s->scope()->caller_bci(); + bci_result = tc->bci(); s = s->caller_state(); } } @@ -366,7 +365,7 @@ void LIR_Assembler::record_non_safepoint_debug_info() { int pc_offset = _pending_non_safepoint_offset; ValueStack* vstack = debug_info(_pending_non_safepoint); - int bci = _pending_non_safepoint->bci(); + int bci = vstack->bci(); DebugInformationRecorder* debug_info = compilation()->debug_info_recorder(); assert(debug_info->recording_non_safepoints(), "sanity"); @@ -380,7 +379,7 @@ if (s == NULL) break; IRScope* scope = s->scope(); //Always pass false for reexecute since these ScopeDescs are never used for deopt - debug_info->describe_scope(pc_offset, scope->method(), s_bci, false/*reexecute*/); + debug_info->describe_scope(pc_offset, scope->method(), s->bci(), false/*reexecute*/); } debug_info->end_non_safepoint(pc_offset);