| Index: src/objects.h
|
| diff --git a/src/objects.h b/src/objects.h
|
| index 2a248b7d9134f77e001bdac44d9a7887b6c33214..d16c7dd0da4e3262beb630f18000143145a1f702 100644
|
| --- a/src/objects.h
|
| +++ b/src/objects.h
|
| @@ -1002,6 +1002,7 @@ template <class C> inline bool Is(Object* obj);
|
| V(JSWeakMap) \
|
| V(JSWeakSet) \
|
| V(JSRegExp) \
|
| + V(WebAssemblyCompiledModule) \
|
| V(HashTable) \
|
| V(Dictionary) \
|
| V(UnseededNumberDictionary) \
|
| @@ -8149,6 +8150,25 @@ class JSMessageObject: public JSObject {
|
| kSize> BodyDescriptor;
|
| };
|
|
|
| +// A compiled web assembly module.
|
| +class WebAssemblyCompiledModule : public JSObject {
|
| + public:
|
| + // Serialize the compiled module. The returned buffer is owned by
|
| + // the caller, who may simply leave the return value drop out of
|
| + // scope, once done processing the bytes.
|
| + // TODO(mtrofin): to avoid increased memory pressure, we should
|
| + // explore a caller-provided segmented memory design.
|
| + std::pair<std::unique_ptr<const byte>, size_t> Serialize();
|
| +
|
| + // Deserialize a compiled module. The buffer is owned by the caller and may
|
| + // be released after deserialization returns.
|
| + static MaybeHandle<WebAssemblyCompiledModule> Deserialize(Isolate* isolate,
|
| + const byte* data,
|
| + size_t size);
|
| +
|
| + private:
|
| + DISALLOW_IMPLICIT_CONSTRUCTORS(WebAssemblyCompiledModule);
|
| +};
|
|
|
| // Regular expressions
|
| // The regular expression holds a single reference to a FixedArray in
|
|
|