comparison src/share/vm/c1/c1_IR.cpp @ 900:9987d9d5eb0e

6833129: specjvm98 fails with NullPointerException in the compiler with -XX:DeoptimizeALot Summary: developed a reexecute logic for the interpreter to reexecute the bytecode when deopt happens Reviewed-by: kvn, never, jrose, twisti
author cfang
date Fri, 31 Jul 2009 17:12:33 -0700
parents ad8c8ca4ab0f
children 89e0543e1737
comparison
equal deleted inserted replaced
899:55cb84cd1247 900:9987d9d5eb0e
206 scope = scope->caller(); 206 scope = scope->caller();
207 } 207 }
208 return scope->caller_bci(); 208 return scope->caller_bci();
209 } 209 }
210 210
211 bool IRScopeDebugInfo::should_reexecute() {
212 ciMethod* cur_method = scope()->method();
213 int cur_bci = bci();
214 if (cur_method != NULL && cur_bci != SynchronizationEntryBCI) {
215 Bytecodes::Code code = cur_method->java_code_at_bci(cur_bci);
216 return Interpreter::bytecode_should_reexecute(code);
217 } else
218 return false;
219 }
211 220
212 221
213 // Implementation of CodeEmitInfo 222 // Implementation of CodeEmitInfo
214 223
215 // Stack must be NON-null 224 // Stack must be NON-null
251 260
252 261
253 void CodeEmitInfo::record_debug_info(DebugInformationRecorder* recorder, int pc_offset) { 262 void CodeEmitInfo::record_debug_info(DebugInformationRecorder* recorder, int pc_offset) {
254 // record the safepoint before recording the debug info for enclosing scopes 263 // record the safepoint before recording the debug info for enclosing scopes
255 recorder->add_safepoint(pc_offset, _oop_map->deep_copy()); 264 recorder->add_safepoint(pc_offset, _oop_map->deep_copy());
256 _scope_debug_info->record_debug_info(recorder, pc_offset); 265 _scope_debug_info->record_debug_info(recorder, pc_offset, true/*topmost*/);
257 recorder->end_safepoint(pc_offset); 266 recorder->end_safepoint(pc_offset);
258 } 267 }
259 268
260 269
261 void CodeEmitInfo::add_register_oop(LIR_Opr opr) { 270 void CodeEmitInfo::add_register_oop(LIR_Opr opr) {