OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 #include "vm/object.h" | 5 #include "vm/object.h" |
6 | 6 |
7 #include "include/dart_api.h" | 7 #include "include/dart_api.h" |
8 #include "platform/assert.h" | 8 #include "platform/assert.h" |
9 #include "vm/assembler.h" | 9 #include "vm/assembler.h" |
10 #include "vm/cpu.h" | 10 #include "vm/cpu.h" |
(...skipping 18031 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
18042 frame_strings.Add(chars); | 18042 frame_strings.Add(chars); |
18043 } | 18043 } |
18044 } else if (function.is_visible() || FLAG_verbose_stacktrace) { | 18044 } else if (function.is_visible() || FLAG_verbose_stacktrace) { |
18045 code = CodeAtFrame(i); | 18045 code = CodeAtFrame(i); |
18046 ASSERT(function.raw() == code.function()); | 18046 ASSERT(function.raw() == code.function()); |
18047 uword pc = code.EntryPoint() + Smi::Value(PcOffsetAtFrame(i)); | 18047 uword pc = code.EntryPoint() + Smi::Value(PcOffsetAtFrame(i)); |
18048 if (code.is_optimized() && expand_inlined()) { | 18048 if (code.is_optimized() && expand_inlined()) { |
18049 // Traverse inlined frames. | 18049 // Traverse inlined frames. |
18050 for (InlinedFunctionsIterator it(code, pc); !it.Done(); it.Advance()) { | 18050 for (InlinedFunctionsIterator it(code, pc); !it.Done(); it.Advance()) { |
18051 function = it.function(); | 18051 function = it.function(); |
18052 code = it.code(); | 18052 if (function.is_visible() || FLAG_verbose_stacktrace) { |
18053 ASSERT(function.raw() == code.function()); | 18053 code = it.code(); |
18054 uword pc = it.pc(); | 18054 ASSERT(function.raw() == code.function()); |
18055 ASSERT(pc != 0); | 18055 uword pc = it.pc(); |
18056 ASSERT(code.EntryPoint() <= pc); | 18056 ASSERT(pc != 0); |
18057 ASSERT(pc < (code.EntryPoint() + code.Size())); | 18057 ASSERT(code.EntryPoint() <= pc); |
18058 total_len += PrintOneStacktrace( | 18058 ASSERT(pc < (code.EntryPoint() + code.Size())); |
18059 isolate, &frame_strings, pc, function, code, *frame_index); | 18059 total_len += PrintOneStacktrace( |
| 18060 isolate, &frame_strings, pc, function, code, *frame_index); |
| 18061 } |
18060 (*frame_index)++; // To account for inlined frames. | 18062 (*frame_index)++; // To account for inlined frames. |
18061 } | 18063 } |
18062 } else { | 18064 } else { |
18063 total_len += PrintOneStacktrace( | 18065 total_len += PrintOneStacktrace( |
18064 isolate, &frame_strings, pc, function, code, *frame_index); | 18066 isolate, &frame_strings, pc, function, code, *frame_index); |
18065 (*frame_index)++; | 18067 (*frame_index)++; |
18066 } | 18068 } |
18067 } | 18069 } |
18068 } | 18070 } |
18069 | 18071 |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
18260 return "_MirrorReference"; | 18262 return "_MirrorReference"; |
18261 } | 18263 } |
18262 | 18264 |
18263 | 18265 |
18264 void MirrorReference::PrintToJSONStream(JSONStream* stream, bool ref) const { | 18266 void MirrorReference::PrintToJSONStream(JSONStream* stream, bool ref) const { |
18265 Instance::PrintToJSONStream(stream, ref); | 18267 Instance::PrintToJSONStream(stream, ref); |
18266 } | 18268 } |
18267 | 18269 |
18268 | 18270 |
18269 } // namespace dart | 18271 } // namespace dart |
OLD | NEW |