OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 inline Code* StackFrame::LookupCode() const { | 131 inline Code* StackFrame::LookupCode() const { |
132 return GetContainingCode(isolate(), pc()); | 132 return GetContainingCode(isolate(), pc()); |
133 } | 133 } |
134 | 134 |
135 | 135 |
136 inline Code* StackFrame::GetContainingCode(Isolate* isolate, Address pc) { | 136 inline Code* StackFrame::GetContainingCode(Isolate* isolate, Address pc) { |
137 return isolate->inner_pointer_to_code_cache()->GetCacheEntry(pc)->code; | 137 return isolate->inner_pointer_to_code_cache()->GetCacheEntry(pc)->code; |
138 } | 138 } |
139 | 139 |
140 | 140 |
| 141 inline Address* StackFrame::ResolveReturnAddressLocation(Address* pc_address) { |
| 142 if (return_address_location_resolver_ == NULL) { |
| 143 return pc_address; |
| 144 } else { |
| 145 return reinterpret_cast<Address*>( |
| 146 return_address_location_resolver_( |
| 147 reinterpret_cast<uintptr_t>(pc_address))); |
| 148 } |
| 149 } |
| 150 |
| 151 |
141 inline EntryFrame::EntryFrame(StackFrameIteratorBase* iterator) | 152 inline EntryFrame::EntryFrame(StackFrameIteratorBase* iterator) |
142 : StackFrame(iterator) { | 153 : StackFrame(iterator) { |
143 } | 154 } |
144 | 155 |
145 | 156 |
146 inline EntryConstructFrame::EntryConstructFrame( | 157 inline EntryConstructFrame::EntryConstructFrame( |
147 StackFrameIteratorBase* iterator) | 158 StackFrameIteratorBase* iterator) |
148 : EntryFrame(iterator) { | 159 : EntryFrame(iterator) { |
149 } | 160 } |
150 | 161 |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
330 inline JavaScriptFrame* SafeStackFrameIterator::frame() const { | 341 inline JavaScriptFrame* SafeStackFrameIterator::frame() const { |
331 ASSERT(!done()); | 342 ASSERT(!done()); |
332 ASSERT(frame_->is_java_script()); | 343 ASSERT(frame_->is_java_script()); |
333 return static_cast<JavaScriptFrame*>(frame_); | 344 return static_cast<JavaScriptFrame*>(frame_); |
334 } | 345 } |
335 | 346 |
336 | 347 |
337 } } // namespace v8::internal | 348 } } // namespace v8::internal |
338 | 349 |
339 #endif // V8_FRAMES_INL_H_ | 350 #endif // V8_FRAMES_INL_H_ |
OLD | NEW |