tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

JitFrames-inl.h (862B)


      1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
      2 * vim: set ts=8 sts=2 et sw=2 tw=80:
      3 * This Source Code Form is subject to the terms of the Mozilla Public
      4 * License, v. 2.0. If a copy of the MPL was not distributed with this
      5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
      6 
      7 #ifndef jit_JitFrames_inl_h
      8 #define jit_JitFrames_inl_h
      9 
     10 #include "jit/JitFrames.h"
     11 #include "vm/JSContext.h"
     12 
     13 #include "jit/JSJitFrameIter-inl.h"
     14 
     15 namespace js {
     16 namespace jit {
     17 
     18 inline BaselineFrame* GetTopBaselineFrame(JSContext* cx) {
     19  JSJitFrameIter frame(cx->activation()->asJit());
     20  MOZ_ASSERT(frame.type() == FrameType::Exit);
     21  ++frame;
     22  if (frame.isBaselineStub()) {
     23    ++frame;
     24  }
     25  MOZ_ASSERT(frame.isBaselineJS());
     26  return frame.baselineFrame();
     27 }
     28 
     29 }  // namespace jit
     30 }  // namespace js
     31 
     32 #endif /* jit_JitFrames_inl_h */