Lines Matching refs:map
21 bool CanInlineElementAccess(Handle<Map> map) {
22 if (!map->IsJSObjectMap()) return false;
23 if (map->is_access_check_needed()) return false;
24 if (map->has_indexed_interceptor()) return false;
25 ElementsKind const elements_kind = map->elements_kind();
32 bool CanInlinePropertyAccess(Handle<Map> map) {
37 if (map->IsBooleanMap()) return true;
38 if (map->instance_type() < LAST_PRIMITIVE_TYPE) return true;
39 return map->IsJSObjectMap() && !map->is_dictionary_map() &&
40 !map->has_named_interceptor() &&
42 !map->is_access_check_needed();
79 MaybeHandle<Map> transition_map) {
119 MaybeHandle<Map> transition_map,
144 Handle<Map> map, AccessMode access_mode, ElementAccessInfo* access_info) {
145 // Check if it is safe to inline element access for the {map}.
146 if (!CanInlineElementAccess(map)) return false;
148 ElementsKind const elements_kind = map->elements_kind();
154 if (access_mode == AccessMode::kStore && map->prototype()->IsJSObject()) {
155 for (PrototypeIterator i(map); !i.IsAtEnd(); i.Advance()) {
164 if (!prototype->map()->is_stable()) return false;
170 ElementAccessInfo(Type::Class(map, zone()), elements_kind, holder);
180 for (Handle<Map> map : maps) {
181 if (Map::TryUpdate(map).ToHandle(&map)) {
182 if (CanInlineElementAccess(map) &&
183 IsFastElementsKind(map->elements_kind()) &&
184 GetInitialFastElementsKind() != map->elements_kind()) {
185 possible_transition_targets.Add(map);
193 for (Handle<Map> map : maps) {
194 if (Map::TryUpdate(map).ToHandle(&map)) {
195 Handle<Map> transition_target =
196 Map::FindTransitionedMap(map, &possible_transition_targets);
198 receiver_maps.Add(map);
200 transitions.push_back(std::make_pair(map, transition_target));
205 for (Handle<Map> receiver_map : receiver_maps) {
227 Handle<Map> map, Handle<Name> name, AccessMode access_mode,
229 // Check if it is safe to inline property access for the {map}.
230 if (!CanInlinePropertyAccess(map)) return false;
233 Handle<Map> receiver_map = map;
237 LookupSpecialFieldAccessor(map, name, access_info)) {
243 // Lookup the named property on the {map}.
244 Handle<DescriptorArray> descriptors(map->instance_descriptors(), isolate());
245 int const number = descriptors->SearchWithCache(*name, *map);
270 *map, index, field_representation.IsDouble());
293 // Add proper code dependencies in case of stable field map(s).
294 Handle<Map> field_owner_map(map->FindFieldOwner(number), isolate());
311 if (map->IsJSTypedArrayMap() && name->IsString() &&
320 if (!map->prototype()->IsJSObject()) {
324 if (Map::GetConstructorFunction(map, native_context())
326 map = handle(constructor->initial_map(), isolate());
327 DCHECK(map->prototype()->IsJSObject());
328 } else if (map->prototype()->IsNull()) {
345 Handle<JSObject> map_prototype(JSObject::cast(map->prototype()), isolate());
346 if (map_prototype->map()->is_deprecated()) {
348 // map into the optimized code.
351 map = handle(map_prototype->map(), isolate());
353 } while (CanInlinePropertyAccess(map));
361 for (Handle<Map> map : maps) {
362 if (Map::TryUpdate(map).ToHandle(&map)) {
364 if (!ComputePropertyAccessInfo(map, name, access_mode, &access_info)) {
375 Handle<Map> map, Handle<Name> name, PropertyAccessInfo* access_info) {
378 if (Accessors::IsJSObjectFieldAccessor(map, name, &offset)) {
381 if (map->IsStringMap()) {
386 } else if (map->IsJSArrayMap()) {
393 if (IsFastDoubleElementsKind(map->elements_kind())) {
395 } else if (IsFastElementsKind(map->elements_kind())) {
401 *access_info = PropertyAccessInfo::DataField(Type::Class(map, zone()),
406 if (Accessors::IsJSArrayBufferViewFieldAccessor(map, name, &offset)) {
414 } else if (map->IsJSTypedArrayMap()) {
421 Type::Class(map
429 bool AccessInfoFactory::LookupTransition(Handle<Map> map, Handle<Name> name,
432 // Check if the {map} has a data transition with the given {name}.
433 if (map->unused_property_fields() == 0) return false;
434 Handle<Map> transition_map;
435 if (TransitionArray::SearchTransition(map, kData, name, NONE)
467 // Add proper code dependencies in case of stable field map(s).
468 Handle<Map> field_owner_map(transition_map->FindFieldOwner(number),
476 Type::Class(map, zone()), field_index, field_type, FieldCheck::kNone,