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

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

Issue 2226893002: Optimize AOT's switchable calls for the monomorphic case. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: sync Created 4 years, 4 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_ia32.cc ('k') | runtime/vm/find_code_object_test.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 "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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 120
121 static void BuildStackTrace(StacktraceBuilder* builder) { 121 static void BuildStackTrace(StacktraceBuilder* builder) {
122 StackFrameIterator frames(StackFrameIterator::kDontValidateFrames); 122 StackFrameIterator frames(StackFrameIterator::kDontValidateFrames);
123 StackFrame* frame = frames.NextFrame(); 123 StackFrame* frame = frames.NextFrame();
124 ASSERT(frame != NULL); // We expect to find a dart invocation frame. 124 ASSERT(frame != NULL); // We expect to find a dart invocation frame.
125 Code& code = Code::Handle(); 125 Code& code = Code::Handle();
126 Smi& offset = Smi::Handle(); 126 Smi& offset = Smi::Handle();
127 while (frame != NULL) { 127 while (frame != NULL) {
128 if (frame->IsDartFrame()) { 128 if (frame->IsDartFrame()) {
129 code = frame->LookupDartCode(); 129 code = frame->LookupDartCode();
130 offset = Smi::New(frame->pc() - code.EntryPoint()); 130 offset = Smi::New(frame->pc() - code.PayloadStart());
131 builder->AddFrame(code, offset); 131 builder->AddFrame(code, offset);
132 } 132 }
133 frame = frames.NextFrame(); 133 frame = frames.NextFrame();
134 } 134 }
135 } 135 }
136 136
137 137
138 // Iterate through the stack frames and try to find a frame with an 138 // Iterate through the stack frames and try to find a frame with an
139 // exception handler. Once found, set the pc, sp and fp so that execution 139 // exception handler. Once found, set the pc, sp and fp so that execution
140 // can continue in that frame. Sets 'needs_stacktrace' if there is no 140 // can continue in that frame. Sets 'needs_stacktrace' if there is no
(...skipping 575 matching lines...) Expand 10 before | Expand all | Expand 10 after
716 } 716 }
717 717
718 return DartLibraryCalls::InstanceCreate(library, 718 return DartLibraryCalls::InstanceCreate(library,
719 *class_name, 719 *class_name,
720 *constructor_name, 720 *constructor_name,
721 arguments); 721 arguments);
722 } 722 }
723 723
724 724
725 } // namespace dart 725 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/disassembler_ia32.cc ('k') | runtime/vm/find_code_object_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698