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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 inline Code* StackFrame::LookupCode() const { | 129 inline Code* StackFrame::LookupCode() const { |
130 return GetContainingCode(isolate(), pc()); | 130 return GetContainingCode(isolate(), pc()); |
131 } | 131 } |
132 | 132 |
133 | 133 |
134 inline Code* StackFrame::GetContainingCode(Isolate* isolate, Address pc) { | 134 inline Code* StackFrame::GetContainingCode(Isolate* isolate, Address pc) { |
135 return isolate->inner_pointer_to_code_cache()->GetCacheEntry(pc)->code; | 135 return isolate->inner_pointer_to_code_cache()->GetCacheEntry(pc)->code; |
136 } | 136 } |
137 | 137 |
138 | 138 |
139 inline Address* StackFrame::ResolveReturnAddressLocation(Address* pc_address) { | |
140 if (return_address_location_resolver_ == NULL) { | |
141 return pc_address; | |
142 } else { | |
143 return reinterpret_cast<Address*>( | |
144 return_address_location_resolver_( | |
145 reinterpret_cast<uintptr_t>(pc_address))); | |
146 } | |
147 } | |
148 | |
149 | |
150 inline EntryFrame::EntryFrame(StackFrameIteratorBase* iterator) | 139 inline EntryFrame::EntryFrame(StackFrameIteratorBase* iterator) |
151 : StackFrame(iterator) { | 140 : StackFrame(iterator) { |
152 } | 141 } |
153 | 142 |
154 | 143 |
155 inline EntryConstructFrame::EntryConstructFrame( | 144 inline EntryConstructFrame::EntryConstructFrame( |
156 StackFrameIteratorBase* iterator) | 145 StackFrameIteratorBase* iterator) |
157 : EntryFrame(iterator) { | 146 : EntryFrame(iterator) { |
158 } | 147 } |
159 | 148 |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
339 inline JavaScriptFrame* SafeStackFrameIterator::frame() const { | 328 inline JavaScriptFrame* SafeStackFrameIterator::frame() const { |
340 ASSERT(!done()); | 329 ASSERT(!done()); |
341 ASSERT(frame_->is_java_script()); | 330 ASSERT(frame_->is_java_script()); |
342 return static_cast<JavaScriptFrame*>(frame_); | 331 return static_cast<JavaScriptFrame*>(frame_); |
343 } | 332 } |
344 | 333 |
345 | 334 |
346 } } // namespace v8::internal | 335 } } // namespace v8::internal |
347 | 336 |
348 #endif // V8_FRAMES_INL_H_ | 337 #endif // V8_FRAMES_INL_H_ |
OLD | NEW |