michael@0: /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- michael@0: * vim: set ts=8 sts=4 et sw=4 tw=99: michael@0: * This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #ifndef jit_JitFrameIterator_inl_h michael@0: #define jit_JitFrameIterator_inl_h michael@0: michael@0: #ifdef JS_ION michael@0: michael@0: #include "jit/JitFrameIterator.h" michael@0: michael@0: #include "jit/Bailouts.h" michael@0: #include "jit/BaselineFrame.h" michael@0: michael@0: namespace js { michael@0: namespace jit { michael@0: michael@0: template michael@0: inline michael@0: InlineFrameIteratorMaybeGC::InlineFrameIteratorMaybeGC( michael@0: JSContext *cx, const IonBailoutIterator *iter) michael@0: : frame_(iter), michael@0: framesRead_(0), michael@0: frameCount_(UINT32_MAX), michael@0: callee_(cx), michael@0: script_(cx) michael@0: { michael@0: if (iter) { michael@0: start_ = SnapshotIterator(*iter); michael@0: findNextFrame(); michael@0: } michael@0: } michael@0: michael@0: inline BaselineFrame * michael@0: JitFrameIterator::baselineFrame() const michael@0: { michael@0: JS_ASSERT(isBaselineJS()); michael@0: return (BaselineFrame *)(fp() - BaselineFrame::FramePointerOffset - BaselineFrame::Size()); michael@0: } michael@0: michael@0: } // namespace jit michael@0: } // namespace js michael@0: michael@0: #endif // JS_ION michael@0: michael@0: #endif /* jit_JitFrameIterator_inl_h */