Lines Matching refs:object
21 MUST_USE_RESULT MaybeHandle<Object> Stringify(Handle<Object> object);
25 Handle<String> object));
31 Handle<Object> object,
34 Result SerializeGeneric(Handle<Object> object,
47 Handle<Object> object, in INLINE() argument
49 return Serialize_<false>(object, in INLINE()
57 INLINE(Result SerializeProperty(Handle<Object> object, in INLINE() argument
61 return Serialize_<true>(object, deferred_comma, deferred_key); in INLINE()
65 Result Serialize_(Handle<Object> object, bool comma, Handle<Object> key);
73 Result SerializeSmi(Smi* object);
76 INLINE(Result SerializeHeapNumber(Handle<HeapNumber> object)) { in INLINE() argument
77 return SerializeDouble(object->value()); in INLINE()
80 Result SerializeJSValue(Handle<JSValue> object);
82 INLINE(Result SerializeJSArray(Handle<JSArray> object));
83 INLINE(Result SerializeJSObject(Handle<JSObject> object));
85 Result SerializeJSArraySlow(Handle<JSArray> object, uint32_t start,
88 void SerializeString(Handle<String> object);
101 Result StackPush(Handle<Object> object);
192 MaybeHandle<Object> BasicJsonStringifier::Stringify(Handle<Object> object) { in Stringify() argument
193 Result result = SerializeObject(object); in Stringify()
202 Isolate* isolate, Handle<String> object) { in StringifyString() argument
206 object->length() * kJsonQuoteWorstCaseBlowup + kSpaceForQuotes; in StringifyString()
210 return stringifier.Stringify(object); in StringifyString()
213 object = String::Flatten(object); in StringifyString()
214 DCHECK(object->IsFlat()); in StringifyString()
216 if (object->IsOneByteRepresentationUnderneath()) { in StringifyString()
223 SerializeStringUnchecked_(object->GetFlatContent().ToOneByteVector(), in StringifyString()
234 SerializeStringUnchecked_(object->GetFlatContent().ToUC16Vector(), in StringifyString()
243 Handle<Object> object, Handle<Object> key) { in ApplyToJsonFunction() argument
244 LookupIterator it(object, tojson_string_, in ApplyToJsonFunction()
248 if (!fun->IsJSFunction()) return object; in ApplyToJsonFunction()
255 isolate_, object, in ApplyToJsonFunction()
256 Execution::Call(isolate_, fun, object, 1, argv), in ApplyToJsonFunction()
258 return scope.CloseAndEscape(object); in ApplyToJsonFunction()
263 Handle<Object> object) { in StackPush() argument
275 if (elements->get(i) == *object) { in StackPush()
285 FixedArray::cast(stack_->elements())->set(length, *object); in StackPush()
298 Handle<Object> object, bool comma, Handle<Object> key) { in Serialize_() argument
299 if (object->IsJSObject()) { in Serialize_()
301 isolate_, object, in Serialize_()
302 ApplyToJsonFunction(object, key), in Serialize_()
306 if (object->IsSmi()) { in Serialize_()
308 return SerializeSmi(Smi::cast(*object)); in Serialize_()
311 switch (HeapObject::cast(*object)->map()->instance_type()) { in Serialize_()
315 return SerializeHeapNumber(Handle<HeapNumber>::cast(object)); in Serialize_()
317 switch (Oddball::cast(*object)->kind()) { in Serialize_()
334 if (object->IsAccessCheckNeeded()) break; in Serialize_()
336 return SerializeJSArray(Handle<JSArray>::cast(object)); in Serialize_()
339 return SerializeJSValue(Handle<JSValue>::cast(object)); in Serialize_()
341 if (object->IsString()) { in Serialize_()
343 SerializeString(Handle<String>::cast(object)); in Serialize_()
345 } else if (object->IsJSObject()) { in Serialize_()
346 if (object->IsCallable()) return UNCHANGED; in Serialize_()
348 if (object->IsAccessCheckNeeded() || object->IsJSGlobalProxy()) break; in Serialize_()
350 return SerializeJSObject(Handle<JSObject>::cast(object)); in Serialize_()
354 return SerializeGeneric(object, key, comma, deferred_string_key); in Serialize_()
359 Handle<Object> object, in SerializeGeneric() argument
364 Handle<Object> argv[] = { key, object }; in SerializeGeneric()
367 isolate_, result, Execution::Call(isolate_, fun, object, 2, argv), in SerializeGeneric()
381 Handle<JSValue> object) { in SerializeJSValue() argument
382 String* class_name = object->class_name(); in SerializeJSValue()
386 isolate_, value, Object::ToString(isolate_, object), EXCEPTION); in SerializeJSValue()
390 ASSIGN_RETURN_ON_EXCEPTION_VALUE(isolate_, value, Object::ToNumber(object), in SerializeJSValue()
395 Object* value = JSValue::cast(*object)->value(); in SerializeJSValue()
400 CHECK(!object->IsAccessCheckNeeded()); in SerializeJSValue()
401 CHECK(!object->IsJSGlobalProxy()); in SerializeJSValue()
402 return SerializeJSObject(object); in SerializeJSValue()
408 BasicJsonStringifier::Result BasicJsonStringifier::SerializeSmi(Smi* object) { in SerializeSmi() argument
412 builder_.AppendCString(IntToCString(object->value(), buffer)); in SerializeSmi()
432 Handle<JSArray> object) { in SerializeJSArray() argument
434 Result stack_push = StackPush(object); in SerializeJSArray()
437 CHECK(object->length()->ToArrayLength(&length)); in SerializeJSArray()
439 switch (object->GetElementsKind()) { in SerializeJSArray()
441 Handle<FixedArray> elements(FixedArray::cast(object->elements()), in SerializeJSArray()
453 FixedDoubleArray::cast(object->elements()), isolate_); in SerializeJSArray()
461 Handle<Object> old_length(object->length(), isolate_); in SerializeJSArray()
463 if (object->length() != *old_length || in SerializeJSArray()
464 object->GetElementsKind() != FAST_ELEMENTS) { in SerializeJSArray()
465 Result result = SerializeJSArraySlow(object, i, length); in SerializeJSArray()
472 Handle<Object>(FixedArray::cast(object->elements())->get(i), in SerializeJSArray()
487 Result result = SerializeJSArraySlow(object, 0, length); in SerializeJSArray()
499 Handle<JSArray> object, uint32_t start, uint32_t length) { in SerializeJSArraySlow() argument
505 Object::GetElement(isolate_, object, i), in SerializeJSArraySlow()
524 Handle<JSObject> object) { in SerializeJSObject() argument
526 Result stack_push = StackPush(object); in SerializeJSObject()
528 DCHECK(!object->IsJSGlobalProxy() && !object->IsJSGlobalObject()); in SerializeJSObject()
533 if (object->HasFastProperties() && in SerializeJSObject()
534 !object->HasIndexedInterceptor() && in SerializeJSObject()
535 !object->HasNamedInterceptor() && in SerializeJSObject()
536 object->elements()->length() == 0) { in SerializeJSObject()
537 Handle<Map> map(object->map()); in SerializeJSObject()
546 if (details.type() == DATA && *map == object->map()) { in SerializeJSObject()
548 Isolate* isolate = object->GetIsolate(); in SerializeJSObject()
549 if (object->IsUnboxedDoubleField(field_index)) { in SerializeJSObject()
550 double value = object->RawFastDoublePropertyAt(field_index); in SerializeJSObject()
554 property = handle(object->RawFastPropertyAt(field_index), isolate); in SerializeJSObject()
559 Object::GetPropertyOrElement(object, key), in SerializeJSObject()
570 JSReceiver::GetKeys(object, JSReceiver::OWN_ONLY, ENUMERABLE_STRINGS), in SerializeJSObject()
579 maybe_property = Object::GetPropertyOrElement(object, key_handle); in SerializeJSObject()
585 isolate_, object, Smi::cast(key)->value()); in SerializeJSObject()
587 maybe_property = Object::GetPropertyOrElement(object, key_handle); in SerializeJSObject()
667 void BasicJsonStringifier::SerializeString(Handle<String> object) { in SerializeString() argument
668 object = String::Flatten(object); in SerializeString()
670 if (object->IsOneByteRepresentationUnderneath()) { in SerializeString()
671 SerializeString_<uint8_t, uint8_t>(object); in SerializeString()
674 SerializeString(object); in SerializeString()
677 if (object->IsOneByteRepresentationUnderneath()) { in SerializeString()
678 SerializeString_<uint8_t, uc16>(object); in SerializeString()
680 SerializeString_<uc16, uc16>(object); in SerializeString()