OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 static const int kCallerPCOffset = +1 * kPointerSize; | 186 static const int kCallerPCOffset = +1 * kPointerSize; |
187 | 187 |
188 // MIPS-specific: a pointer to the old sp to avoid unnecessary calculations. | 188 // MIPS-specific: a pointer to the old sp to avoid unnecessary calculations. |
189 static const int kCallerSPOffset = +2 * kPointerSize; | 189 static const int kCallerSPOffset = +2 * kPointerSize; |
190 | 190 |
191 // FP-relative displacement of the caller's SP. | 191 // FP-relative displacement of the caller's SP. |
192 static const int kCallerSPDisplacement = +2 * kPointerSize; | 192 static const int kCallerSPDisplacement = +2 * kPointerSize; |
193 }; | 193 }; |
194 | 194 |
195 | 195 |
196 class StandardFrameConstants : public AllStatic { | |
197 public: | |
198 // Fixed part of the frame consists of return address, caller fp, | |
199 // context and function. | |
200 static const int kFixedFrameSize = 4 * kPointerSize; | |
201 static const int kExpressionsOffset = -3 * kPointerSize; | |
202 static const int kMarkerOffset = -2 * kPointerSize; | |
203 static const int kContextOffset = -1 * kPointerSize; | |
204 static const int kCallerFPOffset = 0 * kPointerSize; | |
205 static const int kCallerPCOffset = +1 * kPointerSize; | |
206 static const int kCallerSPOffset = +2 * kPointerSize; | |
207 | |
208 // Size of the MIPS 4 32-bit argument slots. | |
209 // This is just an alias with a shorter name. Use it from now on. | |
210 static const int kRArgsSlotsSize = 4 * kPointerSize; | |
211 static const int kRegularArgsSlotsSize = kRArgsSlotsSize; | |
212 | |
213 // JS argument slots size. | |
214 static const int kJSArgsSlotsSize = 0 * kPointerSize; | |
215 // Assembly builtins argument slots size. | |
216 static const int kBArgsSlotsSize = 0 * kPointerSize; | |
217 }; | |
218 | |
219 | |
220 class JavaScriptFrameConstants : public AllStatic { | 196 class JavaScriptFrameConstants : public AllStatic { |
221 public: | 197 public: |
222 // FP-relative. | 198 // FP-relative. |
223 static const int kLocal0Offset = StandardFrameConstants::kExpressionsOffset; | 199 static const int kLocal0Offset = StandardFrameConstants::kExpressionsOffset; |
224 static const int kLastParameterOffset = +2 * kPointerSize; | 200 static const int kLastParameterOffset = +2 * kPointerSize; |
225 static const int kFunctionOffset = StandardFrameConstants::kMarkerOffset; | 201 static const int kFunctionOffset = StandardFrameConstants::kMarkerOffset; |
226 | 202 |
227 // Caller SP-relative. | 203 // Caller SP-relative. |
228 static const int kParam0Offset = -2 * kPointerSize; | 204 static const int kParam0Offset = -2 * kPointerSize; |
229 static const int kReceiverOffset = -1 * kPointerSize; | 205 static const int kReceiverOffset = -1 * kPointerSize; |
(...skipping 16 matching lines...) Expand all Loading... |
246 | 222 |
247 inline Object* JavaScriptFrame::function_slot_object() const { | 223 inline Object* JavaScriptFrame::function_slot_object() const { |
248 const int offset = JavaScriptFrameConstants::kFunctionOffset; | 224 const int offset = JavaScriptFrameConstants::kFunctionOffset; |
249 return Memory::Object_at(fp() + offset); | 225 return Memory::Object_at(fp() + offset); |
250 } | 226 } |
251 | 227 |
252 | 228 |
253 } } // namespace v8::internal | 229 } } // namespace v8::internal |
254 | 230 |
255 #endif | 231 #endif |
OLD | NEW |