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

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

Issue 1220193009: Migrate most uses of Isolate::current_zone to Thread::zone. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 5 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/snapshot_test.cc ('k') | runtime/vm/stack_frame_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) 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 12 matching lines...) Expand all
23 bool StackFrame::IsStubFrame() const { 23 bool StackFrame::IsStubFrame() const {
24 ASSERT(!(IsEntryFrame() || IsExitFrame())); 24 ASSERT(!(IsEntryFrame() || IsExitFrame()));
25 uword saved_pc = 25 uword saved_pc =
26 *(reinterpret_cast<uword*>(fp() + (kPcMarkerSlotFromFp * kWordSize))); 26 *(reinterpret_cast<uword*>(fp() + (kPcMarkerSlotFromFp * kWordSize)));
27 return (saved_pc == 0); 27 return (saved_pc == 0);
28 } 28 }
29 29
30 30
31 const char* StackFrame::ToCString() const { 31 const char* StackFrame::ToCString() const {
32 ASSERT(isolate_ == Isolate::Current()); 32 ASSERT(isolate_ == Isolate::Current());
33 Zone* zone = Isolate::Current()->current_zone(); 33 Zone* zone = Thread::Current()->zone();
34 if (IsDartFrame()) { 34 if (IsDartFrame()) {
35 const Code& code = Code::Handle(LookupDartCode()); 35 const Code& code = Code::Handle(LookupDartCode());
36 ASSERT(!code.IsNull()); 36 ASSERT(!code.IsNull());
37 const Object& owner = Object::Handle(code.owner()); 37 const Object& owner = Object::Handle(code.owner());
38 ASSERT(!owner.IsNull()); 38 ASSERT(!owner.IsNull());
39 if (owner.IsFunction()) { 39 if (owner.IsFunction()) {
40 const Function& function = Function::Cast(owner); 40 const Function& function = Function::Cast(owner);
41 return zone->PrintToString( 41 return zone->PrintToString(
42 "[%-8s : sp(%#" Px ") fp(%#" Px ") pc(%#" Px ") %s ]", 42 "[%-8s : sp(%#" Px ") fp(%#" Px ") pc(%#" Px ") %s ]",
43 GetName(), sp(), fp(), pc(), 43 GetName(), sp(), fp(), pc(),
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after
492 if (deopt_instr->kind() == DeoptInstr::kCallerFp) { 492 if (deopt_instr->kind() == DeoptInstr::kCallerFp) {
493 return (index - num_materializations_); 493 return (index - num_materializations_);
494 } 494 }
495 } 495 }
496 UNREACHABLE(); 496 UNREACHABLE();
497 return 0; 497 return 0;
498 } 498 }
499 499
500 500
501 } // namespace dart 501 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/snapshot_test.cc ('k') | runtime/vm/stack_frame_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698