146 // Look at bci and decide on bcp and continuation pc |
147 // Look at bci and decide on bcp and continuation pc |
147 address bcp; |
148 address bcp; |
148 // C++ interpreter doesn't need a pc since it will figure out what to do when it |
149 // C++ interpreter doesn't need a pc since it will figure out what to do when it |
149 // begins execution |
150 // begins execution |
150 address pc; |
151 address pc; |
151 bool use_next_mdp; // true if we should use the mdp associated with the next bci |
152 bool use_next_mdp = false; // true if we should use the mdp associated with the next bci |
152 // rather than the one associated with bcp |
153 // rather than the one associated with bcp |
153 if (raw_bci() == SynchronizationEntryBCI) { |
154 if (raw_bci() == SynchronizationEntryBCI) { |
154 // We are deoptimizing while hanging in prologue code for synchronized method |
155 // We are deoptimizing while hanging in prologue code for synchronized method |
155 bcp = method()->bcp_from(0); // first byte code |
156 bcp = method()->bcp_from(0); // first byte code |
156 pc = Interpreter::deopt_entry(vtos, 0); // step = 0 since we don't skip current bytecode |
157 pc = Interpreter::deopt_entry(vtos, 0); // step = 0 since we don't skip current bytecode |
157 use_next_mdp = false; |
158 } else if (should_reexecute()) { //reexecute this bytecode |
|
159 assert(is_top_frame, "reexecute allowed only for the top frame"); |
|
160 bcp = method()->bcp_from(bci()); |
|
161 pc = Interpreter::deopt_reexecute_entry(method(), bcp); |
158 } else { |
162 } else { |
159 bcp = method()->bcp_from(bci()); |
163 bcp = method()->bcp_from(bci()); |
160 pc = Interpreter::continuation_for(method(), bcp, callee_parameters, is_top_frame, use_next_mdp); |
164 pc = Interpreter::deopt_continue_after_entry(method(), bcp, callee_parameters, is_top_frame); |
|
165 use_next_mdp = true; |
161 } |
166 } |
162 assert(Bytecodes::is_defined(*bcp), "must be a valid bytecode"); |
167 assert(Bytecodes::is_defined(*bcp), "must be a valid bytecode"); |
163 |
168 |
164 // Monitorenter and pending exceptions: |
169 // Monitorenter and pending exceptions: |
165 // |
170 // |