#include "src/wasm/wasm-serialization.h"
#include "src/codegen/assembler-arch.h"
#include "src/codegen/assembler-inl.h"
#include "src/debug/debug.h"
#include "src/runtime/runtime.h"
#include "src/snapshot/snapshot-data.h"
#include "src/utils/ostreams.h"
#include "src/utils/version.h"
#include "src/wasm/code-space-access.h"
#include "src/wasm/function-compiler.h"
#include "src/wasm/module-compiler.h"
#include "src/wasm/module-decoder.h"
#include "src/wasm/wasm-code-manager.h"
#include "src/wasm/wasm-engine.h"
#include "src/wasm/wasm-module.h"
#include "src/wasm/wasm-objects-inl.h"
#include "src/wasm/wasm-objects.h"
#include "src/wasm/wasm-result.h"
#include "src/wasm/well-known-imports.h"
namespace v8 {
namespace internal {
namespace wasm {
namespace {
constexpr uint8_t kLazyFunction = …;
constexpr uint8_t kEagerFunction = …;
constexpr uint8_t kTurboFanFunction = …;
class Writer { … };
class Reader { … };
void WriteHeader(Writer* writer, WasmEnabledFeatures enabled_features) { … }
void SetWasmCalleeTag(WritableRelocInfo* rinfo, uint32_t tag) { … }
uint32_t GetWasmCalleeTag(RelocInfo* rinfo) { … }
constexpr size_t kHeaderSize = …;
constexpr size_t kCodeHeaderSize = …;
class ExternalReferenceList { … };
static_assert(std::is_trivially_destructible<ExternalReferenceList>::value,
"static destructors not allowed");
}
class V8_EXPORT_PRIVATE NativeModuleSerializer { … };
NativeModuleSerializer::NativeModuleSerializer(
const NativeModule* module, base::Vector<WasmCode* const> code_table,
base::Vector<WellKnownImport const> import_statuses)
: … { … }
size_t NativeModuleSerializer::MeasureCode(const WasmCode* code) const { … }
size_t NativeModuleSerializer::Measure() const { … }
void NativeModuleSerializer::WriteHeader(Writer* writer,
size_t total_code_size) { … }
void NativeModuleSerializer::WriteCode(const WasmCode* code, Writer* writer) { … }
void NativeModuleSerializer::WriteTieringBudget(Writer* writer) { … }
uint32_t NativeModuleSerializer::CanonicalSigIdToModuleLocalTypeId(
uint32_t canonical_sig_id) { … }
bool NativeModuleSerializer::Write(Writer* writer) { … }
WasmSerializer::WasmSerializer(NativeModule* native_module)
: … { … }
size_t WasmSerializer::GetSerializedNativeModuleSize() const { … }
bool WasmSerializer::SerializeNativeModule(base::Vector<uint8_t> buffer) const { … }
struct DeserializationUnit { … };
class DeserializationQueue { … };
class V8_EXPORT_PRIVATE NativeModuleDeserializer { … };
class DeserializeCodeTask : public JobTask { … };
NativeModuleDeserializer::NativeModuleDeserializer(NativeModule* native_module)
: … { … }
bool NativeModuleDeserializer::Read(Reader* reader) { … }
void NativeModuleDeserializer::ReadHeader(Reader* reader) { … }
DeserializationUnit NativeModuleDeserializer::ReadCode(int fn_index,
Reader* reader) { … }
void NativeModuleDeserializer::CopyAndRelocate(
const DeserializationUnit& unit) { … }
void NativeModuleDeserializer::ReadTieringBudget(Reader* reader) { … }
void NativeModuleDeserializer::Publish(std::vector<DeserializationUnit> batch) { … }
bool IsSupportedVersion(base::Vector<const uint8_t> header,
WasmEnabledFeatures enabled_features) { … }
MaybeHandle<WasmModuleObject> DeserializeNativeModule(
Isolate* isolate, base::Vector<const uint8_t> data,
base::Vector<const uint8_t> wire_bytes_vec,
const CompileTimeImports& compile_imports,
base::Vector<const char> source_url) { … }
}
}
}