#if !V8_ENABLE_WEBASSEMBLY
#error This header should only be included if WebAssembly is enabled.
#endif
#ifndef V8_WASM_CONSTANT_EXPRESSION_H_
#define V8_WASM_CONSTANT_EXPRESSION_H_
#include <stdint.h>
#include <variant>
#include "src/base/bit-field.h"
#include "src/wasm/value-type.h"
#include "src/wasm/wasm-value.h"
namespace v8 {
namespace internal {
enum class MessageTemplate;
class WasmTrustedInstanceData;
class Zone;
namespace wasm {
class WireBytesRef;
class ConstantExpression { … };
static_assert …;
static_assert …;
ValueOrError;
V8_INLINE bool is_error(ValueOrError result) { … }
V8_INLINE MessageTemplate to_error(ValueOrError result) { … }
V8_INLINE WasmValue to_value(ValueOrError result) { … }
ValueOrError EvaluateConstantExpression(
Zone* zone, ConstantExpression expr, ValueType expected, Isolate* isolate,
Handle<WasmTrustedInstanceData> trusted_instance_data,
Handle<WasmTrustedInstanceData> shared_trusted_instance_data);
}
}
}
#endif