Lines Matching defs:object
11 #include "include/v8-object.h"
229 Handle<Object> object, MaybeHandle<FixedArray> maybe_externals,
239 if (object->IsHeapObject()) Discover(Handle<HeapObject>::cast(object));
245 SerializeExport(object, factory()->empty_string());
282 Throw("Exported object not found");
347 Handle<JSObject> object =
349 SerializeObject(object);
368 // - For each object:
369 // - Serialized object
463 // - 0 if the __proto__ is Object.prototype, 1 + object id for the __proto__
621 Object object = externals.get(i);
622 if (!object.IsHeapObject()) continue;
624 InsertIntoIndexMap(external_objects_ids_, HeapObject::cast(object),
630 // The object discovery phase assigns IDs for objects / functions / classes /
638 const Handle<HeapObject>& object = discovery_queue_.front();
639 switch (object->map().instance_type()) {
641 DiscoverFunction(Handle<JSFunction>::cast(object));
644 DiscoverClass(Handle<JSFunction>::cast(object));
647 DiscoverObject(Handle<JSObject>::cast(object));
650 DiscoverArray(Handle<JSArray>::cast(object));
658 Handle<JSPrimitiveWrapper>::cast(object);
666 Handle<JSRegExp> regexp = Handle<JSRegExp>::cast(object);
675 if (object->IsString()) {
676 // These are array elements / object properties -> allow in place
678 DiscoverString(Handle<String>::cast(object), AllowInPlace::Yes);
682 external_objects_ids_.LookupOrInsert(*object, &unused_id);
684 Throw("Unsupported object");
840 Object object = elements.get(i);
841 if (!object.IsHeapObject()) continue;
842 discovery_queue_.push(handle(HeapObject::cast(object), isolate_));
846 void WebSnapshotSerializer::DiscoverObject(Handle<JSObject> object) {
848 if (InsertIntoIndexMap(object_ids_, *object, id)) return;
851 objects_ = ArrayList::Add(isolate_, objects_, object);
855 JSObject::MigrateSlowToFast(object, 0, "Web snapshot");
856 if (!object->HasFastProperties()) {
860 Handle<Map> map(object->map(), isolate_);
875 isolate_, object, details.representation(), field_index);
882 handle(FixedArray::cast(object->elements()), isolate_);
884 Object object = elements->get(i);
885 if (!object.IsHeapObject()) continue;
886 discovery_queue_.push(handle(HeapObject::cast(object), isolate_));
897 // - 0 if there's no function prototype, 1 + object id for the function
912 // - 1 + object id for the function prototype
959 // Format (serialized object):
968 void WebSnapshotSerializer::SerializeObject(Handle<JSObject> object) {
969 Handle<Map> map(object->map(), isolate_);
979 isolate_, object, details.representation(), field_index);
986 handle(FixedArray::cast(object->elements()), isolate_);
1036 void WebSnapshotSerializer::SerializeExport(Handle<Object> object,
1040 if (object->IsJSPrimitiveWrapper()) {
1042 Handle<JSPrimitiveWrapper>::cast(object);
1046 WriteValue(object, export_serializer_);
1053 void WebSnapshotSerializer::WriteValue(Handle<Object> object,
1055 if (object->IsSmi()) {
1057 serializer.WriteZigZag<int32_t>(Smi::cast(*object).value());
1062 if (external_objects_ids_.Lookup(HeapObject::cast(*object), &external_id)) {
1068 DCHECK(object->IsHeapObject());
1069 Handle<HeapObject> heap_object = Handle<HeapObject>::cast(object);
1128 Throw("Unsupported object");
1212 uint32_t WebSnapshotSerializer::GetObjectId(JSObject object) {
1214 bool return_value = object_ids_.Lookup(object, &id);
1220 uint32_t WebSnapshotSerializer::GetExternalId(HeapObject object) {
1222 bool return_value = external_objects_ids_.Lookup(object, &id);
1563 // Use the "none" representation until we see the first object having this
1588 // The object hasn't been deserialized yet.
1945 Throw("Malformed object");
1952 // TODO(v8:11525): In-object properties.
1975 Handle<JSObject> object = factory()->NewJSObjectFromMap(map);
1976 object->set_raw_properties_or_hash(*property_array, kRelaxedStore);
1981 Throw("Malformed object");
1993 Throw("Malformed object");
2002 object->set_elements(*elements);
2004 DCHECK(!IsSmiElementsKind(object->map().elements_kind()));
2005 DCHECK(!IsDoubleElementsKind(object->map().elements_kind()));
2006 DCHECK(IsHoleyElementsKind(object->map().elements_kind()));
2008 objects_.set(static_cast<int>(current_object_count_), *object);
2068 // object.
2210 // The object hasn't been deserialized yet.
2219 Throw("Malformed object property");
2233 Throw("Malformed object property");
2292 // The object hasn't been deserialized yet.
2321 message = "Invalid object reference";
2353 // Deferred references is a list of (object, index, target type, target index)
2392 Throw("Invalid object reference");