• Home
  • Raw
  • Download

Lines Matching refs:thread_

155     : thread_(thread), vm_(thread->GetEcmaVM()), heap_(heap) {}  in ObjectFactory()
180 newClass->Initialize(thread_, size, type, 0); in NewEcmaHClassClass()
182 return JSHandle<JSHClass>(thread_, newClass); in NewEcmaHClassClass()
189 hclass->SetClass(thread_, hclass); in InitClassClass()
198 newClass->Initialize(thread_, size, type, inlinedProps); in NewEcmaHClass()
200 return JSHandle<JSHClass>(thread_, newClass); in NewEcmaHClass()
209 newClass->Initialize(thread_, size, type, inlinedProps); in NewEcmaReadOnlyHClass()
211 return JSHandle<JSHClass>(thread_, newClass); in NewEcmaReadOnlyHClass()
216 …return NewEcmaHClass(JSHClass::Cast(thread_->GlobalConstants()->GetHClassClass().GetTaggedObject()… in NewEcmaHClass()
262 array->SetArrayBufferData(thread_, pointer); in NewJSArrayBufferData()
281 array->SetArrayBufferData(thread_, pointer); in NewJSSharedArrayBufferData()
301 arrayBuffer->SetArrayBufferData(thread_, pointer.GetTaggedValue()); in NewJSArrayBuffer()
319 arrayBuffer->SetArrayBufferData(thread_, pointer.GetTaggedValue()); in NewJSArrayBuffer()
331 THROW_TYPE_ERROR_AND_RETURN(thread_, "offset or length error", in NewJSDataView()
332 JSHandle<JSDataView>(thread_, JSTaggedValue::Undefined())); in NewJSDataView()
338 arrayBuffer->SetDataView(thread_, JSTaggedValue::True()); in NewJSDataView()
339 arrayBuffer->SetViewedArrayBuffer(thread_, buffer.GetTaggedValue()); in NewJSDataView()
370 sharedArrayBuffer->SetArrayBufferData(thread_, pointer); in NewJSSharedArrayBuffer()
397 regexp->SetByteCodeBuffer(thread_, pointer.GetTaggedValue()); in NewJSRegExpByteCodeData()
414 JSHClass::Cast(thread_->GlobalConstants()->GetHClassClass().GetTaggedObject()), classSize)); in NewEcmaHClass()
415 newClass->Initialize(thread_, size, type, inlinedProps); in NewEcmaHClass()
416 JSHandle<JSHClass> hclass(thread_, newClass); in NewEcmaHClass()
417 hclass->SetPrototype(thread_, prototype.GetTaggedValue()); in NewEcmaHClass()
423 JSHandle<JSObject> obj(thread_, JSObject::Cast(NewObject(jshclass))); in NewJSObject()
426 obj->SetElements(thread_, emptyArray, SKIP_BARRIER); in NewJSObject()
427 obj->SetProperties(thread_, emptyArray, SKIP_BARRIER); in NewJSObject()
441 JSHandle<TaggedArray> newArray(thread_, header); in CloneProperties()
445 newArray->Set(thread_, i, value); in CloneProperties()
453 auto klass = JSHandle<JSHClass>(thread_, object->GetClass()); in CloneObjectLiteral()
457 JSHandle<TaggedArray> elements(thread_, object->GetElements()); in CloneObjectLiteral()
459 cloneObject->SetElements(thread_, newElements.GetTaggedValue()); in CloneObjectLiteral()
461 JSHandle<TaggedArray> properties(thread_, object->GetProperties()); in CloneObjectLiteral()
463 cloneObject->SetProperties(thread_, newProperties.GetTaggedValue()); in CloneObjectLiteral()
467 cloneObject->SetPropertyInlinedPropsWithRep(thread_, i, object->GetPropertyInlinedProps(i)); in CloneObjectLiteral()
475 auto klass = JSHandle<JSHClass>(thread_, object->GetClass()); in CloneArrayLiteral()
478 cloneObject->SetArrayLength(thread_, object->GetArrayLength()); in CloneArrayLiteral()
479 cloneObject->SetTrackInfo(thread_, JSTaggedValue::Undefined()); in CloneArrayLiteral()
481 JSHandle<TaggedArray> elements(thread_, object->GetElements()); in CloneArrayLiteral()
493 cloneObject->SetElements(thread_, elements.GetTaggedValue()); in CloneArrayLiteral()
496 cloneObject->SetElements(thread_, newElements.GetTaggedValue()); in CloneArrayLiteral()
502 object->SetElements(thread_, cloneObject->GetElements()); in CloneArrayLiteral()
505 JSHandle<TaggedArray> properties(thread_, object->GetProperties()); in CloneArrayLiteral()
516 cloneObject->SetProperties(thread_, properties.GetTaggedValue()); in CloneArrayLiteral()
519 cloneObject->SetProperties(thread_, newProperties.GetTaggedValue()); in CloneArrayLiteral()
525 object->SetProperties(thread_, cloneObject->GetProperties()); in CloneArrayLiteral()
529 cloneObject->SetPropertyInlinedPropsWithRep(thread_, i, object->GetPropertyInlinedProps(i)); in CloneArrayLiteral()
545 JSHandle<TaggedArray> newArray(thread_, header); in CloneProperties()
551 newArray->Set(thread_, i, value); in CloneProperties()
553 JSHandle<JSFunction> valueHandle(thread_, value); in CloneProperties()
555 newFunc->SetLexicalEnv(thread_, env); in CloneProperties()
556 newFunc->SetHomeObject(thread_, obj); in CloneProperties()
557 newArray->Set(thread_, i, newFunc); in CloneProperties()
567 auto klass = JSHandle<JSHClass>(thread_, object->GetClass()); in CloneObjectLiteral()
570 klass = JSHClass::Clone(thread_, klass); in CloneObjectLiteral()
575 JSHandle<TaggedArray> elements(thread_, object->GetElements()); in CloneObjectLiteral()
577 cloneObject->SetElements(thread_, newElements.GetTaggedValue()); in CloneObjectLiteral()
579 JSHandle<TaggedArray> properties(thread_, object->GetProperties()); in CloneObjectLiteral()
581 cloneObject->SetProperties(thread_, newProperties.GetTaggedValue()); in CloneObjectLiteral()
588 cloneObject->SetPropertyInlinedPropsWithRep(thread_, i, value); in CloneObjectLiteral()
590 JSHandle<JSFunction> valueHandle(thread_, value); in CloneObjectLiteral()
592 newFunc->SetLexicalEnv(thread_, env); in CloneObjectLiteral()
593 newFunc->SetHomeObject(thread_, cloneObject); in CloneObjectLiteral()
594 cloneObject->SetPropertyInlinedProps(thread_, i, newFunc.GetTaggedValue()); in CloneObjectLiteral()
602 JSHandle<JSHClass> jshclass(thread_, func->GetJSHClass()); in CloneJSFuction()
603 JSHandle<Method> method(thread_, func->GetMethod()); in CloneJSFuction()
607 cloneFunc->SetPropertyInlinedProps(thread_, JSFunction::LENGTH_INLINE_PROPERTY_INDEX, length); in CloneJSFuction()
614 JSHandle<JSHClass> jshclass(thread_, func->GetJSHClass()); in CloneSFunction()
615 JSHandle<Method> method(thread_, func->GetMethod()); in CloneSFunction()
619 cloneFunc->SetPropertyInlinedProps(thread_, JSFunction::LENGTH_INLINE_PROPERTY_INDEX, length); in CloneSFunction()
628 JSHandle<JSHClass> hclass(thread_, ctor->GetClass()); in CloneClassCtor()
631 hclass = JSHClass::Clone(thread_, hclass); in CloneClassCtor()
634 JSHandle<Method> method(thread_, ctor->GetMethod()); in CloneClassCtor()
645 cloneCtor->SetPropertyInlinedPropsWithRep(thread_, i, value); in CloneClassCtor()
647 JSHandle<JSFunction> valueHandle(thread_, value); in CloneClassCtor()
649 newFunc->SetLexicalEnv(thread_, lexenv); in CloneClassCtor()
650 newFunc->SetHomeObject(thread_, cloneCtor); in CloneClassCtor()
651 cloneCtor->SetPropertyInlinedProps(thread_, i, newFunc.GetTaggedValue()); in CloneClassCtor()
655 JSHandle<TaggedArray> elements(thread_, ctor->GetElements()); in CloneClassCtor()
657 cloneCtor->SetElements(thread_, newElements.GetTaggedValue()); in CloneClassCtor()
659 JSHandle<TaggedArray> properties(thread_, ctor->GetProperties()); in CloneClassCtor()
661 cloneCtor->SetProperties(thread_, newProperties.GetTaggedValue()); in CloneClassCtor()
668 JSHandle<JSObject> obj(thread_, in NewNonMovableJSObject()
671 obj->SetElements(thread_, EmptyArray(), SKIP_BARRIER); in NewNonMovableJSObject()
672 obj->SetProperties(thread_, EmptyArray(), SKIP_BARRIER); in NewNonMovableJSObject()
680 obj->SetValue(thread_, object); in NewJSPrimitiveRef()
695 JSArray::Cast(*obj)->SetTrackInfo(thread_, JSTaggedValue::Undefined()); in NewJSArray()
696 auto accessor = thread_->GlobalConstants()->GetArrayLengthAccessor(); in NewJSArray()
697 …JSArray::Cast(*obj)->SetPropertyInlinedProps(thread_, JSArray::LENGTH_INLINE_PROPERTY_INDEX, acces… in NewJSArray()
712 array->Set(thread_, i, vec[start + i]); in NewJsonFixedArray()
725 it->SetObject(thread_, obj); in NewJSForinIterator()
726 it->SetCachedHclass(thread_, cachedHclass); in NewJSForinIterator()
727 it->SetKeys(thread_, keys); in NewJSForinIterator()
736 const GlobalEnvConstants *globalConst = thread_->GlobalConstants(); in CreateJSRegExpInstanceClass()
746 layoutInfoHandle->AddKey(thread_, 0, globalConst->GetLastIndexString(), attributes); in CreateJSRegExpInstanceClass()
750 regexpClass->SetLayout(thread_, layoutInfoHandle); in CreateJSRegExpInstanceClass()
759 const GlobalEnvConstants *globalConst = thread_->GlobalConstants(); in CreateJSArrayInstanceClass()
770 layoutInfoHandle->AddKey(thread_, 0, globalConst->GetLengthString(), attributes); in CreateJSArrayInstanceClass()
774 arrayClass->SetLayout(thread_, layoutInfoHandle); in CreateJSArrayInstanceClass()
785 const GlobalEnvConstants *globalConst = thread_->GlobalConstants(); in CreateJSArguments()
798 …layoutInfoHandle->AddKey(thread_, JSArguments::LENGTH_INLINE_PROPERTY_INDEX, globalConst->GetLengt… in CreateJSArguments()
808 layoutInfoHandle->AddKey(thread_, JSArguments::ITERATOR_INLINE_PROPERTY_INDEX, in CreateJSArguments()
819 layoutInfoHandle->AddKey(thread_, JSArguments::CALLER_INLINE_PROPERTY_INDEX, in CreateJSArguments()
820thread_->GlobalConstants()->GetHandledCallerString().GetTaggedValue(), attributes); in CreateJSArguments()
830 layoutInfoHandle->AddKey(thread_, JSArguments::CALLEE_INLINE_PROPERTY_INDEX, in CreateJSArguments()
831thread_->GlobalConstants()->GetHandledCalleeString().GetTaggedValue(), attributes); in CreateJSArguments()
835 argumentsClass->SetLayout(thread_, layoutInfoHandle); in CreateJSArguments()
862 JSHandle<EcmaString> emptyString(thread_->GlobalConstants()->GetHandledEmptyString()); in GetJSError()
870 if (thread_->HasPendingException()) { in NewJSError()
871 JSHandle<JSObject> obj(thread_, thread_->GetException()); in NewJSError()
877 if (!thread_->IsAsmInterpreter()) { in NewJSError()
878 FrameHandler frameHandler(thread_); in NewJSError()
880 thread_->SetCurrentSPFrame(frameHandler.GetPrevJSFrame()); in NewJSError()
885 const GlobalEnvConstants *globalConst = thread_->GlobalConstants(); in NewJSError()
917 JSHandle<JSTaggedValue> nativePrototype(thread_, nativeFunc->GetFunctionPrototype()); in NewJSError()
919 …JSHandle<JSTaggedValue> ctor(JSTaggedValue::GetProperty(thread_, nativePrototype, ctorKey).GetValu… in NewJSError()
920 JSHandle<JSTaggedValue> undefined = thread_->GlobalConstants()->GetHandledUndefined(); in NewJSError()
922 … EcmaInterpreter::NewRuntimeCallInfo(thread_, ctor, nativePrototype, undefined, 1, needCheckStack); in NewJSError()
923 RETURN_HANDLE_IF_ABRUPT_COMPLETION(JSObject, thread_); in NewJSError()
927 RETURN_HANDLE_IF_ABRUPT_COMPLETION(JSObject, thread_); in NewJSError()
928 JSHandle<JSObject> handleNativeInstanceObj(thread_, obj); in NewJSError()
929 auto sp = const_cast<JSTaggedType *>(thread_->GetCurrentSPFrame()); in NewJSError()
932 thread_->SetCurrentSPFrame(prevEntry); in NewJSError()
951 …jshclass = JSHandle<JSHClass>(thread_, JSFunction::GetOrCreateInitialJSHClass(thread_, constructor… in NewJSObjectByConstructor()
960 auto dict = JSHandle<TaggedArray>(thread_, maybeDict); in NewJSObjectByConstructor()
962 obj->SetProperties(thread_, properties); in NewJSObjectByConstructor()
969 if (thread_->HasPendingException()) { in NewJSObjectByConstructor()
981 jshclass = JSFunction::GetInstanceJSHClass(thread_, constructor, newTarget); in NewJSObjectByConstructor()
984 …jshclass = JSFunction::GetInstanceJSHClass(thread_, JSHandle<JSFunction>(env->GetObjectFunction())… in NewJSObjectByConstructor()
987 RETURN_HANDLE_IF_ABRUPT_COMPLETION(JSObject, thread_); in NewJSObjectByConstructor()
992 auto dict = JSHandle<TaggedArray>(thread_, maybeDict); in NewJSObjectByConstructor()
994 obj->SetProperties(thread_, properties); in NewJSObjectByConstructor()
1030 JSIntl::Cast(*obj)->SetFallbackSymbol(thread_, JSTaggedValue::Undefined()); in InitializeJSObject()
1032 JSIntl::Cast(*obj)->SetFallbackSymbol(thread_, jsSymbol); in InitializeJSObject()
1036 JSLocale::Cast(*obj)->SetIcuField(thread_, JSTaggedValue::Undefined()); in InitializeJSObject()
1040 JSDateTimeFormat::Cast(*obj)->SetLocale(thread_, JSTaggedValue::Undefined()); in InitializeJSObject()
1041 JSDateTimeFormat::Cast(*obj)->SetCalendar(thread_, JSTaggedValue::Undefined()); in InitializeJSObject()
1042 JSDateTimeFormat::Cast(*obj)->SetNumberingSystem(thread_, JSTaggedValue::Undefined()); in InitializeJSObject()
1043 JSDateTimeFormat::Cast(*obj)->SetTimeZone(thread_, JSTaggedValue::Undefined()); in InitializeJSObject()
1044 JSDateTimeFormat::Cast(*obj)->SetLocaleIcu(thread_, JSTaggedValue::Undefined()); in InitializeJSObject()
1045 … JSDateTimeFormat::Cast(*obj)->SetSimpleDateTimeFormatIcu(thread_, JSTaggedValue::Undefined()); in InitializeJSObject()
1046 JSDateTimeFormat::Cast(*obj)->SetIso8601(thread_, JSTaggedValue::Undefined()); in InitializeJSObject()
1047 JSDateTimeFormat::Cast(*obj)->SetBoundFormat(thread_, JSTaggedValue::Undefined()); in InitializeJSObject()
1054 JSNumberFormat::Cast(*obj)->SetLocale(thread_, JSTaggedValue::Undefined()); in InitializeJSObject()
1055 JSNumberFormat::Cast(*obj)->SetNumberingSystem(thread_, JSTaggedValue::Undefined()); in InitializeJSObject()
1056 JSNumberFormat::Cast(*obj)->SetCurrency(thread_, JSTaggedValue::Undefined()); in InitializeJSObject()
1057 JSNumberFormat::Cast(*obj)->SetUnit(thread_, JSTaggedValue::Undefined()); in InitializeJSObject()
1058 … JSNumberFormat::Cast(*obj)->SetMinimumIntegerDigits(thread_, JSTaggedValue::Undefined()); in InitializeJSObject()
1059 … JSNumberFormat::Cast(*obj)->SetMinimumFractionDigits(thread_, JSTaggedValue::Undefined()); in InitializeJSObject()
1060 … JSNumberFormat::Cast(*obj)->SetMaximumFractionDigits(thread_, JSTaggedValue::Undefined()); in InitializeJSObject()
1061 … JSNumberFormat::Cast(*obj)->SetMinimumSignificantDigits(thread_, JSTaggedValue::Undefined()); in InitializeJSObject()
1062 … JSNumberFormat::Cast(*obj)->SetMaximumSignificantDigits(thread_, JSTaggedValue::Undefined()); in InitializeJSObject()
1063 JSNumberFormat::Cast(*obj)->SetUseGrouping(thread_, JSTaggedValue::Undefined()); in InitializeJSObject()
1064 JSNumberFormat::Cast(*obj)->SetBoundFormat(thread_, JSTaggedValue::Undefined()); in InitializeJSObject()
1065 JSNumberFormat::Cast(*obj)->SetIcuField(thread_, JSTaggedValue::Undefined()); in InitializeJSObject()
1077 JSRelativeTimeFormat::Cast(*obj)->SetLocale(thread_, JSTaggedValue::Undefined()); in InitializeJSObject()
1078 … JSRelativeTimeFormat::Cast(*obj)->SetNumberingSystem(thread_, JSTaggedValue::Undefined()); in InitializeJSObject()
1079 JSRelativeTimeFormat::Cast(*obj)->SetIcuField(thread_, JSTaggedValue::Undefined()); in InitializeJSObject()
1085 JSCollator::Cast(*obj)->SetIcuField(thread_, JSTaggedValue::Undefined()); in InitializeJSObject()
1086 JSCollator::Cast(*obj)->SetLocale(thread_, JSTaggedValue::Undefined()); in InitializeJSObject()
1087 JSCollator::Cast(*obj)->SetCollation(thread_, JSTaggedValue::Undefined()); in InitializeJSObject()
1088 JSCollator::Cast(*obj)->SetBoundCompare(thread_, JSTaggedValue::Undefined()); in InitializeJSObject()
1097 JSPluralRules::Cast(*obj)->SetLocale(thread_, JSTaggedValue::Undefined()); in InitializeJSObject()
1098 JSPluralRules::Cast(*obj)->SetMinimumIntegerDigits(thread_, JSTaggedValue::Undefined()); in InitializeJSObject()
1099 … JSPluralRules::Cast(*obj)->SetMinimumFractionDigits(thread_, JSTaggedValue::Undefined()); in InitializeJSObject()
1100 … JSPluralRules::Cast(*obj)->SetMaximumFractionDigits(thread_, JSTaggedValue::Undefined()); in InitializeJSObject()
1101 … JSPluralRules::Cast(*obj)->SetMinimumSignificantDigits(thread_, JSTaggedValue::Undefined()); in InitializeJSObject()
1102 … JSPluralRules::Cast(*obj)->SetMaximumSignificantDigits(thread_, JSTaggedValue::Undefined()); in InitializeJSObject()
1103 JSPluralRules::Cast(*obj)->SetIcuPR(thread_, JSTaggedValue::Undefined()); in InitializeJSObject()
1104 JSPluralRules::Cast(*obj)->SetIcuNF(thread_, JSTaggedValue::Undefined()); in InitializeJSObject()
1110 JSDisplayNames::Cast(*obj)->SetLocale(thread_, JSTaggedValue::Undefined()); in InitializeJSObject()
1114 JSDisplayNames::Cast(*obj)->SetIcuLDN(thread_, JSTaggedValue::Undefined()); in InitializeJSObject()
1118 JSListFormat::Cast(*obj)->SetLocale(thread_, JSTaggedValue::Undefined()); in InitializeJSObject()
1121 JSListFormat::Cast(*obj)->SetIcuLF(thread_, JSTaggedValue::Undefined()); in InitializeJSObject()
1139 JSArray::Cast(*obj)->SetTrackInfo(thread_, JSTaggedValue::Undefined()); in InitializeJSObject()
1141 auto accessor = thread_->GlobalConstants()->GetArrayLengthAccessor(); in InitializeJSObject()
1142 …JSArray::Cast(*obj)->SetPropertyInlinedProps(thread_, JSArray::LENGTH_INLINE_PROPERTY_INDEX, acces… in InitializeJSObject()
1146 JSDate::Cast(*obj)->SetTimeValue(thread_, JSTaggedValue(0.0)); in InitializeJSObject()
1147 JSDate::Cast(*obj)->SetLocalOffset(thread_, JSTaggedValue(JSDate::MAX_DOUBLE)); in InitializeJSObject()
1161 … JSTypedArray::Cast(*obj)->SetViewedArrayBufferOrByteArray(thread_, JSTaggedValue::Undefined()); in InitializeJSObject()
1162 JSTypedArray::Cast(*obj)->SetTypedArrayName(thread_, JSTaggedValue::Undefined()); in InitializeJSObject()
1169 JSRegExp::Cast(*obj)->SetByteCodeBuffer(thread_, JSTaggedValue::Undefined()); in InitializeJSObject()
1170 JSRegExp::Cast(*obj)->SetOriginalSource(thread_, JSTaggedValue::Undefined()); in InitializeJSObject()
1171 JSRegExp::Cast(*obj)->SetOriginalFlags(thread_, JSTaggedValue(0)); in InitializeJSObject()
1172 JSRegExp::Cast(*obj)->SetGroupName(thread_, JSTaggedValue::Undefined()); in InitializeJSObject()
1176 JSPrimitiveRef::Cast(*obj)->SetValue(thread_, JSTaggedValue::Undefined()); in InitializeJSObject()
1179 JSSet::Cast(*obj)->SetLinkedSet(thread_, JSTaggedValue::Undefined()); in InitializeJSObject()
1182 JSMap::Cast(*obj)->SetLinkedMap(thread_, JSTaggedValue::Undefined()); in InitializeJSObject()
1185 JSWeakMap::Cast(*obj)->SetLinkedMap(thread_, JSTaggedValue::Undefined()); in InitializeJSObject()
1188 JSWeakSet::Cast(*obj)->SetLinkedSet(thread_, JSTaggedValue::Undefined()); in InitializeJSObject()
1191 JSWeakRef::Cast(*obj)->SetWeakObject(thread_, JSTaggedValue::Undefined()); in InitializeJSObject()
1194 … JSFinalizationRegistry::Cast(*obj)->SetCleanupCallback(thread_, JSTaggedValue::Undefined()); in InitializeJSObject()
1195 … JSFinalizationRegistry::Cast(*obj)->SetNoUnregister(thread_, JSTaggedValue::Undefined()); in InitializeJSObject()
1196 … JSFinalizationRegistry::Cast(*obj)->SetMaybeUnregister(thread_, JSTaggedValue::Undefined()); in InitializeJSObject()
1197 JSFinalizationRegistry::Cast(*obj)->SetNext(thread_, JSTaggedValue::Null()); in InitializeJSObject()
1198 JSFinalizationRegistry::Cast(*obj)->SetPrev(thread_, JSTaggedValue::Null()); in InitializeJSObject()
1201 JSGeneratorObject::Cast(*obj)->SetGeneratorContext(thread_, JSTaggedValue::Undefined()); in InitializeJSObject()
1202 JSGeneratorObject::Cast(*obj)->SetResumeResult(thread_, JSTaggedValue::Undefined()); in InitializeJSObject()
1207 … JSAsyncGeneratorObject::Cast(*obj)->SetGeneratorContext(thread_, JSTaggedValue::Undefined()); in InitializeJSObject()
1208 …JSAsyncGeneratorObject::Cast(*obj)->SetAsyncGeneratorQueue(thread_, GetEmptyTaggedQueue().GetTagge… in InitializeJSObject()
1209 … JSAsyncGeneratorObject::Cast(*obj)->SetGeneratorBrand(thread_, JSTaggedValue::Undefined()); in InitializeJSObject()
1210 … JSAsyncGeneratorObject::Cast(*obj)->SetResumeResult(thread_, JSTaggedValue::Undefined()); in InitializeJSObject()
1216 JSStringIterator::Cast(*obj)->SetIteratedString(thread_, JSTaggedValue::Undefined()); in InitializeJSObject()
1219 … JSAsyncFromSyncIterator::Cast(*obj)->SetSyncIteratorRecord(thread_, JSTaggedValue::Undefined()); in InitializeJSObject()
1222 … JSAsyncFromSyncIterUnwarpFunction::Cast(*obj)->SetDone(thread_, JSTaggedValue::Undefined()); in InitializeJSObject()
1225 JSArrayBuffer::Cast(*obj)->SetArrayBufferData(thread_, JSTaggedValue::Undefined()); in InitializeJSObject()
1230 JSArrayBuffer::Cast(*obj)->SetArrayBufferData(thread_, JSTaggedValue::Undefined()); in InitializeJSObject()
1236 JSPromise::Cast(*obj)->SetPromiseResult(thread_, JSTaggedValue::Undefined()); in InitializeJSObject()
1237 … JSPromise::Cast(*obj)->SetPromiseRejectReactions(thread_, GetEmptyTaggedQueue().GetTaggedValue()); in InitializeJSObject()
1238 …JSPromise::Cast(*obj)->SetPromiseFulfillReactions(thread_, GetEmptyTaggedQueue().GetTaggedValue()); in InitializeJSObject()
1243 JSDataView::Cast(*obj)->SetDataView(thread_, JSTaggedValue(false)); in InitializeJSObject()
1244 JSDataView::Cast(*obj)->SetViewedArrayBuffer(thread_, JSTaggedValue::Undefined()); in InitializeJSObject()
1250 JSAPIArrayList::Cast(*obj)->SetLength(thread_, JSTaggedValue(0)); in InitializeJSObject()
1255 JSAPIHashMap::Cast(*obj)->SetTable(thread_, JSTaggedValue::Undefined()); in InitializeJSObject()
1260 JSAPIHashSet::Cast(*obj)->SetTable(thread_, JSTaggedValue::Undefined()); in InitializeJSObject()
1264 JSAPITreeMap::Cast(*obj)->SetTreeMap(thread_, JSTaggedValue::Undefined()); in InitializeJSObject()
1268 JSAPITreeSet::Cast(*obj)->SetTreeSet(thread_, JSTaggedValue::Undefined()); in InitializeJSObject()
1272 JSAPIQueue::Cast(*obj)->SetLength(thread_, JSTaggedValue(0)); in InitializeJSObject()
1279 JSAPIPlainArray::Cast(*obj)->SetValues(thread_, JSTaggedValue(0)); in InitializeJSObject()
1280 JSAPIPlainArray::Cast(*obj)->SetKeys(thread_, JSTaggedValue(0)); in InitializeJSObject()
1294 JSAPILightWeightMap::Cast(*obj)->SetHashes(thread_, JSTaggedValue::Undefined()); in InitializeJSObject()
1295 JSAPILightWeightMap::Cast(*obj)->SetKeys(thread_, JSTaggedValue::Undefined()); in InitializeJSObject()
1296 JSAPILightWeightMap::Cast(*obj)->SetValues(thread_, JSTaggedValue::Undefined()); in InitializeJSObject()
1301 JSAPILightWeightSet::Cast(*obj)->SetHashes(thread_, JSTaggedValue::Undefined()); in InitializeJSObject()
1302 JSAPILightWeightSet::Cast(*obj)->SetValues(thread_, JSTaggedValue::Undefined()); in InitializeJSObject()
1310 JSAPIList::Cast(*obj)->SetSingleList(thread_, JSTaggedValue::Undefined()); in InitializeJSObject()
1314 JSAPILinkedList::Cast(*obj)->SetDoubleList(thread_, JSTaggedValue::Undefined()); in InitializeJSObject()
1318 JSAsyncFuncObject::Cast(*obj)->SetGeneratorContext(thread_, JSTaggedValue::Undefined()); in InitializeJSObject()
1319 JSAsyncFuncObject::Cast(*obj)->SetResumeResult(thread_, JSTaggedValue::Undefined()); in InitializeJSObject()
1320 JSAsyncFuncObject::Cast(*obj)->SetPromise(thread_, JSTaggedValue::Undefined()); in InitializeJSObject()
1324 JSFunction::InitializeJSFunction(thread_, JSHandle<JSFunction>(obj)); in InitializeJSObject()
1327 JSFunction::InitializeJSFunction(thread_, JSHandle<JSFunction>(obj)); in InitializeJSObject()
1330 JSFunction::InitializeJSFunction(thread_, JSHandle<JSFunction>(obj)); in InitializeJSObject()
1331 … JSProxyRevocFunction::Cast(*obj)->SetRevocableProxy(thread_, JSTaggedValue::Undefined()); in InitializeJSObject()
1334 JSFunction::InitializeJSFunction(thread_, JSHandle<JSFunction>(obj)); in InitializeJSObject()
1335 JSPromiseReactionsFunction::Cast(*obj)->SetPromise(thread_, JSTaggedValue::Undefined()); in InitializeJSObject()
1336 … JSPromiseReactionsFunction::Cast(*obj)->SetAlreadyResolved(thread_, JSTaggedValue::Undefined()); in InitializeJSObject()
1339 JSFunction::InitializeJSFunction(thread_, JSHandle<JSFunction>(obj)); in InitializeJSObject()
1340 … JSPromiseExecutorFunction::Cast(*obj)->SetCapability(thread_, JSTaggedValue::Undefined()); in InitializeJSObject()
1343 JSFunction::InitializeJSFunction(thread_, JSHandle<JSFunction>(obj)); in InitializeJSObject()
1344 … JSAsyncModuleFulfilledFunction::Cast(*obj)->SetModule(thread_, JSTaggedValue::Undefined()); in InitializeJSObject()
1347 JSFunction::InitializeJSFunction(thread_, JSHandle<JSFunction>(obj)); in InitializeJSObject()
1348 … JSAsyncModuleRejectedFunction::Cast(*obj)->SetModule(thread_, JSTaggedValue::Undefined()); in InitializeJSObject()
1351 JSFunction::InitializeJSFunction(thread_, JSHandle<JSFunction>(obj)); in InitializeJSObject()
1352 JSAsyncGeneratorResNextRetProRstFtn::Cast(*obj)->SetAsyncGeneratorObject(thread_, in InitializeJSObject()
1356 JSFunction::InitializeJSFunction(thread_, JSHandle<JSFunction>(obj)); in InitializeJSObject()
1357 … JSPromiseAllResolveElementFunction::Cast(*obj)->SetIndex(thread_, JSTaggedValue::Undefined()); in InitializeJSObject()
1358 … JSPromiseAllResolveElementFunction::Cast(*obj)->SetValues(thread_, JSTaggedValue::Undefined()); in InitializeJSObject()
1359 …JSPromiseAllResolveElementFunction::Cast(*obj)->SetCapabilities(thread_, JSTaggedValue::Undefined(… in InitializeJSObject()
1360 …JSPromiseAllResolveElementFunction::Cast(*obj)->SetRemainingElements(thread_, JSTaggedValue::Undef… in InitializeJSObject()
1361 …JSPromiseAllResolveElementFunction::Cast(*obj)->SetAlreadyCalled(thread_, JSTaggedValue::Undefined… in InitializeJSObject()
1364 JSFunction::InitializeJSFunction(thread_, JSHandle<JSFunction>(obj)); in InitializeJSObject()
1366 … JSPromiseAnyRejectElementFunction::Cast(*obj)->SetErrors(thread_, JSTaggedValue::Undefined()); in InitializeJSObject()
1367 … JSPromiseAnyRejectElementFunction::Cast(*obj)->SetCapability(thread_, JSTaggedValue::Undefined()); in InitializeJSObject()
1368 …JSPromiseAnyRejectElementFunction::Cast(*obj)->SetRemainingElements(thread_, JSTaggedValue::Undefi… in InitializeJSObject()
1369 …JSPromiseAnyRejectElementFunction::Cast(*obj)->SetAlreadyCalled(thread_, JSTaggedValue::Undefined(… in InitializeJSObject()
1372 JSFunction::InitializeJSFunction(thread_, JSHandle<JSFunction>(obj)); in InitializeJSObject()
1374 … JSPromiseAllSettledElementFunction::Cast(*obj)->SetValues(thread_, JSTaggedValue::Undefined()); in InitializeJSObject()
1375 …JSPromiseAllSettledElementFunction::Cast(*obj)->SetCapability(thread_, JSTaggedValue::Undefined()); in InitializeJSObject()
1376 …JSPromiseAllSettledElementFunction::Cast(*obj)->SetRemainingElements(thread_, JSTaggedValue::Undef… in InitializeJSObject()
1377 …JSPromiseAllSettledElementFunction::Cast(*obj)->SetAlreadyCalled(thread_, JSTaggedValue::Undefined… in InitializeJSObject()
1380 JSFunction::InitializeJSFunction(thread_, JSHandle<JSFunction>(obj)); in InitializeJSObject()
1381 JSPromiseFinallyFunction::Cast(*obj)->SetOnFinally(thread_, JSTaggedValue::Undefined()); in InitializeJSObject()
1382 … JSPromiseFinallyFunction::Cast(*obj)->SetConstructor(thread_, JSTaggedValue::Undefined()); in InitializeJSObject()
1385 JSFunction::InitializeJSFunction(thread_, JSHandle<JSFunction>(obj)); in InitializeJSObject()
1386 … JSPromiseValueThunkOrThrowerFunction::Cast(*obj)->SetResult(thread_, JSTaggedValue::Undefined()); in InitializeJSObject()
1389 JSFunction::InitializeJSFunction(thread_, JSHandle<JSFunction>(obj)); in InitializeJSObject()
1390 JSIntlBoundFunction::Cast(*obj)->SetNumberFormat(thread_, JSTaggedValue::Undefined()); in InitializeJSObject()
1391 JSIntlBoundFunction::Cast(*obj)->SetDateTimeFormat(thread_, JSTaggedValue::Undefined()); in InitializeJSObject()
1392 JSIntlBoundFunction::Cast(*obj)->SetCollator(thread_, JSTaggedValue::Undefined()); in InitializeJSObject()
1395 JSBoundFunction::Cast(*obj)->SetMethod(thread_, JSTaggedValue::Undefined()); in InitializeJSObject()
1396 JSBoundFunction::Cast(*obj)->SetBoundTarget(thread_, JSTaggedValue::Undefined()); in InitializeJSObject()
1397 JSBoundFunction::Cast(*obj)->SetBoundThis(thread_, JSTaggedValue::Undefined()); in InitializeJSObject()
1398 JSBoundFunction::Cast(*obj)->SetBoundArguments(thread_, JSTaggedValue::Undefined()); in InitializeJSObject()
1421 CjsModule::Cast(*obj)->SetId(thread_, JSTaggedValue::Undefined()); in InitializeJSObject()
1422 CjsModule::Cast(*obj)->SetExports(thread_, JSTaggedValue::Undefined()); in InitializeJSObject()
1423 CjsModule::Cast(*obj)->SetPath(thread_, JSTaggedValue::Undefined()); in InitializeJSObject()
1424 CjsModule::Cast(*obj)->SetFilename(thread_, JSTaggedValue::Undefined()); in InitializeJSObject()
1428 CjsExports::Cast(*obj)->SetExports(thread_, JSTaggedValue::Undefined()); in InitializeJSObject()
1431 CjsRequire::Cast(*obj)->SetCache(thread_, JSTaggedValue::Undefined()); in InitializeJSObject()
1432 CjsRequire::Cast(*obj)->SetParent(thread_, JSTaggedValue::Undefined()); in InitializeJSObject()
1444 const GlobalEnvConstants *globalConst = thread_->GetFirstGlobalConst(); in FillFreeObject()
1515 …JSHandle<JSHClass> hclass(thread_, thread_->GlobalConstants()->GetObjectClass().GetTaggedObject()); in OrdinaryNewJSObjectCreate()
1516 JSHandle<JSHClass> newClass = JSHClass::TransProtoWithoutLayout(thread_, hclass, protoValue); in OrdinaryNewJSObjectCreate()
1565 const GlobalEnvConstants *globalConst = thread_->GlobalConstants(); in CreateFunctionClass()
1584 layoutInfoHandle->AddKey(thread_, fieldOrder, globalConst->GetLengthString(), attributes); in CreateFunctionClass()
1595 layoutInfoHandle->AddKey(thread_, fieldOrder, in CreateFunctionClass()
1596thread_->GlobalConstants()->GetHandledNameString().GetTaggedValue(), attributes); in CreateFunctionClass()
1606 … layoutInfoHandle->AddKey(thread_, fieldOrder, globalConst->GetPrototypeString(), attributes); in CreateFunctionClass()
1614 … layoutInfoHandle->AddKey(thread_, fieldOrder, globalConst->GetPrototypeString(), attributes); in CreateFunctionClass()
1619 functionClass->SetLayout(thread_, layoutInfoHandle); in CreateFunctionClass()
1634 const GlobalEnvConstants *globalConst = thread_->GlobalConstants(); in CreateBoundFunctionClass()
1642 layoutInfoHandle->AddKey(thread_, fieldOrder, globalConst->GetLengthString(), attributes); in CreateBoundFunctionClass()
1653 layoutInfoHandle->AddKey(thread_, fieldOrder, in CreateBoundFunctionClass()
1659 hclass->SetLayout(thread_, layoutInfoHandle); in CreateBoundFunctionClass()
1674 layout->AddKey(thread_, ClassInfoExtractor::CONSTRUCTOR_INDEX, in CreateDefaultClassPrototypeHClass()
1675 thread_->GlobalConstants()->GetConstructorString(), attributes); in CreateDefaultClassPrototypeHClass()
1678 defaultHclass->SetLayout(thread_, layout); in CreateDefaultClassPrototypeHClass()
1691 …array->Set(thread_, ClassInfoExtractor::LENGTH_INDEX, thread_->GlobalConstants()->GetLengthString(… in CreateDefaultClassConstructorHClass()
1692 … array->Set(thread_, ClassInfoExtractor::NAME_INDEX, thread_->GlobalConstants()->GetNameString()); in CreateDefaultClassConstructorHClass()
1693 …array->Set(thread_, ClassInfoExtractor::PROTOTYPE_INDEX, thread_->GlobalConstants()->GetPrototypeS… in CreateDefaultClassConstructorHClass()
1704 layout->AddKey(thread_, index, array->Get(index), attributes); in CreateDefaultClassConstructorHClass()
1708 defaultHclass->SetLayout(thread_, layout); in CreateDefaultClassConstructorHClass()
1719 JSFunction::InitializeJSFunction(thread_, function, method->GetFunctionKind()); in NewSFunctionByHClass()
1720 function->SetMethod(thread_, method); in NewSFunctionByHClass()
1752 JSFunction::InitializeJSFunction(thread_, function, method->GetFunctionKind()); in NewJSFunctionByHClass()
1753 function->SetMethod(thread_, method); in NewJSFunctionByHClass()
1764 JSFunction::InitializeJSFunction(thread_, function, kind); in NewJSFunctionByHClass()
1765 function->SetMethod(thread_, method); in NewJSFunctionByHClass()
1775 JSHClass::Cast(thread_->GlobalConstants()->GetMethodClass().GetTaggedObject())); in NewMethod()
1778 JSHClass::Cast(thread_->GlobalConstants()->GetMethodClass().GetTaggedObject())); in NewMethod()
1780 JSHandle<Method> method(thread_, header); in NewMethod()
1793 method->SetConstantPool(thread_, JSTaggedValue::Undefined()); in NewMethod()
1794 method->SetProfileTypeInfo(thread_, JSTaggedValue::Undefined()); in NewMethod()
1795 method->SetModule(thread_, JSTaggedValue::Undefined()); in NewMethod()
1796 method->SetMachineCode(thread_, JSTaggedValue::Undefined()); in NewMethod()
1806 method = Method::Create(thread_, jsPandaFile, methodLiteral); in NewMethod()
1809 method->SetConstantPool(thread_, constpool); in NewMethod()
1812 method->SetModule(thread_, module); in NewMethod()
1815 thread_->GetCurrentEcmaContext()->GetAOTFileManager()-> in NewMethod()
1853 const GlobalEnvConstants *globalConst = thread_->GlobalConstants(); in NewJSBoundFunction()
1859 bundleFunction->SetPropertyInlinedProps(thread_, JSFunction::NAME_INLINE_PROPERTY_INDEX, in NewJSBoundFunction()
1862 bundleFunction->SetPropertyInlinedProps(thread_, JSFunction::LENGTH_INLINE_PROPERTY_INDEX, in NewJSBoundFunction()
1865 bundleFunction->SetBoundTarget(thread_, target); in NewJSBoundFunction()
1866 bundleFunction->SetBoundThis(thread_, boundThis); in NewJSBoundFunction()
1867 bundleFunction->SetBoundArguments(thread_, args); in NewJSBoundFunction()
1872 …bundleFunction->SetMethod(thread_, vm_->GetMethodByIndex(MethodIndex::BUILTINS_GLOBAL_CALL_JS_BOUN… in NewJSBoundFunction()
1882 intlBoundFunc->SetNumberFormat(thread_, JSTaggedValue::Undefined()); in NewJSIntlBoundFunction()
1883 intlBoundFunc->SetDateTimeFormat(thread_, JSTaggedValue::Undefined()); in NewJSIntlBoundFunction()
1884 intlBoundFunc->SetCollator(thread_, JSTaggedValue::Undefined()); in NewJSIntlBoundFunction()
1886 JSFunction::InitializeJSFunction(thread_, function); in NewJSIntlBoundFunction()
1887 function->SetMethod(thread_, vm_->GetMethodByIndex(idx)); in NewJSIntlBoundFunction()
1888 JSFunction::SetFunctionLength(thread_, function, JSTaggedValue(functionLength)); in NewJSIntlBoundFunction()
1889 const GlobalEnvConstants *globalConst = thread_->GlobalConstants(); in NewJSIntlBoundFunction()
1892 PropertyDescriptor nameDesc(thread_, emptyString, false, false, true); in NewJSIntlBoundFunction()
1893 …JSTaggedValue::DefinePropertyOrThrow(thread_, JSHandle<JSTaggedValue>::Cast(function), nameKey, na… in NewJSIntlBoundFunction()
1894 RETURN_HANDLE_IF_ABRUPT_COMPLETION(JSIntlBoundFunction, thread_); in NewJSIntlBoundFunction()
1901 const GlobalEnvConstants *globalConst = thread_->GlobalConstants(); in NewJSProxyRevocFunction()
1905 revocFunction->SetRevocableProxy(thread_, JSTaggedValue::Undefined()); in NewJSProxyRevocFunction()
1906 revocFunction->SetRevocableProxy(thread_, proxy); in NewJSProxyRevocFunction()
1908 JSFunction::InitializeJSFunction(thread_, function); in NewJSProxyRevocFunction()
1909 …function->SetMethod(thread_, vm_->GetMethodByIndex(MethodIndex::BUILTINS_PROXY_INVALIDATE_PROXY_FU… in NewJSProxyRevocFunction()
1910 JSFunction::SetFunctionLength(thread_, function, JSTaggedValue(0)); in NewJSProxyRevocFunction()
1913 PropertyDescriptor nameDesc(thread_, emptyString, false, false, true); in NewJSProxyRevocFunction()
1914 …JSTaggedValue::DefinePropertyOrThrow(thread_, JSHandle<JSTaggedValue>::Cast(function), nameKey, na… in NewJSProxyRevocFunction()
1915 RETURN_HANDLE_IF_ABRUPT_COMPLETION(JSProxyRevocFunction, thread_); in NewJSProxyRevocFunction()
1926 awaitFunction->SetAsyncContext(thread_, JSTaggedValue::Undefined()); in NewJSAsyncAwaitStatusFunction()
1927 JSFunction::InitializeJSFunction(thread_, JSHandle<JSFunction>::Cast(awaitFunction)); in NewJSAsyncAwaitStatusFunction()
1928 awaitFunction->SetMethod(thread_, vm_->GetMethodByIndex(idx)); in NewJSAsyncAwaitStatusFunction()
1934 …JSHandle<JSTaggedValue> proto(thread_, JSHandle<JSFunction>::Cast(generatorFunction)->GetProtoOrHC… in NewJSGeneratorObject()
1936 JSHandle<GlobalEnv> realmHandle = JSObject::GetFunctionRealm(thread_, generatorFunction); in NewJSGeneratorObject()
1937 RETURN_HANDLE_IF_ABRUPT_COMPLETION(JSGeneratorObject, thread_); in NewJSGeneratorObject()
1942 generatorObject->SetGeneratorContext(thread_, JSTaggedValue::Undefined()); in NewJSGeneratorObject()
1943 generatorObject->SetResumeResult(thread_, JSTaggedValue::Undefined()); in NewJSGeneratorObject()
1949 …JSHandle<JSTaggedValue> proto(thread_, JSHandle<JSFunction>::Cast(generatorFunction)->GetProtoOrHC… in NewJSAsyncGeneratorObject()
1951 JSHandle<GlobalEnv> realmHandle = JSObject::GetFunctionRealm(thread_, generatorFunction); in NewJSAsyncGeneratorObject()
1952 RETURN_HANDLE_IF_ABRUPT_COMPLETION(JSAsyncGeneratorObject, thread_); in NewJSAsyncGeneratorObject()
1975 JSHClass::Cast(thread_->GlobalConstants()->GetCompletionRecordClass().GetTaggedObject())); in NewCompletionRecord()
1976 JSHandle<CompletionRecord> obj(thread_, header); in NewCompletionRecord()
1978 obj->SetValue(thread_, value); in NewCompletionRecord()
1986 JSHClass::Cast(thread_->GlobalConstants()->GetGeneratorContextClass().GetTaggedObject())); in NewGeneratorContext()
1987 JSHandle<GeneratorContext> obj(thread_, header); in NewGeneratorContext()
1988 obj->SetRegsArray(thread_, JSTaggedValue::Undefined()); in NewGeneratorContext()
1989 obj->SetMethod(thread_, JSTaggedValue::Undefined()); in NewGeneratorContext()
1990 obj->SetThis(thread_, JSTaggedValue::Undefined()); in NewGeneratorContext()
1991 obj->SetAcc(thread_, JSTaggedValue::Undefined()); in NewGeneratorContext()
1992 obj->SetGeneratorObject(thread_, JSTaggedValue::Undefined()); in NewGeneratorContext()
1993 obj->SetLexicalEnv(thread_, JSTaggedValue::Undefined()); in NewGeneratorContext()
2003 obj->SetValue(thread_, object); in NewJSPrimitiveRef()
2006 const GlobalEnvConstants *globalConst = thread_->GlobalConstants(); in NewJSPrimitiveRef()
2010 …PropertyDescriptor desc(thread_, JSHandle<JSTaggedValue>(thread_, JSTaggedValue(length)), false, f… in NewJSPrimitiveRef()
2011 … JSTaggedValue::DefinePropertyOrThrow(thread_, JSHandle<JSTaggedValue>(obj), lengthStr, desc); in NewJSPrimitiveRef()
2012 RETURN_HANDLE_IF_ABRUPT_COMPLETION(JSPrimitiveRef, thread_); in NewJSPrimitiveRef()
2057 obj->SetValue(thread_, str); in NewJSString()
2068 return JSHandle<GlobalEnv>(thread_, GlobalEnv::Cast(header)); in NewGlobalEnv()
2076 JSHClass::Cast(thread_->GlobalConstants()->GetEnvClass().GetTaggedObject()), size); in NewLexicalEnv()
2077 JSHandle<LexicalEnv> array(thread_, header); in NewLexicalEnv()
2086 JSHClass::Cast(thread_->GlobalConstants()->GetSymbolClass().GetTaggedObject())); in NewEmptySymbol()
2087 JSHandle<JSSymbol> obj(thread_, JSSymbol::Cast(header)); in NewEmptySymbol()
2088 obj->SetDescription(thread_, JSTaggedValue::Undefined()); in NewEmptySymbol()
2098 JSHClass::Cast(thread_->GlobalConstants()->GetSymbolClass().GetTaggedObject())); in NewJSSymbol()
2099 JSHandle<JSSymbol> obj(thread_, JSSymbol::Cast(header)); in NewJSSymbol()
2100 obj->SetDescription(thread_, JSTaggedValue::Undefined()); in NewJSSymbol()
2117 JSHClass::Cast(thread_->GlobalConstants()->GetSymbolClass().GetTaggedObject())); in NewPrivateNameSymbol()
2118 JSHandle<JSSymbol> obj(thread_, JSSymbol::Cast(header)); in NewPrivateNameSymbol()
2121 obj->SetDescription(thread_, name); in NewPrivateNameSymbol()
2130 JSHClass::Cast(thread_->GlobalConstants()->GetSymbolClass().GetTaggedObject())); in NewWellKnownSymbol()
2131 JSHandle<JSSymbol> obj(thread_, JSSymbol::Cast(header)); in NewWellKnownSymbol()
2134 obj->SetDescription(thread_, name); in NewWellKnownSymbol()
2143 JSHClass::Cast(thread_->GlobalConstants()->GetSymbolClass().GetTaggedObject())); in NewPublicSymbol()
2144 JSHandle<JSSymbol> obj(thread_, JSSymbol::Cast(header)); in NewPublicSymbol()
2146 obj->SetDescription(thread_, name); in NewPublicSymbol()
2157 return JSHandle<JSSymbol>(thread_, objValue); in NewSymbolWithTable()
2163 JSHandle<SymbolTable> table = SymbolTable::Insert(thread_, tableHandle, keyHandle, valueHandle); in NewSymbolWithTable()
2164 env->SetRegisterSymbols(thread_, table); in NewSymbolWithTable()
2196 JSHClass::Cast(thread_->GlobalConstants()->GetAccessorDataClass().GetTaggedObject())); in NewAccessorData()
2197 JSHandle<AccessorData> acc(thread_, AccessorData::Cast(header)); in NewAccessorData()
2198 acc->SetGetter(thread_, JSTaggedValue::Undefined()); in NewAccessorData()
2199 acc->SetSetter(thread_, JSTaggedValue::Undefined()); in NewAccessorData()
2207 JSHClass::Cast(thread_->GlobalConstants()->GetInternalAccessorClass().GetTaggedObject())); in NewInternalAccessor()
2208 JSHandle<AccessorData> obj(thread_, AccessorData::Cast(header)); in NewInternalAccessor()
2209 obj->SetGetter(thread_, JSTaggedValue::Undefined()); in NewInternalAccessor()
2210 obj->SetSetter(thread_, JSTaggedValue::Undefined()); in NewInternalAccessor()
2213 obj->SetSetter(thread_, setFunc.GetTaggedValue()); in NewInternalAccessor()
2216 obj->SetSetter(thread_, setFunc); in NewInternalAccessor()
2220 obj->SetGetter(thread_, getFunc); in NewInternalAccessor()
2228 JSHClass::Cast(thread_->GlobalConstants()->GetCapabilityRecordClass().GetTaggedObject())); in NewPromiseCapability()
2229 JSHandle<PromiseCapability> obj(thread_, header); in NewPromiseCapability()
2230 obj->SetPromise(thread_, JSTaggedValue::Undefined()); in NewPromiseCapability()
2231 obj->SetResolve(thread_, JSTaggedValue::Undefined()); in NewPromiseCapability()
2232 obj->SetReject(thread_, JSTaggedValue::Undefined()); in NewPromiseCapability()
2240 JSHClass::Cast(thread_->GlobalConstants()->GetReactionsRecordClass().GetTaggedObject())); in NewPromiseReaction()
2241 JSHandle<PromiseReaction> obj(thread_, header); in NewPromiseReaction()
2242 obj->SetPromiseCapability(thread_, JSTaggedValue::Undefined()); in NewPromiseReaction()
2243 obj->SetHandler(thread_, JSTaggedValue::Undefined()); in NewPromiseReaction()
2252 … JSHClass::Cast(thread_->GlobalConstants()->GetPromiseIteratorRecordClass().GetTaggedObject())); in NewPromiseIteratorRecord()
2253 JSHandle<PromiseIteratorRecord> obj(thread_, header); in NewPromiseIteratorRecord()
2254 obj->SetIterator(thread_, itor.GetTaggedValue()); in NewPromiseIteratorRecord()
2263 JSHClass::Cast(thread_->GlobalConstants()->GetMicroJobQueueClass().GetTaggedObject())); in NewMicroJobQueue()
2264 JSHandle<job::MicroJobQueue> obj(thread_, header); in NewMicroJobQueue()
2265 obj->SetPromiseJobQueue(thread_, GetEmptyTaggedQueue().GetTaggedValue()); in NewMicroJobQueue()
2266 obj->SetScriptJobQueue(thread_, GetEmptyTaggedQueue().GetTaggedValue()); in NewMicroJobQueue()
2275 JSHClass::Cast(thread_->GlobalConstants()->GetPendingJobClass().GetTaggedObject())); in NewPendingJob()
2276 JSHandle<job::PendingJob> obj(thread_, header); in NewPendingJob()
2277 obj->SetJob(thread_, func.GetTaggedValue()); in NewPendingJob()
2278 obj->SetArguments(thread_, argv.GetTaggedValue()); in NewPendingJob()
2293 const GlobalEnvConstants *globalConst = thread_->GlobalConstants(); in NewJSProxy()
2303 … JSHClass::Cast(thread_->GlobalConstants()->GetJSProxyOrdinaryClass().GetTaggedObject())); in NewJSProxy()
2306 JSHandle<JSProxy> proxy(thread_, header); in NewJSProxy()
2308 proxy->SetMethod(thread_, vm_->GetMethodByIndex(MethodIndex::BUILTINS_GLOBAL_CALL_JS_PROXY)); in NewJSProxy()
2309 proxy->SetTarget(thread_, target.GetTaggedValue()); in NewJSProxy()
2310 proxy->SetHandler(thread_, handler.GetTaggedValue()); in NewJSProxy()
2311 proxy->SetPrivateField(thread_, emptyObject.GetTaggedValue()); in NewJSProxy()
2320 hclass->SetClass(thread_, hclass); in NewJSRealm()
2324 auto result = TemplateMap::Create(thread_); in NewJSRealm()
2325 realmEnvHandle->SetTemplateMap(thread_, result); in NewJSRealm()
2326 realmEnvHandle->SetJSThread(thread_); in NewJSRealm()
2328 builtins.Initialize(realmEnvHandle, thread_, false, true); in NewJSRealm()
2329 JSHandle<JSTaggedValue> protoValue = thread_->GlobalConstants()->GetHandledJSRealmClass(); in NewJSRealm()
2332 realm->SetGlobalEnv(thread_, realmEnvHandle.GetTaggedValue()); in NewJSRealm()
2333 realm->SetValue(thread_, JSTaggedValue::Undefined()); in NewJSRealm()
2336 JSHandle<JSTaggedValue> realmkey(thread_->GlobalConstants()->GetHandledGlobalString()); in NewJSRealm()
2337 … PropertyDescriptor realmDesc(thread_, JSHandle<JSTaggedValue>::Cast(realmObj), true, false, true); in NewJSRealm()
2339 JSObject::DefineOwnProperty(thread_, JSHandle<JSObject>::Cast(realm), realmkey, realmDesc); in NewJSRealm()
2349 … JSHClass::Cast(thread_->GlobalConstants()->GetArrayClass().GetTaggedObject()), TaggedArray::SIZE); in NewEmptyArray()
2350 JSHandle<TaggedArray> array(thread_, header); in NewEmptyArray()
2360 …JSHClass::Cast(thread_->GlobalConstants()->GetMutantTaggedArrayClass().GetTaggedObject()), TaggedA… in NewEmptyMutantArray()
2361 JSHandle<MutantTaggedArray> array(thread_, header); in NewEmptyMutantArray()
2384 …JSHClass *arrayClass = JSHClass::Cast(thread_->GlobalConstants()->GetArrayClass().GetTaggedObject(… in NewTaggedArray()
2400 JSHandle<TaggedArray> array(thread_, header); in NewTaggedArray()
2415 if (region->InYoungSpace() && !thread_->IsConcurrentMarkingOrFinished()) { in NewAndCopyTaggedArray()
2423 dstElements->Set(thread_, i, srcElements->Get(i + k)); in NewAndCopyTaggedArray()
2427 dstElements->Set(thread_, i, JSTaggedValue::Hole()); in NewAndCopyTaggedArray()
2439 if (region->InYoungSpace() && !thread_->IsConcurrentMarkingOrFinished()) { in NewAndCopyNameDictionary()
2447 dstElements->Set(thread_, i, srcElements->Get(i)); in NewAndCopyNameDictionary()
2464 ElementAccessor::Set(thread_, arrayObj, i, value, true); in NewAndCopyJSArrayObject()
2467 ElementAccessor::Set(thread_, arrayObj, i, JSTaggedValue::Hole(), true); in NewAndCopyJSArrayObject()
2478 JSHandle<TaggedArray> srcElements(thread_, thisObjHandle->GetElements()); in NewAndCopyTaggedArrayByObject()
2483 if (region->InYoungSpace() && !thread_->IsConcurrentMarkingOrFinished()) { in NewAndCopyTaggedArrayByObject()
2491 dstElements->Set(thread_, i, ElementAccessor::Get(thisObjHandle, i + k)); in NewAndCopyTaggedArrayByObject()
2495 dstElements->Set(thread_, i, JSTaggedValue::Hole()); in NewAndCopyTaggedArrayByObject()
2507 JSHandle<MutantTaggedArray> srcElements(thread_, thisObjHandle->GetElements()); in NewAndCopyMutantTaggedArrayByObject()
2512 if (region->InYoungSpace() && !thread_->IsConcurrentMarkingOrFinished()) { in NewAndCopyMutantTaggedArrayByObject()
2523 dstElements->Set<false>(thread_, i, value); in NewAndCopyMutantTaggedArrayByObject()
2530 dstElements->Set<false>(thread_, i, value); in NewAndCopyMutantTaggedArrayByObject()
2545 auto arrayClass = JSHClass::Cast(thread_->GlobalConstants()->GetArrayClass().GetTaggedObject()); in NewTaggedArrayWithoutInit()
2557 JSHandle<TaggedArray> array(thread_, header); in NewTaggedArrayWithoutInit()
2572 …auto arrayClass = JSHClass::Cast(thread_->GlobalConstants()->GetMutantTaggedArrayClass().GetTagged… in NewMutantTaggedArrayWithoutInit()
2584 JSHandle<MutantTaggedArray> array(thread_, header); in NewMutantTaggedArrayWithoutInit()
2608 JSHClass::Cast(thread_->GlobalConstants()->GetCOWArrayClass().GetTaggedObject()), size); in NewCOWTaggedArray()
2609 JSHandle<COWTaggedArray> cowArray(thread_, header); in NewCOWTaggedArray()
2621 …JSHClass::Cast(thread_->GlobalConstants()->GetCOWMutantTaggedArrayClass().GetTaggedObject()), size… in NewCOWMutantTaggedArray()
2622 JSHandle<COWMutantTaggedArray> cowMutantTaggedArray(thread_, header); in NewCOWMutantTaggedArray()
2634 … JSHClass::Cast(thread_->GlobalConstants()->GetMutantTaggedArrayClass().GetTaggedObject()), size); in NewMutantTaggedArray()
2635 JSHandle<MutantTaggedArray> mutantTaggedArray(thread_, header); in NewMutantTaggedArray()
2648 JSHClass::Cast(thread_->GlobalConstants()->GetArrayClass().GetTaggedObject()), size); in NewTaggedHashArray()
2649 JSHandle<TaggedHashArray> array(thread_, header); in NewTaggedHashArray()
2658 …JSHClass *arrayClass = JSHClass::Cast(thread_->GlobalConstants()->GetByteArrayClass().GetTaggedObj… in NewByteArray()
2660 JSHandle<ByteArray> array(thread_, header); in NewByteArray()
2686 const GlobalEnvConstants *globalConst = thread_->GlobalConstants(); in NewLinkedNode()
2689 JSHandle<LinkedNode> node(thread_, header); in NewLinkedNode()
2690 node->InitLinkedNode(thread_, hash, key, value, next); in NewLinkedNode()
2699 const GlobalEnvConstants *globalConst = thread_->GlobalConstants(); in NewTreeNode()
2702 JSHandle<RBTreeNode> treenode(thread_, header); in NewTreeNode()
2703 treenode->InitRBTreeNode(thread_, hash, key, value, 1); in NewTreeNode()
2714 JSHClass::Cast(thread_->GlobalConstants()->GetDictionaryClass().GetTaggedObject()), size); in NewDictionaryArray()
2715 JSHandle<TaggedArray> array(thread_, header); in NewDictionaryArray()
2731 …arrayClass = JSHClass::Cast(thread_->GlobalConstants()->GetMutantTaggedArrayClass().GetTaggedObjec… in ExtendArray()
2733 arrayClass = JSHClass::Cast(thread_->GlobalConstants()->GetArrayClass().GetTaggedObject()); in ExtendArray()
2736 JSHandle<TaggedArray> newArray(thread_, header); in ExtendArray()
2744 newArray->Set<false>(thread_, i, value); in ExtendArray()
2746 newArray->Set(thread_, i, value); in ExtendArray()
2753 newArray->Set<false>(thread_, i, specialHole); in ExtendArray()
2755 newArray->Set(thread_, i, initVal); in ExtendArray()
2776 JSHClass::Cast(thread_->GlobalConstants()->GetArrayClass().GetTaggedObject()), size); in CopyPartArray()
2777 JSHandle<TaggedArray> newArray(thread_, header); in CopyPartArray()
2785 newArray->Set(thread_, i, value); in CopyPartArray()
2806 … cowArrayClass = JSHClass::Cast(thread_->GlobalConstants()->GetCOWMutantTaggedArrayClass() in CopyArray()
2809 … cowArrayClass = JSHClass::Cast(thread_->GlobalConstants()->GetCOWArrayClass().GetTaggedObject()); in CopyArray()
2815 …arrayClass = JSHClass::Cast(thread_->GlobalConstants()->GetMutantTaggedArrayClass().GetTaggedObjec… in CopyArray()
2817 … arrayClass = JSHClass::Cast(thread_->GlobalConstants()->GetArrayClass().GetTaggedObject()); in CopyArray()
2822 JSHandle<TaggedArray> newArray(thread_, header); in CopyArray()
2829 newArray->Set<false>(thread_, i, value); in CopyArray()
2831 newArray->Set(thread_, i, value); in CopyArray()
2845 JSHClass::Cast(thread_->GlobalConstants()->GetArrayClass().GetTaggedObject()), size); in CopyFromEnumCache()
2846 JSHandle<TaggedArray> newArray(thread_, header); in CopyFromEnumCache()
2852 newArray->Set(thread_, i, value); in CopyFromEnumCache()
2863 layoutInfoHandle->Initialize(thread_); in CreateLayoutInfo()
2875 JSHandle<LayoutInfo>::Cast(newArray)->Initialize(thread_, oldArray->GetExtraLength()); in ExtendLayoutInfo()
2880 newArray->Set(thread_, i, value); in ExtendLayoutInfo()
2897 newArr->AddKey(thread_, i, sp[i].key_, PropertyAttributes(sp[i].attr_)); in CopyAndReSort()
2908 JSHClass::Cast(thread_->GlobalConstants()->GetConstantPoolClass().GetTaggedObject()), size); in NewConstantPool()
2909 JSHandle<ConstantPool> array(thread_, header); in NewConstantPool()
2910 array->InitializeWithSpecialValue(thread_, JSTaggedValue::Hole(), capacity); in NewConstantPool()
2918 JSHClass::Cast(thread_->GlobalConstants()->GetProgramClass().GetTaggedObject())); in NewProgram()
2919 JSHandle<Program> p(thread_, header); in NewProgram()
2921 p->SetMainFunction(thread_, JSTaggedValue::Undefined()); in NewProgram()
2933 moduleNamespace->SetModule(thread_, JSTaggedValue::Undefined()); in NewModuleNamespace()
2934 moduleNamespace->SetExports(thread_, JSTaggedValue::Undefined()); in NewModuleNamespace()
2935 moduleNamespace->SetDeregisterProcession(thread_, JSTaggedValue::Undefined()); in NewModuleNamespace()
2968 return JSHandle<EcmaString>(thread_->GlobalConstants()->GetHandledEmptyString()); in GetEmptyString()
2973 return JSHandle<TaggedArray>(thread_->GlobalConstants()->GetHandledEmptyArray()); in EmptyArray()
2978 return JSHandle<MutantTaggedArray>(thread_->GlobalConstants()->GetHandledEmptyArray()); in EmptyMutantArray()
2989 …return JSHandle<EcmaString>(thread_, stringTable->GetOrInternString(utf8Data, utf8Len, canBeCompre… in GetStringFromStringTable()
2999 …return JSHandle<EcmaString>(thread_, stringTable->CreateAndInternStringNonMovable(utf8Data, utf8Le… in GetStringFromStringTableNonMovable()
3010 …return JSHandle<EcmaString>(thread_, stringTable->GetOrInternString(utf16Data, utf16Len, canBeComp… in GetStringFromStringTable()
3020 return JSHandle<EcmaString>(thread_, stringTable->GetOrInternString(string)); in GetStringFromStringTable()
3047 JSHClass::Cast(thread_->GlobalConstants()->GetPropertyBoxClass().GetTaggedObject())); in NewPropertyBox()
3048 JSHandle<PropertyBox> box(thread_, header); in NewPropertyBox()
3049 box->SetValue(thread_, value); in NewPropertyBox()
3057 JSHClass::Cast(thread_->GlobalConstants()->GetProtoChangeMarkerClass().GetTaggedObject())); in NewProtoChangeMarker()
3058 JSHandle<ProtoChangeMarker> marker(thread_, header); in NewProtoChangeMarker()
3067 JSHClass::Cast(thread_->GlobalConstants()->GetMarkerCellClass().GetTaggedObject())); in NewMarkerCell()
3068 JSHandle<MarkerCell> marker(thread_, header); in NewMarkerCell()
3077 JSHClass::Cast(thread_->GlobalConstants()->GetProtoChangeDetailsClass().GetTaggedObject())); in NewProtoChangeDetails()
3078 JSHandle<ProtoChangeDetails> protoInfo(thread_, header); in NewProtoChangeDetails()
3079 protoInfo->SetChangeListener(thread_, JSTaggedValue::Undefined()); in NewProtoChangeDetails()
3091 … JSHClass::Cast(thread_->GlobalConstants()->GetProfileTypeInfoClass().GetTaggedObject()), size); in NewProfileTypeInfo()
3092 JSHandle<ProfileTypeInfo> array(thread_, header); in NewProfileTypeInfo()
3107 JSHClass::Cast(thread_->GlobalConstants()->GetBigIntClass().GetTaggedObject()), size); in NewBigInt()
3108 JSHandle<BigInt> bigint(thread_, header); in NewBigInt()
3119 …if (vm_->GetJSOptions().EnableForceGC() && vm_->IsInitialized() && thread_->IsAllContextsInitializ… in NewObjectHook()
3136 queue->SetStart(thread_, JSTaggedValue(0)); // equal to 0 when add 1. in NewTaggedQueue()
3137 queue->SetEnd(thread_, JSTaggedValue(0)); in NewTaggedQueue()
3138 queue->SetCapacity(thread_, JSTaggedValue(length)); in NewTaggedQueue()
3145 return JSHandle<TaggedQueue>(thread_->GlobalConstants()->GetHandledEmptyTaggedQueue()); in GetEmptyTaggedQueue()
3152 const GlobalEnvConstants *globalConst = thread_->GlobalConstants(); in NewJSSetIterator()
3154 hclassHandle->SetPrototype(thread_, protoValue); in NewJSSetIterator()
3157 iter->SetIteratedSet(thread_, set->GetLinkedSet()); in NewJSSetIterator()
3169 const GlobalEnvConstants *globalConst = thread_->GlobalConstants(); in NewJSRegExpIterator()
3171 hclassHandle->SetPrototype(thread_, protoValue); in NewJSRegExpIterator()
3174 iter->SetIteratingRegExp(thread_, matcher.GetTaggedValue()); in NewJSRegExpIterator()
3175 iter->SetIteratedString(thread_, inputStr.GetTaggedValue()); in NewJSRegExpIterator()
3186 const GlobalEnvConstants *globalConst = thread_->GlobalConstants(); in NewJSMapIterator()
3188 hclassHandle->SetPrototype(thread_, protoValue); in NewJSMapIterator()
3191 iter->SetIteratedMap(thread_, map->GetLinkedMap()); in NewJSMapIterator()
3201 const GlobalEnvConstants *globalConst = thread_->GlobalConstants(); in NewJSAPIHashMapIterator()
3203 JSHandle<JSTaggedValue> proto(thread_, globalConst->GetHashMapIteratorPrototype()); in NewJSAPIHashMapIterator()
3205 hclassHandle->SetPrototype(thread_, proto); in NewJSAPIHashMapIterator()
3208 iter->SetCurrentNodeResult(thread_, undefinedHandle); in NewJSAPIHashMapIterator()
3209 iter->SetIteratedHashMap(thread_, hashMap); in NewJSAPIHashMapIterator()
3211 iter->SetTaggedQueue(thread_, JSTaggedValue::Undefined()); in NewJSAPIHashMapIterator()
3213 iter->SetTaggedQueue(thread_, queue); in NewJSAPIHashMapIterator()
3222 const GlobalEnvConstants *globalConst = thread_->GlobalConstants(); in NewJSAPIHashSetIterator()
3224 JSHandle<JSTaggedValue> proto(thread_, globalConst->GetHashSetIteratorPrototype()); in NewJSAPIHashSetIterator()
3226 hclassHandle->SetPrototype(thread_, proto); in NewJSAPIHashSetIterator()
3229 iter->SetCurrentNodeResult(thread_, undefinedHandle); in NewJSAPIHashSetIterator()
3230 iter->SetIteratedHashSet(thread_, hashSet); in NewJSAPIHashSetIterator()
3233 iter->SetTaggedQueue(thread_, JSTaggedValue::Undefined()); in NewJSAPIHashSetIterator()
3235 iter->SetTaggedQueue(thread_, queue); in NewJSAPIHashSetIterator()
3244 const GlobalEnvConstants *globalConst = thread_->GlobalConstants(); in NewJSArrayIterator()
3246 hclassHandle->SetPrototype(thread_, protoValue); in NewJSArrayIterator()
3249 iter->SetIteratedArray(thread_, array); in NewJSArrayIterator()
3262 reactionsFunction->SetPromise(thread_, JSTaggedValue::Hole()); in CreateJSPromiseReactionsFunction()
3263 reactionsFunction->SetAlreadyResolved(thread_, JSTaggedValue::Hole()); in CreateJSPromiseReactionsFunction()
3265 JSFunction::InitializeJSFunction(thread_, function); in CreateJSPromiseReactionsFunction()
3266 reactionsFunction->SetMethod(thread_, vm_->GetMethodByIndex(idx)); in CreateJSPromiseReactionsFunction()
3267 JSFunction::SetFunctionLength(thread_, function, JSTaggedValue(1)); in CreateJSPromiseReactionsFunction()
3277 executorFunction->SetCapability(thread_, JSTaggedValue::Undefined()); in CreateJSPromiseExecutorFunction()
3279 JSFunction::InitializeJSFunction(thread_, function); in CreateJSPromiseExecutorFunction()
3281 thread_, vm_->GetMethodByIndex(MethodIndex::BUILTINS_PROMISE_HANDLER_EXECUTOR)); in CreateJSPromiseExecutorFunction()
3282 JSFunction::SetFunctionLength(thread_, function, JSTaggedValue(FunctionLength::TWO)); in CreateJSPromiseExecutorFunction()
3292 fulfilledFunction->SetModule(thread_, JSTaggedValue::Undefined()); in CreateJSAsyncModuleFulfilledFunction()
3294 JSFunction::InitializeJSFunction(thread_, function); in CreateJSAsyncModuleFulfilledFunction()
3296 thread_, vm_->GetMethodByIndex(MethodIndex::BUILTINS_ASYNC_MODULE_FULFILLED_FUNCTION)); in CreateJSAsyncModuleFulfilledFunction()
3297 JSFunction::SetFunctionLength(thread_, function, JSTaggedValue(FunctionLength::ONE)); in CreateJSAsyncModuleFulfilledFunction()
3307 rejectedFunction->SetModule(thread_, JSTaggedValue::Undefined()); in CreateJSAsyncModuleRejectedFunction()
3309 JSFunction::InitializeJSFunction(thread_, function); in CreateJSAsyncModuleRejectedFunction()
3311 thread_, vm_->GetMethodByIndex(MethodIndex::BUILTINS_ASYNC_MODULE_REJECTED_FUNCTION)); in CreateJSAsyncModuleRejectedFunction()
3312 JSFunction::SetFunctionLength(thread_, function, JSTaggedValue(FunctionLength::ONE)); in CreateJSAsyncModuleRejectedFunction()
3322 JSFunction::InitializeJSFunction(thread_, JSHandle<JSFunction>::Cast(function)); in NewJSPromiseAllResolveElementFunction()
3324thread_, vm_->GetMethodByIndex(MethodIndex::BUILTINS_PROMISE_HANDLER_RESOLVE_ELEMENT_FUNCTION)); in NewJSPromiseAllResolveElementFunction()
3325 function->SetIndex(thread_, JSTaggedValue::Undefined()); in NewJSPromiseAllResolveElementFunction()
3326 function->SetValues(thread_, JSTaggedValue::Undefined()); in NewJSPromiseAllResolveElementFunction()
3327 function->SetCapabilities(thread_, JSTaggedValue::Undefined()); in NewJSPromiseAllResolveElementFunction()
3328 function->SetRemainingElements(thread_, JSTaggedValue::Undefined()); in NewJSPromiseAllResolveElementFunction()
3329 function->SetAlreadyCalled(thread_, JSTaggedValue::Undefined()); in NewJSPromiseAllResolveElementFunction()
3330 JSFunction::SetFunctionLength(thread_, JSHandle<JSFunction>::Cast(function), JSTaggedValue(1)); in NewJSPromiseAllResolveElementFunction()
3340 JSFunction::InitializeJSFunction(thread_, JSHandle<JSFunction>::Cast(function)); in NewJSPromiseAnyRejectElementFunction()
3342thread_, vm_->GetMethodByIndex(MethodIndex::BUILTINS_PROMISE_HANDLER_ANY_REJECT_ELEMENT_FUNCTION)); in NewJSPromiseAnyRejectElementFunction()
3344 function->SetErrors(thread_, JSTaggedValue::Undefined()); in NewJSPromiseAnyRejectElementFunction()
3345 function->SetCapability(thread_, JSTaggedValue::Undefined()); in NewJSPromiseAnyRejectElementFunction()
3346 function->SetRemainingElements(thread_, JSTaggedValue::Undefined()); in NewJSPromiseAnyRejectElementFunction()
3347 function->SetAlreadyCalled(thread_, JSTaggedValue::Undefined()); in NewJSPromiseAnyRejectElementFunction()
3348 JSFunction::SetFunctionLength(thread_, JSHandle<JSFunction>::Cast(function), JSTaggedValue(1)); in NewJSPromiseAnyRejectElementFunction()
3358 JSFunction::InitializeJSFunction(thread_, JSHandle<JSFunction>::Cast(function)); in NewJSPromiseAllSettledResolveElementFunction()
3359 function->SetMethod(thread_, in NewJSPromiseAllSettledResolveElementFunction()
3362 function->SetValues(thread_, JSTaggedValue::Undefined()); in NewJSPromiseAllSettledResolveElementFunction()
3363 function->SetCapability(thread_, JSTaggedValue::Undefined()); in NewJSPromiseAllSettledResolveElementFunction()
3364 function->SetRemainingElements(thread_, JSTaggedValue::Undefined()); in NewJSPromiseAllSettledResolveElementFunction()
3365 function->SetAlreadyCalled(thread_, JSTaggedValue::Undefined()); in NewJSPromiseAllSettledResolveElementFunction()
3366 JSFunction::SetFunctionLength(thread_, JSHandle<JSFunction>::Cast(function), JSTaggedValue(1)); in NewJSPromiseAllSettledResolveElementFunction()
3376 JSFunction::InitializeJSFunction(thread_, JSHandle<JSFunction>::Cast(function)); in NewJSPromiseAllSettledRejectElementFunction()
3377 function->SetMethod(thread_, in NewJSPromiseAllSettledRejectElementFunction()
3380 function->SetValues(thread_, JSTaggedValue::Undefined()); in NewJSPromiseAllSettledRejectElementFunction()
3381 function->SetCapability(thread_, JSTaggedValue::Undefined()); in NewJSPromiseAllSettledRejectElementFunction()
3382 function->SetRemainingElements(thread_, JSTaggedValue::Undefined()); in NewJSPromiseAllSettledRejectElementFunction()
3383 function->SetAlreadyCalled(thread_, JSTaggedValue::Undefined()); in NewJSPromiseAllSettledRejectElementFunction()
3384 JSFunction::SetFunctionLength(thread_, JSHandle<JSFunction>::Cast(function), JSTaggedValue(1)); in NewJSPromiseAllSettledRejectElementFunction()
3394 JSFunction::InitializeJSFunction(thread_, JSHandle<JSFunction>::Cast(function)); in NewJSPromiseThenFinallyFunction()
3395 …function->SetMethod(thread_, vm_->GetMethodByIndex(MethodIndex::BUILTINS_PROMISE_HANDLER_THEN_FINA… in NewJSPromiseThenFinallyFunction()
3396 function->SetConstructor(thread_, JSTaggedValue::Undefined()); in NewJSPromiseThenFinallyFunction()
3397 function->SetOnFinally(thread_, JSTaggedValue::Undefined()); in NewJSPromiseThenFinallyFunction()
3398 JSFunction::SetFunctionLength(thread_, JSHandle<JSFunction>::Cast(function), JSTaggedValue(1)); in NewJSPromiseThenFinallyFunction()
3408 JSFunction::InitializeJSFunction(thread_, JSHandle<JSFunction>::Cast(function)); in NewJSPromiseCatchFinallyFunction()
3409 …function->SetMethod(thread_, vm_->GetMethodByIndex(MethodIndex::BUILTINS_PROMISE_HANDLER_CATCH_FIN… in NewJSPromiseCatchFinallyFunction()
3410 function->SetConstructor(thread_, JSTaggedValue::Undefined()); in NewJSPromiseCatchFinallyFunction()
3411 function->SetOnFinally(thread_, JSTaggedValue::Undefined()); in NewJSPromiseCatchFinallyFunction()
3412 JSFunction::SetFunctionLength(thread_, JSHandle<JSFunction>::Cast(function), JSTaggedValue(1)); in NewJSPromiseCatchFinallyFunction()
3423 JSFunction::InitializeJSFunction(thread_, JSHandle<JSFunction>::Cast(function)); in NewJSAsyGenResNextRetProRstFulfilledFtn()
3424 …function->SetMethod(thread_, vm_->GetMethodByIndex(MethodIndex::BUILTINS_ASYNC_GENERATOR_NEXT_FULF… in NewJSAsyGenResNextRetProRstFulfilledFtn()
3425 function->SetAsyncGeneratorObject(thread_, JSTaggedValue::Undefined()); in NewJSAsyGenResNextRetProRstFulfilledFtn()
3426 JSFunction::SetFunctionLength(thread_, JSHandle<JSFunction>::Cast(function), JSTaggedValue(1)); in NewJSAsyGenResNextRetProRstFulfilledFtn()
3436 JSFunction::InitializeJSFunction(thread_, JSHandle<JSFunction>::Cast(function)); in NewJSAsyncFromSyncIterUnwarpFunction()
3438 function->SetMethod(thread_, debugVaule); in NewJSAsyncFromSyncIterUnwarpFunction()
3439 function->SetDone(thread_, JSTaggedValue::Undefined()); in NewJSAsyncFromSyncIterUnwarpFunction()
3440 JSFunction::SetFunctionLength(thread_, JSHandle<JSFunction>::Cast(function), JSTaggedValue(1)); in NewJSAsyncFromSyncIterUnwarpFunction()
3451 JSFunction::InitializeJSFunction(thread_, JSHandle<JSFunction>::Cast(function)); in NewJSAsyGenResNextRetProRstRejectedFtn()
3452 …function->SetMethod(thread_, vm_->GetMethodByIndex(MethodIndex::BUILTINS_ASYNC_GENERATOR_NEXT_REJE… in NewJSAsyGenResNextRetProRstRejectedFtn()
3453 function->SetAsyncGeneratorObject(thread_, JSTaggedValue::Undefined()); in NewJSAsyGenResNextRetProRstRejectedFtn()
3454 JSFunction::SetFunctionLength(thread_, JSHandle<JSFunction>::Cast(function), JSTaggedValue(1)); in NewJSAsyGenResNextRetProRstRejectedFtn()
3464 JSFunction::InitializeJSFunction(thread_, JSHandle<JSFunction>::Cast(function)); in NewJSPromiseValueThunkFunction()
3465 …function->SetMethod(thread_, vm_->GetMethodByIndex(MethodIndex::BUILTINS_PROMISE_HANDLER_VALUE_THU… in NewJSPromiseValueThunkFunction()
3466 function->SetResult(thread_, JSTaggedValue::Undefined()); in NewJSPromiseValueThunkFunction()
3467 JSFunction::SetFunctionLength(thread_, JSHandle<JSFunction>::Cast(function), JSTaggedValue(0)); in NewJSPromiseValueThunkFunction()
3477 JSFunction::InitializeJSFunction(thread_, JSHandle<JSFunction>::Cast(function)); in NewJSPromiseThrowerFunction()
3478 …function->SetMethod(thread_, vm_->GetMethodByIndex(MethodIndex::BUILTINS_PROMISE_HANDLER_THROWER_F… in NewJSPromiseThrowerFunction()
3479 function->SetResult(thread_, JSTaggedValue::Undefined()); in NewJSPromiseThrowerFunction()
3480 JSFunction::SetFunctionLength(thread_, JSHandle<JSFunction>::Cast(function), JSTaggedValue(0)); in NewJSPromiseThrowerFunction()
3500 … JSHClass::Cast(thread_->GlobalConstants()->GetTransitionHandlerClass().GetTaggedObject()))); in NewTransitionHandler()
3501 handler->SetHandlerInfo(thread_, JSTaggedValue::Undefined()); in NewTransitionHandler()
3502 handler->SetTransitionHClass(thread_, JSTaggedValue::Undefined()); in NewTransitionHandler()
3503 return JSHandle<TransitionHandler>(thread_, handler); in NewTransitionHandler()
3511 … JSHClass::Cast(thread_->GlobalConstants()->GetPrototypeHandlerClass().GetTaggedObject()))); in NewPrototypeHandler()
3512 JSHandle<PrototypeHandler> handler(thread_, header); in NewPrototypeHandler()
3513 handler->SetHandlerInfo(thread_, JSTaggedValue::Undefined()); in NewPrototypeHandler()
3514 handler->SetProtoCell(thread_, JSTaggedValue::Undefined()); in NewPrototypeHandler()
3515 handler->SetHolder(thread_, JSTaggedValue::Undefined()); in NewPrototypeHandler()
3524 … JSHClass::Cast(thread_->GlobalConstants()->GetTransWithProtoHandlerClass().GetTaggedObject()))); in NewTransWithProtoHandler()
3525 JSHandle<TransWithProtoHandler> handler(thread_, header); in NewTransWithProtoHandler()
3526 handler->SetHandlerInfo(thread_, JSTaggedValue::Undefined()); in NewTransWithProtoHandler()
3527 handler->SetProtoCell(thread_, JSTaggedValue::Undefined()); in NewTransWithProtoHandler()
3528 handler->SetTransitionHClass(thread_, JSTaggedValue::Undefined()); in NewTransWithProtoHandler()
3537 … JSHClass::Cast(thread_->GlobalConstants()->GetStoreTSHandlerClass().GetTaggedObject()))); in NewStoreTSHandler()
3538 JSHandle<StoreTSHandler> handler(thread_, header); in NewStoreTSHandler()
3539 handler->SetHandlerInfo(thread_, JSTaggedValue::Undefined()); in NewStoreTSHandler()
3540 handler->SetProtoCell(thread_, JSTaggedValue::Undefined()); in NewStoreTSHandler()
3541 handler->SetHolder(thread_, JSTaggedValue::Undefined()); in NewStoreTSHandler()
3549 JSHClass::Cast(thread_->GlobalConstants()->GetPromiseRecordClass().GetTaggedObject())); in NewPromiseRecord()
3550 JSHandle<PromiseRecord> obj(thread_, header); in NewPromiseRecord()
3551 obj->SetValue(thread_, JSTaggedValue::Undefined()); in NewPromiseRecord()
3559 …JSHClass::Cast(thread_->GlobalConstants()->GetPromiseResolvingFunctionsRecordClass().GetTaggedObje… in NewResolvingFunctionsRecord()
3560 JSHandle<ResolvingFunctionsRecord> obj(thread_, header); in NewResolvingFunctionsRecord()
3561 obj->SetResolveFunction(thread_, JSTaggedValue::Undefined()); in NewResolvingFunctionsRecord()
3562 obj->SetRejectFunction(thread_, JSTaggedValue::Undefined()); in NewResolvingFunctionsRecord()
3572 JSMutableHandle<JSTaggedValue> key(thread_, JSTaggedValue::Undefined()); in CreateObjectClass()
3586 layoutInfoHandle->AddKey(thread_, fieldOrder, key.GetTaggedValue(), attributes); in CreateObjectClass()
3591 objClass->SetPrototype(thread_, proto.GetTaggedValue()); in CreateObjectClass()
3594 objClass->SetLayout(thread_, layoutInfoHandle); in CreateObjectClass()
3603 JSMutableHandle<JSTaggedValue> key(thread_, JSTaggedValue::Undefined()); in SetLayoutInObjHClass()
3616 newObjHclass = JSHClass::SetPropertyOfObjHClass(thread_, newObjHclass, key, attributes); in SetLayoutInObjHClass()
3626 hclass->SetPrototype(thread_, proto.GetTaggedValue()); in CreateObjectLiteralRootHClass()
3640 env->SetObjectLiteralHClassCache(thread_, cacheArr.GetTaggedValue()); in GetObjectLiteralRootHClass()
3642 cacheArr->Set(thread_, length, objHClass); in GetObjectLiteralRootHClass()
3649 hclassCacheArr->Set(thread_, length, objHClass); in GetObjectLiteralRootHClass()
3652 return JSHandle<JSHClass>(thread_, maybeHClass); in GetObjectLiteralRootHClass()
3682 const GlobalEnvConstants *globalConst = thread_->GlobalConstants(); in CreateNullJSObject()
3698thread_->GlobalConstants()->GetMachineCodeClass().GetTaggedObject()), length + MachineCode::SIZE); in NewMachineCodeObject()
3707 JSHandle<MachineCode> codeObj(thread_, code); in NewMachineCodeObject()
3715 … JSHClass::Cast(thread_->GlobalConstants()->GetClassInfoExtractorHClass().GetTaggedObject())); in NewClassInfoExtractor()
3716 JSHandle<ClassInfoExtractor> obj(thread_, header); in NewClassInfoExtractor()
3718 obj->SetConstructorMethod(thread_, method.GetTaggedValue()); in NewClassInfoExtractor()
3720 obj->SetNonStaticKeys(thread_, emptyArray, SKIP_BARRIER); in NewClassInfoExtractor()
3721 obj->SetNonStaticProperties(thread_, emptyArray, SKIP_BARRIER); in NewClassInfoExtractor()
3722 obj->SetNonStaticElements(thread_, emptyArray, SKIP_BARRIER); in NewClassInfoExtractor()
3723 obj->SetStaticKeys(thread_, emptyArray, SKIP_BARRIER); in NewClassInfoExtractor()
3724 obj->SetStaticProperties(thread_, emptyArray, SKIP_BARRIER); in NewClassInfoExtractor()
3725 obj->SetStaticElements(thread_, emptyArray, SKIP_BARRIER); in NewClassInfoExtractor()
3734 tsPropInfoHandle->SetNumOfProperties(thread_, 0); in CreateTSObjLayoutInfo()
3743 JSHClass::Cast(thread_->GlobalConstants()->GetTSObjectTypeClass().GetTaggedObject())); in NewTSObjectType()
3744 JSHandle<TSObjectType> objectType(thread_, header); in NewTSObjectType()
3745 objectType->SetObjLayoutInfo(thread_, JSTaggedValue::Undefined()); in NewTSObjectType()
3746 objectType->SetIndexSigns(thread_, JSTaggedValue::Undefined()); in NewTSObjectType()
3750 objectType->SetObjLayoutInfo(thread_, tsPropInfo); in NewTSObjectType()
3759 JSHClass::Cast(thread_->GlobalConstants()->GetTSClassTypeClass().GetTaggedObject())); in NewTSClassType()
3760 JSHandle<TSClassType> classType(thread_, header); in NewTSClassType()
3763 classType->SetInstanceType(thread_, JSTaggedValue::Undefined()); in NewTSClassType()
3764 classType->SetConstructorType(thread_, JSTaggedValue::Undefined()); in NewTSClassType()
3765 classType->SetPrototypeType(thread_, JSTaggedValue::Undefined()); in NewTSClassType()
3766 classType->SetName(thread_, JSTaggedValue::Undefined()); in NewTSClassType()
3767 classType->SetIndexSigns(thread_, JSTaggedValue::Undefined()); in NewTSClassType()
3779 JSHClass::Cast(thread_->GlobalConstants()->GetTSInterfaceTypeClass().GetTaggedObject())); in NewTSInterfaceType()
3780 JSHandle<TSInterfaceType> interfaceType(thread_, header); in NewTSInterfaceType()
3784 interfaceType->SetExtends(thread_, extends); in NewTSInterfaceType()
3785 interfaceType->SetFields(thread_, JSTaggedValue::Undefined()); in NewTSInterfaceType()
3786 interfaceType->SetIndexSigns(thread_, JSTaggedValue::Undefined()); in NewTSInterfaceType()
3798 JSHClass::Cast(thread_->GlobalConstants()->GetTSUnionTypeClass().GetTaggedObject())); in NewTSUnionType()
3799 JSHandle<TSUnionType> unionType(thread_, header); in NewTSUnionType()
3802 unionType->SetComponents(thread_, JSTaggedValue::Undefined()); in NewTSUnionType()
3804 unionType->SetComponents(thread_, componentTypes); in NewTSUnionType()
3814 … JSHClass::Cast(thread_->GlobalConstants()->GetTSClassInstanceTypeClass().GetTaggedObject())); in NewTSClassInstanceType()
3815 JSHandle<TSClassInstanceType> classInstanceType(thread_, header); in NewTSClassInstanceType()
3828 JSHClass::Cast(thread_->GlobalConstants()->GetTSFunctionTypeClass().GetTaggedObject())); in NewTSFunctionType()
3829 JSHandle<TSFunctionType> functionType(thread_, header); in NewTSFunctionType()
3832 functionType->SetName(thread_, JSTaggedValue::Undefined()); in NewTSFunctionType()
3833 functionType->SetParameterTypes(thread_, JSTaggedValue::Undefined()); in NewTSFunctionType()
3840 functionType->SetParameterTypes(thread_, parameterTypes); in NewTSFunctionType()
3850 JSHClass::Cast(thread_->GlobalConstants()->GetTSArrayTypeClass().GetTaggedObject())); in NewTSArrayType()
3852 JSHandle<TSArrayType> arrayType(thread_, header); in NewTSArrayType()
3863 …JSHClass *arrayClass = JSHClass::Cast(thread_->GlobalConstants()->GetArrayClass().GetTaggedObject(… in NewTSTypeTable()
3866 JSHandle<TSTypeTable> table(thread_, header); in NewTSTypeTable()
3868 table->SetNumberOfTypes(thread_); in NewTSTypeTable()
3879 …JSHClass *arrayClass = JSHClass::Cast(thread_->GlobalConstants()->GetArrayClass().GetTaggedObject(… in NewTSModuleTable()
3881 JSHandle<TSModuleTable> array(thread_, header); in NewTSModuleTable()
3883 array->SetNumberOfTSTypeTables(thread_, 0); in NewTSModuleTable()
3893 … JSHClass::Cast(thread_->GlobalConstants()->GetTSIteratorInstanceTypeClass().GetTaggedObject())); in NewTSIteratorInstanceType()
3894 JSHandle<TSIteratorInstanceType> iteratorInstanceType(thread_, header); in NewTSIteratorInstanceType()
3908 JSHClass::Cast(thread_->GlobalConstants()->GetTSNamespaceTypeClass().GetTaggedObject())); in NewTSNamespaceType()
3909 JSHandle<TSNamespaceType> namespaceType(thread_, header); in NewTSNamespaceType()
3911 namespaceType->SetPropertyType(thread_, JSTaggedValue::Undefined()); in NewTSNamespaceType()
3913 namespaceType->SetPropertyType(thread_, tsPropInfo); in NewTSNamespaceType()
3981 …return JSHandle<EcmaString>(thread_, EcmaStringAccessor::CreateFromUtf8(vm_, utf8Data, utf8Len, ca… in NewFromUtf8Literal()
3988 …return JSHandle<EcmaString>(thread_, EcmaStringAccessor::CreateFromUtf8(vm_, utf8Data, utf8Len, tr… in NewFromUtf8LiteralCompress()
4002 …return JSHandle<EcmaString>(thread_, EcmaStringAccessor::CreateFromUtf16(vm_, utf16Data, utf16Len,… in NewFromUtf16Literal()
4009 …return JSHandle<EcmaString>(thread_, EcmaStringAccessor::CreateFromUtf16(vm_, utf16Data, utf16Len,… in NewFromUtf16LiteralCompress()
4016 …return JSHandle<EcmaString>(thread_, EcmaStringAccessor::CreateFromUtf16(vm_, utf16Data, utf16Len,… in NewFromUtf16LiteralNotCompress()
4035 return JSHandle<EcmaString>(thread_, stringTable->GetOrInternString(firstString, secondString)); in GetStringFromStringTable()
4041 JSHandle<JSFunction> builtinObj(thread_, thread_->GlobalConstants()->GetArrayListFunction()); in NewJSAPIArrayList()
4043 ObjectFactory *factory = thread_->GetEcmaVM()->GetFactory(); in NewJSAPIArrayList()
4045 obj->SetElements(thread_, elements); in NewJSAPIArrayList()
4053 const GlobalEnvConstants *globalConst = thread_->GlobalConstants(); in NewJSAPIArrayListIterator()
4054 JSHandle<JSTaggedValue> protoValue(thread_, globalConst->GetArrayListIteratorPrototype()); in NewJSAPIArrayListIterator()
4056 hclassHandle->SetPrototype(thread_, protoValue); in NewJSAPIArrayListIterator()
4059 iter->SetIteratedArrayList(thread_, arrayList); in NewJSAPIArrayListIterator()
4068 const GlobalEnvConstants *globalConst = thread_->GlobalConstants(); in NewJSAPILightWeightMapIterator()
4069 JSHandle<JSTaggedValue> protoValue(thread_, globalConst->GetLightWeightMapIteratorPrototype()); in NewJSAPILightWeightMapIterator()
4071 hclassHandle->SetPrototype(thread_, protoValue); in NewJSAPILightWeightMapIterator()
4074 iter->SetIteratedLightWeightMap(thread_, obj); in NewJSAPILightWeightMapIterator()
4084 const GlobalEnvConstants *globalConst = thread_->GlobalConstants(); in NewJSAPILightWeightSetIterator()
4085 JSHandle<JSTaggedValue> protoValue(thread_, globalConst->GetLightWeightSetIteratorPrototype()); in NewJSAPILightWeightSetIterator()
4087 hclassHandle->SetPrototype(thread_, protoValue); in NewJSAPILightWeightSetIterator()
4090 iter->SetIteratedLightWeightSet(thread_, obj); in NewJSAPILightWeightSetIterator()
4099 JSHandle<JSFunction> builtinObj(thread_, thread_->GlobalConstants()->GetPlainArrayFunction()); in NewJSAPIPlainArray()
4101 ObjectFactory *factory = thread_->GetEcmaVM()->GetFactory(); in NewJSAPIPlainArray()
4104 obj->SetKeys(thread_, keyArray); in NewJSAPIPlainArray()
4105 obj->SetValues(thread_, valueArray); in NewJSAPIPlainArray()
4114 …JSHandle<JSTaggedValue> protoValue(thread_, thread_->GlobalConstants()->GetPlainArrayIteratorProto… in NewJSAPIPlainArrayIterator()
4115 const GlobalEnvConstants *globalConst = thread_->GlobalConstants(); in NewJSAPIPlainArrayIterator()
4117 hclassHandle->SetPrototype(thread_, protoValue); in NewJSAPIPlainArrayIterator()
4120 iter->SetIteratedPlainArray(thread_, plainarray); in NewJSAPIPlainArrayIterator()
4129 const GlobalEnvConstants *globalConst = thread_->GlobalConstants(); in NewJSAPIStackIterator()
4130 JSHandle<JSTaggedValue> protoValue(thread_, globalConst->GetStackIteratorPrototype()); in NewJSAPIStackIterator()
4132 hclassHandle->SetPrototype(thread_, protoValue); in NewJSAPIStackIterator()
4135 iter->SetIteratedStack(thread_, stack); in NewJSAPIStackIterator()
4146 JSHClass::Cast(thread_->GlobalConstants()->GetArrayClass().GetTaggedObject()), size); in CopyDeque()
4147 JSHandle<TaggedArray> newArray(thread_, header); in CopyDeque()
4156 newArray->Set(thread_, newIndex, value); in CopyDeque()
4167 const GlobalEnvConstants *globalConst = thread_->GlobalConstants(); in NewJSAPIDequeIterator()
4168 JSHandle<JSTaggedValue> protoValue(thread_, globalConst->GetDequeIteratorPrototype()); in NewJSAPIDequeIterator()
4170 hclassHandle->SetPrototype(thread_, protoValue); in NewJSAPIDequeIterator()
4173 iter->SetIteratedDeque(thread_, deque); in NewJSAPIDequeIterator()
4184 JSHClass::Cast(thread_->GlobalConstants()->GetArrayClass().GetTaggedObject()), size); in CopyQueue()
4185 JSHandle<TaggedArray> newArray(thread_, header); in CopyQueue()
4194 newArray->Set(thread_, newIndex, value); in CopyQueue()
4205 const GlobalEnvConstants *globalConst = thread_->GlobalConstants(); in NewJSAPIQueueIterator()
4206 JSHandle<JSTaggedValue> protoValue(thread_, globalConst->GetQueueIteratorPrototype()); in NewJSAPIQueueIterator()
4208 hclassHandle->SetPrototype(thread_, protoValue); in NewJSAPIQueueIterator()
4211 iter->SetIteratedQueue(thread_, queue); // IteratedQueue in NewJSAPIQueueIterator()
4220 const GlobalEnvConstants *globalConst = thread_->GlobalConstants(); in NewJSAPITreeMapIterator()
4221 JSHandle<JSTaggedValue> proto(thread_, globalConst->GetTreeMapIteratorPrototype()); in NewJSAPITreeMapIterator()
4223 hclassHandle->SetPrototype(thread_, proto); in NewJSAPITreeMapIterator()
4226 iter->SetIteratedMap(thread_, map); in NewJSAPITreeMapIterator()
4228 iter->SetEntries(thread_, JSTaggedValue::Hole()); in NewJSAPITreeMapIterator()
4237 const GlobalEnvConstants *globalConst = thread_->GlobalConstants(); in NewJSAPITreeSetIterator()
4238 JSHandle<JSTaggedValue> proto(thread_, globalConst->GetTreeSetIteratorPrototype()); in NewJSAPITreeSetIterator()
4240 hclassHandle->SetPrototype(thread_, proto); in NewJSAPITreeSetIterator()
4243 iter->SetIteratedSet(thread_, set); in NewJSAPITreeSetIterator()
4245 iter->SetEntries(thread_, JSTaggedValue::Hole()); in NewJSAPITreeSetIterator()
4253 JSHandle<JSFunction> builtinObj(thread_, thread_->GlobalConstants()->GetVectorFunction()); in NewJSAPIVector()
4256 obj->SetElements(thread_, newVector); in NewJSAPIVector()
4264 const GlobalEnvConstants *globalConst = thread_->GlobalConstants(); in NewJSAPIVectorIterator()
4265 JSHandle<JSTaggedValue> proto(thread_, globalConst->GetVectorIteratorPrototype()); in NewJSAPIVectorIterator()
4267 hclassHandle->SetPrototype(thread_, proto); in NewJSAPIVectorIterator()
4270 iter->SetIteratedVector(thread_, vector); in NewJSAPIVectorIterator()
4278 const GlobalEnvConstants *globalConst = thread_->GlobalConstants(); in NewJSAPILinkedListIterator()
4279 JSHandle<JSTaggedValue> proto(thread_, globalConst->GetLinkedListIteratorPrototype()); in NewJSAPILinkedListIterator()
4281 hclassHandle->SetPrototype(thread_, proto); in NewJSAPILinkedListIterator()
4284 iter->SetIteratedLinkedList(thread_, linkedList->GetDoubleList()); in NewJSAPILinkedListIterator()
4294 const GlobalEnvConstants *globalConst = thread_->GlobalConstants(); in NewJSAPIListIterator()
4295 JSHandle<JSTaggedValue> proto(thread_, globalConst->GetListIteratorPrototype()); in NewJSAPIListIterator()
4297 hclassHandle->SetPrototype(thread_, proto); in NewJSAPIListIterator()
4300 iter->SetIteratedList(thread_, List->GetSingleList()); in NewJSAPIListIterator()
4310 JSHandle<JSFunction> function(thread_, thread_->GlobalConstants()->GetListFunction()); in NewJSAPIList()
4317 JSHandle<JSFunction> function(thread_, thread_->GlobalConstants()->GetLinkedListFunction()); in NewJSAPILinkedList()
4323 JSHandle<JSTaggedValue> defautValue = thread_->GlobalConstants()->GetHandledUndefined(); in NewImportEntry()
4333 JSHClass::Cast(thread_->GlobalConstants()->GetImportEntryClass().GetTaggedObject())); in NewImportEntry()
4334 JSHandle<ImportEntry> obj(thread_, header); in NewImportEntry()
4335 obj->SetModuleRequest(thread_, moduleRequest); in NewImportEntry()
4336 obj->SetImportName(thread_, importName); in NewImportEntry()
4337 obj->SetLocalName(thread_, localName); in NewImportEntry()
4343 JSHandle<JSTaggedValue> defautValue = thread_->GlobalConstants()->GetHandledUndefined(); in NewLocalExportEntry()
4352 JSHClass::Cast(thread_->GlobalConstants()->GetLocalExportEntryClass().GetTaggedObject())); in NewLocalExportEntry()
4353 JSHandle<LocalExportEntry> obj(thread_, header); in NewLocalExportEntry()
4354 obj->SetExportName(thread_, exportName); in NewLocalExportEntry()
4355 obj->SetLocalName(thread_, localName); in NewLocalExportEntry()
4362 JSHandle<JSTaggedValue> defautValue = thread_->GlobalConstants()->GetHandledUndefined(); in NewIndirectExportEntry()
4372 … JSHClass::Cast(thread_->GlobalConstants()->GetIndirectExportEntryClass().GetTaggedObject())); in NewIndirectExportEntry()
4373 JSHandle<IndirectExportEntry> obj(thread_, header); in NewIndirectExportEntry()
4374 obj->SetExportName(thread_, exportName); in NewIndirectExportEntry()
4375 obj->SetModuleRequest(thread_, moduleRequest); in NewIndirectExportEntry()
4376 obj->SetImportName(thread_, importName); in NewIndirectExportEntry()
4382 JSHandle<JSTaggedValue> defautValue = thread_->GlobalConstants()->GetHandledUndefined(); in NewStarExportEntry()
4390 JSHClass::Cast(thread_->GlobalConstants()->GetStarExportEntryClass().GetTaggedObject())); in NewStarExportEntry()
4391 JSHandle<StarExportEntry> obj(thread_, header); in NewStarExportEntry()
4392 obj->SetModuleRequest(thread_, moduleRequest); in NewStarExportEntry()
4400 JSHClass::Cast(thread_->GlobalConstants()->GetSourceTextModuleClass().GetTaggedObject())); in NewSourceTextModule()
4401 JSHandle<SourceTextModule> obj(thread_, header); in NewSourceTextModule()
4402 JSTaggedValue undefinedValue = thread_->GlobalConstants()->GetUndefined(); in NewSourceTextModule()
4403 obj->SetEnvironment(thread_, undefinedValue); in NewSourceTextModule()
4404 obj->SetNamespace(thread_, undefinedValue); in NewSourceTextModule()
4405 obj->SetEcmaModuleFilename(thread_, undefinedValue); in NewSourceTextModule()
4406 obj->SetEcmaModuleRecordName(thread_, undefinedValue); in NewSourceTextModule()
4407 obj->SetRequestedModules(thread_, undefinedValue); in NewSourceTextModule()
4408 obj->SetImportEntries(thread_, undefinedValue); in NewSourceTextModule()
4409 obj->SetLocalExportEntries(thread_, undefinedValue); in NewSourceTextModule()
4410 obj->SetIndirectExportEntries(thread_, undefinedValue); in NewSourceTextModule()
4411 obj->SetStarExportEntries(thread_, undefinedValue); in NewSourceTextModule()
4412 obj->SetNameDictionary(thread_, undefinedValue); in NewSourceTextModule()
4414 obj->SetCycleRoot(thread_, obj); in NewSourceTextModule()
4415 obj->SetTopLevelCapability(thread_, undefinedValue); in NewSourceTextModule()
4416 obj->SetAsyncParentModules(thread_, undefinedValue); in NewSourceTextModule()
4432 JSHandle<JSTaggedValue> undefinedValue = thread_->GlobalConstants()->GetHandledUndefined(); in NewResolvedBindingRecord()
4443 JSHClass::Cast(thread_->GlobalConstants()->GetResolvedBindingClass().GetTaggedObject())); in NewResolvedBindingRecord()
4444 JSHandle<ResolvedBinding> obj(thread_, header); in NewResolvedBindingRecord()
4445 obj->SetModule(thread_, module); in NewResolvedBindingRecord()
4446 obj->SetBindingName(thread_, bindingName); in NewResolvedBindingRecord()
4452 JSHandle<JSTaggedValue> undefinedValue = thread_->GlobalConstants()->GetHandledUndefined(); in NewResolvedIndexBindingRecord()
4463 … JSHClass::Cast(thread_->GlobalConstants()->GetResolvedIndexBindingClass().GetTaggedObject())); in NewResolvedIndexBindingRecord()
4464 JSHandle<ResolvedIndexBinding> obj(thread_, header); in NewResolvedIndexBindingRecord()
4465 obj->SetModule(thread_, module); in NewResolvedIndexBindingRecord()
4474 JSHClass::Cast(thread_->GlobalConstants()->GetCellRecordClass().GetTaggedObject())); in NewCellRecord()
4475 JSHandle<CellRecord> obj(thread_, header); in NewCellRecord()
4476 obj->SetWeakRefTarget(thread_, JSTaggedValue::Undefined()); in NewCellRecord()
4477 obj->SetHeldValue(thread_, JSTaggedValue::Undefined()); in NewCellRecord()
4483 auto globalConst = thread_->GlobalConstants(); in CreateIteratorResultInstanceClass()
4495 layoutInfoHandle->AddKey(thread_, fieldOrder++, globalConst->GetValueString(), attributes); in CreateIteratorResultInstanceClass()
4503 layoutInfoHandle->AddKey(thread_, fieldOrder++, globalConst->GetDoneString(), attributes); in CreateIteratorResultInstanceClass()
4507 iterResultClass->SetLayout(thread_, layoutInfoHandle); in CreateIteratorResultInstanceClass()
4526 JSHandle<JSObject> obj(thread_, JSObject::Cast(NewOldSpaceObject(jshclass))); in NewOldSpaceJSObject()
4529 obj->SetElements(thread_, emptyArray); in NewOldSpaceJSObject()
4530 obj->SetProperties(thread_, emptyArray); in NewOldSpaceJSObject()
4541 JSHandle<JSHClass> cls(thread_, in NewJSStableArrayWithElements()
4544 array->SetElements(thread_, elements); in NewJSStableArrayWithElements()
4546 array->SetTrackInfo(thread_, JSTaggedValue::Undefined()); in NewJSStableArrayWithElements()
4547 auto accessor = thread_->GlobalConstants()->GetArrayLengthAccessor(); in NewJSStableArrayWithElements()
4548 array->SetPropertyInlinedProps(thread_, JSArray::LENGTH_INLINE_PROPERTY_INDEX, accessor); in NewJSStableArrayWithElements()
4559 …JSFunction::InitializeJSFunction(thread_, asyncGeneratorFunc, FunctionKind::ASYNC_GENERATOR_FUNCTI… in NewJSAsyncGeneratorFunction()
4560 asyncGeneratorFunc->SetMethod(thread_, method); in NewJSAsyncGeneratorFunction()
4568 …JSHClass::Cast(thread_->GlobalConstants()->GetAsyncGeneratorRequestRecordClass().GetTaggedObject()… in NewAsyncGeneratorRequest()
4569 JSHandle<AsyncGeneratorRequest> obj(thread_, header); in NewAsyncGeneratorRequest()
4570 obj->SetCompletion(thread_, JSTaggedValue::Undefined()); in NewAsyncGeneratorRequest()
4571 obj->SetCapability(thread_, JSTaggedValue::Undefined()); in NewAsyncGeneratorRequest()
4580 … JSHClass::Cast(thread_->GlobalConstants()->GetAsyncIteratorRecordClass().GetTaggedObject())); in NewAsyncIteratorRecord()
4581 JSHandle<AsyncIteratorRecord> obj(thread_, header); in NewAsyncIteratorRecord()
4582 obj->SetIterator(thread_, itor.GetTaggedValue()); in NewAsyncIteratorRecord()
4583 obj->SetNextMethod(thread_, next.GetTaggedValue()); in NewAsyncIteratorRecord()
4593 … JSHClass::Cast(thread_->GlobalConstants()->GetAOTLiteralInfoClass().GetTaggedObject()), size); in NewAOTLiteralInfo()
4595 JSHandle<AOTLiteralInfo> aotLiteralInfo(thread_, header); in NewAOTLiteralInfo()
4605 JSHClass::Cast(thread_->GlobalConstants()->GetVTableClass().GetTaggedObject()), size); in NewVTable()
4607 JSHandle<VTable> vtable(thread_, header); in NewVTable()
4617 JSHClass::Cast(thread_->GlobalConstants()->GetClassLiteralClass().GetTaggedObject())); in NewClassLiteral()
4620 JSHandle<ClassLiteral> classLiteral(thread_, header); in NewClassLiteral()
4621 classLiteral->SetArray(thread_, emptyArray); in NewClassLiteral()
4661 ASSERT_NO_ABRUPT_COMPLETION(thread_); in NewJSFunction()
4672 jsFunc->SetHomeObject(thread_, homeObject); in NewSFunction()
4673 ASSERT_NO_ABRUPT_COMPLETION(thread_); in NewSFunction()
4684 jsFunc->SetHomeObject(thread_, homeObject); in NewJSFunction()
4685 ASSERT_NO_ABRUPT_COMPLETION(thread_); in NewJSFunction()
4699 JSMutableHandle<JSHClass> hclassHandle(thread_, GetObjectLiteralRootHClass(inlineProps)); in CreateJSObjectWithProperties()
4704 …THROW_TYPE_ERROR_AND_RETURN(thread_, "property key must be string and can not convert into element… in CreateJSObjectWithProperties()
4710 … hclassHandle.Update(JSHClass::SetPropertyOfObjHClass<true>(thread_, hclassHandle, key, attr)); in CreateJSObjectWithProperties()
4711 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, JSHandle<JSTaggedValue>()); in CreateJSObjectWithProperties()
4716 object->SetPropertyInlinedProps<true>(thread_, i, descs[i].GetValue().GetTaggedValue()); in CreateJSObjectWithProperties()
4740 …THROW_TYPE_ERROR_AND_RETURN(thread_, "property key must be string and can not convert into element… in CreateLargeJSObjectWithProperties()
4747 layout->AddKey<true>(thread_, i, key.GetTaggedValue(), attr); in CreateLargeJSObjectWithProperties()
4748 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, JSHandle<JSTaggedValue>()); in CreateLargeJSObjectWithProperties()
4749 object->SetPropertyInlinedProps<true>(thread_, i, descs[i].GetValue().GetTaggedValue()); in CreateLargeJSObjectWithProperties()
4752 hClassHandle->SetLayout(thread_, layoutHandle); in CreateLargeJSObjectWithProperties()
4769thread_, NameDictionary::Create(thread_, NameDictionary::ComputeHashTableSize(propertyCount))); in CreateDictionaryJSObjectWithProperties()
4774 …THROW_TYPE_ERROR_AND_RETURN(thread_, "property key must be string and can not convert into element… in CreateDictionaryJSObjectWithProperties()
4778 dict.Update(NameDictionary::PutIfAbsent(thread_, dict, key, descs[i].GetValue(), attr)); in CreateDictionaryJSObjectWithProperties()
4781 …THROW_TYPE_ERROR_AND_RETURN(thread_, "property keys can not duplicate", JSHandle<JSTaggedValue>()); in CreateDictionaryJSObjectWithProperties()
4783 object->SetProperties(thread_, dict); in CreateDictionaryJSObjectWithProperties()
4796 JSMutableHandle<JSHClass> hclassHandle(thread_, GetObjectLiteralRootHClass(inlineProps)); in CreateJSObjectWithNamedProperties()
4801 …THROW_TYPE_ERROR_AND_RETURN(thread_, "property key must be string and can not convert into element… in CreateJSObjectWithNamedProperties()
4807 … hclassHandle.Update(JSHClass::SetPropertyOfObjHClass<true>(thread_, hclassHandle, key, attr)); in CreateJSObjectWithNamedProperties()
4808 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, JSHandle<JSTaggedValue>()); in CreateJSObjectWithNamedProperties()
4813 …object->SetPropertyInlinedProps<true>(thread_, i, JSNApiHelper::ToJSHandle(values[i]).GetTaggedVal… in CreateJSObjectWithNamedProperties()
4836 …THROW_TYPE_ERROR_AND_RETURN(thread_, "property key must be string and can not convert into element… in CreateLargeJSObjectWithNamedProperties()
4843 layout->AddKey<true>(thread_, i, key.GetTaggedValue(), attr); in CreateLargeJSObjectWithNamedProperties()
4844 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, JSHandle<JSTaggedValue>()); in CreateLargeJSObjectWithNamedProperties()
4845 …object->SetPropertyInlinedProps<true>(thread_, i, JSNApiHelper::ToJSHandle(values[i]).GetTaggedVal… in CreateLargeJSObjectWithNamedProperties()
4848 hClassHandle->SetLayout(thread_, layoutHandle); in CreateLargeJSObjectWithNamedProperties()
4865thread_, NameDictionary::Create(thread_, NameDictionary::ComputeHashTableSize(propertyCount))); in CreateDictionaryJSObjectWithNamedProperties()
4870 …THROW_TYPE_ERROR_AND_RETURN(thread_, "property key must be string and can not convert into element… in CreateDictionaryJSObjectWithNamedProperties()
4874 …dict.Update(NameDictionary::PutIfAbsent(thread_, dict, key, JSNApiHelper::ToJSHandle(values[i]), a… in CreateDictionaryJSObjectWithNamedProperties()
4877 …THROW_TYPE_ERROR_AND_RETURN(thread_, "property keys can not duplicate", JSHandle<JSTaggedValue>()); in CreateDictionaryJSObjectWithNamedProperties()
4879 object->SetProperties(thread_, dict); in CreateDictionaryJSObjectWithNamedProperties()
4886 const GlobalEnvConstants *globalConst = thread_->GlobalConstants(); in CreateSFunctionClassWithoutProto()
4896 layoutInfoHandle->AddKey(thread_, fieldOrder, globalConst->GetLengthString(), attributes); in CreateSFunctionClassWithoutProto()
4906 layoutInfoHandle->AddKey(thread_, fieldOrder, in CreateSFunctionClassWithoutProto()
4910 functionClass->SetLayout(thread_, layoutInfoHandle); in CreateSFunctionClassWithoutProto()