Lines Matching defs:map

5 #include "src/objects/map-updater.h"
46 Isolate* isolate, Handle<Map> map, FILE* file, const char* reason,
55 Name name = map->instance_descriptors(isolate).GetKey(modify_index);
113 // If the original map was sealed or frozen, let's use the old
254 Handle<Map> MapUpdater::UpdateMapNoLock(Isolate* isolate, Handle<Map> map) {
255 if (!map->is_deprecated()) return map;
256 // TODO(ishell): support fast map updating if we enable it.
258 MapUpdater mu(isolate, map);
259 // Update map without locking the Isolate::map_updater_access mutex.
288 explicit IntegrityLevelTransitionInfo(Map map)
289 : integrity_level_source_map(map) {}
298 Map map, Isolate* isolate, DisallowGarbageCollection* no_gc,
300 IntegrityLevelTransitionInfo info(map);
304 DCHECK(!map.is_extensible());
305 Map previous = Map::cast(map.GetBackPointer(isolate));
308 map, &info.integrity_level_symbol, &info.integrity_level)) {
332 CHECK_EQ(map.NumberOfOwnDescriptors(), source_map.NumberOfOwnDescriptors());
346 // Check the state of the root map.
382 // From here on, use the map with correct elements kind as root map.
402 void MapUpdater::GeneralizeField(Handle<Map> map, InternalIndex modify_index,
406 GeneralizeField(isolate_, map, modify_index, new_constness,
424 // Has to be an initial map.
433 // Resize the initial map and all maps in its transition tree.
434 callback = [slack](Map map) {
436 int old_visitor_id = Map::GetVisitorId(map);
437 int new_unused = map.UnusedPropertyFields() - slack;
439 map.set_instance_size(map.InstanceSizeFromSlack(slack));
440 map.set_construction_counter(Map::kNoSlackTracking);
441 DCHECK_EQ(old_visitor_id, Map::GetVisitorId(map));
442 DCHECK_EQ(new_unused, map.UnusedPropertyFields());
445 // Stop slack tracking for this map.
446 callback = [](Map map) {
447 map.set_construction_counter(Map::kNoSlackTracking);
453 // related map changes (instead of guaranteeing only atomicity of each
454 // single map change). This is needed e.g. by InstancesNeedsRewriting,
557 // Check the state of the root map.
621 // Modify root map in-place. The GeneralizeField method is a no-op
628 // From here on, use the map with correct elements kind as root map.
649 // Check if target map is incompatible.
689 // Directly change the map if the target map is more general.
734 // Find the last compatible target map in the transition tree.
745 // Check that target map is compatible.
890 // If the |new_elements_kind_| is still transitionable then the old map's
1068 void PrintReconfiguration(Isolate* isolate, Handle<Map> map, FILE* file,
1073 Name name = map->instance_descriptors(isolate).GetKey(modify_index);
1090 Isolate* isolate, Handle<Map> map, InternalIndex descriptor,
1094 DCHECK(!map->is_dictionary_map());
1097 if (!map->GetBackPointer().IsMap()) {
1099 // back pointers, normalize and try to hit the map cache instead.
1100 return Map::Normalize(isolate, map, CLEAR_INOBJECT_PROPERTIES,
1105 PrintReconfiguration(isolate, map, stdout, descriptor, kind, attributes);
1108 return MapUpdater{isolate, map}.ReconfigureToDataField(
1114 void MapUpdater::UpdateFieldType(Isolate* isolate, Handle<Map> map,
1122 map->instance_descriptors(isolate).GetDetails(descriptor);
1126 if (new_constness != details.constness() && map->is_prototype_map()) {
1127 JSObject::InvalidatePrototypeChains(*map);
1131 backlog.push(*map);
1163 // TODO(jgruber): Lock the map-updater mutex.
1165 void MapUpdater::GeneralizeField(Isolate* isolate, Handle<Map> map,
1170 DCHECK(!map->is_deprecated());
1173 Handle<DescriptorArray> old_descriptors(map->instance_descriptors(isolate),
1181 // Return if the current map is general enough to hold requested constness and
1196 Handle<Map> field_owner(map->FindFieldOwner(isolate, modify_index), isolate);
1230 isolate, map, stdout, "field type generalization", modify_index,
1231 map->NumberOfOwnDescriptors(), map->NumberOfOwnDescriptors(), false,