| 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 "vm/assembler.h" | 7 #include "vm/assembler.h" |
| 8 #include "vm/deopt_instructions.h" | 8 #include "vm/deopt_instructions.h" |
| 9 #include "vm/isolate.h" | 9 #include "vm/isolate.h" |
| 10 #include "vm/object.h" | 10 #include "vm/object.h" |
| 11 #include "vm/object_store.h" | 11 #include "vm/object_store.h" |
| 12 #include "vm/os.h" | 12 #include "vm/os.h" |
| 13 #include "vm/parser.h" | 13 #include "vm/parser.h" |
| 14 #include "vm/raw_object.h" | 14 #include "vm/raw_object.h" |
| 15 #include "vm/stub_code.h" | 15 #include "vm/stub_code.h" |
| 16 #include "vm/visitor.h" | 16 #include "vm/visitor.h" |
| 17 | 17 |
| 18 namespace dart { | 18 namespace dart { |
| 19 | 19 |
| 20 | 20 |
| 21 bool StackFrame::IsStubFrame() const { | 21 bool StackFrame::IsStubFrame() const { |
| 22 ASSERT(!(IsEntryFrame() || IsExitFrame())); | 22 ASSERT(!(IsEntryFrame() || IsExitFrame())); |
| 23 uword saved_pc = | 23 uword saved_pc = |
| 24 *(reinterpret_cast<uword*>(fp() + (kPcMarkerSlotFromFp * kWordSize))); | 24 *(reinterpret_cast<uword*>(fp() + (kPcMarkerSlotFromFp * kWordSize))); |
| 25 return (saved_pc == 0); | 25 return (saved_pc == 0); |
| 26 } | 26 } |
| 27 | 27 |
| 28 | 28 |
| 29 void StackFrame::Print() const { | 29 void StackFrame::Print() const { |
| 30 OS::Print("[%-8s : sp(%#"Px") ]\n", GetName(), sp()); | 30 OS::Print("[%-8s : sp(%#" Px ") ]\n", GetName(), sp()); |
| 31 } | 31 } |
| 32 | 32 |
| 33 | 33 |
| 34 void ExitFrame::VisitObjectPointers(ObjectPointerVisitor* visitor) { | 34 void ExitFrame::VisitObjectPointers(ObjectPointerVisitor* visitor) { |
| 35 // There are no objects to visit in this frame. | 35 // There are no objects to visit in this frame. |
| 36 } | 36 } |
| 37 | 37 |
| 38 | 38 |
| 39 RawContext* EntryFrame::SavedContext() const { | 39 RawContext* EntryFrame::SavedContext() const { |
| 40 return *(reinterpret_cast<RawContext**>( | 40 return *(reinterpret_cast<RawContext**>( |
| (...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 381 pc_ = DeoptInstr::GetRetAddress(deopt_instr, object_table_, &func); | 381 pc_ = DeoptInstr::GetRetAddress(deopt_instr, object_table_, &func); |
| 382 code_ = func.unoptimized_code(); | 382 code_ = func.unoptimized_code(); |
| 383 function_ = func.raw(); | 383 function_ = func.raw(); |
| 384 return; | 384 return; |
| 385 } | 385 } |
| 386 } | 386 } |
| 387 SetDone(); | 387 SetDone(); |
| 388 } | 388 } |
| 389 | 389 |
| 390 } // namespace dart | 390 } // namespace dart |
| OLD | NEW |