| 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 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 { | 196 class StandardFrameConstants : public AllStatic { |
| 197 public: | 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; |
| 198 static const int kExpressionsOffset = -3 * kPointerSize; | 201 static const int kExpressionsOffset = -3 * kPointerSize; |
| 199 static const int kMarkerOffset = -2 * kPointerSize; | 202 static const int kMarkerOffset = -2 * kPointerSize; |
| 200 static const int kContextOffset = -1 * kPointerSize; | 203 static const int kContextOffset = -1 * kPointerSize; |
| 201 static const int kCallerFPOffset = 0 * kPointerSize; | 204 static const int kCallerFPOffset = 0 * kPointerSize; |
| 202 static const int kCallerPCOffset = +1 * kPointerSize; | 205 static const int kCallerPCOffset = +1 * kPointerSize; |
| 203 static const int kCallerSPOffset = +2 * kPointerSize; | 206 static const int kCallerSPOffset = +2 * kPointerSize; |
| 204 | 207 |
| 205 // Size of the MIPS 4 32-bit argument slots. | 208 // Size of the MIPS 4 32-bit argument slots. |
| 206 // This is just an alias with a shorter name. Use it from now on. | 209 // This is just an alias with a shorter name. Use it from now on. |
| 207 static const int kRArgsSlotsSize = 4 * kPointerSize; | 210 static const int kRArgsSlotsSize = 4 * kPointerSize; |
| (...skipping 15 matching lines...) Expand all Loading... |
| 223 | 226 |
| 224 // Caller SP-relative. | 227 // Caller SP-relative. |
| 225 static const int kParam0Offset = -2 * kPointerSize; | 228 static const int kParam0Offset = -2 * kPointerSize; |
| 226 static const int kReceiverOffset = -1 * kPointerSize; | 229 static const int kReceiverOffset = -1 * kPointerSize; |
| 227 }; | 230 }; |
| 228 | 231 |
| 229 | 232 |
| 230 class ArgumentsAdaptorFrameConstants : public AllStatic { | 233 class ArgumentsAdaptorFrameConstants : public AllStatic { |
| 231 public: | 234 public: |
| 232 static const int kLengthOffset = StandardFrameConstants::kExpressionsOffset; | 235 static const int kLengthOffset = StandardFrameConstants::kExpressionsOffset; |
| 236 static const int kFrameSize = |
| 237 StandardFrameConstants::kFixedFrameSize + kPointerSize; |
| 233 }; | 238 }; |
| 234 | 239 |
| 235 | 240 |
| 236 class InternalFrameConstants : public AllStatic { | 241 class InternalFrameConstants : public AllStatic { |
| 237 public: | 242 public: |
| 238 static const int kCodeOffset = StandardFrameConstants::kExpressionsOffset; | 243 static const int kCodeOffset = StandardFrameConstants::kExpressionsOffset; |
| 239 }; | 244 }; |
| 240 | 245 |
| 241 | 246 |
| 242 inline Object* JavaScriptFrame::function_slot_object() const { | 247 inline Object* JavaScriptFrame::function_slot_object() const { |
| 243 const int offset = JavaScriptFrameConstants::kFunctionOffset; | 248 const int offset = JavaScriptFrameConstants::kFunctionOffset; |
| 244 return Memory::Object_at(fp() + offset); | 249 return Memory::Object_at(fp() + offset); |
| 245 } | 250 } |
| 246 | 251 |
| 247 | 252 |
| 248 } } // namespace v8::internal | 253 } } // namespace v8::internal |
| 249 | 254 |
| 250 #endif | 255 #endif |
| OLD | NEW |