Bug 1885489 - Part 5: Add SnapshotIterator::readInt32(). r=iain
[gecko.git] / js / src / jit / Jit.h
blobd9632513b69ce6a5e935e34caed1bf1092a9c28a
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/. */
7 #ifndef jit_Jit_h
8 #define jit_Jit_h
10 #include "jstypes.h"
12 struct JS_PUBLIC_API JSContext;
14 namespace js {
16 class RunState;
18 namespace jit {
20 enum class EnterJitStatus {
21 // An error occurred, either before we entered JIT code or the script threw
22 // an exception. Usually the context will have a pending exception, except
23 // for uncatchable exceptions (interrupts).
24 Error,
26 // Entered and returned from JIT code.
27 Ok,
29 // We didn't enter JIT code, for instance because the script still has to
30 // warm up or cannot be compiled.
31 NotEntered,
34 extern bool EnterInterpreterEntryTrampoline(uint8_t* code, JSContext* cx,
35 RunState* state);
36 extern EnterJitStatus MaybeEnterJit(JSContext* cx, RunState& state);
38 } // namespace jit
39 } // namespace js
41 #endif /* jit_Jit_h */