--- old/src/share/vm/code/debugInfo.hpp Mon Jul 6 17:13:48 2009 +++ new/src/share/vm/code/debugInfo.hpp Mon Jul 6 17:13:48 2009 @@ -255,7 +255,8 @@ 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; restart = read_int()%2 == 1 ? true : false; + int read_bci_and_restart(bool& restart) { int i = read_int(); restart = (i & 1) ? true : false; return (i >> 1) + InvocationEntryBci; } }; // DebugInfoWriteStream specializes CompressedWriteStream for @@ -268,5 +269,6 @@ public: DebugInfoWriteStream(DebugInformationRecorder* recorder, int initial_size); void write_handle(jobject h); - void write_bci(int bci) { write_int(bci - InvocationEntryBci); } + //Encoding bci and restart into one word as (bci - InvocationEntryBci)*2 + restart + void write_bci_and_restart(int bci, bool restart) { write_int(((bci - InvocationEntryBci) << 1) + (restart ? 1 : 0)); } };