OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 V(CONSTRUCT, ConstructFrame) \ | 163 V(CONSTRUCT, ConstructFrame) \ |
164 V(ARGUMENTS_ADAPTOR, ArgumentsAdaptorFrame) | 164 V(ARGUMENTS_ADAPTOR, ArgumentsAdaptorFrame) |
165 | 165 |
166 | 166 |
167 class StandardFrameConstants : public AllStatic { | 167 class StandardFrameConstants : public AllStatic { |
168 public: | 168 public: |
169 // Fixed part of the frame consists of return address, caller fp, | 169 // Fixed part of the frame consists of return address, caller fp, |
170 // context and function. | 170 // context and function. |
171 // StandardFrame::IterateExpressions assumes that kContextOffset is the last | 171 // StandardFrame::IterateExpressions assumes that kContextOffset is the last |
172 // object pointer. | 172 // object pointer. |
173 static const int kFixedFrameSize = kPCOnStackSize + kFPOnStackSize + | 173 static const int kFixedFrameSizeFromFp = 2 * kPointerSize; |
174 2 * kPointerSize; | 174 static const int kFixedFrameSize = kPCOnStackSize + kFPOnStackSize + |
175 static const int kExpressionsOffset = -3 * kPointerSize; | 175 kFixedFrameSizeFromFp; |
176 static const int kMarkerOffset = -2 * kPointerSize; | 176 static const int kExpressionsOffset = -3 * kPointerSize; |
177 static const int kContextOffset = -1 * kPointerSize; | 177 static const int kMarkerOffset = -2 * kPointerSize; |
178 static const int kCallerFPOffset = 0 * kPointerSize; | 178 static const int kContextOffset = -1 * kPointerSize; |
179 static const int kCallerPCOffset = +1 * kFPOnStackSize; | 179 static const int kCallerFPOffset = 0 * kPointerSize; |
180 static const int kCallerSPOffset = kCallerPCOffset + 1 * kPCOnStackSize; | 180 static const int kCallerPCOffset = +1 * kFPOnStackSize; |
| 181 static const int kCallerSPOffset = kCallerPCOffset + 1 * kPCOnStackSize; |
181 }; | 182 }; |
182 | 183 |
183 | 184 |
184 // Abstract base class for all stack frames. | 185 // Abstract base class for all stack frames. |
185 class StackFrame BASE_EMBEDDED { | 186 class StackFrame BASE_EMBEDDED { |
186 public: | 187 public: |
187 #define DECLARE_TYPE(type, ignore) type, | 188 #define DECLARE_TYPE(type, ignore) type, |
188 enum Type { | 189 enum Type { |
189 NONE = 0, | 190 NONE = 0, |
190 STACK_FRAME_TYPE_LIST(DECLARE_TYPE) | 191 STACK_FRAME_TYPE_LIST(DECLARE_TYPE) |
(...skipping 738 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
929 }; | 930 }; |
930 | 931 |
931 | 932 |
932 // Reads all frames on the current stack and copies them into the current | 933 // Reads all frames on the current stack and copies them into the current |
933 // zone memory. | 934 // zone memory. |
934 Vector<StackFrame*> CreateStackMap(Isolate* isolate, Zone* zone); | 935 Vector<StackFrame*> CreateStackMap(Isolate* isolate, Zone* zone); |
935 | 936 |
936 } } // namespace v8::internal | 937 } } // namespace v8::internal |
937 | 938 |
938 #endif // V8_FRAMES_H_ | 939 #endif // V8_FRAMES_H_ |
OLD | NEW |