equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright 1997-2006 Sun Microsystems, Inc. All Rights Reserved. |
2 * Copyright 1997-2009 Sun Microsystems, Inc. All Rights Reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
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 // Decoding based on encoding: bci = InvocationEntryBci + read_int()/2; reexecute = read_int()%2 == 1 ? true : false; |
258 int read_bci() { return read_int() + InvocationEntryBci; } |
259 int read_bci_and_reexecute(bool& reexecute) { int i = read_int(); reexecute = (i & 1) ? true : false; return (i >> 1) + InvocationEntryBci; } |
|
260 }; |
259 }; |
261 |
260 |
262 // DebugInfoWriteStream specializes CompressedWriteStream for |
261 // DebugInfoWriteStream specializes CompressedWriteStream for |
263 // writing debugging information. Used by ScopeDescRecorder. |
262 // writing debugging information. Used by ScopeDescRecorder. |
264 |
263 |
267 DebugInformationRecorder* _recorder; |
266 DebugInformationRecorder* _recorder; |
268 DebugInformationRecorder* recorder() const { return _recorder; } |
267 DebugInformationRecorder* recorder() const { return _recorder; } |
269 public: |
268 public: |
270 DebugInfoWriteStream(DebugInformationRecorder* recorder, int initial_size); |
269 DebugInfoWriteStream(DebugInformationRecorder* recorder, int initial_size); |
271 void write_handle(jobject h); |
270 void write_handle(jobject h); |
272 //Encoding bci and reexecute into one word as (bci - InvocationEntryBci)*2 + reexecute |
271 void write_bci(int bci) { write_int(bci - InvocationEntryBci); } |
273 void write_bci_and_reexecute(int bci, bool reexecute) { write_int(((bci - InvocationEntryBci) << 1) + (reexecute ? 1 : 0)); } |
272 }; |
274 }; |
|