Lines Matching refs:thread

58     static JSObject *JSObjectTestCreate(JSThread *thread)
60 [[maybe_unused]] ecmascript::EcmaHandleScope scope(thread);
61 EcmaVM *ecmaVM = thread->GetEcmaVM();
69 static JSAPIArrayList *CreateArrayList(JSThread *thread)
71 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory();
72 auto result = TestCommon::CreateContainerTaggedValue(thread, containers::ContainerTag::ArrayList);
73 JSHandle<JSTaggedValue> constructor(thread, result);
77 arrayList->SetElements(thread, taggedArray);
81 static JSAPIPlainArray *CreatePlainArray(JSThread *thread)
83 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory();
84 auto result = TestCommon::CreateContainerTaggedValue(thread, containers::ContainerTag::PlainArray);
85 JSHandle<JSTaggedValue> constructor(thread, result);
90 plainArray->SetKeys(thread, keyArray);
91 plainArray->SetValues(thread, valueArray);
95 static JSAPIDeque *CreateJSApiDeque(JSThread *thread)
97 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory();
98 auto result = TestCommon::CreateContainerTaggedValue(thread, containers::ContainerTag::Deque);
99 JSHandle<JSTaggedValue> constructor(thread, result);
102 deque->SetElements(thread, newElements);
106 static JSAPIHashMap *CreateHashMap(JSThread *thread)
108 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory();
109 auto result = TestCommon::CreateContainerTaggedValue(thread, containers::ContainerTag::HashMap);
110 JSHandle<JSTaggedValue> constructor(thread, result);
112 JSTaggedValue hashMapArray = TaggedHashArray::Create(thread);
113 map->SetTable(thread, hashMapArray);
118 static JSAPIHashSet *CreateHashSet(JSThread *thread)
120 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory();
121 auto result = TestCommon::CreateContainerTaggedValue(thread, containers::ContainerTag::HashSet);
122 JSHandle<JSTaggedValue> constructor(thread, result);
124 JSTaggedValue hashSetArray = TaggedHashArray::Create(thread);
125 set->SetTable(thread, hashSetArray);
130 static JSAPILightWeightMap *CreateLightWeightMap(JSThread *thread)
132 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory();
133 auto result = TestCommon::CreateContainerTaggedValue(thread, containers::ContainerTag::LightWeightMap);
134 JSHandle<JSTaggedValue> constructor(thread, result);
140 lightWeightMap->SetHashes(thread, hashArray);
141 lightWeightMap->SetKeys(thread, keyArray);
142 lightWeightMap->SetValues(thread, valueArray);
147 static JSAPILightWeightSet *CreateLightWeightSet(JSThread *thread)
149 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory();
150 auto result = TestCommon::CreateContainerTaggedValue(thread, containers::ContainerTag::LightWeightSet);
151 JSHandle<JSTaggedValue> constructor(thread, result);
156 lightweightSet->SetHashes(thread, hashArray);
157 lightweightSet->SetValues(thread, valueArray);
162 static JSAPILinkedList *CreateLinkedList(JSThread *thread)
164 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory();
165 auto result = TestCommon::CreateContainerTaggedValue(thread, containers::ContainerTag::LinkedList);
167 JSHandle<JSTaggedValue> contianer(thread, result);
170 JSTaggedValue doubleList = TaggedDoubleList::Create(thread);
171 linkedList->SetDoubleList(thread, doubleList);
175 static JSAPIList *CreateList(JSThread *thread)
177 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory();
178 auto result = TestCommon::CreateContainerTaggedValue(thread, containers::ContainerTag::List);
179 JSHandle<JSTaggedValue> constructor(thread, result);
181 JSTaggedValue singleList = TaggedSingleList::Create(thread);
182 list->SetSingleList(thread, singleList);
186 static JSHandle<JSAPIQueue> CreateQueue(JSThread *thread, int capacaty)
188 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory();
189 auto result = TestCommon::CreateContainerTaggedValue(thread, containers::ContainerTag::Queue);
190 JSHandle<JSTaggedValue> constructor(thread, result);
193 jsQueue->SetElements(thread, newElements);
194 jsQueue->SetLength(thread, JSTaggedValue(0));
200 static JSHandle<JSAPIStack> CreateJSApiStack(JSThread *thread)
202 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory();
203 auto result = TestCommon::CreateContainerTaggedValue(thread, containers::ContainerTag::Stack);
205 JSHandle<JSTaggedValue> constructor(thread, result);
211 static JSHandle<JSAPITreeMap> CreateTreeMap(JSThread *thread)
213 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory();
214 auto result = TestCommon::CreateContainerTaggedValue(thread, containers::ContainerTag::TreeMap);
216 JSHandle<JSTaggedValue> constructor(thread, result);
219 JSTaggedValue internal = TaggedTreeMap::Create(thread);
220 jsTreeMap->SetTreeMap(thread, internal);