Home | History | Annotate | Download | only in src

Lines Matching defs:constructor

112   Handle<JSFunction> constructor;
114 constructor = handle(native_context->number_function(), isolate);
123 constructor = handle(
127 Handle<JSObject> result = isolate->factory()->NewJSObject(constructor);
1220 // Fetch the constructor function of the object.
1257 MaybeHandle<JSObject> JSObject::New(Handle<JSFunction> constructor,
1261 // - a subclass of constructor,
1262 // - a proxy wrapper around constructor, or
1263 // - the constructor itself.
1264 // If called through Reflect.construct, it's guaranteed to be a constructor.
1265 Isolate* const isolate = constructor->GetIsolate();
1266 DCHECK(constructor->IsConstructor());
1268 DCHECK(!constructor->has_initial_map() ||
1269 constructor->initial_map()->instance_type() != JS_FUNCTION_TYPE);
1274 JSFunction::GetDerivedMap(isolate, constructor, new_target), JSObject);
2286 Handle<Object> constructor = isolate->factory()->undefined_value();
2291 isolate, constructor,
2295 if (constructor->IsConstructor()) {
2299 JSReceiver::GetFunctionRealm(Handle<JSReceiver>::cast(constructor)),
2302 *constructor == constructor_context->array_function()) {
2303 constructor = isolate->factory()->undefined_value();
2306 if (constructor->IsJSReceiver()) {
2308 isolate, constructor,
2309 JSReceiver::GetProperty(Handle<JSReceiver>::cast(constructor),
2312 if (constructor->IsNull(isolate)) {
2313 constructor = isolate->factory()->undefined_value();
2317 if (constructor->IsUndefined(isolate)) {
2320 if (!constructor->IsConstructor()) {
2325 return constructor;
2738 Object* constructor = map_of_this->GetConstructor();
2740 if (constructor->IsHeapObject() &&
2741 !heap->Contains(HeapObject::cast(constructor))) {
2742 accumulator->Add("!!!INVALID CONSTRUCTOR!!!");
2745 if (constructor->IsJSFunction()) {
2746 if (!heap->Contains(JSFunction::cast(constructor)->shared())) {
2747 accumulator->Add("!!!INVALID SHARED ON CONSTRUCTOR!!!");
2750 JSFunction::cast(constructor)->shared()->name();
3120 JSFunction* constructor = JSFunction::cast(maybe_constructor);
3121 return String::cast(constructor->shared()->instance_class_name());
3123 // If the constructor is not present, return "Object".
3133 // constructor on the map provides the most accurate name.
3140 JSFunction* constructor = JSFunction::cast(maybe_constructor);
3141 String* name = String::cast(constructor->shared()->name());
3142 if (name->length() == 0) name = constructor->shared()->inferred_name();
3162 JSFunction* constructor = JSFunction::cast(*maybe_constructor);
3163 String* name = String::cast(constructor->shared()->name());
3164 if (name->length() == 0) name = constructor->shared()->inferred_name();
3178 Object* constructor = receiver->map()->GetConstructor();
3180 if (constructor->IsJSFunction()) {
3181 function = JSFunction::cast(constructor);
3183 // Functions have null as a constructor,
7202 // Is the object the constructor for this object?
7267 // Get the constructor function for arguments array.
8619 // Strict function maps have Function as a constructor but the
8622 Object* constructor = map->GetConstructor();
8623 DCHECK(constructor->IsJSFunction());
8624 DCHECK(*map == JSFunction::cast(constructor)->initial_map() ||
8931 // constructor. Initial maps for strict mode are cached as special transitions
11781 // constructor, prototype and bit_field2. For predictability reasons we
11788 // XOR-ing the prototype and constructor directly yields too many zero bits
11790 // To avoid this we shift the prototype bits relatively to the constructor.
12144 // Replace the pointer to the exact constructor with the Object function
12149 JSFunction* constructor = JSFunction::cast(maybe_constructor);
12151 if (!constructor->shared()->IsApiFunction() &&
12153 Context* context = constructor->context()->native_context();
12384 JSFunction* constructor = JSFunction::cast(maybe_constructor);
12385 Object* data = constructor->shared()->function_data();
12433 // function as a constructor.
12490 // constructor field so it can be accessed. Also, set the prototype
12637 // The constructor should be compiled for the optimization hints to be
12667 // Finally link initial map and constructor function.
12676 Handle<JSFunction> constructor,
12678 EnsureHasInitialMap(constructor);
12680 Handle<Map> constructor_initial_map(constructor->initial_map(), isolate);
12681 if (*new_target == *constructor) return constructor_initial_map;
12683 // Fast case, new.target is a subclass of constructor. The map is cacheable
12689 // Check that |function|'s initial map still in sync with the |constructor|,
12692 function->initial_map()->GetConstructor() == *constructor) {
12699 // Link initial map and constructor function if the new.target is actually a
12700 // subclass constructor.
12722 map->SetConstructor(*constructor);
12743 // The above prototype lookup might change the constructor and its
12745 EnsureHasInitialMap(constructor);
12746 constructor_initial_map = handle(constructor->initial_map(), isolate);
12751 // constructor that points to the .prototype. This relies on
12752 // constructor.prototype being FROZEN for those constructors.
12759 constructor, isolate->factory()->native_context_index_symbol());
12772 map->SetConstructor(*constructor);
13145 Handle<JSFunction> constructor = isolate->script_function();
13147 Handle<JSValue>::cast(isolate->factory()->NewJSObject(constructor));
13514 // If no properties are added in the constructor, they are more likely
15794 JSFunction* constructor = JSFunction::cast(maybe_constructor);
15795 if (constructor->shared()->IsApiFunction()) {
15834 // CreateDynamicFunction() (such as through the Function() constructor).
15983 Handle<JSFunction> constructor = isolate->regexp_function();
15985 Handle<JSRegExp>::cast(isolate->factory()->NewJSObject(constructor));
16102 Object* constructor = map->GetConstructor();
16103 if (constructor->IsJSFunction() &&
16104 JSFunction::cast(constructor)->initial_map() == map) {
19000 MaybeHandle<JSDate> JSDate::New(Handle<JSFunction> constructor,
19002 Isolate* const isolate = constructor->GetIsolate();
19005 JSObject::New(constructor, new_target), JSDate);
19508 JSFunction* constructor = JSFunction::cast(maybe_constructor);
19510 if (!constructor->shared()->IsApiFunction()) return nullptr;
19513 constructor->shared()->get_api_func_data()->access_check_info();