OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_FRAMES_H_ | 5 #ifndef V8_FRAMES_H_ |
6 #define V8_FRAMES_H_ | 6 #define V8_FRAMES_H_ |
7 | 7 |
8 #include "src/allocation.h" | 8 #include "src/allocation.h" |
9 #include "src/handles.h" | 9 #include "src/handles.h" |
10 #include "src/safepoint-table.h" | 10 #include "src/safepoint-table.h" |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 static const int kCodeOffset = | 169 static const int kCodeOffset = |
170 StandardFrameConstants::kExpressionsOffset - 0 * kPointerSize; | 170 StandardFrameConstants::kExpressionsOffset - 0 * kPointerSize; |
171 | 171 |
172 static const int kFrameSize = | 172 static const int kFrameSize = |
173 StandardFrameConstants::kFixedFrameSize + 4 * kPointerSize; | 173 StandardFrameConstants::kFixedFrameSize + 4 * kPointerSize; |
174 }; | 174 }; |
175 | 175 |
176 | 176 |
177 class InterpreterFrameConstants : public AllStatic { | 177 class InterpreterFrameConstants : public AllStatic { |
178 public: | 178 public: |
| 179 // FP-relative. |
| 180 static const int kRegisterFilePointerFromFp = |
| 181 -StandardFrameConstants::kFixedFrameSizeFromFp - 3 * kPointerSize; |
| 182 |
179 // Register file pointer relative. | 183 // Register file pointer relative. |
180 static const int kLastParamFromRegisterPointer = | 184 static const int kLastParamFromRegisterPointer = |
181 StandardFrameConstants::kFixedFrameSize + 2 * kPointerSize; | 185 StandardFrameConstants::kFixedFrameSize + 3 * kPointerSize; |
182 static const int kNewTargetFromRegisterPointer = kPointerSize; | 186 |
183 static const int kFunctionFromRegisterPointer = 2 * kPointerSize; | 187 static const int kBytecodeOffsetFromRegisterPointer = 1 * kPointerSize; |
184 static const int kContextFromRegisterPointer = 3 * kPointerSize; | 188 static const int kNewTargetFromRegisterPointer = 2 * kPointerSize; |
| 189 static const int kFunctionFromRegisterPointer = 3 * kPointerSize; |
| 190 static const int kContextFromRegisterPointer = 4 * kPointerSize; |
185 }; | 191 }; |
186 | 192 |
187 | 193 |
188 // Abstract base class for all stack frames. | 194 // Abstract base class for all stack frames. |
189 class StackFrame BASE_EMBEDDED { | 195 class StackFrame BASE_EMBEDDED { |
190 public: | 196 public: |
191 #define DECLARE_TYPE(type, ignore) type, | 197 #define DECLARE_TYPE(type, ignore) type, |
192 enum Type { | 198 enum Type { |
193 NONE = 0, | 199 NONE = 0, |
194 STACK_FRAME_TYPE_LIST(DECLARE_TYPE) | 200 STACK_FRAME_TYPE_LIST(DECLARE_TYPE) |
(...skipping 758 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
953 | 959 |
954 | 960 |
955 // Reads all frames on the current stack and copies them into the current | 961 // Reads all frames on the current stack and copies them into the current |
956 // zone memory. | 962 // zone memory. |
957 Vector<StackFrame*> CreateStackMap(Isolate* isolate, Zone* zone); | 963 Vector<StackFrame*> CreateStackMap(Isolate* isolate, Zone* zone); |
958 | 964 |
959 } // namespace internal | 965 } // namespace internal |
960 } // namespace v8 | 966 } // namespace v8 |
961 | 967 |
962 #endif // V8_FRAMES_H_ | 968 #endif // V8_FRAMES_H_ |
OLD | NEW |