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 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 Maybe<Vector<const uint8_t>> ReadRawBytes(int size) WARN_UNUSED_RESULT; | 222 Maybe<Vector<const uint8_t>> ReadRawBytes(int size) WARN_UNUSED_RESULT; |
223 | 223 |
224 // Reads a string if it matches the one provided. | 224 // Reads a string if it matches the one provided. |
225 // Returns true if this was the case. Otherwise, nothing is consumed. | 225 // Returns true if this was the case. Otherwise, nothing is consumed. |
226 bool ReadExpectedString(Handle<String> expected) WARN_UNUSED_RESULT; | 226 bool ReadExpectedString(Handle<String> expected) WARN_UNUSED_RESULT; |
227 | 227 |
228 // Like ReadObject, but skips logic for special cases in simulating the | 228 // Like ReadObject, but skips logic for special cases in simulating the |
229 // "stack machine". | 229 // "stack machine". |
230 MaybeHandle<Object> ReadObjectInternal() WARN_UNUSED_RESULT; | 230 MaybeHandle<Object> ReadObjectInternal() WARN_UNUSED_RESULT; |
231 | 231 |
| 232 // Reads a string intended to be part of a more complicated object. |
| 233 // Before v12, these are UTF-8 strings. After, they can be any encoding |
| 234 // permissible for a string (with the relevant tag). |
| 235 MaybeHandle<String> ReadString() WARN_UNUSED_RESULT; |
| 236 |
232 // Reading V8 objects of specific kinds. | 237 // Reading V8 objects of specific kinds. |
233 // The tag is assumed to have already been read. | 238 // The tag is assumed to have already been read. |
234 MaybeHandle<String> ReadUtf8String() WARN_UNUSED_RESULT; | 239 MaybeHandle<String> ReadUtf8String() WARN_UNUSED_RESULT; |
235 MaybeHandle<String> ReadOneByteString() WARN_UNUSED_RESULT; | 240 MaybeHandle<String> ReadOneByteString() WARN_UNUSED_RESULT; |
236 MaybeHandle<String> ReadTwoByteString() WARN_UNUSED_RESULT; | 241 MaybeHandle<String> ReadTwoByteString() WARN_UNUSED_RESULT; |
237 MaybeHandle<JSObject> ReadJSObject() WARN_UNUSED_RESULT; | 242 MaybeHandle<JSObject> ReadJSObject() WARN_UNUSED_RESULT; |
238 MaybeHandle<JSArray> ReadSparseJSArray() WARN_UNUSED_RESULT; | 243 MaybeHandle<JSArray> ReadSparseJSArray() WARN_UNUSED_RESULT; |
239 MaybeHandle<JSArray> ReadDenseJSArray() WARN_UNUSED_RESULT; | 244 MaybeHandle<JSArray> ReadDenseJSArray() WARN_UNUSED_RESULT; |
240 MaybeHandle<JSDate> ReadJSDate() WARN_UNUSED_RESULT; | 245 MaybeHandle<JSDate> ReadJSDate() WARN_UNUSED_RESULT; |
241 MaybeHandle<JSValue> ReadJSValue(SerializationTag tag) WARN_UNUSED_RESULT; | 246 MaybeHandle<JSValue> ReadJSValue(SerializationTag tag) WARN_UNUSED_RESULT; |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
275 Handle<FixedArray> id_map_; | 280 Handle<FixedArray> id_map_; |
276 MaybeHandle<SeededNumberDictionary> array_buffer_transfer_map_; | 281 MaybeHandle<SeededNumberDictionary> array_buffer_transfer_map_; |
277 | 282 |
278 DISALLOW_COPY_AND_ASSIGN(ValueDeserializer); | 283 DISALLOW_COPY_AND_ASSIGN(ValueDeserializer); |
279 }; | 284 }; |
280 | 285 |
281 } // namespace internal | 286 } // namespace internal |
282 } // namespace v8 | 287 } // namespace v8 |
283 | 288 |
284 #endif // V8_VALUE_SERIALIZER_H_ | 289 #endif // V8_VALUE_SERIALIZER_H_ |
OLD | NEW |