Lines Matching defs:thread

29 JSHandle<TransitionsDictionary> TransitionsDictionary::PutIfAbsent(const JSThread *thread,
42 dictionary->SetValue(thread, entry, weakValue);
48 JSHandle<TransitionsDictionary> newDictionary(HashTableT::GrowHashTable(thread, dictionary));
52 newDictionary->SetEntry(thread, entry, key.GetTaggedValue(), val, metaData.GetTaggedValue());
54 newDictionary->IncreaseEntries(thread);
80 JSHandle<TransitionsDictionary> TransitionsDictionary::Remove(const JSThread *thread,
90 table->RemoveElement(thread, entry);
91 return TransitionsDictionary::Shrink(thread, table);
94 void TransitionsDictionary::Rehash(const JSThread *thread, TransitionsDictionary *newTable)
111 newTable->Set(thread, insertionIndex, tv);
114 newTable->Set(thread, insertionIndex + j, tv);
119 newTable->SetEntriesCount(thread, entryCount);
120 newTable->SetHoleEntriesCount(thread, 0);
123 void JSHClass::InitializeWithDefaultValue(const JSThread *thread, uint32_t size, JSType type, uint32_t inlinedProps)
133 SetLayout(thread, JSTaggedValue::Null());
137 SetPrototype(thread, JSTaggedValue::Null());
145 SetTransitions(thread, JSTaggedValue::Undefined());
146 SetParent(thread, JSTaggedValue::Undefined());
147 SetProtoChangeMarker(thread, JSTaggedValue::Null());
148 SetProtoChangeDetails(thread, JSTaggedValue::Null());
149 SetEnumCache(thread, JSTaggedValue::Null());
190 void JSHClass::Initialize(const JSThread *thread, uint32_t size, JSType type, uint32_t inlinedProps)
192 InitializeWithDefaultValue(thread, size, type, inlinedProps);
194 SetLayout(thread, thread->GlobalConstants()->GetEmptyLayoutInfo());
199 void JSHClass::Initialize(const JSThread *thread, uint32_t size, JSType type,
202 InitializeWithDefaultValue(thread, size, type, inlinedProps);
204 SetLayout(thread, layout);
211 JSHandle<JSHClass> JSHClass::Clone(const JSThread *thread, const JSHandle<JSHClass> &jshclass,
219 newJsHClass = thread->GetEcmaVM()->GetFactory()->NewSEcmaHClass(size, type, numInlinedProps);
221 newJsHClass = thread->GetEcmaVM()->GetFactory()->NewEcmaHClass(size, type, numInlinedProps);
224 newJsHClass->Copy(thread, *jshclass);
225 newJsHClass->SetTransitions(thread, JSTaggedValue::Undefined());
226 newJsHClass->SetParent(thread, JSTaggedValue::Undefined());
227 newJsHClass->SetProtoChangeDetails(thread, JSTaggedValue::Null());
228 newJsHClass->SetEnumCache(thread, JSTaggedValue::Null());
230 newJsHClass->SetLayout(thread, jshclass->GetLayout());
239 JSHandle<JSHClass> JSHClass::CloneWithElementsKind(const JSThread *thread, const JSHandle<JSHClass> &jshclass,
242 JSHandle<JSHClass> newHClass = Clone(thread, jshclass);
249 JSHandle<JSHClass> JSHClass::CloneWithoutInlinedProperties(const JSThread *thread, const JSHandle<JSHClass> &jshclass)
251 return Clone(thread, jshclass, true);
254 void JSHClass::TransitionElementsToDictionary(const JSThread *thread, const JSHandle<JSObject> &obj)
258 JSObject::TransitionToDictionary(thread, obj);
259 RETURN_IF_ABRUPT_COMPLETION(thread);
261 TransitionToDictionary(thread, obj);
268 void JSHClass::OptimizeAsFastElements(const JSThread *thread, JSHandle<JSObject> obj)
271 JSObject::OptimizeAsFastProperties(thread, obj);
273 OptimizeAsFastProperties(thread, obj);
280 void JSHClass::AddProperty(const JSThread *thread, const JSHandle<JSObject> &obj, const JSHandle<JSTaggedValue> &key,
283 JSHandle<JSHClass> jshclass(thread, obj->GetJSHClass());
289 newClass->SetPrototype(thread, jshclass->GetPrototype());
293 obj->SynchronizedSetClass(thread, newClass);
296 JSHandle<JSHClass> newHClass = JSHandle<JSHClass>(thread, newClass);
298 if (JSHClass::IsNeedNotifyHclassChangedForAotTransition(thread, jshclass, key.GetTaggedValue())) {
299 JSHClass::EnableProtoChangeMarker(thread, newHClass);
300 JSHClass::NotifyHclassChanged(thread, jshclass, newHClass, key.GetTaggedValue());
302 JSHClass::RefreshUsers(thread, jshclass, newHClass);
304 JSHClass::EnablePHCProtoChangeMarker(thread, newHClass);
306 JSHClass::NotifyHclassChanged(thread, jshclass, newHClass, key.GetTaggedValue());
311 JSHandle<JSHClass> newJsHClass = JSHClass::Clone(thread, jshclass);
313 AddPropertyToNewHClass(thread, jshclass, newJsHClass, key, attr);
316 JSHClass::NotifyHclassChanged(thread, jshclass, newJsHClass, key.GetTaggedValue());
319 obj->SynchronizedSetClass(thread, *newJsHClass);
322 JSHandle<JSHClass> JSHClass::TransitionExtension(const JSThread *thread, const JSHandle<JSHClass> &jshclass)
324 JSHandle<JSTaggedValue> key(thread->GlobalConstants()->GetHandledPreventExtensionsString());
328 newClass->SetPrototype(thread, jshclass->GetPrototype());
329 return JSHandle<JSHClass>(thread, newClass);
332 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory();
334 JSHandle<JSHClass> newJsHClass = JSHClass::Clone(thread, jshclass);
339 JSMutableHandle<LayoutInfo> layoutInfoHandle(thread, attrs);
341 newJsHClass->SetLayout(thread, layoutInfoHandle);
345 AddExtensionTransitions(thread, jshclass, newJsHClass, key);
350 JSHandle<JSHClass> JSHClass::TransitionProto(const JSThread *thread, const JSHandle<JSHClass> &jshclass,
353 JSHandle<JSTaggedValue> key(thread->GlobalConstants()->GetHandledPrototypeString());
358 return JSHandle<JSHClass>(thread, newClass);
360 newClass = FindTransitionProtoForAOT(thread, jshclass, proto);
362 return JSHandle<JSHClass>(thread, newClass);
366 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory();
368 JSHandle<JSHClass> newJsHClass = JSHClass::Clone(thread, jshclass);
369 newJsHClass->SetPrototype(thread, proto.GetTaggedValue(), isChangeProto);
373 JSMutableHandle<LayoutInfo> layoutInfoHandle(thread, layout);
375 newJsHClass->SetLayout(thread, layoutInfoHandle);
379 AddProtoTransitions(thread, jshclass, newJsHClass, key, proto);
386 JSHClass *JSHClass::FindTransitionProtoForAOT(const JSThread *thread, const JSHandle<JSHClass> &jshclass,
392 JSHandle<JSHClass> baseIhc(thread, proto->GetTaggedObject()->GetClass());
396 auto transitionTable = thread->GetCurrentEcmaContext()->GetFunctionProtoTransitionTable();
397 auto transHc = transitionTable->FindTransitionByHClass(thread,
400 JSHandle<JSTaggedValue> transIhc(thread, transHc.first);
401 JSHandle<JSTaggedValue> transPhc(thread, transHc.second);
405 ReBuildFunctionInheritanceRelationship(thread, proto, JSHandle<JSTaggedValue>(baseIhc), transIhc, transPhc);
410 void JSHClass::ReBuildFunctionInheritanceRelationship(const JSThread *thread,
416 JSHandle<JSHClass>::Cast(transIhc)->SetProto(thread, proto.GetTaggedValue());
421 JSHandle<JSHClass> oldPhc(thread, proto->GetTaggedObject()->GetClass());
422 proto->GetTaggedObject()->SynchronizedSetClass(thread, JSHClass::Cast(transPhc->GetTaggedObject()));
425 JSHClass::Cast(transPhc->GetTaggedObject())->SetPrototype(thread, oldPhc->GetPrototype());
428 JSHandle<JSTaggedValue> parentPrototype(thread, phcPrototype);
430 JSHClass::EnablePHCProtoChangeMarker(thread,
431 JSHandle<JSHClass>(thread, parentPrototype->GetTaggedObject()->GetClass()));
432 JSHClass::EnableProtoChangeMarker(thread, JSHandle<JSHClass>(transIhc));
435 JSHandle<JSHClass> JSHClass::CloneWithAddProto(const JSThread *thread, const JSHandle<JSHClass> &jshclass,
440 JSHandle<JSHClass> newJsHClass = JSHClass::Clone(thread, jshclass);
441 newJsHClass->SetPrototype(thread, proto.GetTaggedValue());
444 AddProtoTransitions(thread, jshclass, newJsHClass, key, proto);
449 JSHandle<JSHClass> JSHClass::TransProtoWithoutLayout(const JSThread *thread, const JSHandle<JSHClass> &jshclass,
452 JSHandle<JSTaggedValue> key(thread->GlobalConstants()->GetHandledPrototypeString());
457 return JSHandle<JSHClass>(thread, newClass);
461 return CloneWithAddProto(thread, jshclass, key, proto);
464 void JSHClass::SetPrototype(const JSThread *thread, JSTaggedValue proto, bool isChangeProto)
467 JSHandle<JSTaggedValue> protoHandle(thread, proto);
468 SetPrototype(thread, protoHandle, isChangeProto);
471 JSHandle<JSHClass> JSHClass::SetPrototypeWithNotification(const JSThread *thread,
479 JSHandle<JSHClass> newClass = JSHClass::TransitionProto(thread, hclass, proto, isChangeProto);
482 JSHClass::NotifyHclassChanged(thread, hclass, newClass);
487 void JSHClass::SetPrototypeTransition(JSThread *thread, const JSHandle<JSObject> &object,
490 JSHandle<JSHClass> hclass(thread, object->GetJSHClass());
491 auto newClass = SetPrototypeWithNotification(thread, hclass, proto, isChangeProto);
493 object->SynchronizedSetClass(thread, *newClass);
494 thread->NotifyStableArrayElementsGuardians(object, StableArrayChangeKind::PROTO);
495 ObjectOperator::UpdateDetectorOnSetPrototype(thread, object.GetTaggedValue());
498 void JSHClass::SetPrototype(const JSThread *thread, const JSHandle<JSTaggedValue> &proto, bool isChangeProto)
502 OptimizePrototypeForIC(thread, proto, isChangeProto);
504 SetProto(thread, proto);
507 void JSHClass::OptimizePrototypeForIC(const JSThread *thread, const JSHandle<JSTaggedValue> &proto, bool isChangeProto)
509 JSHandle<JSHClass> hclass(thread, proto->GetTaggedObject()->GetClass());
528 if (ProtoIsFastJSArray(thread, proto, hclass)) {
529 newProtoClass = JSHandle<JSHClass>(thread, thread->GetArrayInstanceHClass(hclass->GetElementsKind(),
532 newProtoClass = JSHClass::Clone(thread, hclass);
538 JSMutableHandle<LayoutInfo> layoutInfoHandle(thread, layout);
540 thread->GetEcmaVM()->GetFactory()->CopyLayoutInfo(layoutInfoHandle).GetTaggedValue());
541 newProtoClass->SetLayout(thread, layoutInfoHandle);
546 NotifyHclassChanged(thread, hclass, newProtoClass);
548 JSObject::Cast(proto->GetTaggedObject())->SynchronizedSetClass(thread, *newProtoClass);
552 thread->GetEcmaVM()->GetPGOProfiler()->UpdateRootProfileTypeSafe(*hclass, *newProtoClass);
561 void JSHClass::TransitionToDictionary(const JSThread *thread, const JSHandle<JSObject> &obj)
564 JSHandle<JSHClass> jshclass(thread, obj->GetJSHClass());
565 JSHandle<JSHClass> newJsHClass = CloneWithoutInlinedProperties(thread, jshclass);
576 JSHClass::NotifyHclassChanged(thread, JSHandle<JSHClass>(thread, obj->GetJSHClass()), newJsHClass);
579 obj->SynchronizedSetClass(thread, *newJsHClass);
583 void JSHClass::OptimizeAsFastProperties(const JSThread *thread, const JSHandle<JSObject> &obj,
587 JSHandle<JSHClass> jshclass(thread, obj->GetJSHClass());
588 JSHandle<JSHClass> newJsHClass = Clone(thread, jshclass, isDictionary);
592 JSHandle<NameDictionary> properties(thread, obj->GetProperties());
594 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory();
606 layoutInfoHandle->AddKey(thread, i, key, attributes);
612 newJsHClass->SetLayout(thread, layoutInfoHandle);
622 JSHClass::NotifyHclassChanged(thread, JSHandle<JSHClass>(thread, obj->GetJSHClass()), newJsHClass);
624 obj->SynchronizedSetClass(thread, *newJsHClass);
628 void JSHClass::TransitionForRepChange(const JSThread *thread, const JSHandle<JSObject> &receiver,
631 JSHandle<JSHClass> oldHClass(thread, receiver->GetJSHClass());
634 JSHandle<JSHClass> newHClass = JSHClass::Clone(thread, oldHClass);
637 JSHandle<LayoutInfo> oldLayout(thread, newHClass->GetLayout());
638 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory();
640 newHClass->SetLayout(thread, newLayout);
644 int entry = JSHClass::FindPropertyEntry(thread, hclass, key.GetTaggedValue());
646 newLayout->SetNormalAttr(thread, entry, attr);
650 JSHClass::NotifyHclassChanged(thread, oldHClass, newHClass, key.GetTaggedValue());
653 receiver->SynchronizedSetClass(thread, *newHClass);
657 bool JSHClass::IsInitialArrayHClassWithElementsKind(const JSThread *thread, const JSHClass *targetHClass,
660 const auto &arrayHClassIndexMap = thread->GetArrayHClassIndexMap();
664 auto hclassVal = thread->GlobalConstants()->GetGlobalConstantObject(static_cast<size_t>(indexPair.first));
665 auto hclassWithProtoVal = thread->GlobalConstants()->
674 bool JSHClass::TransitToElementsKindUncheck(const JSThread *thread, const JSHandle<JSObject> &obj,
680 if (IsInitialArrayHClassWithElementsKind(thread, objHclass, current)) {
681 const auto &arrayHClassIndexMap = thread->GetArrayHClassIndexMap();
688 auto hclassVal = thread->GlobalConstants()->GetGlobalConstantObject(index);
690 obj->SynchronizedSetClass(thread, hclass);
692 JSHClass::NotifyHclassChanged(thread, JSHandle<JSHClass>(thread, objHclass),
693 JSHandle<JSHClass>(thread, hclass));
702 void JSHClass::TransitToElementsKind(const JSThread *thread, const JSHandle<JSArray> &array,
715 ASSERT(IsInitialArrayHClassWithElementsKind(thread, array->GetJSHClass(), current));
716 TransitToElementsKindUncheck(thread, JSHandle<JSObject>(array), newKind);
719 bool JSHClass::TransitToElementsKind(const JSThread *thread, const JSHandle<JSObject> &object,
736 ASSERT(IsInitialArrayHClassWithElementsKind(thread, object->GetJSHClass(), current));
737 if (!TransitToElementsKindUncheck(thread, object, newKind)) {
741 if (!thread->GetEcmaVM()->IsEnableElementsKind()) {
743 if (!thread->IsPGOProfilerEnable()) {
747 thread->GetEcmaVM()->GetPGOProfiler()->UpdateTrackElementsKind(trackInfoVal, newKind);
809 TransitionResult JSHClass::ConvertOrTransitionWithRep(const JSThread *thread,
816 if (thread->IsPGOProfilerEnable() && !hclass->IsJSShared() && attr.UpdateTrackType(value.GetTaggedValue())) {
829 JSHClass::TransitionForRepChange(thread, receiver, key, attr);
841 JSHClass::TransitionForRepChange(thread, receiver, key, attr);
848 JSHandle<JSTaggedValue> JSHClass::EnableProtoChangeMarker(const JSThread *thread, const JSHandle<JSHClass> &jshclass)
854 return JSHandle<JSTaggedValue>(thread, JSTaggedValue::Null());
856 JSHandle<JSObject> protoHandle(thread, proto);
857 JSHandle<JSHClass> protoClass(thread, protoHandle->GetJSHClass());
862 RegisterOnProtoChain(thread, protoClass);
866 JSHandle<ProtoChangeMarker> markerHandle(thread, ProtoChangeMarker::Cast(protoChangeMarker.GetTaggedObject()));
871 JSHandle<ProtoChangeMarker> markerHandle = thread->GetEcmaVM()->GetFactory()->NewProtoChangeMarker();
875 protoClass->SetProtoChangeMarker(thread, markerHandle.GetTaggedValue());
880 JSHandle<JSTaggedValue> JSHClass::EnablePHCProtoChangeMarker(const JSThread *thread,
883 RegisterOnProtoChain(thread, protoClass);
887 JSHandle<ProtoChangeMarker> markerHandle(thread, ProtoChangeMarker::Cast(protoChangeMarker.GetTaggedObject()));
892 JSHandle<ProtoChangeMarker> markerHandle = thread->GetEcmaVM()->GetFactory()->NewProtoChangeMarker();
894 protoClass->SetProtoChangeMarker(thread, markerHandle.GetTaggedValue());
898 void JSHClass::NotifyHclassChanged(const JSThread *thread, JSHandle<JSHClass> oldHclass, JSHandle<JSHClass> newHclass,
935 JSHClass::NoticeThroughChain(thread, oldHclass, addedKey);
936 JSHClass::RefreshUsers(thread, oldHclass, newHclass);
939 void JSHClass::NotifyAccessorChanged(const JSThread *thread, JSHandle<JSHClass> hclass)
960 NotifyAccessorChanged(thread, JSHandle<JSHClass>(thread, listeners->Get(i).GetTaggedObject()));
965 void JSHClass::RegisterOnProtoChain(const JSThread *thread, const JSHandle<JSHClass> &jshclass)
972 JSHandle<ProtoChangeDetails> userDetails = GetProtoChangeDetails(thread, user);
992 JSHandle<JSObject> protoHandle(thread, proto);
994 GetProtoChangeDetails(thread, JSHandle<JSHClass>(thread, protoHandle->GetJSHClass()));
998 listenersHandle = JSHandle<ChangeListener>(ChangeListener::Create(thread));
1000 listenersHandle = JSHandle<ChangeListener>(thread, listeners);
1003 JSHandle<ChangeListener> newListeners = ChangeListener::Add(thread, listenersHandle, user, &registerIndex);
1005 protoDetails->SetChangeListener(thread, newListeners.GetTaggedValue());
1007 user = JSHandle<JSHClass>(thread, protoHandle->GetJSHClass());
1011 bool JSHClass::UnregisterOnProtoChain(const JSThread *thread, const JSHandle<JSHClass> &jshclass)
1022 JSHandle<ProtoChangeDetails> currentDetails = GetProtoChangeDetails(thread, jshclass);
1036 JSHandle<ChangeListener> listeners(thread, listenersValue.GetTaggedObject());
1038 listeners->Delete(thread, index);
1042 JSHandle<ProtoChangeDetails> JSHClass::GetProtoChangeDetails(const JSThread *thread, const JSHandle<JSHClass> &jshclass)
1046 return JSHandle<ProtoChangeDetails>(thread, protoDetails);
1048 JSHandle<ProtoChangeDetails> protoDetailsHandle = thread->GetEcmaVM()->GetFactory()->NewProtoChangeDetails();
1049 jshclass->SetProtoChangeDetails(thread, protoDetailsHandle.GetTaggedValue());
1053 JSHandle<ProtoChangeDetails> JSHClass::GetProtoChangeDetails(const JSThread *thread, const JSHandle<JSObject> &obj)
1055 JSHandle<JSHClass> jshclass(thread, obj->GetJSHClass());
1056 return GetProtoChangeDetails(thread, jshclass);
1059 void JSHClass::MarkProtoChanged([[maybe_unused]] const JSThread *thread, const JSHandle<JSHClass> &jshclass)
1070 void JSHClass::NoticeThroughChain(const JSThread *thread, const JSHandle<JSHClass> &jshclass,
1074 MarkProtoChanged(thread, jshclass);
1087 NoticeThroughChain(thread, JSHandle<JSHClass>(thread, listeners->Get(i).GetTaggedObject()), addedKey);
1092 void JSHClass::RefreshUsers(const JSThread *thread, const JSHandle<JSHClass> &oldHclass,
1097 bool onceRegistered = UnregisterOnProtoChain(thread, oldHclass);
1101 newHclass->SetProtoChangeDetails(thread, oldHclass->GetProtoChangeDetails());
1103 oldHclass->SetProtoChangeDetails(thread, JSTaggedValue::Undefined());
1109 RegisterOnProtoChain(thread, newHclass);
1113 PropertyLookupResult JSHClass::LookupPropertyInAotHClass(const JSThread *thread, JSHClass *hclass, JSTaggedValue key)
1125 int entry = JSHClass::FindPropertyEntry(thread, hclass, key);
1154 PropertyLookupResult JSHClass::LookupPropertyInPGOHClass(const JSThread *thread, JSHClass *hclass, JSTaggedValue key)
1164 int entry = JSHClass::FindPropertyEntry(thread, hclass, key);
1194 PropertyLookupResult JSHClass::LookupPropertyInBuiltinPrototypeHClass(const JSThread *thread, JSHClass *hclass,
1206 int entry = JSHClass::FindPropertyEntry(thread, hclass, key);
1256 JSHandle<JSHClass> JSHClass::CreateRootHClassFromPGO(const JSThread* thread,
1263 return CreateRootHClassWithCached(thread, desc, maxNum);
1267 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory();
1275 rootDesc->IterateProps([thread, factory, &index, hclass, layout](const pgo::PropertyDesc& propDesc) {
1280 if (handler.SetAttribute(thread, attributes)) {
1285 layout->AddKey(thread, index, key.GetTaggedValue(), attributes);
1288 hclass->SetLayout(thread, layout);
1294 JSHandle<JSHClass> JSHClass::CreateRootHClassWithCached(const JSThread* thread,
1299 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory();
1305 hclass->SetPrototype(thread, JSTaggedValue::Null());
1306 hclass->SetLayout(thread, layout);
1308 rootDesc->IterateProps([thread, factory, &index, &hclass](const pgo::PropertyDesc& propDesc) {
1313 if (handler.SetAttribute(thread, attributes)) {
1320 JSHandle<JSHClass> child = SetPropertyOfObjHClass(thread, hclass, key, attributes, rep);
1321 child->SetParent(thread, hclass);
1322 child->SetPrototype(thread, JSTaggedValue::Null());
1329 JSHandle<JSHClass> JSHClass::CreateChildHClassFromPGO(const JSThread* thread,
1336 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory();
1339 JSHandle<JSHClass> newJsHClass = JSHClass::Clone(thread, parent);
1344 JSMutableHandle<LayoutInfo> layoutInfoHandle(thread, newJsHClass->GetLayout());
1347 newJsHClass->SetLayout(thread, layoutInfoHandle);
1351 newJsHClass->SetLayout(thread, layoutInfoHandle);
1355 if (handler.SetAttribute(thread, attributes)) {
1360 layoutInfoHandle->AddKey(thread, offset, key.GetTaggedValue(), attributes);
1362 AddTransitions(thread, parent, newJsHClass, key, attributes);
1363 JSHClass::NotifyHclassChanged(thread, parent, newJsHClass, key.GetTaggedValue());
1462 PropertyLookupResult JSHClass::LookupPropertyInBuiltinHClass(const JSThread *thread, JSHClass *hclass,
1473 int entry = JSHClass::FindPropertyEntry(thread, hclass, key);
1503 JSHandle<JSHClass> JSHClass::CreateSHClass(JSThread *thread,
1508 EcmaVM *vm = thread->GetEcmaVM();
1527 CreateSInlinedLayout(thread, descs, hclass, parentHClass);
1529 CreateSDictLayout(thread, descs, hclass, parentHClass);
1535 JSHandle<JSHClass> JSHClass::CreateSConstructorHClass(JSThread *thread, const std::vector<PropertyDescriptor> &descs)
1537 auto hclass = CreateSHClass(thread, descs, nullptr, true);
1543 JSHandle<JSHClass> JSHClass::CreateSPrototypeHClass(JSThread *thread, const std::vector<PropertyDescriptor> &descs)
1545 auto hclass = CreateSHClass(thread, descs);
1551 void JSHClass::CreateSInlinedLayout(JSThread *thread,
1556 EcmaVM *vm = thread->GetEcmaVM();
1566 JSMutableHandle<JSTaggedValue> key(thread, JSTaggedValue::Undefined());
1578 layout->AddKey(thread, i, key.GetTaggedValue(), attr);
1583 JSHandle<LayoutInfo> old(thread, parentHClass->GetLayout());
1586 auto entry = layout->FindElementWithCache(thread, *hclass, key.GetTaggedValue(), index);
1592 layout->AddKey(thread, index, old->GetKey(i), attr);
1597 hclass->SetLayout(thread, layout);
1606 void JSHClass::CreateSDictLayout(JSThread *thread,
1622 thread,
1623 NameDictionary::CreateInSharedHeap(thread, NameDictionary::ComputeHashTableSize(length + parentLength)));
1624 JSMutableHandle<JSTaggedValue> key(thread, JSTaggedValue::Undefined());
1625 auto globalConst = const_cast<GlobalEnvConstants *>(thread->GlobalConstants());
1634 JSHandle<NameDictionary> newDict = NameDictionary::Put(thread, dict, key, value, attr);
1640 JSHandle<NameDictionary> old(thread, parentHClass->GetLayout());
1645 thread, dict, key, value, PropertyAttributes(old->GetAttributes(indexOrder[i])));
1649 JSHandle<LayoutInfo> old(thread, parentHClass->GetLayout());
1653 NameDictionary::Put(thread, dict, key, value, PropertyAttributes(old->GetAttr(i)));
1659 hclass->SetLayout(thread, dict);
1663 bool JSHClass::IsNeedNotifyHclassChangedForAotTransition(const JSThread *thread, const JSHandle<JSHClass> &hclass,
1666 JSMutableHandle<JSObject> protoHandle(thread, hclass->GetPrototype());
1669 if (JSHClass::FindPropertyEntry(thread, protoHclass, key) != -1) {