249 // Printing
250 void print_on(outputStream* st) const;
251 };
252
253 // DebugInfoReadStream specializes CompressedReadStream for reading
254 // debugging information. Used by ScopeDesc.
255
256 class DebugInfoReadStream : public CompressedReadStream {
257 private:
258 const nmethod* _code;
259 const nmethod* code() const { return _code; }
260 GrowableArray<ScopeValue*>* _obj_pool;
261 public:
262 DebugInfoReadStream(const nmethod* code, int offset, GrowableArray<ScopeValue*>* obj_pool = NULL) :
263 CompressedReadStream(code->scopes_data_begin(), offset) {
264 _code = code;
265 _obj_pool = obj_pool;
266
267 } ;
268
269 oop read_oop() {
270 oop o = code()->oop_at(read_int());
271 assert(o == NULL || o->is_oop(), "oop only");
272 return o;
273 }
274 Method* read_method() {
275 Method* o = (Method*)(code()->metadata_at(read_int()));
276 // is_metadata() is a faster check than is_metaspace_object()
277 assert(o == NULL || o->is_metadata(), "meta data only");
278 return o;
279 }
280 ScopeValue* read_object_value();
281 ScopeValue* get_cached_object();
282 // BCI encoding is mostly unsigned, but -1 is a distinguished value
283 int read_bci() { return read_int() + InvocationEntryBci; }
284 };
285
286 // DebugInfoWriteStream specializes CompressedWriteStream for
287 // writing debugging information. Used by ScopeDescRecorder.
288
289 class DebugInfoWriteStream : public CompressedWriteStream {
290 private:
291 DebugInformationRecorder* _recorder;
292 DebugInformationRecorder* recorder() const { return _recorder; }
293 public:
|
249 // Printing
250 void print_on(outputStream* st) const;
251 };
252
253 // DebugInfoReadStream specializes CompressedReadStream for reading
254 // debugging information. Used by ScopeDesc.
255
256 class DebugInfoReadStream : public CompressedReadStream {
257 private:
258 const nmethod* _code;
259 const nmethod* code() const { return _code; }
260 GrowableArray<ScopeValue*>* _obj_pool;
261 public:
262 DebugInfoReadStream(const nmethod* code, int offset, GrowableArray<ScopeValue*>* obj_pool = NULL) :
263 CompressedReadStream(code->scopes_data_begin(), offset) {
264 _code = code;
265 _obj_pool = obj_pool;
266
267 } ;
268
269 oop read_oop();
270 Method* read_method() {
271 Method* o = (Method*)(code()->metadata_at(read_int()));
272 // is_metadata() is a faster check than is_metaspace_object()
273 assert(o == NULL || o->is_metadata(), "meta data only");
274 return o;
275 }
276 ScopeValue* read_object_value();
277 ScopeValue* get_cached_object();
278 // BCI encoding is mostly unsigned, but -1 is a distinguished value
279 int read_bci() { return read_int() + InvocationEntryBci; }
280 };
281
282 // DebugInfoWriteStream specializes CompressedWriteStream for
283 // writing debugging information. Used by ScopeDescRecorder.
284
285 class DebugInfoWriteStream : public CompressedWriteStream {
286 private:
287 DebugInformationRecorder* _recorder;
288 DebugInformationRecorder* recorder() const { return _recorder; }
289 public:
|