GrowableArray<ScopeValue*>* ScopeDesc::decode_scope_values(int decode_offset) { if (decode_offset == DebugInformationRecorder::serialized_null) return NULL; DebugInfoReadStream* stream = stream_at(decode_offset); int length = stream->read_int(); GrowableArray<ScopeValue*>* result = new GrowableArray<ScopeValue*> (length); for (int index = 0; index < length; index++) { result->push(ScopeValue::read_from(stream)); } return result; }
ScopeDesc::ScopeDesc(const nmethod* code, int decode_offset) { _code = code; _decode_offset = decode_offset; // decode header DebugInfoReadStream* stream = stream_at(_decode_offset); _sender_decode_offset = stream->read_int(); _method = methodHandle((methodOop) stream->read_handle()()); _bci = stream->read_int(); // decode offsets for body and sender _locals_decode_offset = stream->read_int(); _expressions_decode_offset = stream->read_int(); _monitors_decode_offset = stream->read_int(); }
void ScopeDesc::decode_body() { if (decode_offset() == DebugInformationRecorder::serialized_null) { // This is a sentinel record, which is only relevant to // approximate queries. Decode a reasonable frame. _sender_decode_offset = DebugInformationRecorder::serialized_null; _method = _code->method(); _bci = InvocationEntryBci; _locals_decode_offset = DebugInformationRecorder::serialized_null; _expressions_decode_offset = DebugInformationRecorder::serialized_null; _monitors_decode_offset = DebugInformationRecorder::serialized_null; } else { // decode header DebugInfoReadStream* stream = stream_at(decode_offset()); _sender_decode_offset = stream->read_int(); _method = stream->read_method(); _bci = stream->read_bci(); // decode offsets for body and sender _locals_decode_offset = stream->read_int(); _expressions_decode_offset = stream->read_int(); _monitors_decode_offset = stream->read_int(); } }