Lines Matching defs:map
368 bool IsFunctionMapOrSpecialBuiltin(Handle<Map> map, Builtin builtin,
371 return ((*map == context->get(Context::STRICT_FUNCTION_MAP_INDEX)) ||
372 (*map == context->get(
374 (*map ==
386 Handle<Map> map,
390 DCHECK(IsFunctionMapOrSpecialBuiltin(map, builtin, context));
397 .set_map(map)
407 Handle<Map> map =
411 DCHECK(IsFunctionMapOrSpecialBuiltin(map, builtin, context));
419 Factory::JSFunctionBuilder{isolate, info, context}.set_map(map).Build();
437 // Since we are creating an initial map for JSFunction objects with
456 Handle<Map> map = isolate->strict_function_without_prototype_map();
457 DCHECK(IsFunctionMapOrSpecialBuiltin(map, builtin, context));
464 .set_map(map)
515 // This sets a constructor instance type on the constructor map which will be
519 // Note, this function doesn't create a copy of the constructor's map. So it's
521 // to the constructor and thus the map is already guaranteed to be unique.
528 Map map = constructor->map();
531 DCHECK_NE(map, *isolate->strict_function_map());
532 DCHECK_NE(map, *isolate->strict_function_with_readonly_prototype_map());
533 // Constructor function map is always a root map, and thus we don't have to
535 DCHECK(map.GetBackPointer().IsUndefined(isolate));
536 DCHECK_EQ(JS_FUNCTION_TYPE, map.instance_type());
538 map.set_instance_type(constructor_type);
693 // Allocate the function map first and then patch the prototype later.
722 Handle<Map> map;
727 map = factory->CreateSloppyFunctionMap(FUNCTION_WITHOUT_PROTOTYPE, empty);
728 native_context()->set_sloppy_function_without_prototype_map(*map);
733 map =
735 native_context()->set_sloppy_function_with_readonly_prototype_map(*map);
740 map = factory->CreateSloppyFunctionMap(FUNCTION_WITH_WRITEABLE_PROTOTYPE,
742 native_context()->set_sloppy_function_map(*map);
744 map = factory->CreateSloppyFunctionMap(
746 native_context()->set_sloppy_function_with_name_map(*map);
786 Handle<Map> map;
791 map = factory->CreateStrictFunctionMap(FUNCTION_WITHOUT_PROTOTYPE, empty);
792 native_context()->set_strict_function_without_prototype_map(*map);
794 map = factory->CreateStrictFunctionMap(METHOD_WITH_NAME, empty);
795 native_context()->set_method_with_name_map(*map);
800 map = factory->CreateStrictFunctionMap(FUNCTION_WITH_WRITEABLE_PROTOTYPE,
802 native_context()->set_strict_function_map(*map);
804 map = factory->CreateStrictFunctionMap(
806 native_context()->set_strict_function_with_name_map(*map);
811 map =
813 native_context()->set_strict_function_with_readonly_prototype_map(*map);
816 // Allocate map for class functions.
818 map = factory->CreateClassFunctionMap(empty);
819 native_context()->set_class_function_map(*map);
821 // Now that the strict mode function map is available, set up the
841 // Finish setting up Object function's initial map.
851 Handle<Map> map = Map::Copy(
852 isolate(), handle(object_function_prototype->map(), isolate()),
854 map->set_is_prototype_map(true);
856 map->set_is_immutable_proto(true);
857 object_function_prototype->set_map(*map);
862 Handle<Map> empty_function_map(empty_function->map(), isolate_);
868 object_function_prototype->map().set_instance_type(JS_OBJECT_PROTOTYPE_TYPE);
870 // Set up slow map for Object.create(null) instances without in-object
872 Handle<Map> map(object_fun->initial_map(), isolate_);
873 map = Map::CopyInitialMapNormalized(isolate(), map);
874 Map::SetPrototype(isolate(), map, factory->null_value());
875 native_context()->set_slow_object_with_null_prototype_map(*map);
877 // Set up slow map for literals with too many properties.
878 map = Map::Copy(isolate(), map, "slow_object_with_object_prototype_map");
879 Map::SetPrototype(isolate(), map, object_function_prototype);
880 native_context()->set_slow_object_with_object_prototype_map(*map);
889 Handle<Map> map = Map::Copy(isolate, source_map, reason);
890 // Ensure the resulting map has prototype slot (it is necessary for storing
891 // inital map even when the prototype property is not required).
892 if (!map->has_prototype_slot()) {
894 int unused_property_fields = map->UnusedPropertyFields();
895 map->set_instance_size(map->instance_size() + kTaggedSize);
897 map->SetInObjectPropertiesStartInWords(
898 map->GetInObjectPropertiesStartInWords() + 1);
899 map->set_has_prototype_slot(true);
900 map->SetInObjectUnusedPropertyFields(unused_property_fields);
902 map->set_is_constructor(false);
903 Map::SetPrototype(isolate, map, prototype);
904 return map;
918 CHECK_NE(iterator_prototype->map().ptr(),
919 isolate_->initial_object_prototype()->map().ptr());
920 iterator_prototype->map().set_instance_type(JS_ITERATOR_PROTOTYPE_TYPE);
989 Handle<Map> map;
990 map = CreateNonConstructorMap(isolate(), isolate()->strict_function_map(),
993 native_context()->set_generator_function_map(*map);
995 map = CreateNonConstructorMap(
998 native_context()->set_generator_function_with_name_map(*map);
1092 Handle<Map> map;
1093 map = CreateNonConstructorMap(isolate(), isolate()->strict_function_map(),
1096 native_context()->set_async_generator_function_map(*map);
1098 map = CreateNonConstructorMap(
1101 native_context()->set_async_generator_function_with_name_map(*map);
1120 Handle<Map> map =
1123 Map::SetPrototype(isolate(), map, async_function_prototype);
1124 native_context()->set_async_function_map(*map);
1126 map = Map::Copy(isolate(), isolate()->method_with_name_map(),
1128 Map::SetPrototype(isolate(), map, async_function_prototype);
1129 native_context()->set_async_function_with_name_map(*map);
1154 Handle<Map> map =
1157 Map::EnsureDescriptorSlack(isolate_, map, 2);
1163 map->AppendDescriptor(isolate(), &d);
1169 map->AppendDescriptor(isolate(), &d);
1172 Map::SetPrototype(isolate(), map, isolate()->initial_object_prototype());
1173 map->SetConstructor(native_context()->object_function());
1175 native_context()->set_proxy_revocable_result_map(*map);
1180 void ReplaceAccessors(Isolate* isolate, Handle<Map> map, Handle<String> name,
1183 DescriptorArray descriptors = map->instance_descriptors(isolate);
1184 InternalIndex entry = descriptors.SearchWithCache(isolate, *name, *map);
1228 Handle<Map> map(empty->map(), isolate());
1229 ReplaceAccessors(isolate(), map, factory()->arguments_string(), rw_attribs,
1231 ReplaceAccessors(isolate(), map, factory()->caller_string(), rw_attribs,
1516 Handle<Map> map =
1518 map->set_native_context(*native_context());
1519 native_context()->set_function_context_map(*map);
1521 map = factory->NewMap(CATCH_CONTEXT_TYPE, kVariableSizeSentinel);
1522 map->set_native_context(*native_context());
1523 native_context()->set_catch_context_map(*map);
1525 map = factory->NewMap(WITH_CONTEXT_TYPE, kVariableSizeSentinel);
1526 map->set_native_context(*native_context());
1527 native_context()->set_with_context_map(*map);
1529 map = factory->NewMap(DEBUG_EVALUATE_CONTEXT_TYPE, kVariableSizeSentinel);
1530 map->set_native_context(*native_context());
1531 native_context()->set_debug_evaluate_context_map(*map);
1533 map = factory->NewMap(BLOCK_CONTEXT_TYPE, kVariableSizeSentinel);
1534 map->set_native_context(*native_context());
1535 native_context()->set_block_context_map(*map);
1537 map = factory->NewMap(MODULE_CONTEXT_TYPE, kVariableSizeSentinel);
1538 map->set_native_context(*native_context());
1539 native_context()->set_module_context_map(*map);
1541 map = factory->NewMap(AWAIT_CONTEXT_TYPE, kVariableSizeSentinel);
1542 map->set_native_context(*native_context());
1543 native_context()->set_await_context_map(*map);
1545 map = factory->NewMap(SCRIPT_CONTEXT_TYPE, kVariableSizeSentinel);
1546 map->set_native_context(*native_context());
1547 native_context()->set_script_context_map(*map);
1549 map = factory->NewMap(EVAL_CONTEXT_TYPE, kVariableSizeSentinel);
1550 map->set_native_context(*native_context());
1551 native_context()->set_eval_context_map(*map);
1744 // Create the initial array map for Array.prototype which is required by
1834 SimpleInstallFunction(isolate_, proto, "map", Builtin::kArrayMap, 1, false);
1865 Handle<Map> map(proto->map(), isolate_);
1866 Map::SetShouldBeFastPrototypeMap(map, true, isolate_);
1877 CHECK_NE(array_iterator_prototype->map().ptr(),
1878 isolate_->initial_object_prototype()->map().ptr());
1879 array_iterator_prototype->map().set_instance_type(
2192 CHECK_NE(string_iterator_prototype->map().ptr(),
2193 isolate_->initial_object_prototype()->map().ptr());
2194 string_iterator_prototype->map().set_instance_type(
2467 Handle<Map> prototype_map(prototype->map(), isolate());
2469 CHECK_NE(prototype->map().ptr(),
2470 isolate_->initial_object_prototype()->map().ptr());
2471 prototype->map().set_instance_type(JS_PROMISE_PROTOTYPE_TYPE);
2501 prototype->map().LastAdded().as_int());
2536 prototype->map().LastAdded().as_int());
2545 prototype->map().LastAdded().as_int());
2554 prototype->map().LastAdded().as_int());
2563 prototype->map().LastAdded().as_int());
2572 prototype->map().LastAdded().as_int());
2575 Handle<Map> prototype_map(prototype->map(), isolate());
2578 isolate_->initial_object_prototype()->map().ptr());
2581 // Store the initial RegExp.prototype map. This is used in fast-path
3384 SimpleInstallFunction(isolate_, prototype, "map",
3514 prototype->map().LastAdded().as_int());
3541 native_context()->set_initial_map_prototype_map(prototype->map());
3613 prototype->map().LastAdded().as_int());
3636 native_context()->set_initial_set_prototype_map(prototype->map());
3644 CHECK_NE(prototype->map().ptr(),
3645 isolate_->initial_object_prototype()->map().ptr());
3646 prototype->map().set_instance_type(JS_SET_PROTOTYPE_TYPE);
3650 Handle<Map> map = factory->NewMap(
3653 map->SetConstructor(native_context()->object_function());
3654 Map::SetPrototype(isolate(), map, isolate_->factory()->null_value());
3655 Map::EnsureDescriptorSlack(isolate_, map, 1);
3656 native_context()->set_js_module_namespace_map(*map);
3665 map->AppendDescriptor(isolate(), &d);
3670 // Setup the map for IterResultObjects created from builtins in such a
3671 // way that it's exactly the same map as the one produced by object
3676 Handle<Map> map = factory->ObjectLiteralMapFromCache(native_context(), 2);
3679 map = Map::CopyWithField(isolate(), map, factory->value_string(),
3686 map = Map::CopyWithField(isolate(), map, factory->done_string(),
3692 native_context()->set_iterator_result_map(*map);
3723 prototype->map().LastAdded().as_int());
3731 native_context()->set_initial_weakmap_prototype_map(prototype->map());
3758 prototype->map().LastAdded().as_int());
3765 native_context()->set_initial_weakset_prototype_map(prototype->map());
3770 // Proxy function map has prototype slot for storing initial map but does
3837 Handle<Map> map =
3840 map->SetConstructor(native_context()->object_function());
3841 map->set_is_callable(true);
3842 Map::SetPrototype(isolate(), map, empty_function);
3846 Map::EnsureDescriptorSlack(isolate_, map, 2);
3855 map->AppendDescriptor(isolate(), &d);
3865 map->AppendDescriptor(isolate(), &d);
3867 native_context()->set_bound_function_without_constructor_map(*map);
3869 map = Map::Copy(isolate_, map, "IsConstructor");
3870 map->set_is_constructor(true);
3871 native_context()->set_bound_function_with_constructor_map(*map);
3929 { // --- sloppy arguments map
3935 Handle<Map> map(function->initial_map(), isolate());
3938 Map::EnsureDescriptorSlack(isolate_, map, 2);
3945 map->AppendDescriptor(isolate(), &d);
3952 map->AppendDescriptor(isolate(), &d);
3956 native_context()->set_sloppy_arguments_map(*map);
3958 DCHECK(!map->is_dictionary_map());
3959 DCHECK(IsObjectElementsKind(map->elements_kind()));
3962 { // --- fast and slow aliased arguments map
3963 Handle<Map> map = isolate_->sloppy_arguments_map();
3964 map = Map::Copy(isolate_, map, "FastAliasedArguments");
3965 map->set_elements_kind(FAST_SLOPPY_ARGUMENTS_ELEMENTS);
3966 DCHECK_EQ(2, map->GetInObjectProperties());
3967 native_context()->set_fast_aliased_arguments_map(*map);
3969 map = Map::Copy(isolate_, map, "SlowAliasedArguments");
3970 map->set_elements_kind(SLOW_SLOPPY_ARGUMENTS_ELEMENTS);
3971 DCHECK_EQ(2, map->GetInObjectProperties());
3972 native_context()->set_slow_aliased_arguments_map(*map);
3975 { // --- strict mode arguments map
3988 // Create the map. Allocate one in-object field for length.
3989 Handle<Map> map =
3993 Map::EnsureDescriptorSlack(isolate_, map, 2);
4000 map->AppendDescriptor(isolate(), &d);
4005 map->AppendDescriptor(isolate(), &d);
4011 Map::SetPrototype(isolate(), map, isolate_->initial_object_prototype());
4014 map->SetConstructor(
4017 native_context()->set_strict_arguments_map(*map);
4019 DCHECK(!map->is_dictionary_map());
4020 DCHECK(IsObjectElementsKind(map->elements_kind()));
4089 CHECK_NE(prototype->map().ptr(),
4090 isolate_->initial_object_prototype()->map().ptr());
4091 prototype->map().set_instance_type(JS_TYPED_ARRAY_PROTOTYPE_TYPE);
4096 // have their own maps. Create the corresponding map here.
4245 CHECK_NE(prototype->map().ptr(),
4246 isolate_->initial_object_prototype()->map().ptr());
4247 prototype->map().set_instance_type(JS_SET_ITERATOR_PROTOTYPE_TYPE);
4278 CHECK_NE(prototype->map().ptr(),
4279 isolate_->initial_object_prototype()->map().ptr());
4280 prototype->map().set_instance_type(JS_MAP_ITERATOR_PROTOTYPE_TYPE);
4337 // there's one global (per native context) map here that is used for the
4521 Handle<Map> map = factory->NewMap(JS_WRAPPED_FUNCTION_TYPE,
4524 map->SetConstructor(native_context()->object_function());
4525 map->set_is_callable(true);
4528 Map::SetPrototype(isolate(), map, empty_function);
4532 Map::EnsureDescriptorSlack(isolate_, map, 2);
4540 map->AppendDescriptor(isolate(), &d);
4550 map->AppendDescriptor(isolate(), &d);
4553 native_context()->set_wrapped_function_map(*map);
4685 // Store regexp prototype map again after change.
4686 native_context()->set_regexp_prototype_map(regexp_prototype->map());
5519 // Store the map for the %ObjectPrototype% after the natives has been compiled
5529 HeapObject::cast(object_function->initial_map().prototype()).map());
5532 // Store the map for the %StringPrototype% after the natives has been compiled
5540 string_function_prototype.map());
5601 // Create a map for accessor property descriptors (a variant of JSObject
5604 // AccessorPropertyDescriptor initial map.
5605 Handle<Map> map =
5609 Map::EnsureDescriptorSlack(isolate(), map, 4);
5616 map->AppendDescriptor(isolate(), &d);
5623 map->AppendDescriptor(isolate(), &d);
5630 map->AppendDescriptor(isolate(), &d);
5637 map->AppendDescriptor(isolate(), &d);
5640 Map::SetPrototype(isolate(), map, isolate()->initial_object_prototype());
5641 map->SetConstructor(native_context()->object_function());
5643 native_context()->set_accessor_property_descriptor_map(*map);
5646 // Create a map for data property descriptors (a variant of JSObject
5650 // DataPropertyDescriptor initial map.
5651 Handle<Map> map =
5655 Map::EnsureDescriptorSlack(isolate(), map, 4);
5662 map->AppendDescriptor(isolate(), &d);
5669 map->AppendDescriptor(isolate(), &d);
5676 map->AppendDescriptor(isolate(), &d);
5683 map->AppendDescriptor(isolate(), &d);
5686 Map::SetPrototype(isolate(), map, isolate()->initial_object_prototype());
5687 map->SetConstructor(native_context()->object_function());
5689 native_context()->set_data_property_descriptor_map(*map);
5695 // JSRegExpResult initial map.
5696 // Add additional slack to the initial map in case regexp_match_indices
5757 // Set up the map for RegExp results objects for regexps with the /d flag.
5783 // JSRegExpResultIndices initial map.
5809 Handle<Map> map(native_context()->sloppy_arguments_map(), isolate());
5810 Map::EnsureDescriptorSlack(isolate(), map, 1);
5811 map->AppendDescriptor(isolate(), &d);
5816 Handle<Map> map(native_context()->fast_aliased_arguments_map(),
5818 Map::EnsureDescriptorSlack(isolate(), map, 1);
5819 map->AppendDescriptor(isolate(), &d);
5824 Handle<Map> map(native_context()->slow_aliased_arguments_map(),
5826 Map::EnsureDescriptorSlack(isolate(), map, 1);
5827 map->AppendDescriptor(isolate(), &d);
5832 Handle<Map> map(native_context()->strict_arguments_map(), isolate());
5833 Map::EnsureDescriptorSlack(isolate(), map, 1);
5834 map->AppendDescriptor(isolate(), &d);
6083 .IsTemplateFor(object->map()));
6113 from->map().instance_descriptors(isolate()), isolate());
6114 for (InternalIndex i : from->map().IterateOwnDescriptors()) {
6122 FieldIndex index = FieldIndex::ForDescriptor(from->map(), i);
6241 // Transfer the prototype (new map is needed).
6242 Handle<HeapObject> proto(from->map().prototype(), isolate());
6254 // Add initial map.
6259 // Set prototype on map.
6263 // Update map with length accessor from Array.
6403 // Store String.prototype's map again in case it has been changed by
6411 string_function_prototype.map());
6473 global_proxy->map().SetConstructor(*global_constructor);