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
14
namespace
v8
{
15
namespace
internal
{
16
namespace
wasm
{
17
18
// All the tiers of Wasm execution.
19
enum class
ExecutionTier
: int8_t {
20
kNone
,
21
#if V8_ENABLE_DRUMBRAKE
22
kInterpreter,
23
#endif
// V8_ENABLE_DRUMBRAKE
24
kLiftoff
,
25
kTurbofan
,
26
};
27
28
inline
const
char
*
ExecutionTierToString
(
ExecutionTier
tier) {
29
switch
(tier) {
30
case
ExecutionTier::kTurbofan
:
31
return
"turbofan"
;
32
case
ExecutionTier::kLiftoff
:
33
return
"liftoff"
;
34
#if V8_ENABLE_DRUMBRAKE
35
case
ExecutionTier::kInterpreter:
36
return
"interpreter"
;
37
#endif
// V8_ENABLE_DRUMBRAKE
38
case
ExecutionTier::kNone
:
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.
46
enum
ForDebugging
: int8_t {
47
kNotForDebugging
= 0,
48
kForDebugging
,
49
kWithBreakpoints
,
50
kForStepping
51
};
52
53
enum
DebugState
:
bool
{
kNotDebugging
=
false
,
kDebugging
=
true
};
54
55
}
// namespace wasm
56
}
// namespace internal
57
}
// namespace v8
58
59
#endif
// V8_WASM_WASM_TIER_H_
v8::internal::wasm::ForDebugging
ForDebugging
Definition
wasm-tier.h:46
v8::internal::wasm::kNotForDebugging
@ kNotForDebugging
Definition
wasm-tier.h:47
v8::internal::wasm::kForDebugging
@ kForDebugging
Definition
wasm-tier.h:48
v8::internal::wasm::kForStepping
@ kForStepping
Definition
wasm-tier.h:50
v8::internal::wasm::kWithBreakpoints
@ kWithBreakpoints
Definition
wasm-tier.h:49
v8::internal::wasm::DebugState
DebugState
Definition
wasm-tier.h:53
v8::internal::wasm::kNotDebugging
@ kNotDebugging
Definition
wasm-tier.h:53
v8::internal::wasm::kDebugging
@ kDebugging
Definition
wasm-tier.h:53
v8::internal::wasm::ExecutionTier
ExecutionTier
Definition
wasm-tier.h:19
v8::internal::wasm::ExecutionTier::kNone
@ kNone
v8::internal::wasm::ExecutionTier::kLiftoff
@ kLiftoff
v8::internal::wasm::ExecutionTier::kTurbofan
@ kTurbofan
v8::internal::wasm::LocationKindForDeopt::kNone
@ kNone
v8::internal::wasm::ExecutionTierToString
const char * ExecutionTierToString(ExecutionTier tier)
Definition
wasm-tier.h:28
v8::internal::internal
internal
Definition
wasm-objects-inl.h:458
v8
Definition
api-arguments-inl.h:19
wasm
Definition
c-api.cc:87
src
wasm
wasm-tier.h
Generated on Sun Apr 6 2025 21:08:58 for v8 by
1.12.0