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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 static const int kCallerFPOffset = 0 * kPointerSize; | 127 static const int kCallerFPOffset = 0 * kPointerSize; |
128 // The calling JS function is below FP. | 128 // The calling JS function is below FP. |
129 static const int kCallerPCOffset = 1 * kPointerSize; | 129 static const int kCallerPCOffset = 1 * kPointerSize; |
130 | 130 |
131 // FP-relative displacement of the caller's SP. It points just | 131 // FP-relative displacement of the caller's SP. It points just |
132 // below the saved PC. | 132 // below the saved PC. |
133 static const int kCallerSPDisplacement = 2 * kPointerSize; | 133 static const int kCallerSPDisplacement = 2 * kPointerSize; |
134 }; | 134 }; |
135 | 135 |
136 | 136 |
137 class StandardFrameConstants : public AllStatic { | |
138 public: | |
139 // Fixed part of the frame consists of return address, caller fp, | |
140 // context and function. | |
141 static const int kFixedFrameSize = 4 * kPointerSize; | |
142 static const int kExpressionsOffset = -3 * kPointerSize; | |
143 static const int kMarkerOffset = -2 * kPointerSize; | |
144 static const int kContextOffset = -1 * kPointerSize; | |
145 static const int kCallerFPOffset = 0 * kPointerSize; | |
146 static const int kCallerPCOffset = 1 * kPointerSize; | |
147 static const int kCallerSPOffset = 2 * kPointerSize; | |
148 }; | |
149 | |
150 | |
151 class JavaScriptFrameConstants : public AllStatic { | 137 class JavaScriptFrameConstants : public AllStatic { |
152 public: | 138 public: |
153 // FP-relative. | 139 // FP-relative. |
154 static const int kLocal0Offset = StandardFrameConstants::kExpressionsOffset; | 140 static const int kLocal0Offset = StandardFrameConstants::kExpressionsOffset; |
155 static const int kLastParameterOffset = +2 * kPointerSize; | 141 static const int kLastParameterOffset = +2 * kPointerSize; |
156 static const int kFunctionOffset = StandardFrameConstants::kMarkerOffset; | 142 static const int kFunctionOffset = StandardFrameConstants::kMarkerOffset; |
157 | 143 |
158 // Caller SP-relative. | 144 // Caller SP-relative. |
159 static const int kParam0Offset = -2 * kPointerSize; | 145 static const int kParam0Offset = -2 * kPointerSize; |
160 static const int kReceiverOffset = -1 * kPointerSize; | 146 static const int kReceiverOffset = -1 * kPointerSize; |
(...skipping 16 matching lines...) Expand all Loading... |
177 | 163 |
178 inline Object* JavaScriptFrame::function_slot_object() const { | 164 inline Object* JavaScriptFrame::function_slot_object() const { |
179 const int offset = JavaScriptFrameConstants::kFunctionOffset; | 165 const int offset = JavaScriptFrameConstants::kFunctionOffset; |
180 return Memory::Object_at(fp() + offset); | 166 return Memory::Object_at(fp() + offset); |
181 } | 167 } |
182 | 168 |
183 | 169 |
184 } } // namespace v8::internal | 170 } } // namespace v8::internal |
185 | 171 |
186 #endif // V8_ARM_FRAMES_ARM_H_ | 172 #endif // V8_ARM_FRAMES_ARM_H_ |
OLD | NEW |