• Home
  • Raw
  • Download

Lines Matching refs:isolate

31   HandleScope scope(isolate);  in RUNTIME_FUNCTION()
34 isolate, NewReferenceError(MessageTemplate::kUnsupportedSuper)); in RUNTIME_FUNCTION()
39 HandleScope scope(isolate); in RUNTIME_FUNCTION()
42 Handle<String> name(constructor->shared().Name(), isolate); in RUNTIME_FUNCTION()
45 isolate, in RUNTIME_FUNCTION()
49 isolate, NewTypeError(MessageTemplate::kConstructorNonCallable, name)); in RUNTIME_FUNCTION()
54 HandleScope scope(isolate); in RUNTIME_FUNCTION()
57 isolate, NewTypeError(MessageTemplate::kStaticPrototype)); in RUNTIME_FUNCTION()
61 HandleScope scope(isolate); in RUNTIME_FUNCTION()
64 isolate, NewReferenceError(MessageTemplate::kSuperAlreadyCalled)); in RUNTIME_FUNCTION()
68 HandleScope scope(isolate); in RUNTIME_FUNCTION()
71 isolate, NewReferenceError(MessageTemplate::kSuperNotCalled)); in RUNTIME_FUNCTION()
76 Object ThrowNotSuperConstructor(Isolate* isolate, Handle<Object> constructor, in ThrowNotSuperConstructor() argument
81 handle(Handle<JSFunction>::cast(constructor)->shared().Name(), isolate); in ThrowNotSuperConstructor()
83 DCHECK(constructor->IsNull(isolate)); in ThrowNotSuperConstructor()
84 super_name = isolate->factory()->null_string(); in ThrowNotSuperConstructor()
86 super_name = Object::NoSideEffectsToString(isolate, constructor); in ThrowNotSuperConstructor()
90 super_name = isolate->factory()->null_string(); in ThrowNotSuperConstructor()
92 Handle<String> function_name(function->shared().Name(), isolate); in ThrowNotSuperConstructor()
96 isolate, in ThrowNotSuperConstructor()
101 isolate, NewTypeError(MessageTemplate::kNotSuperConstructor, super_name, in ThrowNotSuperConstructor()
108 HandleScope scope(isolate); in RUNTIME_FUNCTION()
112 return ThrowNotSuperConstructor(isolate, constructor, function); in RUNTIME_FUNCTION()
117 return ReadOnlyRoots(isolate).home_object_symbol(); in RUNTIME_FUNCTION()
123 Handle<Name> KeyToName(Isolate* isolate, Handle<Object> key);
126 Handle<Name> KeyToName<NameDictionary>(Isolate* isolate, Handle<Object> key) { in KeyToName() argument
132 Handle<Name> KeyToName<NumberDictionary>(Isolate* isolate, Handle<Object> key) { in KeyToName() argument
134 return isolate->factory()->NumberToString(key); in KeyToName()
137 inline void SetHomeObject(Isolate* isolate, JSFunction method, in SetHomeObject() argument
144 ReadOnlyRoots(isolate).home_object_symbol()); in SetHomeObject()
162 Isolate* isolate, in GetMethodAndSetHomeObjectAndName() argument
175 SetHomeObject(isolate, *method, *home_object); in GetMethodAndSetHomeObjectAndName()
183 Handle<Name> name = KeyToName<Dictionary>(isolate, key); in GetMethodAndSetHomeObjectAndName()
200 Isolate* isolate, in GetMethodWithSharedNameAndSetHomeObject() argument
213 SetHomeObject(isolate, *method, home_object); in GetMethodWithSharedNameAndSetHomeObject()
221 Isolate* isolate, Handle<Dictionary> dictionary_template) { in ShallowCopyDictionaryTemplate() argument
222 Handle<Map> dictionary_map(dictionary_template->map(), isolate); in ShallowCopyDictionaryTemplate()
224 Handle<Dictionary>::cast(isolate->factory()->CopyFixedArrayWithMap( in ShallowCopyDictionaryTemplate()
230 Handle<AccessorPair> pair(AccessorPair::cast(value), isolate); in ShallowCopyDictionaryTemplate()
231 pair = AccessorPair::Copy(isolate, pair); in ShallowCopyDictionaryTemplate()
239 bool SubstituteValues(Isolate* isolate, Handle<Dictionary> dictionary, in SubstituteValues() argument
243 Handle<Name> name_string = isolate->factory()->name_string(); in SubstituteValues()
246 ReadOnlyRoots roots(isolate); in SubstituteValues()
254 Handle<Object> key(maybe_key, isolate); in SubstituteValues()
255 Handle<Object> value(dictionary->ValueAt(i), isolate); in SubstituteValues()
262 isolate, result, in SubstituteValues()
264 isolate, args, Smi::cast(tmp), receiver, in SubstituteValues()
265 isolate->factory()->get_string(), key), in SubstituteValues()
273 isolate, result, in SubstituteValues()
275 isolate, args, Smi::cast(tmp), receiver, in SubstituteValues()
276 isolate->factory()->set_string(), key), in SubstituteValues()
283 isolate, result, in SubstituteValues()
285 isolate, args, Smi::cast(*value), receiver, in SubstituteValues()
286 isolate->factory()->empty_string(), key), in SubstituteValues()
294 void UpdateProtectors(Isolate* isolate, Handle<JSObject> receiver, in UpdateProtectors() argument
296 ReadOnlyRoots roots(isolate); in UpdateProtectors()
300 Handle<Name> name(Name::cast(maybe_key), isolate); in UpdateProtectors()
301 LookupIterator::UpdateProtector(isolate, receiver, name); in UpdateProtectors()
305 void UpdateProtectors(Isolate* isolate, Handle<JSObject> receiver, in UpdateProtectors() argument
309 Handle<Name> name(properties_template->GetKey(i), isolate); in UpdateProtectors()
310 LookupIterator::UpdateProtector(isolate, receiver, name); in UpdateProtectors()
315 Isolate* isolate, Handle<Map> map, in AddDescriptorsByTemplate() argument
323 DescriptorArray::Allocate(isolate, nof_descriptors, 0); in AddDescriptorsByTemplate()
327 ReadOnlyRoots(isolate).empty_slow_element_dictionary() in AddDescriptorsByTemplate()
329 : ShallowCopyDictionaryTemplate(isolate, in AddDescriptorsByTemplate()
342 isolate->factory()->NewPropertyArray(count); in AddDescriptorsByTemplate()
351 isolate, handle(AccessorPair::cast(value), isolate)); in AddDescriptorsByTemplate()
361 value = GetMethodWithSharedNameAndSetHomeObject(isolate, args, value, in AddDescriptorsByTemplate()
365 value.OptimalRepresentation(isolate)); in AddDescriptorsByTemplate()
373 isolate, args, tmp, *receiver)); in AddDescriptorsByTemplate()
378 isolate, args, tmp, *receiver)); in AddDescriptorsByTemplate()
401 UpdateProtectors(isolate, receiver, descriptors_template); in AddDescriptorsByTemplate()
403 map->InitializeDescriptors(isolate, *descriptors, in AddDescriptorsByTemplate()
406 if (!SubstituteValues<NumberDictionary>(isolate, elements_dictionary, in AddDescriptorsByTemplate()
425 Isolate* isolate, Handle<Map> map, in AddDescriptorsByTemplate() argument
435 ShallowCopyDictionaryTemplate(isolate, properties_dictionary_template); in AddDescriptorsByTemplate()
437 ShallowCopyDictionaryTemplate(isolate, elements_dictionary_template); in AddDescriptorsByTemplate()
458 isolate, elements_dictionary, element, key_index, value_kind, value); in AddDescriptorsByTemplate()
461 name = isolate->factory()->InternalizeName(name); in AddDescriptorsByTemplate()
463 isolate, properties_dictionary, name, key_index, value_kind, value); in AddDescriptorsByTemplate()
468 if (!SubstituteValues<NameDictionary>(isolate, properties_dictionary, in AddDescriptorsByTemplate()
478 isolate, properties_dictionary, isolate->factory()->name_string(), in AddDescriptorsByTemplate()
479 isolate->factory()->function_name_accessor(), details); in AddDescriptorsByTemplate()
483 UpdateProtectors(isolate, receiver, properties_dictionary); in AddDescriptorsByTemplate()
486 if (!SubstituteValues<NumberDictionary>(isolate, elements_dictionary, in AddDescriptorsByTemplate()
502 Handle<JSObject> CreateClassPrototype(Isolate* isolate) { in CreateClassPrototype() argument
509 Handle<Map> map = Map::Create(isolate, 0); in CreateClassPrototype()
510 return isolate->factory()->NewJSObjectFromMap(map); in CreateClassPrototype()
513 bool InitClassPrototype(Isolate* isolate, in InitClassPrototype() argument
519 Handle<Map> map(prototype->map(), isolate); in InitClassPrototype()
520 map = Map::CopyDropDescriptors(isolate, map); in InitClassPrototype()
522 Map::SetPrototype(isolate, map, prototype_parent); in InitClassPrototype()
526 class_boilerplate->instance_computed_properties(), isolate); in InitClassPrototype()
529 isolate); in InitClassPrototype()
532 class_boilerplate->instance_properties_template(), isolate); in InitClassPrototype()
546 isolate, map, properties_dictionary_template, in InitClassPrototype()
556 return AddDescriptorsByTemplate(isolate, map, descriptors_template, in InitClassPrototype()
563 Isolate* isolate, Handle<ClassBoilerplate> class_boilerplate, in InitClassConstructor() argument
566 Handle<Map> map(constructor->map(), isolate); in InitClassConstructor()
567 map = Map::CopyDropDescriptors(isolate, map); in InitClassConstructor()
573 Map::SetPrototype(isolate, map, constructor_parent, false); in InitClassConstructor()
578 isolate); in InitClassConstructor()
580 class_boilerplate->static_computed_properties(), isolate); in InitClassConstructor()
583 class_boilerplate->static_properties_template(), isolate); in InitClassConstructor()
590 map->InitializeDescriptors(isolate, in InitClassConstructor()
591 ReadOnlyRoots(isolate).empty_descriptor_array(), in InitClassConstructor()
601 isolate, map, properties_dictionary_template, in InitClassConstructor()
608 return AddDescriptorsByTemplate(isolate, map, descriptors_template, in InitClassConstructor()
615 Isolate* isolate, Handle<ClassBoilerplate> class_boilerplate, in DefineClass() argument
621 if (super_class->IsTheHole(isolate)) { in DefineClass()
622 prototype_parent = isolate->initial_object_prototype(); in DefineClass()
624 if (super_class->IsNull(isolate)) { in DefineClass()
625 prototype_parent = isolate->factory()->null_value(); in DefineClass()
631 isolate, prototype_parent, in DefineClass()
632 Runtime::GetObjectProperty(isolate, super_class, in DefineClass()
633 isolate->factory()->prototype_string()), in DefineClass()
635 if (!prototype_parent->IsNull(isolate) && in DefineClass()
638 isolate, NewTypeError(MessageTemplate::kPrototypeParentNotAnObject, in DefineClass()
645 constructor_parent = handle(HeapObject::cast(*super_class), isolate); in DefineClass()
647 THROW_NEW_ERROR(isolate, in DefineClass()
654 Handle<JSObject> prototype = CreateClassPrototype(isolate); in DefineClass()
658 if (!InitClassConstructor(isolate, class_boilerplate, constructor_parent, in DefineClass()
660 !InitClassPrototype(isolate, class_boilerplate, prototype, in DefineClass()
663 DCHECK(isolate->has_pending_exception()); in DefineClass()
668 LOG(isolate, in DefineClass()
669 MapEvent("InitialMap", empty_map, handle(constructor->map(), isolate), in DefineClass()
671 handle(constructor->shared().DebugName(), isolate))); in DefineClass()
672 LOG(isolate, in DefineClass()
673 MapEvent("InitialMap", empty_map, handle(prototype->map(), isolate), in DefineClass()
683 HandleScope scope(isolate); in RUNTIME_FUNCTION()
691 isolate, in RUNTIME_FUNCTION()
692 DefineClass(isolate, class_boilerplate, super_class, constructor, args)); in RUNTIME_FUNCTION()
699 MaybeHandle<JSReceiver> GetSuperHolder(Isolate* isolate, in GetSuperHolder() argument
704 !isolate->MayAccess(handle(isolate->context(), isolate), home_object)) { in GetSuperHolder()
705 isolate->ReportFailedAccessCheck(home_object); in GetSuperHolder()
706 RETURN_EXCEPTION_IF_SCHEDULED_EXCEPTION(isolate, JSReceiver); in GetSuperHolder()
709 PrototypeIterator iter(isolate, home_object); in GetSuperHolder()
715 Handle<Name> name = key->GetName(isolate); in GetSuperHolder()
716 THROW_NEW_ERROR(isolate, NewTypeError(message, name, proto), JSReceiver); in GetSuperHolder()
721 MaybeHandle<Object> LoadFromSuper(Isolate* isolate, Handle<Object> receiver, in LoadFromSuper() argument
726 isolate, holder, in LoadFromSuper()
727 GetSuperHolder(isolate, home_object, SuperMode::kLoad, key), Object); in LoadFromSuper()
728 LookupIterator it(isolate, receiver, *key, holder); in LoadFromSuper()
730 ASSIGN_RETURN_ON_EXCEPTION(isolate, result, Object::GetProperty(&it), Object); in LoadFromSuper()
737 HandleScope scope(isolate); in RUNTIME_FUNCTION()
743 LookupIterator::Key key(isolate, name); in RUNTIME_FUNCTION()
745 RETURN_RESULT_OR_FAILURE(isolate, in RUNTIME_FUNCTION()
746 LoadFromSuper(isolate, receiver, home_object, &key)); in RUNTIME_FUNCTION()
751 HandleScope scope(isolate); in RUNTIME_FUNCTION()
760 LookupIterator::Key lookup_key(isolate, key, &success); in RUNTIME_FUNCTION()
761 if (!success) return ReadOnlyRoots(isolate).exception(); in RUNTIME_FUNCTION()
764 isolate, LoadFromSuper(isolate, receiver, home_object, &lookup_key)); in RUNTIME_FUNCTION()
769 MaybeHandle<Object> StoreToSuper(Isolate* isolate, Handle<JSObject> home_object, in StoreToSuper() argument
775 isolate, holder, in StoreToSuper()
776 GetSuperHolder(isolate, home_object, SuperMode::kStore, key), Object); in StoreToSuper()
777 LookupIterator it(isolate, receiver, *key, holder); in StoreToSuper()
786 HandleScope scope(isolate); in RUNTIME_FUNCTION()
793 LookupIterator::Key key(isolate, name); in RUNTIME_FUNCTION()
796 isolate, StoreToSuper(isolate, home_object, receiver, &key, value, in RUNTIME_FUNCTION()
801 HandleScope scope(isolate); in RUNTIME_FUNCTION()
811 LookupIterator::Key lookup_key(isolate, key, &success); in RUNTIME_FUNCTION()
812 if (!success) return ReadOnlyRoots(isolate).exception(); in RUNTIME_FUNCTION()
815 isolate, StoreToSuper(isolate, home_object, receiver, &lookup_key, value, in RUNTIME_FUNCTION()