Mercurial > hg > graal-jvmci-8
comparison src/share/vm/code/debugInfo.hpp @ 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 | a61af66fc99e |
children | 72088be4b386 |
comparison
equal
deleted
inserted
replaced
899:55cb84cd1247 | 900:9987d9d5eb0e |
---|---|
253 return code()->oop_at(read_int()); | 253 return code()->oop_at(read_int()); |
254 } | 254 } |
255 ScopeValue* read_object_value(); | 255 ScopeValue* read_object_value(); |
256 ScopeValue* get_cached_object(); | 256 ScopeValue* get_cached_object(); |
257 // BCI encoding is mostly unsigned, but -1 is a distinguished value | 257 // BCI encoding is mostly unsigned, but -1 is a distinguished value |
258 int read_bci() { return read_int() + InvocationEntryBci; } | 258 // Decoding based on encoding: bci = InvocationEntryBci + read_int()/2; reexecute = read_int()%2 == 1 ? true : false; |
259 int read_bci_and_reexecute(bool& reexecute) { int i = read_int(); reexecute = (i & 1) ? true : false; return (i >> 1) + InvocationEntryBci; } | |
259 }; | 260 }; |
260 | 261 |
261 // DebugInfoWriteStream specializes CompressedWriteStream for | 262 // DebugInfoWriteStream specializes CompressedWriteStream for |
262 // writing debugging information. Used by ScopeDescRecorder. | 263 // writing debugging information. Used by ScopeDescRecorder. |
263 | 264 |
266 DebugInformationRecorder* _recorder; | 267 DebugInformationRecorder* _recorder; |
267 DebugInformationRecorder* recorder() const { return _recorder; } | 268 DebugInformationRecorder* recorder() const { return _recorder; } |
268 public: | 269 public: |
269 DebugInfoWriteStream(DebugInformationRecorder* recorder, int initial_size); | 270 DebugInfoWriteStream(DebugInformationRecorder* recorder, int initial_size); |
270 void write_handle(jobject h); | 271 void write_handle(jobject h); |
271 void write_bci(int bci) { write_int(bci - InvocationEntryBci); } | 272 //Encoding bci and reexecute into one word as (bci - InvocationEntryBci)*2 + reexecute |
272 }; | 273 void write_bci_and_reexecute(int bci, bool reexecute) { write_int(((bci - InvocationEntryBci) << 1) + (reexecute ? 1 : 0)); } |
274 }; |