5#ifndef INCLUDE_V8_WASM_H_
6#define INCLUDE_V8_WASM_H_
26class StreamingDecoder;
34 std::unique_ptr<const uint8_t[]>
buffer;
56 const std::string&
source_url()
const {
return source_url_; }
63 const char* source_url,
size_t url_length);
65 const std::shared_ptr<internal::wasm::NativeModule> native_module_;
66 const std::string source_url_;
80#ifdef V8_ENABLE_CHECKS
87 static void CheckCast(
Value*
object);
115#ifdef V8_ENABLE_CHECKS
122 static void CheckCast(
Value* obj);
134 internal::kWasmWasmStreamingTag;
135 class WasmStreamingImpl;
156 void Finish(
bool can_use_compiled_module =
true);
188 void SetUrl(
const char* url,
size_t length);
199 std::unique_ptr<WasmStreamingImpl> impl_;
212#ifdef V8_ENABLE_CHECKS
224 static void CheckCast(
Value*
object);
MemorySpan< const uint8_t > GetWireBytesRef()
const std::string & source_url() const
Definition: v8-wasm.h:56
Definition: v8-isolate.h:261
Definition: v8-local-handle.h:266
Definition: v8-local-handle.h:632
Definition: v8-memory-span.h:64
Definition: v8-object.h:233
Definition: v8-value.h:32
Definition: v8-wasm.h:207
int32_t WasmFileDescriptor
Definition: v8-wasm.h:218
static Local< WasmMemoryMapDescriptor > New(Isolate *isolate, WasmFileDescriptor fd)
WasmMemoryMapDescriptor()=delete
static WasmMemoryMapDescriptor * Cast(Value *value)
Definition: v8-wasm.h:211
static WasmMemoryObject * Cast(Value *value)
Definition: v8-wasm.h:79
WasmMemoryObject()=delete
Local< ArrayBuffer > Buffer()
WasmModuleObject()=delete
static MaybeLocal< WasmModuleObject > Compile(Isolate *isolate, MemorySpan< const uint8_t > wire_bytes)
static MaybeLocal< WasmModuleObject > FromCompiledModule(Isolate *isolate, const CompiledWasmModule &)
CompiledWasmModule GetCompiledModule()
static WasmModuleObject * Cast(Value *value)
Definition: v8-wasm.h:114
Definition: v8-wasm.h:131
WasmStreaming(std::unique_ptr< WasmStreamingImpl > impl)
void Finish(bool can_use_compiled_module=true)
bool SetCompiledModuleBytes(const uint8_t *bytes, size_t size)
static std::shared_ptr< WasmStreaming > Unpack(Isolate *isolate, Local< Value > value)
void SetUrl(const char *url, size_t length)
void SetMoreFunctionsCanBeSerializedCallback(std::function< void(CompiledWasmModule)>)
void Abort(MaybeLocal< Value > exception)
void OnBytesReceived(const uint8_t *bytes, size_t size)
ExternalPointerTag
Definition: v8-internal.h:598
Definition: libplatform.h:15
size_t size
Definition: v8-wasm.h:35
std::unique_ptr< const uint8_t[]> buffer
Definition: v8-wasm.h:34
OwnedBuffer(std::unique_ptr< const uint8_t[]> buffer, size_t size)
Definition: v8-wasm.h:36
#define V8_EXPORT
Definition: v8config.h:793
#define V8_INLINE
Definition: v8config.h:499