Home | History | Annotate | Download | only in src

Lines Matching refs:constructor

109   Handle<JSFunction> constructor;
111 constructor = handle(native_context->number_function(), isolate);
120 constructor = handle(
124 Handle<JSObject> result = isolate->factory()->NewJSObject(constructor);
1183 // Fetch the constructor function of the object.
1220 MaybeHandle<JSObject> JSObject::New(Handle<JSFunction> constructor,
1224 // - a subclass of constructor,
1225 // - a proxy wrapper around constructor, or
1226 // - the constructor itself.
1227 // If called through Reflect.construct, it's guaranteed to be a constructor.
1228 Isolate* const isolate = constructor->GetIsolate();
1229 DCHECK(constructor->IsConstructor());
1231 DCHECK(!constructor->has_initial_map() ||
1232 constructor->initial_map()->instance_type() != JS_FUNCTION_TYPE);
1237 JSFunction::GetDerivedMap(isolate, constructor, new_target), JSObject);
2114 Handle<Object> constructor = isolate->factory()->undefined_value();
2119 isolate, constructor,
2123 if (constructor->IsConstructor()) {
2127 JSReceiver::GetFunctionRealm(Handle<JSReceiver>::cast(constructor)),
2130 *constructor == constructor_context->array_function()) {
2131 constructor = isolate->factory()->undefined_value();
2134 if (constructor->IsJSReceiver()) {
2136 isolate, constructor,
2137 JSReceiver::GetProperty(Handle<JSReceiver>::cast(constructor),
2140 if (constructor->IsNull(isolate)) {
2141 constructor = isolate->factory()->undefined_value();
2145 if (constructor->IsUndefined(isolate)) {
2148 if (!constructor->IsConstructor()) {
2153 return constructor;
2526 Object* constructor = map_of_this->GetConstructor();
2528 if (constructor->IsHeapObject() &&
2529 !heap->Contains(HeapObject::cast(constructor))) {
2530 accumulator->Add("!!!INVALID CONSTRUCTOR!!!");
2533 if (constructor->IsJSFunction()) {
2534 if (!heap->Contains(JSFunction::cast(constructor)->shared())) {
2535 accumulator->Add("!!!INVALID SHARED ON CONSTRUCTOR!!!");
2538 JSFunction::cast(constructor)->shared()->name();
3014 JSFunction* constructor = JSFunction::cast(maybe_constructor);
3015 return String::cast(constructor->shared()->instance_class_name());
3017 // If the constructor is not present, return "Object".
3027 // constructor on the map provides the most accurate name.
3034 JSFunction* constructor = JSFunction::cast(maybe_constructor);
3035 String* name = String::cast(constructor->shared()->name());
3036 if (name->length() == 0) name = constructor->shared()->inferred_name();
3056 JSFunction* constructor = JSFunction::cast(*maybe_constructor);
3057 String* name = String::cast(constructor->shared()->name());
3058 if (name->length() == 0) name = constructor->shared()->inferred_name();
3073 Object* constructor = receiver->map()->GetConstructor();
3075 if (constructor->IsJSFunction()) {
3076 function = JSFunction::cast(constructor);
3078 // Functions have null as a constructor,
7591 // Is the object the constructor for this object?
7656 // Get the constructor function for arguments array.
9001 // Strict function maps have Function as a constructor but the
9004 Object* constructor = map->GetConstructor();
9005 DCHECK(constructor->IsJSFunction());
9006 DCHECK(*map == JSFunction::cast(constructor)->initial_map() ||
9318 // constructor. Initial maps for strict mode are cached as special transitions
12163 // constructor, prototype and bit_field2. For predictability reasons we
12170 // XOR-ing the prototype and constructor directly yields too many zero bits
12172 // To avoid this we shift the prototype bits relatively to the constructor.
12585 // Replace the pointer to the exact constructor with the Object function
12590 JSFunction* constructor = JSFunction::cast(maybe_constructor);
12592 if (!constructor->shared()->IsApiFunction() &&
12594 Context* context = constructor->context()->native_context();
12817 JSFunction* constructor = JSFunction::cast(maybe_constructor);
12818 Object* data = constructor->shared()->function_data();
12866 // function as a constructor.
12923 // constructor field so it can be accessed. Also, set the prototype
13070 // The constructor should be compiled for the optimization hints to be
13100 // Finally link initial map and constructor function.
13109 Handle<JSFunction> constructor,
13111 EnsureHasInitialMap(constructor);
13113 Handle<Map> constructor_initial_map(constructor->initial_map(), isolate);
13114 if (*new_target == *constructor) return constructor_initial_map;
13116 // Fast case, new.target is a subclass of constructor. The map is cacheable
13122 // Check that |function|'s initial map still in sync with the |constructor|,
13125 function->initial_map()->GetConstructor() == *constructor) {
13132 // Link initial map and constructor function if the new.target is actually a
13133 // subclass constructor.
13155 map->SetConstructor(*constructor);
13176 // The above prototype lookup might change the constructor and its
13178 EnsureHasInitialMap(constructor);
13179 constructor_initial_map = handle(constructor->initial_map(), isolate);
13184 // constructor that points to the .prototype. This relies on
13185 // constructor.prototype being FROZEN for those constructors.
13192 constructor, isolate->factory()->native_context_index_symbol());
13205 map->SetConstructor(*constructor);
13577 Handle<JSFunction> constructor = isolate->script_function();
13579 Handle<JSValue>::cast(isolate->factory()->NewJSObject(constructor));
13899 // If no properties are added in the constructor, they are more likely
16336 JSFunction* constructor = JSFunction::cast(maybe_constructor);
16337 if (constructor->shared()->IsApiFunction()) {
16591 Handle<JSFunction> constructor = isolate->regexp_function();
16593 Handle<JSRegExp>::cast(isolate->factory()->NewJSObject(constructor));
16710 Object* constructor = map->GetConstructor();
16711 if (constructor->IsJSFunction() &&
16712 JSFunction::cast(constructor)->initial_map() == map) {
19217 MaybeHandle<JSDate> JSDate::New(Handle<JSFunction> constructor,
19219 Isolate* const isolate = constructor->GetIsolate();
19222 JSObject::New(constructor, new_target), JSDate);
19751 JSFunction* constructor = JSFunction::cast(maybe_constructor);
19753 if (!constructor->shared()->IsApiFunction()) return nullptr;
19756 constructor->shared()->get_api_func_data()->access_check_info();