v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
wasm-tier.h
Go to the documentation of this file.
1// Copyright 2018 the V8 project authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef V8_WASM_WASM_TIER_H_
6#define V8_WASM_WASM_TIER_H_
7
8#if !V8_ENABLE_WEBASSEMBLY
9#error This header should only be included if WebAssembly is enabled.
10#endif // !V8_ENABLE_WEBASSEMBLY
11
12#include <cstdint>
13
14namespace v8 {
15namespace internal {
16namespace wasm {
17
18// All the tiers of Wasm execution.
19enum class ExecutionTier : int8_t {
20 kNone,
21#if V8_ENABLE_DRUMBRAKE
22 kInterpreter,
23#endif // V8_ENABLE_DRUMBRAKE
26};
27
28inline const char* ExecutionTierToString(ExecutionTier tier) {
29 switch (tier) {
31 return "turbofan";
33 return "liftoff";
34#if V8_ENABLE_DRUMBRAKE
35 case ExecutionTier::kInterpreter:
36 return "interpreter";
37#endif // V8_ENABLE_DRUMBRAKE
39 return "none";
40 }
41}
42
43// {kForDebugging} is used for default tiered-down code, {kWithBreakpoints} if
44// the code also contains breakpoints, and {kForStepping} for code that is
45// flooded with breakpoints.
52
53enum DebugState : bool { kNotDebugging = false, kDebugging = true };
54
55} // namespace wasm
56} // namespace internal
57} // namespace v8
58
59#endif // V8_WASM_WASM_TIER_H_
const char * ExecutionTierToString(ExecutionTier tier)
Definition wasm-tier.h:28
Definition c-api.cc:87