#ifndef V8_WASM_MODULE_RUNNER_H_
#define V8_WASM_MODULE_RUNNER_H_
#include "src/execution/isolate.h"
#include "src/objects/objects.h"
#include "src/wasm/wasm-module.h"
#include "src/wasm/wasm-objects.h"
#include "src/wasm/wasm-result.h"
namespace v8 {
namespace internal {
namespace wasm {
namespace testing {
MaybeHandle<WasmExportedFunction> GetExportedFunction(
Isolate* isolate, Handle<WasmInstanceObject> instance, const char* name);
int32_t CallWasmFunctionForTesting(
Isolate* isolate, Handle<WasmInstanceObject> instance, const char* name,
base::Vector<Handle<Object>> args,
std::unique_ptr<const char[]>* exception = nullptr);
int32_t CompileAndRunWasmModule(Isolate* isolate, const uint8_t* module_start,
const uint8_t* module_end);
MaybeHandle<WasmModuleObject> CompileForTesting(Isolate* isolate,
ErrorThrower* thrower,
ModuleWireBytes bytes);
MaybeHandle<WasmInstanceObject> CompileAndInstantiateForTesting(
Isolate* isolate, ErrorThrower* thrower, ModuleWireBytes bytes);
base::OwnedVector<Handle<Object>> MakeDefaultArguments(Isolate* isolate,
const FunctionSig* sig);
void SetupIsolateForWasmModule(Isolate* isolate);
}
}
}
}
#endif