OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |