mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 06:14:49 +02:00
6833129: specjvm98 fails with NullPointerException in the compiler with -XX:DeoptimizeALot
Developed a reexecute logic for the interpreter to reexecute the bytecode when deopt happens Reviewed-by: kvn, never, jrose, twisti
This commit is contained in:
parent
f2ea22a547
commit
ae00753bf7
29 changed files with 465 additions and 241 deletions
|
@ -255,7 +255,8 @@ class DebugInfoReadStream : public CompressedReadStream {
|
|||
ScopeValue* read_object_value();
|
||||
ScopeValue* get_cached_object();
|
||||
// BCI encoding is mostly unsigned, but -1 is a distinguished value
|
||||
int read_bci() { return read_int() + InvocationEntryBci; }
|
||||
// Decoding based on encoding: bci = InvocationEntryBci + read_int()/2; reexecute = read_int()%2 == 1 ? true : false;
|
||||
int read_bci_and_reexecute(bool& reexecute) { int i = read_int(); reexecute = (i & 1) ? true : false; return (i >> 1) + InvocationEntryBci; }
|
||||
};
|
||||
|
||||
// DebugInfoWriteStream specializes CompressedWriteStream for
|
||||
|
@ -268,5 +269,6 @@ class DebugInfoWriteStream : public CompressedWriteStream {
|
|||
public:
|
||||
DebugInfoWriteStream(DebugInformationRecorder* recorder, int initial_size);
|
||||
void write_handle(jobject h);
|
||||
void write_bci(int bci) { write_int(bci - InvocationEntryBci); }
|
||||
//Encoding bci and reexecute into one word as (bci - InvocationEntryBci)*2 + reexecute
|
||||
void write_bci_and_reexecute(int bci, bool reexecute) { write_int(((bci - InvocationEntryBci) << 1) + (reexecute ? 1 : 0)); }
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue