| 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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 | 90 |
| 91 static const int kCallerFPOffset = 0 * kPointerSize; | 91 static const int kCallerFPOffset = 0 * kPointerSize; |
| 92 static const int kCallerPCOffset = +1 * kPointerSize; | 92 static const int kCallerPCOffset = +1 * kPointerSize; |
| 93 | 93 |
| 94 // FP-relative displacement of the caller's SP. It points just | 94 // FP-relative displacement of the caller's SP. It points just |
| 95 // below the saved PC. | 95 // below the saved PC. |
| 96 static const int kCallerSPDisplacement = +2 * kPointerSize; | 96 static const int kCallerSPDisplacement = +2 * kPointerSize; |
| 97 }; | 97 }; |
| 98 | 98 |
| 99 | 99 |
| 100 class StandardFrameConstants : public AllStatic { | |
| 101 public: | |
| 102 // Fixed part of the frame consists of return address, caller fp, | |
| 103 // context and function. | |
| 104 // StandardFrame::IterateExpressions assumes that kContextOffset is the last | |
| 105 // object pointer. | |
| 106 static const int kFixedFrameSize = 4 * kPointerSize; | |
| 107 static const int kExpressionsOffset = -3 * kPointerSize; | |
| 108 static const int kMarkerOffset = -2 * kPointerSize; | |
| 109 static const int kContextOffset = -1 * kPointerSize; | |
| 110 static const int kCallerFPOffset = 0 * kPointerSize; | |
| 111 static const int kCallerPCOffset = +1 * kPointerSize; | |
| 112 static const int kCallerSPOffset = +2 * kPointerSize; | |
| 113 }; | |
| 114 | |
| 115 | |
| 116 class JavaScriptFrameConstants : public AllStatic { | 100 class JavaScriptFrameConstants : public AllStatic { |
| 117 public: | 101 public: |
| 118 // FP-relative. | 102 // FP-relative. |
| 119 static const int kLocal0Offset = StandardFrameConstants::kExpressionsOffset; | 103 static const int kLocal0Offset = StandardFrameConstants::kExpressionsOffset; |
| 120 static const int kLastParameterOffset = +2 * kPointerSize; | 104 static const int kLastParameterOffset = +2 * kPointerSize; |
| 121 static const int kFunctionOffset = StandardFrameConstants::kMarkerOffset; | 105 static const int kFunctionOffset = StandardFrameConstants::kMarkerOffset; |
| 122 | 106 |
| 123 // Caller SP-relative. | 107 // Caller SP-relative. |
| 124 static const int kParam0Offset = -2 * kPointerSize; | 108 static const int kParam0Offset = -2 * kPointerSize; |
| 125 static const int kReceiverOffset = -1 * kPointerSize; | 109 static const int kReceiverOffset = -1 * kPointerSize; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 144 | 128 |
| 145 inline Object* JavaScriptFrame::function_slot_object() const { | 129 inline Object* JavaScriptFrame::function_slot_object() const { |
| 146 const int offset = JavaScriptFrameConstants::kFunctionOffset; | 130 const int offset = JavaScriptFrameConstants::kFunctionOffset; |
| 147 return Memory::Object_at(fp() + offset); | 131 return Memory::Object_at(fp() + offset); |
| 148 } | 132 } |
| 149 | 133 |
| 150 | 134 |
| 151 } } // namespace v8::internal | 135 } } // namespace v8::internal |
| 152 | 136 |
| 153 #endif // V8_IA32_FRAMES_IA32_H_ | 137 #endif // V8_IA32_FRAMES_IA32_H_ |
| OLD | NEW |