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