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

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

Issue 23494026: Change inlined stack frame iterator to use code and pc instead of frame. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « runtime/lib/stacktrace.cc ('k') | runtime/vm/simulator_arm.cc » ('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 "vm/dart_api_impl.h" 7 #include "vm/dart_api_impl.h"
8 #include "vm/dart_entry.h" 8 #include "vm/dart_entry.h"
9 #include "vm/debugger.h" 9 #include "vm/debugger.h"
10 #include "vm/flags.h" 10 #include "vm/flags.h"
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 Smi& offset = Smi::Handle(); 197 Smi& offset = Smi::Handle();
198 bool dart_handler_found = false; 198 bool dart_handler_found = false;
199 bool handler_pc_set = false; 199 bool handler_pc_set = false;
200 while (frame != NULL) { 200 while (frame != NULL) {
201 while (!frame->IsEntryFrame()) { 201 while (!frame->IsEntryFrame()) {
202 if (frame->IsDartFrame()) { 202 if (frame->IsDartFrame()) {
203 code = frame->LookupDartCode(); 203 code = frame->LookupDartCode();
204 if (code.is_optimized()) { 204 if (code.is_optimized()) {
205 // For optimized frames, extract all the inlined functions if any 205 // For optimized frames, extract all the inlined functions if any
206 // into the stack trace. 206 // into the stack trace.
207 for (InlinedFunctionsIterator it(frame); !it.Done(); it.Advance()) { 207 for (InlinedFunctionsIterator it(code, frame->pc());
208 !it.Done(); it.Advance()) {
208 func = it.function(); 209 func = it.function();
209 code = it.code(); 210 code = it.code();
210 uword pc = it.pc(); 211 uword pc = it.pc();
211 ASSERT(pc != 0); 212 ASSERT(pc != 0);
212 ASSERT(code.EntryPoint() <= pc); 213 ASSERT(code.EntryPoint() <= pc);
213 ASSERT(pc < (code.EntryPoint() + code.Size())); 214 ASSERT(pc < (code.EntryPoint() + code.Size()));
214 if (ShouldShowFunction(func)) { 215 if (ShouldShowFunction(func)) {
215 offset = Smi::New(pc - code.EntryPoint()); 216 offset = Smi::New(pc - code.EntryPoint());
216 builder->AddFrame(func, code, offset, dart_handler_found); 217 builder->AddFrame(func, code, offset, dart_handler_found);
217 } 218 }
(...skipping 534 matching lines...) Expand 10 before | Expand all | Expand 10 after
752 break; 753 break;
753 } 754 }
754 755
755 return DartLibraryCalls::InstanceCreate(library, 756 return DartLibraryCalls::InstanceCreate(library,
756 *class_name, 757 *class_name,
757 *constructor_name, 758 *constructor_name,
758 arguments); 759 arguments);
759 } 760 }
760 761
761 } // namespace dart 762 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/lib/stacktrace.cc ('k') | runtime/vm/simulator_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698