OLD | NEW |
1 // Copyright (c) 2015, the Dartino project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dartino 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.md file. | 3 // BSD-style license that can be found in the LICENSE.md file. |
4 | 4 |
5 #ifndef SRC_VM_FRAME_H_ | 5 #ifndef SRC_VM_FRAME_H_ |
6 #define SRC_VM_FRAME_H_ | 6 #define SRC_VM_FRAME_H_ |
7 | 7 |
8 #include "src/shared/globals.h" | 8 #include "src/shared/globals.h" |
9 #include "src/vm/object.h" | 9 #include "src/vm/object.h" |
10 #include "src/vm/process.h" | 10 #include "src/vm/process.h" |
11 | 11 |
12 namespace fletch { | 12 namespace dartino { |
13 | 13 |
14 // General stack layout: | 14 // General stack layout: |
15 // | 15 // |
16 // | | | 16 // | | |
17 // +----------------+ | 17 // +----------------+ |
18 // | Locals | | 18 // | Locals | |
19 // | . | | 19 // | . | |
20 // | . | | 20 // | . | |
21 // | . | | 21 // | . | |
22 // +----------------+ | 22 // +----------------+ |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 Object** LastLocalAddress() const { return FramePointer() - size_ + 2; } | 99 Object** LastLocalAddress() const { return FramePointer() - size_ + 2; } |
100 | 100 |
101 Object** NextFramePointer() const { return FramePointer() - size_; } | 101 Object** NextFramePointer() const { return FramePointer() - size_; } |
102 | 102 |
103 private: | 103 private: |
104 Stack* stack_; | 104 Stack* stack_; |
105 Object** frame_pointer_; | 105 Object** frame_pointer_; |
106 word size_; | 106 word size_; |
107 }; | 107 }; |
108 | 108 |
109 } // namespace fletch | 109 } // namespace dartino |
110 | 110 |
111 #endif // SRC_VM_FRAME_H_ | 111 #endif // SRC_VM_FRAME_H_ |
OLD | NEW |