OLD | NEW |
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 #ifndef VM_STACK_FRAME_H_ | 5 #ifndef VM_STACK_FRAME_H_ |
6 #define VM_STACK_FRAME_H_ | 6 #define VM_STACK_FRAME_H_ |
7 | 7 |
8 #include "vm/allocation.h" | 8 #include "vm/allocation.h" |
9 #include "vm/object.h" | 9 #include "vm/object.h" |
10 #include "vm/stub_code.h" | 10 #include "vm/stub_code.h" |
(...skipping 22 matching lines...) Expand all Loading... |
33 public: | 33 public: |
34 virtual ~StackFrame() { } | 34 virtual ~StackFrame() { } |
35 | 35 |
36 // Accessors to get the pc, sp and fp of a frame. | 36 // Accessors to get the pc, sp and fp of a frame. |
37 uword sp() const { return sp_; } | 37 uword sp() const { return sp_; } |
38 uword fp() const { return fp_; } | 38 uword fp() const { return fp_; } |
39 uword pc() const { | 39 uword pc() const { |
40 return *reinterpret_cast<uword*>(sp_ + (kSavedPcSlotFromSp * kWordSize)); | 40 return *reinterpret_cast<uword*>(sp_ + (kSavedPcSlotFromSp * kWordSize)); |
41 } | 41 } |
42 | 42 |
| 43 // The pool pointer is not implemented on all architectures. |
| 44 static int SavedCallerPpSlotFromFp() { |
| 45 if (kSavedCallerPpSlotFromFp != kSavedCallerFpSlotFromFp) { |
| 46 return kSavedCallerPpSlotFromFp; |
| 47 } |
| 48 UNREACHABLE(); |
| 49 return 0; |
| 50 } |
| 51 |
43 void set_pc(uword value) { | 52 void set_pc(uword value) { |
44 *reinterpret_cast<uword*>(sp_ + (kSavedPcSlotFromSp * kWordSize)) = value; | 53 *reinterpret_cast<uword*>(sp_ + (kSavedPcSlotFromSp * kWordSize)) = value; |
45 } | 54 } |
46 | 55 |
47 // Visit objects in the frame. | 56 // Visit objects in the frame. |
48 virtual void VisitObjectPointers(ObjectPointerVisitor* visitor); | 57 virtual void VisitObjectPointers(ObjectPointerVisitor* visitor); |
49 | 58 |
50 // Print a frame. | 59 // Print a frame. |
51 virtual void Print() const; | 60 virtual void Print() const; |
52 | 61 |
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
273 GrowableArray<DeoptInstr*> deopt_instructions_; | 282 GrowableArray<DeoptInstr*> deopt_instructions_; |
274 Array& object_table_; | 283 Array& object_table_; |
275 | 284 |
276 DISALLOW_COPY_AND_ASSIGN(InlinedFunctionsIterator); | 285 DISALLOW_COPY_AND_ASSIGN(InlinedFunctionsIterator); |
277 }; | 286 }; |
278 | 287 |
279 } // namespace dart | 288 } // namespace dart |
280 | 289 |
281 #endif // VM_STACK_FRAME_H_ | 290 #endif // VM_STACK_FRAME_H_ |
282 | 291 |
OLD | NEW |