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/v8memory.h" | 10 #include "src/v8memory.h" |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 inline bool StackHandler::is_catch() const { | 70 inline bool StackHandler::is_catch() const { |
71 return kind() == CATCH; | 71 return kind() == CATCH; |
72 } | 72 } |
73 | 73 |
74 | 74 |
75 inline bool StackHandler::is_finally() const { | 75 inline bool StackHandler::is_finally() const { |
76 return kind() == FINALLY; | 76 return kind() == FINALLY; |
77 } | 77 } |
78 | 78 |
79 | 79 |
| 80 inline Context* StackHandler::context() const { |
| 81 const int offset = StackHandlerConstants::kContextOffset; |
| 82 return Context::cast(Memory::Object_at(address() + offset)); |
| 83 } |
| 84 |
| 85 |
| 86 inline Code* StackHandler::code() const { |
| 87 const int offset = StackHandlerConstants::kCodeOffset; |
| 88 return Code::cast(Memory::Object_at(address() + offset)); |
| 89 } |
| 90 |
| 91 |
80 inline StackHandler::Kind StackHandler::kind() const { | 92 inline StackHandler::Kind StackHandler::kind() const { |
81 const int offset = StackHandlerConstants::kStateIntOffset; | 93 const int offset = StackHandlerConstants::kStateIntOffset; |
82 return KindField::decode(Memory::unsigned_at(address() + offset)); | 94 return KindField::decode(Memory::unsigned_at(address() + offset)); |
83 } | 95 } |
84 | 96 |
85 | 97 |
86 inline unsigned StackHandler::index() const { | 98 inline unsigned StackHandler::index() const { |
87 const int offset = StackHandlerConstants::kStateIntOffset; | 99 const int offset = StackHandlerConstants::kStateIntOffset; |
88 return IndexField::decode(Memory::unsigned_at(address() + offset)); | 100 return IndexField::decode(Memory::unsigned_at(address() + offset)); |
89 } | 101 } |
90 | 102 |
91 | 103 |
| 104 inline Address StackHandler::frame_pointer() const { |
| 105 const int offset = StackHandlerConstants::kFPOffset; |
| 106 return Memory::Address_at(address() + offset); |
| 107 } |
| 108 |
| 109 |
92 inline Object** StackHandler::context_address() const { | 110 inline Object** StackHandler::context_address() const { |
93 const int offset = StackHandlerConstants::kContextOffset; | 111 const int offset = StackHandlerConstants::kContextOffset; |
94 return reinterpret_cast<Object**>(address() + offset); | 112 return reinterpret_cast<Object**>(address() + offset); |
95 } | 113 } |
96 | 114 |
97 | 115 |
98 inline Object** StackHandler::code_address() const { | 116 inline Object** StackHandler::code_address() const { |
99 const int offset = StackHandlerConstants::kCodeOffset; | 117 const int offset = StackHandlerConstants::kCodeOffset; |
100 return reinterpret_cast<Object**>(address() + offset); | 118 return reinterpret_cast<Object**>(address() + offset); |
101 } | 119 } |
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
327 inline StackFrame* SafeStackFrameIterator::frame() const { | 345 inline StackFrame* SafeStackFrameIterator::frame() const { |
328 DCHECK(!done()); | 346 DCHECK(!done()); |
329 DCHECK(frame_->is_java_script() || frame_->is_exit()); | 347 DCHECK(frame_->is_java_script() || frame_->is_exit()); |
330 return frame_; | 348 return frame_; |
331 } | 349 } |
332 | 350 |
333 | 351 |
334 } } // namespace v8::internal | 352 } } // namespace v8::internal |
335 | 353 |
336 #endif // V8_FRAMES_INL_H_ | 354 #endif // V8_FRAMES_INL_H_ |
OLD | NEW |