Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(992)

Side by Side Diff: runtime/vm/exceptions.cc

Issue 2685723004: Revert "Use CodeSourceMap for stack traces (still JIT only)." (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « runtime/vm/disassembler.cc ('k') | runtime/vm/flow_graph_compiler.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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/exceptions.h" 5 #include "vm/exceptions.h"
6 6
7 #include "platform/address_sanitizer.h" 7 #include "platform/address_sanitizer.h"
8 8
9 #include "vm/dart_api_impl.h" 9 #include "vm/dart_api_impl.h"
10 #include "vm/dart_entry.h" 10 #include "vm/dart_entry.h"
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 if (cur_index_ >= StackTrace::kPreallocatedStackdepth) { 91 if (cur_index_ >= StackTrace::kPreallocatedStackdepth) {
92 // The number of frames is overflowing the preallocated stack trace object. 92 // The number of frames is overflowing the preallocated stack trace object.
93 Code& frame_code = Code::Handle(); 93 Code& frame_code = Code::Handle();
94 Smi& frame_offset = Smi::Handle(); 94 Smi& frame_offset = Smi::Handle();
95 intptr_t start = StackTrace::kPreallocatedStackdepth - (kNumTopframes - 1); 95 intptr_t start = StackTrace::kPreallocatedStackdepth - (kNumTopframes - 1);
96 intptr_t null_slot = start - 2; 96 intptr_t null_slot = start - 2;
97 // We are going to drop one frame. 97 // We are going to drop one frame.
98 dropped_frames_++; 98 dropped_frames_++;
99 // Add an empty slot to indicate the overflow so that the toString 99 // Add an empty slot to indicate the overflow so that the toString
100 // method can account for the overflow. 100 // method can account for the overflow.
101 if (stacktrace_.CodeAtFrame(null_slot) != Code::null()) { 101 if (stacktrace_.FunctionAtFrame(null_slot) != Function::null()) {
102 stacktrace_.SetCodeAtFrame(null_slot, frame_code); 102 stacktrace_.SetCodeAtFrame(null_slot, frame_code);
103 // We drop an extra frame here too. 103 // We drop an extra frame here too.
104 dropped_frames_++; 104 dropped_frames_++;
105 } 105 }
106 // Encode the number of dropped frames into the pc offset. 106 // Encode the number of dropped frames into the pc offset.
107 frame_offset ^= Smi::New(dropped_frames_); 107 frame_offset ^= Smi::New(dropped_frames_);
108 stacktrace_.SetPcOffsetAtFrame(null_slot, frame_offset); 108 stacktrace_.SetPcOffsetAtFrame(null_slot, frame_offset);
109 // Move frames one slot down so that we can accomodate the new frame. 109 // Move frames one slot down so that we can accomodate the new frame.
110 for (intptr_t i = start; i < StackTrace::kPreallocatedStackdepth; i++) { 110 for (intptr_t i = start; i < StackTrace::kPreallocatedStackdepth; i++) {
111 intptr_t prev = (i - 1); 111 intptr_t prev = (i - 1);
(...skipping 701 matching lines...) Expand 10 before | Expand all | Expand 10 after
813 class_name = &Symbols::_CompileTimeError(); 813 class_name = &Symbols::_CompileTimeError();
814 break; 814 break;
815 } 815 }
816 816
817 return DartLibraryCalls::InstanceCreate(library, *class_name, 817 return DartLibraryCalls::InstanceCreate(library, *class_name,
818 *constructor_name, arguments); 818 *constructor_name, arguments);
819 } 819 }
820 820
821 821
822 } // namespace dart 822 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/disassembler.cc ('k') | runtime/vm/flow_graph_compiler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698