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 #include "src/json-stringifier.h" | 5 #include "src/json-stringifier.h" |
6 | 6 |
7 #include "src/conversions.h" | 7 #include "src/conversions.h" |
8 #include "src/lookup.h" | 8 #include "src/lookup.h" |
9 #include "src/messages.h" | 9 #include "src/messages.h" |
10 #include "src/objects-inl.h" | 10 #include "src/objects-inl.h" |
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
316 return SUCCESS; | 316 return SUCCESS; |
317 default: | 317 default: |
318 return UNCHANGED; | 318 return UNCHANGED; |
319 } | 319 } |
320 case JS_ARRAY_TYPE: | 320 case JS_ARRAY_TYPE: |
321 if (deferred_string_key) SerializeDeferredKey(comma, key); | 321 if (deferred_string_key) SerializeDeferredKey(comma, key); |
322 return SerializeJSArray(Handle<JSArray>::cast(object)); | 322 return SerializeJSArray(Handle<JSArray>::cast(object)); |
323 case JS_VALUE_TYPE: | 323 case JS_VALUE_TYPE: |
324 if (deferred_string_key) SerializeDeferredKey(comma, key); | 324 if (deferred_string_key) SerializeDeferredKey(comma, key); |
325 return SerializeJSValue(Handle<JSValue>::cast(object)); | 325 return SerializeJSValue(Handle<JSValue>::cast(object)); |
| 326 case SIMD128_VALUE_TYPE: |
326 case SYMBOL_TYPE: | 327 case SYMBOL_TYPE: |
327 return UNCHANGED; | 328 return UNCHANGED; |
328 default: | 329 default: |
329 if (object->IsString()) { | 330 if (object->IsString()) { |
330 if (deferred_string_key) SerializeDeferredKey(comma, key); | 331 if (deferred_string_key) SerializeDeferredKey(comma, key); |
331 SerializeString(Handle<String>::cast(object)); | 332 SerializeString(Handle<String>::cast(object)); |
332 return SUCCESS; | 333 return SUCCESS; |
333 } else { | 334 } else { |
334 DCHECK(object->IsJSReceiver()); | 335 DCHECK(object->IsJSReceiver()); |
335 if (object->IsCallable()) return UNCHANGED; | 336 if (object->IsCallable()) return UNCHANGED; |
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
713 if (object->IsOneByteRepresentationUnderneath()) { | 714 if (object->IsOneByteRepresentationUnderneath()) { |
714 SerializeString_<uint8_t, uc16>(object); | 715 SerializeString_<uint8_t, uc16>(object); |
715 } else { | 716 } else { |
716 SerializeString_<uc16, uc16>(object); | 717 SerializeString_<uc16, uc16>(object); |
717 } | 718 } |
718 } | 719 } |
719 } | 720 } |
720 | 721 |
721 } // namespace internal | 722 } // namespace internal |
722 } // namespace v8 | 723 } // namespace v8 |
OLD | NEW |