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

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

Issue 1830733002: Fix stub frame walking: when materializing the frame content during deoptimization, the stack is no… (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Remove change to IsStubFrame; pending investigation. Created 4 years, 9 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/raw_object.cc ('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 10 matching lines...) Expand all
21 21
22 22
23 bool StackFrame::IsStubFrame() const { 23 bool StackFrame::IsStubFrame() const {
24 ASSERT(!(IsEntryFrame() || IsExitFrame())); 24 ASSERT(!(IsEntryFrame() || IsExitFrame()));
25 #if !defined(TARGET_OS_WINDOWS) 25 #if !defined(TARGET_OS_WINDOWS)
26 // On Windows, the profiler calls this from a separate thread where 26 // On Windows, the profiler calls this from a separate thread where
27 // Thread::Current() is NULL, so we cannot create a NoSafepointScope. 27 // Thread::Current() is NULL, so we cannot create a NoSafepointScope.
28 NoSafepointScope no_safepoint; 28 NoSafepointScope no_safepoint;
29 #endif 29 #endif
30 RawCode* code = GetCodeObject(); 30 RawCode* code = GetCodeObject();
31 intptr_t cid = code->ptr()->owner_->GetClassId(); 31 const intptr_t cid = code->ptr()->owner_->GetClassId();
32 ASSERT(cid == kNullCid || cid == kClassCid || cid == kFunctionCid); 32 ASSERT(cid == kNullCid || cid == kClassCid || cid == kFunctionCid);
33 return cid == kNullCid || cid == kClassCid; 33 return cid == kNullCid || cid == kClassCid;
34 } 34 }
35 35
36 36
37 const char* StackFrame::ToCString() const { 37 const char* StackFrame::ToCString() const {
38 ASSERT(thread_ == Thread::Current()); 38 ASSERT(thread_ == Thread::Current());
39 Zone* zone = Thread::Current()->zone(); 39 Zone* zone = Thread::Current()->zone();
40 if (IsDartFrame()) { 40 if (IsDartFrame()) {
41 const Code& code = Code::Handle(LookupDartCode()); 41 const Code& code = Code::Handle(LookupDartCode());
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after
490 if (deopt_instr->kind() == DeoptInstr::kCallerFp) { 490 if (deopt_instr->kind() == DeoptInstr::kCallerFp) {
491 return (index - num_materializations_); 491 return (index - num_materializations_);
492 } 492 }
493 } 493 }
494 UNREACHABLE(); 494 UNREACHABLE();
495 return 0; 495 return 0;
496 } 496 }
497 497
498 498
499 } // namespace dart 499 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/raw_object.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698