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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
53 | 53 |
54 void set_pc(uword value) { | 54 void set_pc(uword value) { |
55 *reinterpret_cast<uword*>(sp() + (kSavedPcSlotFromSp * kWordSize)) = value; | 55 *reinterpret_cast<uword*>(sp() + (kSavedPcSlotFromSp * kWordSize)) = value; |
56 } | 56 } |
57 | 57 |
58 void set_pc_marker(RawCode* code) { | 58 void set_pc_marker(RawCode* code) { |
59 *reinterpret_cast<RawCode**>(fp() + (kPcMarkerSlotFromFp * kWordSize)) = | 59 *reinterpret_cast<RawCode**>(fp() + (kPcMarkerSlotFromFp * kWordSize)) = |
60 code; | 60 code; |
61 } | 61 } |
62 | 62 |
63 #if !defined(TARGET_ARCH_IA32) && !defined(TARGET_ARCH_DBC) | |
64 uword* saved_caller_pp_slot() const { | |
65 return reinterpret_cast<uword*>(fp() + | |
66 SavedCallerPpSlotFromFp() * kWordSize); | |
67 } | |
68 uword saved_caller_pp() const { | |
Florian Schneider
2016/09/28 01:30:36
Since you store the slot, this getter would not ne
rmacnak
2016/09/28 17:15:56
Done.
| |
69 return *saved_caller_pp_slot(); | |
70 } | |
71 #endif | |
72 | |
63 // Visit objects in the frame. | 73 // Visit objects in the frame. |
64 virtual void VisitObjectPointers(ObjectPointerVisitor* visitor); | 74 virtual void VisitObjectPointers(ObjectPointerVisitor* visitor); |
65 | 75 |
66 const char* ToCString() const; | 76 const char* ToCString() const; |
67 | 77 |
68 // Check validity of a frame, used for assertion purposes. | 78 // Check validity of a frame, used for assertion purposes. |
69 virtual bool IsValid() const; | 79 virtual bool IsValid() const; |
70 | 80 |
71 // Frame type. | 81 // Frame type. |
72 virtual bool IsDartFrame(bool validate = true) const { | 82 virtual bool IsDartFrame(bool validate = true) const { |
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
372 | 382 |
373 | 383 |
374 DART_FORCE_INLINE static uword LocalVarAddress(uword fp, intptr_t index) { | 384 DART_FORCE_INLINE static uword LocalVarAddress(uword fp, intptr_t index) { |
375 return fp + LocalVarIndex(0, index) * kWordSize; | 385 return fp + LocalVarIndex(0, index) * kWordSize; |
376 } | 386 } |
377 | 387 |
378 | 388 |
379 } // namespace dart | 389 } // namespace dart |
380 | 390 |
381 #endif // VM_STACK_FRAME_H_ | 391 #endif // VM_STACK_FRAME_H_ |
OLD | NEW |