OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_FRAMES_INL_H_ | 5 #ifndef V8_FRAMES_INL_H_ |
6 #define V8_FRAMES_INL_H_ | 6 #define V8_FRAMES_INL_H_ |
7 | 7 |
8 #include "src/frames.h" | 8 #include "src/frames.h" |
9 #include "src/isolate.h" | 9 #include "src/isolate.h" |
10 #include "src/objects-inl.h" | 10 #include "src/objects-inl.h" |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 intptr_t frame_type = | 176 intptr_t frame_type = |
177 Memory::intptr_at(fp + TypedFrameConstants::kFrameTypeOffset); | 177 Memory::intptr_at(fp + TypedFrameConstants::kFrameTypeOffset); |
178 return frame_type == StackFrame::TypeToMarker(StackFrame::CONSTRUCT); | 178 return frame_type == StackFrame::TypeToMarker(StackFrame::CONSTRUCT); |
179 } | 179 } |
180 | 180 |
181 inline JavaScriptFrame::JavaScriptFrame(StackFrameIteratorBase* iterator) | 181 inline JavaScriptFrame::JavaScriptFrame(StackFrameIteratorBase* iterator) |
182 : StandardFrame(iterator) {} | 182 : StandardFrame(iterator) {} |
183 | 183 |
184 Address JavaScriptFrame::GetParameterSlot(int index) const { | 184 Address JavaScriptFrame::GetParameterSlot(int index) const { |
185 int param_count = ComputeParametersCount(); | 185 int param_count = ComputeParametersCount(); |
186 DCHECK(-1 <= index && index < param_count); | 186 DCHECK(-1 <= index && |
| 187 (index < param_count || |
| 188 param_count == SharedFunctionInfo::kDontAdaptArgumentsSentinel)); |
187 int parameter_offset = (param_count - index - 1) * kPointerSize; | 189 int parameter_offset = (param_count - index - 1) * kPointerSize; |
188 return caller_sp() + parameter_offset; | 190 return caller_sp() + parameter_offset; |
189 } | 191 } |
190 | 192 |
191 inline Address JavaScriptFrame::GetOperandSlot(int index) const { | 193 inline Address JavaScriptFrame::GetOperandSlot(int index) const { |
192 Address base = fp() + JavaScriptFrameConstants::kLocal0Offset; | 194 Address base = fp() + JavaScriptFrameConstants::kLocal0Offset; |
193 DCHECK(IsAddressAligned(base, kPointerSize)); | 195 DCHECK(IsAddressAligned(base, kPointerSize)); |
194 DCHECK_EQ(type(), JAVA_SCRIPT); | 196 DCHECK_EQ(type(), JAVA_SCRIPT); |
195 DCHECK_LT(index, ComputeOperandsCount()); | 197 DCHECK_LT(index, ComputeOperandsCount()); |
196 DCHECK_LE(0, index); | 198 DCHECK_LE(0, index); |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
272 | 274 |
273 inline StubFailureTrampolineFrame::StubFailureTrampolineFrame( | 275 inline StubFailureTrampolineFrame::StubFailureTrampolineFrame( |
274 StackFrameIteratorBase* iterator) : StandardFrame(iterator) { | 276 StackFrameIteratorBase* iterator) : StandardFrame(iterator) { |
275 } | 277 } |
276 | 278 |
277 | 279 |
278 inline ConstructFrame::ConstructFrame(StackFrameIteratorBase* iterator) | 280 inline ConstructFrame::ConstructFrame(StackFrameIteratorBase* iterator) |
279 : InternalFrame(iterator) { | 281 : InternalFrame(iterator) { |
280 } | 282 } |
281 | 283 |
| 284 inline BuiltinContinuationFrame::BuiltinContinuationFrame( |
| 285 StackFrameIteratorBase* iterator) |
| 286 : InternalFrame(iterator) {} |
| 287 |
| 288 inline JavaScriptBuiltinContinuationFrame::JavaScriptBuiltinContinuationFrame( |
| 289 StackFrameIteratorBase* iterator) |
| 290 : JavaScriptFrame(iterator) {} |
| 291 |
282 inline JavaScriptFrameIterator::JavaScriptFrameIterator( | 292 inline JavaScriptFrameIterator::JavaScriptFrameIterator( |
283 Isolate* isolate) | 293 Isolate* isolate) |
284 : iterator_(isolate) { | 294 : iterator_(isolate) { |
285 if (!done()) Advance(); | 295 if (!done()) Advance(); |
286 } | 296 } |
287 | 297 |
288 inline JavaScriptFrameIterator::JavaScriptFrameIterator( | 298 inline JavaScriptFrameIterator::JavaScriptFrameIterator( |
289 Isolate* isolate, ThreadLocalTop* top) | 299 Isolate* isolate, ThreadLocalTop* top) |
290 : iterator_(isolate, top) { | 300 : iterator_(isolate, top) { |
291 if (!done()) Advance(); | 301 if (!done()) Advance(); |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
323 DCHECK(frame_->is_java_script() || frame_->is_exit() || | 333 DCHECK(frame_->is_java_script() || frame_->is_exit() || |
324 frame_->is_builtin_exit()); | 334 frame_->is_builtin_exit()); |
325 return frame_; | 335 return frame_; |
326 } | 336 } |
327 | 337 |
328 | 338 |
329 } // namespace internal | 339 } // namespace internal |
330 } // namespace v8 | 340 } // namespace v8 |
331 | 341 |
332 #endif // V8_FRAMES_INL_H_ | 342 #endif // V8_FRAMES_INL_H_ |
OLD | NEW |