Mercurial > hg > truffle
comparison src/share/vm/code/scopeDesc.cpp @ 6948:e522a00b91aa
Merge with http://hg.openjdk.java.net/hsx/hsx25/hotspot/ after NPG - C++ build works
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Mon, 12 Nov 2012 23:14:12 +0100 |
parents | 5857923e563c da91efe96a93 |
children | b6a8f2d23057 |
comparison
equal
deleted
inserted
replaced
6711:ae13cc658b80 | 6948:e522a00b91aa |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 1997, 2012, Oracle and/or its affiliates. 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. |
66 void ScopeDesc::decode_body() { | 66 void ScopeDesc::decode_body() { |
67 if (decode_offset() == DebugInformationRecorder::serialized_null) { | 67 if (decode_offset() == DebugInformationRecorder::serialized_null) { |
68 // This is a sentinel record, which is only relevant to | 68 // This is a sentinel record, which is only relevant to |
69 // approximate queries. Decode a reasonable frame. | 69 // approximate queries. Decode a reasonable frame. |
70 _sender_decode_offset = DebugInformationRecorder::serialized_null; | 70 _sender_decode_offset = DebugInformationRecorder::serialized_null; |
71 _method = methodHandle(_code->method()); | 71 _method = _code->method(); |
72 _bci = InvocationEntryBci; | 72 _bci = InvocationEntryBci; |
73 _locals_decode_offset = DebugInformationRecorder::serialized_null; | 73 _locals_decode_offset = DebugInformationRecorder::serialized_null; |
74 _expressions_decode_offset = DebugInformationRecorder::serialized_null; | 74 _expressions_decode_offset = DebugInformationRecorder::serialized_null; |
75 _monitors_decode_offset = DebugInformationRecorder::serialized_null; | 75 _monitors_decode_offset = DebugInformationRecorder::serialized_null; |
76 } else { | 76 } else { |
77 // decode header | 77 // decode header |
78 DebugInfoReadStream* stream = stream_at(decode_offset()); | 78 DebugInfoReadStream* stream = stream_at(decode_offset()); |
79 | 79 |
80 _sender_decode_offset = stream->read_int(); | 80 _sender_decode_offset = stream->read_int(); |
81 _method = methodHandle((methodOop) stream->read_oop()); | 81 _method = stream->read_method(); |
82 _bci = stream->read_bci(); | 82 _bci = stream->read_bci(); |
83 | 83 |
84 // decode offsets for body and sender | 84 // decode offsets for body and sender |
85 _locals_decode_offset = stream->read_int(); | 85 _locals_decode_offset = stream->read_int(); |
86 _expressions_decode_offset = stream->read_int(); | 86 _expressions_decode_offset = stream->read_int(); |
158 | 158 |
159 #ifndef PRODUCT | 159 #ifndef PRODUCT |
160 | 160 |
161 void ScopeDesc::print_value_on(outputStream* st) const { | 161 void ScopeDesc::print_value_on(outputStream* st) const { |
162 tty->print(" "); | 162 tty->print(" "); |
163 method()()->print_short_name(st); | 163 method()->print_short_name(st); |
164 int lineno = method()->line_number_from_bci(bci()); | 164 int lineno = method()->line_number_from_bci(bci()); |
165 if (lineno != -1) { | 165 if (lineno != -1) { |
166 st->print_cr("@%d (line %d)", bci(), lineno); | 166 st->print_cr("@%d (line %d)", bci(), lineno); |
167 } else { | 167 } else { |
168 st->print_cr("@%d", bci()); | 168 st->print_cr("@%d", bci()); |