#if !V8_ENABLE_WEBASSEMBLY
#error This header should only be included if WebAssembly is enabled.
#endif
#ifndef V8_WASM_FUNCTION_BODY_DECODER_H_
#define V8_WASM_FUNCTION_BODY_DECODER_H_
#include "src/base/compiler-specific.h"
#include "src/base/iterator.h"
#include "src/common/globals.h"
#include "src/wasm/decoder.h"
#include "src/wasm/wasm-opcodes.h"
#include "src/wasm/wasm-result.h"
namespace v8::internal {
class AccountingAllocator;
class BitVector;
class Zone;
}
namespace v8::internal::wasm {
class WasmDetectedFeatures;
class WasmEnabledFeatures;
struct WasmModule;
struct FunctionBody { … };
enum class LoadTransformationKind : uint8_t { … };
V8_EXPORT_PRIVATE DecodeResult ValidateFunctionBody(
Zone* zone, WasmEnabledFeatures enabled, const WasmModule* module,
WasmDetectedFeatures* detected, const FunctionBody& body);
struct BodyLocalDecls { … };
V8_EXPORT_PRIVATE void DecodeLocalDecls(WasmEnabledFeatures enabled,
BodyLocalDecls* decls,
const uint8_t* start,
const uint8_t* end, Zone* zone);
V8_EXPORT_PRIVATE bool ValidateAndDecodeLocalDeclsForTesting(
WasmEnabledFeatures enabled, BodyLocalDecls* decls,
const WasmModule* module, bool is_shared, const uint8_t* start,
const uint8_t* end, Zone* zone);
V8_EXPORT_PRIVATE BitVector* AnalyzeLoopAssignmentForTesting(
Zone* zone, uint32_t num_locals, const uint8_t* start, const uint8_t* end,
bool* loop_is_innermost);
V8_EXPORT_PRIVATE unsigned OpcodeLength(const uint8_t* pc, const uint8_t* end);
V8_EXPORT_PRIVATE bool CheckHardwareSupportsSimd();
class V8_EXPORT_PRIVATE BytecodeIterator : public NON_EXPORTED_BASE(Decoder) { … };
}
#endif