Lines Matching refs:object
90 MaybeHandle<Object> JsonStringifier::Stringify(Handle<Object> object, in Stringify() argument
97 Result result = SerializeObject(object); in Stringify()
196 MaybeHandle<Object> JsonStringifier::ApplyToJsonFunction(Handle<Object> object, in ApplyToJsonFunction() argument
199 LookupIterator it(object, tojson_string_, in ApplyToJsonFunction()
203 if (!fun->IsCallable()) return object; in ApplyToJsonFunction()
208 ASSIGN_RETURN_ON_EXCEPTION(isolate_, object, in ApplyToJsonFunction()
209 Execution::Call(isolate_, fun, object, 1, argv), in ApplyToJsonFunction()
211 return scope.CloseAndEscape(object); in ApplyToJsonFunction()
242 JsonStringifier::Result JsonStringifier::StackPush(Handle<Object> object) { in StackPush() argument
254 if (elements->get(i) == *object) { in StackPush()
264 FixedArray::cast(stack_->elements())->set(length, *object); in StackPush()
274 JsonStringifier::Result JsonStringifier::Serialize_(Handle<Object> object, in Serialize_() argument
278 Handle<Object> initial_value = object; in Serialize_()
283 if (object->IsJSReceiver()) { in Serialize_()
285 isolate_, object, ApplyToJsonFunction(object, key), EXCEPTION); in Serialize_()
289 isolate_, object, ApplyReplacerFunction(object, key, initial_value), in Serialize_()
293 if (object->IsSmi()) { in Serialize_()
295 return SerializeSmi(Smi::cast(*object)); in Serialize_()
298 switch (HeapObject::cast(*object)->map()->instance_type()) { in Serialize_()
302 return SerializeHeapNumber(Handle<HeapNumber>::cast(object)); in Serialize_()
304 switch (Oddball::cast(*object)->kind()) { in Serialize_()
322 return SerializeJSArray(Handle<JSArray>::cast(object)); in Serialize_()
325 return SerializeJSValue(Handle<JSValue>::cast(object)); in Serialize_()
330 if (object->IsString()) { in Serialize_()
332 SerializeString(Handle<String>::cast(object)); in Serialize_()
335 DCHECK(object->IsJSReceiver()); in Serialize_()
336 if (object->IsCallable()) return UNCHANGED; in Serialize_()
339 if (object->IsJSProxy()) { in Serialize_()
340 return SerializeJSProxy(Handle<JSProxy>::cast(object)); in Serialize_()
342 return SerializeJSObject(Handle<JSObject>::cast(object)); in Serialize_()
351 Handle<JSValue> object) { in SerializeJSValue() argument
352 String* class_name = object->class_name(); in SerializeJSValue()
356 isolate_, value, Object::ToString(isolate_, object), EXCEPTION); in SerializeJSValue()
360 ASSIGN_RETURN_ON_EXCEPTION_VALUE(isolate_, value, Object::ToNumber(object), in SerializeJSValue()
365 Object* value = JSValue::cast(*object)->value(); in SerializeJSValue()
370 return SerializeJSObject(object); in SerializeJSValue()
375 JsonStringifier::Result JsonStringifier::SerializeSmi(Smi* object) { in SerializeSmi() argument
379 builder_.AppendCString(IntToCString(object->value(), buffer)); in SerializeSmi()
396 Handle<JSArray> object) { in SerializeJSArray() argument
398 Result stack_push = StackPush(object); in SerializeJSArray()
401 CHECK(object->length()->ToArrayLength(&length)); in SerializeJSArray()
402 DCHECK(!object->IsAccessCheckNeeded()); in SerializeJSArray()
407 switch (object->GetElementsKind()) { in SerializeJSArray()
409 Handle<FixedArray> elements(FixedArray::cast(object->elements()), in SerializeJSArray()
428 FixedDoubleArray::cast(object->elements()), isolate_); in SerializeJSArray()
443 Handle<Object> old_length(object->length(), isolate_); in SerializeJSArray()
445 if (object->length() != *old_length || in SerializeJSArray()
446 object->GetElementsKind() != FAST_ELEMENTS) { in SerializeJSArray()
453 Handle<Object>(FixedArray::cast(object->elements())->get(i), in SerializeJSArray()
473 Result result = SerializeArrayLikeSlow(object, i, length); in SerializeJSArray()
484 Handle<JSReceiver> object, uint32_t start, uint32_t length) { in SerializeArrayLikeSlow() argument
495 isolate_, element, JSReceiver::GetElement(isolate_, object, i), in SerializeArrayLikeSlow()
511 Handle<JSObject> object) { in SerializeJSObject() argument
513 Result stack_push = StackPush(object); in SerializeJSObject()
517 object->map()->instance_type() > LAST_CUSTOM_ELEMENTS_RECEIVER && in SerializeJSObject()
518 object->HasFastProperties() && in SerializeJSObject()
519 Handle<JSObject>::cast(object)->elements()->length() == 0) { in SerializeJSObject()
520 DCHECK(object->IsJSObject()); in SerializeJSObject()
521 DCHECK(!object->IsJSGlobalProxy()); in SerializeJSObject()
522 Handle<JSObject> js_obj = Handle<JSObject>::cast(object); in SerializeJSObject()
554 Result result = SerializeJSReceiverSlow(object); in SerializeJSObject()
562 Handle<JSReceiver> object) { in SerializeJSReceiverSlow() argument
567 KeyAccumulator::GetKeys(object, KeyCollectionMode::kOwnOnly, in SerializeJSReceiverSlow()
579 Object::GetPropertyOrElement(object, key), in SerializeJSReceiverSlow()
592 Handle<JSProxy> object) { in SerializeJSProxy() argument
594 Result stack_push = StackPush(object); in SerializeJSProxy()
596 Maybe<bool> is_array = Object::IsArray(object); in SerializeJSProxy()
602 Object::GetLengthFromArrayLike(isolate_, object), EXCEPTION); in SerializeJSProxy()
613 Result result = SerializeArrayLikeSlow(object, 0, length); in SerializeJSProxy()
619 Result result = SerializeJSReceiverSlow(object); in SerializeJSProxy()
703 void JsonStringifier::SerializeString(Handle<String> object) { in SerializeString() argument
704 object = String::Flatten(object); in SerializeString()
706 if (object->IsOneByteRepresentationUnderneath()) { in SerializeString()
707 SerializeString_<uint8_t, uint8_t>(object); in SerializeString()
710 SerializeString(object); in SerializeString()
713 if (object->IsOneByteRepresentationUnderneath()) { in SerializeString()
714 SerializeString_<uint8_t, uc16>(object); in SerializeString()
716 SerializeString_<uc16, uc16>(object); in SerializeString()