OLD | NEW |
1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_VALUE_SERIALIZER_H_ | 5 #ifndef V8_VALUE_SERIALIZER_H_ |
6 #define V8_VALUE_SERIALIZER_H_ | 6 #define V8_VALUE_SERIALIZER_H_ |
7 | 7 |
8 #include <cstdint> | 8 #include <cstdint> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 Maybe<bool> WriteJSObject(Handle<JSObject> object) WARN_UNUSED_RESULT; | 98 Maybe<bool> WriteJSObject(Handle<JSObject> object) WARN_UNUSED_RESULT; |
99 Maybe<bool> WriteJSObjectSlow(Handle<JSObject> object) WARN_UNUSED_RESULT; | 99 Maybe<bool> WriteJSObjectSlow(Handle<JSObject> object) WARN_UNUSED_RESULT; |
100 Maybe<bool> WriteJSArray(Handle<JSArray> array) WARN_UNUSED_RESULT; | 100 Maybe<bool> WriteJSArray(Handle<JSArray> array) WARN_UNUSED_RESULT; |
101 void WriteJSDate(JSDate* date); | 101 void WriteJSDate(JSDate* date); |
102 Maybe<bool> WriteJSValue(Handle<JSValue> value) WARN_UNUSED_RESULT; | 102 Maybe<bool> WriteJSValue(Handle<JSValue> value) WARN_UNUSED_RESULT; |
103 void WriteJSRegExp(JSRegExp* regexp); | 103 void WriteJSRegExp(JSRegExp* regexp); |
104 Maybe<bool> WriteJSMap(Handle<JSMap> map) WARN_UNUSED_RESULT; | 104 Maybe<bool> WriteJSMap(Handle<JSMap> map) WARN_UNUSED_RESULT; |
105 Maybe<bool> WriteJSSet(Handle<JSSet> map) WARN_UNUSED_RESULT; | 105 Maybe<bool> WriteJSSet(Handle<JSSet> map) WARN_UNUSED_RESULT; |
106 Maybe<bool> WriteJSArrayBuffer(JSArrayBuffer* array_buffer); | 106 Maybe<bool> WriteJSArrayBuffer(JSArrayBuffer* array_buffer); |
107 Maybe<bool> WriteJSArrayBufferView(JSArrayBufferView* array_buffer); | 107 Maybe<bool> WriteJSArrayBufferView(JSArrayBufferView* array_buffer); |
| 108 Maybe<bool> WriteWasmModule(Handle<JSObject> object) WARN_UNUSED_RESULT; |
108 Maybe<bool> WriteHostObject(Handle<JSObject> object) WARN_UNUSED_RESULT; | 109 Maybe<bool> WriteHostObject(Handle<JSObject> object) WARN_UNUSED_RESULT; |
109 | 110 |
110 /* | 111 /* |
111 * Reads the specified keys from the object and writes key-value pairs to the | 112 * Reads the specified keys from the object and writes key-value pairs to the |
112 * buffer. Returns the number of keys actually written, which may be smaller | 113 * buffer. Returns the number of keys actually written, which may be smaller |
113 * if some keys are not own properties when accessed. | 114 * if some keys are not own properties when accessed. |
114 */ | 115 */ |
115 Maybe<uint32_t> WriteJSObjectPropertiesSlow( | 116 Maybe<uint32_t> WriteJSObjectPropertiesSlow( |
116 Handle<JSObject> object, Handle<FixedArray> keys) WARN_UNUSED_RESULT; | 117 Handle<JSObject> object, Handle<FixedArray> keys) WARN_UNUSED_RESULT; |
117 | 118 |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
223 MaybeHandle<JSDate> ReadJSDate() WARN_UNUSED_RESULT; | 224 MaybeHandle<JSDate> ReadJSDate() WARN_UNUSED_RESULT; |
224 MaybeHandle<JSValue> ReadJSValue(SerializationTag tag) WARN_UNUSED_RESULT; | 225 MaybeHandle<JSValue> ReadJSValue(SerializationTag tag) WARN_UNUSED_RESULT; |
225 MaybeHandle<JSRegExp> ReadJSRegExp() WARN_UNUSED_RESULT; | 226 MaybeHandle<JSRegExp> ReadJSRegExp() WARN_UNUSED_RESULT; |
226 MaybeHandle<JSMap> ReadJSMap() WARN_UNUSED_RESULT; | 227 MaybeHandle<JSMap> ReadJSMap() WARN_UNUSED_RESULT; |
227 MaybeHandle<JSSet> ReadJSSet() WARN_UNUSED_RESULT; | 228 MaybeHandle<JSSet> ReadJSSet() WARN_UNUSED_RESULT; |
228 MaybeHandle<JSArrayBuffer> ReadJSArrayBuffer() WARN_UNUSED_RESULT; | 229 MaybeHandle<JSArrayBuffer> ReadJSArrayBuffer() WARN_UNUSED_RESULT; |
229 MaybeHandle<JSArrayBuffer> ReadTransferredJSArrayBuffer(bool is_shared) | 230 MaybeHandle<JSArrayBuffer> ReadTransferredJSArrayBuffer(bool is_shared) |
230 WARN_UNUSED_RESULT; | 231 WARN_UNUSED_RESULT; |
231 MaybeHandle<JSArrayBufferView> ReadJSArrayBufferView( | 232 MaybeHandle<JSArrayBufferView> ReadJSArrayBufferView( |
232 Handle<JSArrayBuffer> buffer) WARN_UNUSED_RESULT; | 233 Handle<JSArrayBuffer> buffer) WARN_UNUSED_RESULT; |
| 234 MaybeHandle<JSObject> ReadWasmModule() WARN_UNUSED_RESULT; |
233 MaybeHandle<JSObject> ReadHostObject() WARN_UNUSED_RESULT; | 235 MaybeHandle<JSObject> ReadHostObject() WARN_UNUSED_RESULT; |
234 | 236 |
235 /* | 237 /* |
236 * Reads key-value pairs into the object until the specified end tag is | 238 * Reads key-value pairs into the object until the specified end tag is |
237 * encountered. If successful, returns the number of properties read. | 239 * encountered. If successful, returns the number of properties read. |
238 */ | 240 */ |
239 Maybe<uint32_t> ReadJSObjectProperties(Handle<JSObject> object, | 241 Maybe<uint32_t> ReadJSObjectProperties(Handle<JSObject> object, |
240 SerializationTag end_tag, | 242 SerializationTag end_tag, |
241 bool can_use_transitions); | 243 bool can_use_transitions); |
242 | 244 |
(...skipping 14 matching lines...) Expand all Loading... |
257 Handle<FixedArray> id_map_; | 259 Handle<FixedArray> id_map_; |
258 MaybeHandle<SeededNumberDictionary> array_buffer_transfer_map_; | 260 MaybeHandle<SeededNumberDictionary> array_buffer_transfer_map_; |
259 | 261 |
260 DISALLOW_COPY_AND_ASSIGN(ValueDeserializer); | 262 DISALLOW_COPY_AND_ASSIGN(ValueDeserializer); |
261 }; | 263 }; |
262 | 264 |
263 } // namespace internal | 265 } // namespace internal |
264 } // namespace v8 | 266 } // namespace v8 |
265 | 267 |
266 #endif // V8_VALUE_SERIALIZER_H_ | 268 #endif // V8_VALUE_SERIALIZER_H_ |
OLD | NEW |