| 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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 94 } | 94 } | 
| 95 | 95 | 
| 96 | 96 | 
| 97 inline ExitFrame::ExitFrame(StackFrameIteratorBase* iterator) | 97 inline ExitFrame::ExitFrame(StackFrameIteratorBase* iterator) | 
| 98     : StackFrame(iterator) { | 98     : StackFrame(iterator) { | 
| 99 } | 99 } | 
| 100 | 100 | 
| 101 inline BuiltinExitFrame::BuiltinExitFrame(StackFrameIteratorBase* iterator) | 101 inline BuiltinExitFrame::BuiltinExitFrame(StackFrameIteratorBase* iterator) | 
| 102     : ExitFrame(iterator) {} | 102     : ExitFrame(iterator) {} | 
| 103 | 103 | 
| 104 inline Object* BuiltinExitFrame::target_slot_object() const { |  | 
| 105   return Memory::Object_at(fp() + BuiltinExitFrameConstants::kTargetOffset); |  | 
| 106 } |  | 
| 107 |  | 
| 108 inline Object* BuiltinExitFrame::new_target_slot_object() const { |  | 
| 109   return Memory::Object_at(fp() + BuiltinExitFrameConstants::kNewTargetOffset); |  | 
| 110 } |  | 
| 111 |  | 
| 112 inline Object* BuiltinExitFrame::receiver_slot_object() const { | 104 inline Object* BuiltinExitFrame::receiver_slot_object() const { | 
| 113   // The receiver is the first argument on the frame. | 105   // The receiver is the first argument on the frame. | 
| 114   // fp[1]: return address. | 106   // fp[1]: return address. | 
| 115   // fp[2]: the last argument (new target). | 107   // fp[2]: the last argument (new target). | 
| 116   // fp[4]: argc. | 108   // fp[4]: argc. | 
| 117   // fp[2 + argc - 1]: receiver. | 109   // fp[2 + argc - 1]: receiver. | 
| 118   Object* argc_slot = | 110   Object* argc_slot = argc_slot_object(); | 
| 119       Memory::Object_at(fp() + BuiltinExitFrameConstants::kArgcOffset); |  | 
| 120   DCHECK(argc_slot->IsSmi()); | 111   DCHECK(argc_slot->IsSmi()); | 
| 121   int argc = Smi::cast(argc_slot)->value(); | 112   int argc = Smi::cast(argc_slot)->value(); | 
| 122 | 113 | 
| 123   const int receiverOffset = | 114   const int receiverOffset = | 
| 124       BuiltinExitFrameConstants::kNewTargetOffset + (argc - 1) * kPointerSize; | 115       BuiltinExitFrameConstants::kNewTargetOffset + (argc - 1) * kPointerSize; | 
| 125   return Memory::Object_at(fp() + receiverOffset); | 116   return Memory::Object_at(fp() + receiverOffset); | 
| 126 } | 117 } | 
| 127 | 118 | 
|  | 119 inline Object* BuiltinExitFrame::argc_slot_object() const { | 
|  | 120   return Memory::Object_at(fp() + BuiltinExitFrameConstants::kArgcOffset); | 
|  | 121 } | 
|  | 122 | 
|  | 123 inline Object* BuiltinExitFrame::target_slot_object() const { | 
|  | 124   return Memory::Object_at(fp() + BuiltinExitFrameConstants::kTargetOffset); | 
|  | 125 } | 
|  | 126 | 
|  | 127 inline Object* BuiltinExitFrame::new_target_slot_object() const { | 
|  | 128   return Memory::Object_at(fp() + BuiltinExitFrameConstants::kNewTargetOffset); | 
|  | 129 } | 
|  | 130 | 
| 128 inline StandardFrame::StandardFrame(StackFrameIteratorBase* iterator) | 131 inline StandardFrame::StandardFrame(StackFrameIteratorBase* iterator) | 
| 129     : StackFrame(iterator) { | 132     : StackFrame(iterator) { | 
| 130 } | 133 } | 
| 131 | 134 | 
| 132 | 135 | 
| 133 inline Object* StandardFrame::GetExpression(int index) const { | 136 inline Object* StandardFrame::GetExpression(int index) const { | 
| 134   return Memory::Object_at(GetExpressionAddress(index)); | 137   return Memory::Object_at(GetExpressionAddress(index)); | 
| 135 } | 138 } | 
| 136 | 139 | 
| 137 | 140 | 
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 320   DCHECK(frame_->is_java_script() || frame_->is_exit() || | 323   DCHECK(frame_->is_java_script() || frame_->is_exit() || | 
| 321          frame_->is_builtin_exit()); | 324          frame_->is_builtin_exit()); | 
| 322   return frame_; | 325   return frame_; | 
| 323 } | 326 } | 
| 324 | 327 | 
| 325 | 328 | 
| 326 }  // namespace internal | 329 }  // namespace internal | 
| 327 }  // namespace v8 | 330 }  // namespace v8 | 
| 328 | 331 | 
| 329 #endif  // V8_FRAMES_INL_H_ | 332 #endif  // V8_FRAMES_INL_H_ | 
| OLD | NEW | 
|---|