| 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 21331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 21342 frame_strings.Add(chars); | 21342 frame_strings.Add(chars); |
| 21343 total_len += truncated_len; | 21343 total_len += truncated_len; |
| 21344 ASSERT(PcOffsetAtFrame(i) != Smi::null()); | 21344 ASSERT(PcOffsetAtFrame(i) != Smi::null()); |
| 21345 // To account for gap frames. | 21345 // To account for gap frames. |
| 21346 (*frame_index) += Smi::Value(PcOffsetAtFrame(i)); | 21346 (*frame_index) += Smi::Value(PcOffsetAtFrame(i)); |
| 21347 } | 21347 } |
| 21348 } else { | 21348 } else { |
| 21349 code = CodeAtFrame(i); | 21349 code = CodeAtFrame(i); |
| 21350 ASSERT(function.raw() == code.function()); | 21350 ASSERT(function.raw() == code.function()); |
| 21351 uword pc = code.EntryPoint() + Smi::Value(PcOffsetAtFrame(i)); | 21351 uword pc = code.EntryPoint() + Smi::Value(PcOffsetAtFrame(i)); |
| 21352 if (code.is_optimized() && expand_inlined() && !FLAG_precompiled_mode) { | 21352 if (code.is_optimized() && |
| 21353 expand_inlined() && |
| 21354 !FLAG_precompiled_runtime) { |
| 21353 // Traverse inlined frames. | 21355 // Traverse inlined frames. |
| 21354 for (InlinedFunctionsIterator it(code, pc); | 21356 for (InlinedFunctionsIterator it(code, pc); |
| 21355 !it.Done() && (*frame_index < max_frames); it.Advance()) { | 21357 !it.Done() && (*frame_index < max_frames); it.Advance()) { |
| 21356 function = it.function(); | 21358 function = it.function(); |
| 21357 if (function.is_visible() || FLAG_show_invisible_frames) { | 21359 if (function.is_visible() || FLAG_show_invisible_frames) { |
| 21358 code = it.code(); | 21360 code = it.code(); |
| 21359 ASSERT(function.raw() == code.function()); | 21361 ASSERT(function.raw() == code.function()); |
| 21360 uword pc = it.pc(); | 21362 uword pc = it.pc(); |
| 21361 ASSERT(pc != 0); | 21363 ASSERT(pc != 0); |
| 21362 ASSERT(code.EntryPoint() <= pc); | 21364 ASSERT(code.EntryPoint() <= pc); |
| (...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 21695 return UserTag::null(); | 21697 return UserTag::null(); |
| 21696 } | 21698 } |
| 21697 | 21699 |
| 21698 | 21700 |
| 21699 const char* UserTag::ToCString() const { | 21701 const char* UserTag::ToCString() const { |
| 21700 const String& tag_label = String::Handle(label()); | 21702 const String& tag_label = String::Handle(label()); |
| 21701 return tag_label.ToCString(); | 21703 return tag_label.ToCString(); |
| 21702 } | 21704 } |
| 21703 | 21705 |
| 21704 } // namespace dart | 21706 } // namespace dart |
| OLD | NEW |