wasm-serialization.h 849 Bytes
Newer Older
1 2 3 4
// Copyright 2017 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

5 6
#ifndef V8_WASM_WASM_SERIALIZATION_H_
#define V8_WASM_WASM_SERIALIZATION_H_
7 8 9 10 11 12 13

#include "src/wasm/wasm-objects.h"

namespace v8 {
namespace internal {
namespace wasm {

14
size_t GetSerializedNativeModuleSize(
15
    Isolate* isolate, Handle<WasmCompiledModule> compiled_module);
16

17 18 19 20
bool SerializeNativeModule(Isolate* isolate,
                           Handle<WasmCompiledModule> compiled_module,
                           Vector<byte> buffer);

21
MaybeHandle<WasmModuleObject> DeserializeNativeModule(
22
    Isolate* isolate, Vector<const byte> data, Vector<const byte> wire_bytes);
23 24 25 26 27

}  // namespace wasm
}  // namespace internal
}  // namespace v8

28
#endif  // V8_WASM_WASM_SERIALIZATION_H_