| 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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 inline Object* StandardFrame::GetExpression(int index) const { | 107 inline Object* StandardFrame::GetExpression(int index) const { |
| 108 return Memory::Object_at(GetExpressionAddress(index)); | 108 return Memory::Object_at(GetExpressionAddress(index)); |
| 109 } | 109 } |
| 110 | 110 |
| 111 | 111 |
| 112 inline void StandardFrame::SetExpression(int index, Object* value) { | 112 inline void StandardFrame::SetExpression(int index, Object* value) { |
| 113 Memory::Object_at(GetExpressionAddress(index)) = value; | 113 Memory::Object_at(GetExpressionAddress(index)) = value; |
| 114 } | 114 } |
| 115 | 115 |
| 116 | 116 |
| 117 inline Object* StandardFrame::context() const { | |
| 118 const int offset = StandardFrameConstants::kContextOffset; | |
| 119 Object* maybe_result = Memory::Object_at(fp() + offset); | |
| 120 DCHECK(!maybe_result->IsSmi()); | |
| 121 return maybe_result; | |
| 122 } | |
| 123 | |
| 124 | |
| 125 inline Address StandardFrame::caller_fp() const { | 117 inline Address StandardFrame::caller_fp() const { |
| 126 return Memory::Address_at(fp() + StandardFrameConstants::kCallerFPOffset); | 118 return Memory::Address_at(fp() + StandardFrameConstants::kCallerFPOffset); |
| 127 } | 119 } |
| 128 | 120 |
| 129 | 121 |
| 130 inline Address StandardFrame::caller_pc() const { | 122 inline Address StandardFrame::caller_pc() const { |
| 131 return Memory::Address_at(ComputePCAddress(fp())); | 123 return Memory::Address_at(ComputePCAddress(fp())); |
| 132 } | 124 } |
| 133 | 125 |
| 134 | 126 |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 inline bool JavaScriptFrame::has_adapted_arguments() const { | 199 inline bool JavaScriptFrame::has_adapted_arguments() const { |
| 208 return IsArgumentsAdaptorFrame(caller_fp()); | 200 return IsArgumentsAdaptorFrame(caller_fp()); |
| 209 } | 201 } |
| 210 | 202 |
| 211 | 203 |
| 212 inline Object* JavaScriptFrame::function_slot_object() const { | 204 inline Object* JavaScriptFrame::function_slot_object() const { |
| 213 const int offset = JavaScriptFrameConstants::kFunctionOffset; | 205 const int offset = JavaScriptFrameConstants::kFunctionOffset; |
| 214 return Memory::Object_at(fp() + offset); | 206 return Memory::Object_at(fp() + offset); |
| 215 } | 207 } |
| 216 | 208 |
| 209 inline Object* JavaScriptFrame::context() const { |
| 210 const int offset = StandardFrameConstants::kContextOffset; |
| 211 Object* maybe_result = Memory::Object_at(fp() + offset); |
| 212 DCHECK(!maybe_result->IsSmi()); |
| 213 return maybe_result; |
| 214 } |
| 217 | 215 |
| 218 inline StubFrame::StubFrame(StackFrameIteratorBase* iterator) | 216 inline StubFrame::StubFrame(StackFrameIteratorBase* iterator) |
| 219 : StandardFrame(iterator) { | 217 : StandardFrame(iterator) { |
| 220 } | 218 } |
| 221 | 219 |
| 222 | 220 |
| 223 inline OptimizedFrame::OptimizedFrame(StackFrameIteratorBase* iterator) | 221 inline OptimizedFrame::OptimizedFrame(StackFrameIteratorBase* iterator) |
| 224 : JavaScriptFrame(iterator) { | 222 : JavaScriptFrame(iterator) { |
| 225 } | 223 } |
| 226 | 224 |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 305 DCHECK(!done()); | 303 DCHECK(!done()); |
| 306 DCHECK(frame_->is_java_script() || frame_->is_exit()); | 304 DCHECK(frame_->is_java_script() || frame_->is_exit()); |
| 307 return frame_; | 305 return frame_; |
| 308 } | 306 } |
| 309 | 307 |
| 310 | 308 |
| 311 } // namespace internal | 309 } // namespace internal |
| 312 } // namespace v8 | 310 } // namespace v8 |
| 313 | 311 |
| 314 #endif // V8_FRAMES_INL_H_ | 312 #endif // V8_FRAMES_INL_H_ |
| OLD | NEW |