Lines Matching defs:object

27 #include "src/objects/object-macros.h"
90 Handle<JSReceiver> object,
92 LookupIterator it(isolate, object, name, object,
119 Handle<JSReceiver> object) {
120 return KeyAccumulator::GetKeys(object, KeyCollectionMode::kOwnOnly,
125 bool JSObject::PrototypeHasNoElements(Isolate* isolate, JSObject object) {
127 HeapObject prototype = HeapObject::cast(object.map().prototype());
150 void JSObject::EnsureCanContainHeapObjectElements(Handle<JSObject> object) {
151 JSObject::ValidateElements(*object);
152 ElementsKind elements_kind = object->map().elements_kind();
155 TransitionElementsKind(object, HOLEY_ELEMENTS);
157 TransitionElementsKind(object, PACKED_ELEMENTS);
163 void JSObject::EnsureCanContainElements(Handle<JSObject> object, TSlot objects,
169 ElementsKind current_kind = object->GetElementsKind();
176 Object the_hole = object->GetReadOnlyRoots().the_hole_value();
201 TransitionElementsKind(object, target_kind);
205 void JSObject::EnsureCanContainElements(Handle<JSObject> object,
209 ReadOnlyRoots roots = object->GetReadOnlyRoots();
218 EnsureCanContainElements(object, objects, length, mode);
223 if (object->GetElementsKind() == HOLEY_SMI_ELEMENTS) {
224 TransitionElementsKind(object, HOLEY_DOUBLE_ELEMENTS);
225 } else if (object->GetElementsKind() == PACKED_SMI_ELEMENTS) {
230 TransitionElementsKind(object, HOLEY_DOUBLE_ELEMENTS);
234 TransitionElementsKind(object, PACKED_DOUBLE_ELEMENTS);
238 void JSObject::SetMapAndElements(Handle<JSObject> object, Handle<Map> new_map,
240 Isolate* isolate = object->GetIsolate();
241 JSObject::MigrateToMap(isolate, object, new_map);
242 DCHECK((object->map().has_fast_smi_or_object_elements() ||
244 object->map().has_fast_string_wrapper_elements()) ==
248 (object->map().has_fast_double_elements() ==
250 object->set_elements(*value);
268 // Check for the most common kind of JavaScript object before
279 // Embedder fields are located after the object header.
305 // Embedder fields are located after the object header, whereas in-object
306 // properties are located at the end of the object. We don't have to round up
344 // Access fast-case object properties at index. The use of these routines
345 // is needed to correctly distinguish between properties stored in-object and
385 // of bounds of an object. It's used to access a fast in-object property from
388 // contend with the main thread altering the object in heavy ways through
389 // object migration. Specifically, the object can get smaller. Initially, this
390 // may seem benign, because object migration fills the freed-up space with
408 // given by the map and it will be a valid Smi or object pointer.
508 // Adjust for the number of properties stored in the object.
526 // fill start with references to the undefined value object
550 // fill pre allocated slots with references to the undefined value object
563 // fill everything with references to the undefined value object
628 // If a GC was caused while constructing this object, the elements
822 Maybe<bool> JSReceiver::HasProperty(Isolate* isolate, Handle<JSReceiver> object,
825 LookupIterator it(isolate, object, key, object);
830 Handle<JSReceiver> object,
832 if (object->IsJSObject()) { // Shortcut.
833 LookupIterator it(isolate, object, index, object, LookupIterator::OWN);
838 JSReceiver::GetOwnPropertyAttributes(object, index);
844 Handle<JSReceiver> object, Handle<Name> name) {
845 Isolate* isolate = object->GetIsolate();
847 LookupIterator it(isolate, object, key, object);
852 Handle<JSReceiver> object, Handle<Name> name) {
853 Isolate* isolate = object->GetIsolate();
855 LookupIterator it(isolate, object, key, object, LookupIterator::OWN);
860 Handle<JSReceiver> object, uint32_t index) {
861 LookupIterator it(object->GetIsolate(), object, index, object,
866 Maybe<bool> JSReceiver::HasElement(Isolate* isolate, Handle<JSReceiver> object,
868 LookupIterator it(isolate, object, index, object);
873 Handle<JSReceiver> object, uint32_t index) {
874 Isolate* isolate = object->GetIsolate();
875 LookupIterator it(isolate, object, index, object);
880 Handle<JSReceiver> object, uint32_t index) {
881 Isolate* isolate = object->GetIsolate();
882 LookupIterator it(isolate, object, index, object, LookupIterator::OWN);
904 // backing storage would, the object should have slow elements.
914 static inline bool ShouldConvertToSlowElements(JSObject object,
929 ObjectInYoungGeneration(object))) {
932 return ShouldConvertToSlowElements(object.GetFastElementsUsage(),
939 #include "src/objects/object-macros-undef.h"