6873116: Modify reexecute implementation to use pcDesc to record the reexecute bit

Use PcDesc to keep record of the reexecute bit instead of using DebugInfoStreams

Reviewed-by: kvn, never, twisti
This commit is contained in:
Changpeng Fang 2009-08-20 12:42:57 -07:00
parent 15b6cdf897
commit ff9a1bddb5
16 changed files with 76 additions and 58 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright 1997-2006 Sun Microsystems, Inc. All Rights Reserved.
* Copyright 1997-2009 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -255,8 +255,7 @@ class DebugInfoReadStream : public CompressedReadStream {
ScopeValue* read_object_value();
ScopeValue* get_cached_object();
// BCI encoding is mostly unsigned, but -1 is a distinguished value
// 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; }
int read_bci() { return read_int() + InvocationEntryBci; }
};
// DebugInfoWriteStream specializes CompressedWriteStream for
@ -269,6 +268,5 @@ class DebugInfoWriteStream : public CompressedWriteStream {
public:
DebugInfoWriteStream(DebugInformationRecorder* recorder, int initial_size);
void write_handle(jobject h);
//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)); }
void write_bci(int bci) { write_int(bci - InvocationEntryBci); }
};