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

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

Issue 1422453002: Fix windows build (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 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/isolate.h ('k') | no next file » | 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) 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/stack_frame.h" 5 #include "vm/stack_frame.h"
6 6
7 #include "platform/memory_sanitizer.h" 7 #include "platform/memory_sanitizer.h"
8 #include "vm/assembler.h" 8 #include "vm/assembler.h"
9 #include "vm/deopt_instructions.h" 9 #include "vm/deopt_instructions.h"
10 #include "vm/isolate.h" 10 #include "vm/isolate.h"
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 PcDescriptors::Iterator iter(descriptors, RawPcDescriptors::kAnyKind); 254 PcDescriptors::Iterator iter(descriptors, RawPcDescriptors::kAnyKind);
255 while (iter.MoveNext()) { 255 while (iter.MoveNext()) {
256 if (iter.PcOffset() == pc_offset) { 256 if (iter.PcOffset() == pc_offset) {
257 return iter.TokenPos(); 257 return iter.TokenPos();
258 } 258 }
259 } 259 }
260 return -1; 260 return -1;
261 } 261 }
262 262
263 263
264
265 bool StackFrame::IsValid() const { 264 bool StackFrame::IsValid() const {
266 if (IsEntryFrame() || IsExitFrame() || IsStubFrame()) { 265 if (IsEntryFrame() || IsExitFrame() || IsStubFrame()) {
267 return true; 266 return true;
268 } 267 }
269 return (LookupDartCode() != Code::null()); 268 return (LookupDartCode() != Code::null());
270 } 269 }
271 270
272 271
273 void StackFrameIterator::SetupLastExitFrameData() { 272 void StackFrameIterator::SetupLastExitFrameData() {
274 uword exit_marker = Thread::Current()->top_exit_frame_info(); 273 // This gets called by profiler which may run in a different thread (Windows)
274 // but needs the info from mutator_thread instead.
275 uword exit_marker = isolate_->top_exit_frame_info();
275 frames_.fp_ = exit_marker; 276 frames_.fp_ = exit_marker;
276 } 277 }
277 278
278 279
279 void StackFrameIterator::SetupNextExitFrameData() { 280 void StackFrameIterator::SetupNextExitFrameData() {
280 uword exit_address = entry_.fp() + (kExitLinkSlotFromEntryFp * kWordSize); 281 uword exit_address = entry_.fp() + (kExitLinkSlotFromEntryFp * kWordSize);
281 uword exit_marker = *reinterpret_cast<uword*>(exit_address); 282 uword exit_marker = *reinterpret_cast<uword*>(exit_address);
282 frames_.fp_ = exit_marker; 283 frames_.fp_ = exit_marker;
283 frames_.sp_ = 0; 284 frames_.sp_ = 0;
284 frames_.pc_ = 0; 285 frames_.pc_ = 0;
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
496 if (deopt_instr->kind() == DeoptInstr::kCallerFp) { 497 if (deopt_instr->kind() == DeoptInstr::kCallerFp) {
497 return (index - num_materializations_); 498 return (index - num_materializations_);
498 } 499 }
499 } 500 }
500 UNREACHABLE(); 501 UNREACHABLE();
501 return 0; 502 return 0;
502 } 503 }
503 504
504 505
505 } // namespace dart 506 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/isolate.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698