5#ifndef V8_WASM_CONSTANT_EXPRESSION_H_
6#define V8_WASM_CONSTANT_EXPRESSION_H_
8#if !V8_ENABLE_WEBASSEMBLY
9#error This header should only be included if WebAssembly is enabled.
69 constexpr uint32_t
index()
const {
116static_assert(
sizeof(ConstantExpression) <= 8);
121 return std::holds_alternative<MessageTemplate>(
result);
124 return std::get<MessageTemplate>(
result);
127 return std::get<WasmValue>(
result);
static constexpr T decode(U value)
static constexpr U encode(T value)
constexpr bool is_set() const
constexpr ConstantExpression(uint64_t bit_field)
constexpr ConstantExpression()=default
static constexpr ConstantExpression WireBytes(uint32_t offset, uint32_t length)
static constexpr int kKindBits
constexpr uint32_t index() const
constexpr Kind kind() const
static constexpr int kValueBits
static constexpr ConstantExpression I32Const(int32_t value)
static constexpr ConstantExpression RefFunc(uint32_t index)
constexpr int32_t i32_value() const
V8_EXPORT_PRIVATE WireBytesRef wire_bytes_ref() const
static constexpr ConstantExpression RefNull(HeapType type)
static constexpr int kLengthBits
constexpr HeapType type() const
static constexpr int kOffsetBits
static constexpr HeapType FromBits(uint32_t bits)
ZoneVector< RpoNumber > & result
V8_INLINE bool is_error(ValueOrError result)
std::variant< WasmValue, MessageTemplate > ValueOrError
V8_INLINE MessageTemplate to_error(ValueOrError result)
V8_INLINE WasmValue to_value(ValueOrError result)
constexpr size_t kV8MaxWasmModuleSize
ValueOrError EvaluateConstantExpression(Zone *zone, ConstantExpression expr, ValueType expected, const WasmModule *module, Isolate *isolate, DirectHandle< WasmTrustedInstanceData > trusted_instance_data, DirectHandle< WasmTrustedInstanceData > shared_trusted_instance_data)
kWasmInternalFunctionIndirectPointerTag WasmTrustedInstanceData
#define DCHECK_EQ(v1, v2)
#define V8_EXPORT_PRIVATE