#include "src/wasm/wasm-js.h"
#include <cinttypes>
#include <cstring>
#include <optional>
#include "include/v8-function.h"
#include "include/v8-persistent-handle.h"
#include "include/v8-promise.h"
#include "include/v8-wasm.h"
#include "src/api/api-inl.h"
#include "src/api/api-natives.h"
#include "src/base/logging.h"
#include "src/execution/execution.h"
#include "src/execution/isolate.h"
#include "src/execution/messages.h"
#include "src/flags/flags.h"
#include "src/handles/handles.h"
#include "src/heap/factory.h"
#include "src/objects/fixed-array.h"
#include "src/objects/instance-type.h"
#include "src/objects/js-function.h"
#include "src/objects/managed-inl.h"
#include "src/objects/objects-inl.h"
#include "src/objects/shared-function-info.h"
#include "src/objects/templates.h"
#include "src/wasm/function-compiler.h"
#include "src/wasm/signature-hashing.h"
#include "src/wasm/streaming-decoder.h"
#include "src/wasm/value-type.h"
#include "src/wasm/wasm-debug.h"
#include "src/wasm/wasm-engine.h"
#include "src/wasm/wasm-limits.h"
#include "src/wasm/wasm-objects-inl.h"
#include "src/wasm/wasm-serialization.h"
#include "src/wasm/wasm-value.h"
namespace v8 {
CompileTimeImport;
CompileTimeImports;
ErrorThrower;
WasmEnabledFeatures;
namespace internal {
void ToUtf8Lossy(Isolate* isolate, Handle<String> string, std::string& out);
}
class WasmStreaming::WasmStreamingImpl { … };
WasmStreaming::WasmStreaming(std::unique_ptr<WasmStreamingImpl> impl)
: … { … }
WasmStreaming::~WasmStreaming() = default;
void WasmStreaming::OnBytesReceived(const uint8_t* bytes, size_t size) { … }
void WasmStreaming::Finish(bool can_use_compiled_module) { … }
void WasmStreaming::Abort(MaybeLocal<Value> exception) { … }
bool WasmStreaming::SetCompiledModuleBytes(const uint8_t* bytes, size_t size) { … }
void WasmStreaming::SetMoreFunctionsCanBeSerializedCallback(
std::function<void(CompiledWasmModule)> callback) { … }
void WasmStreaming::SetUrl(const char* url, size_t length) { … }
std::shared_ptr<WasmStreaming> WasmStreaming::Unpack(Isolate* isolate,
Local<Value> value) { … }
namespace …
namespace internal {
wasm
}
static i::Handle<i::FunctionTemplateInfo> NewFunctionTemplate(
i::Isolate* i_isolate, FunctionCallback func, bool has_prototype,
SideEffectType side_effect_type = SideEffectType::kHasSideEffect) { … }
static i::Handle<i::ObjectTemplateInfo> NewObjectTemplate(
i::Isolate* i_isolate) { … }
namespace internal {
namespace …
void WasmJs::PrepareForSnapshot(Isolate* isolate) { … }
void WasmJs::InstallModule(Isolate* isolate, Handle<JSObject> webassembly) { … }
void WasmJs::Install(Isolate* isolate, bool exposed_on_global_object) { … }
void WasmJs::InstallConditionalFeatures(Isolate* isolate,
Handle<NativeContext> context) { … }
bool WasmJs::InstallJSPromiseIntegration(Isolate* isolate,
DirectHandle<NativeContext> context,
Handle<JSObject> webassembly) { … }
bool WasmJs::InstallTypeReflection(Isolate* isolate,
DirectHandle<NativeContext> context,
Handle<JSObject> webassembly) { … }
namespace wasm {
std::unique_ptr<WasmStreaming> StartStreamingForTesting(
Isolate* isolate,
std::shared_ptr<wasm::CompilationResultResolver> resolver) { … }
}
#undef ASSIGN
#undef EXTRACT_THIS
}
}