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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 : iterator_(iterator), isolate_(iterator_->isolate()) { | 56 : iterator_(iterator), isolate_(iterator_->isolate()) { |
57 } | 57 } |
58 | 58 |
59 | 59 |
60 inline StackHandler* StackFrame::top_handler() const { | 60 inline StackHandler* StackFrame::top_handler() const { |
61 return iterator_->handler(); | 61 return iterator_->handler(); |
62 } | 62 } |
63 | 63 |
64 | 64 |
65 inline Code* StackFrame::LookupCode() const { | 65 inline Code* StackFrame::LookupCode() const { |
| 66 // TODO(jgruber): This should really check that pc is within the returned |
| 67 // code's instruction range [instruction_start(), instruction_end()[. |
66 return GetContainingCode(isolate(), pc()); | 68 return GetContainingCode(isolate(), pc()); |
67 } | 69 } |
68 | 70 |
69 | 71 |
70 inline Code* StackFrame::GetContainingCode(Isolate* isolate, Address pc) { | 72 inline Code* StackFrame::GetContainingCode(Isolate* isolate, Address pc) { |
71 return isolate->inner_pointer_to_code_cache()->GetCacheEntry(pc)->code; | 73 return isolate->inner_pointer_to_code_cache()->GetCacheEntry(pc)->code; |
72 } | 74 } |
73 | 75 |
74 | 76 |
75 inline Address* StackFrame::ResolveReturnAddressLocation(Address* pc_address) { | 77 inline Address* StackFrame::ResolveReturnAddressLocation(Address* pc_address) { |
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
323 DCHECK(frame_->is_java_script() || frame_->is_exit() || | 325 DCHECK(frame_->is_java_script() || frame_->is_exit() || |
324 frame_->is_builtin_exit()); | 326 frame_->is_builtin_exit()); |
325 return frame_; | 327 return frame_; |
326 } | 328 } |
327 | 329 |
328 | 330 |
329 } // namespace internal | 331 } // namespace internal |
330 } // namespace v8 | 332 } // namespace v8 |
331 | 333 |
332 #endif // V8_FRAMES_INL_H_ | 334 #endif // V8_FRAMES_INL_H_ |
OLD | NEW |