Lines Matching defs:map
31 bool CanInlinePropertyAccess(MapRef map, AccessMode access_mode) {
37 // relationship between the map and the object (and therefore the property
40 if (map.object()->IsBooleanMap()) return true;
41 if (map.instance_type() < LAST_PRIMITIVE_HEAP_OBJECT_TYPE) return true;
42 if (map.object()->IsJSObjectMap()) {
43 if (map.is_dictionary_map()) {
46 map.object()->is_prototype_map();
48 return !map.object()->has_named_interceptor() &&
50 !map.is_access_check_needed();
121 : holder.has_value() ? holder->map().object()
306 // For stores, the field map and field representation information
369 MapRef map, AccessMode access_mode) const {
370 if (!map.CanInlineElementAccess()) return {};
371 return ElementAccessInfo({{map}, zone()}, map.elements_kind(), zone());
411 MapRef receiver_map, MapRef map, NameRef name,
416 Handle<DescriptorArray> descriptors = map.instance_descriptors().object();
428 FieldIndex field_index = FieldIndex::ForPropertyIndex(*map.object(), index,
449 map, descriptor, details_representation));
454 map, descriptor, details_representation));
473 map, descriptor, details_representation));
475 // Remember the field map, and try to infer a useful type.
489 map, descriptor, descriptors_field_type_ref.value()));
495 constness = dependencies()->DependOnFieldConstness(map, descriptor);
499 // compilation. This is safe since its result is fixed for a given map and
501 MapRef field_owner_map = map.FindFieldOwner(descriptor);
526 MapRef map, base::Optional<JSObjectRef> holder, AccessMode access_mode,
528 if (map.instance_type() == JS_MODULE_NAMESPACE_TYPE) {
529 DCHECK(map.object()->is_prototype_map());
531 PrototypeInfo::cast(map.object()->prototype_info()));
551 DCHECK(!map.is_dictionary_map());
573 *broker->target_native_context().object(), *map.object())) {
605 map, cached_property_name_ref.value(), access_mode);
611 if (map.is_dictionary_map()) {
646 DCHECK(holder.map().object()->is_prototype_map());
664 receiver_map, name, holder.map(), holder,
669 MapRef map, base::Optional<JSObjectRef> maybe_holder, NameRef name,
671 if (map.is_dictionary_map()) {
673 DCHECK(map.object()->is_prototype_map());
701 DescriptorArray descriptors = *map.instance_descriptors().object();
702 *index_out = descriptors.Search(*name.object(), *map.object(), true);
712 MapRef map, NameRef name, AccessMode access_mode) const {
720 if (access_mode == AccessMode::kHas && !map.object()->IsJSReceiverMap()) {
724 // Check if it is safe to inline property access for the {map}.
725 if (!CanInlinePropertyAccess(map, access_mode)) {
731 PropertyAccessInfo access_info = LookupSpecialFieldAccessor(map, name);
739 // Remember the receiver map. We use {map} as loop variable.
740 MapRef receiver_map = map;
751 map = constructor->initial_map(broker()->dependencies());
752 DCHECK(!map.IsPrimitiveMap());
758 if (!TryLoadPropertyDetails(map, holder, name, &index, &details)) {
765 DCHECK(!map.is_dictionary_map());
779 if (map.is_dictionary_map()) {
815 return ComputeDataFieldAccessInfo(receiver_map, map, name, holder,
825 return ComputeAccessorDescriptorAccessInfo(receiver_map, name, map,
832 // The property wasn't found on {map}. Look on the prototype if appropriate.
837 if (map.object()->IsJSTypedArrayMap() && name.IsString()) {
870 DCHECK(holder->object()->map().is_prototype_map());
871 DCHECK(!holder->map().equals(receiver_map));
874 fast_mode_prototype_on_chain || !map.is_dictionary_map();
876 dictionary_prototype_on_chain || map.is_dictionary_map();
880 // Load the map's prototype's map to guarantee that every time we use it,
882 HeapObjectRef prototype = map.prototype();
884 MapRef map_prototype_map = prototype.map();
917 map = map_prototype_map;
919 if (!CanInlinePropertyAccess(map, access_mode)) {
1027 base::Optional<MapRef> map = TryMakeRef(broker(), map_handle);
1028 if (!map.has_value()) return {};
1029 if (map->instance_type() != instance_type ||
1030 !map->CanInlineElementAccess()) {
1033 if (!GeneralizeElementsKind(elements_kind, map->elements_kind())
1037 maps.push_back(map.value());
1045 MapRef map, NameRef name) const {
1047 if (map.object()->IsStringMap()) {
1050 return PropertyAccessInfo::StringLength(zone(), map);
1056 if (Accessors::IsJSObjectFieldAccessor(isolate(), map.object(), name.object(),
1060 if (map.object()->IsJSArrayMap()) {
1068 if (IsDoubleElementsKind(map.elements_kind())) {
1071 } else if (IsFastElementsKind(map.elements_kind())) {
1079 return PropertyAccessInfo::DataField(zone(), map, {{}, zone()}, field_index,
1080 field_representation, field_type, map,
1087 MapRef map, NameRef name, base::Optional<JSObjectRef> holder,
1089 // Check if the {map} has a data transition with the given {name}.
1091 TransitionsAccessor(isolate(), *map.object(), true)
1151 // Remember the field map, and try to infer a useful type.
1164 // stores to the same constant field by the presence of a transition map.
1168 zone(), map, std::move(unrecorded_dependencies), field_index,
1173 zone(), map, std::move(unrecorded_dependencies), field_index,