Lines Matching full:thread
27 JSThread *thread = argv->GetThread(); in HashMapConstructor() local
28 BUILTINS_API_TRACE(thread, HashMap, Constructor); in HashMapConstructor()
29 [[maybe_unused]] EcmaHandleScope handleScope(thread); in HashMapConstructor()
30 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in HashMapConstructor()
35 ContainerError::BusinessError(thread, ErrorFlag::IS_NULL_ERROR, in HashMapConstructor()
37 THROW_NEW_ERROR_AND_RETURN_VALUE(thread, error, JSTaggedValue::Exception()); in HashMapConstructor()
42 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in HashMapConstructor()
45 JSTaggedValue hashMapArray = TaggedHashArray::Create(thread); in HashMapConstructor()
46 hashMap->SetTable(thread, hashMapArray); in HashMapConstructor()
55 JSThread *thread = argv->GetThread(); in Keys() local
56 BUILTINS_API_TRACE(thread, HashMap, Keys); in Keys()
57 [[maybe_unused]] EcmaHandleScope handleScope(thread); in Keys()
60 … if (self->IsJSProxy() && JSHandle<JSProxy>::Cast(self)->GetTarget(thread).IsJSAPIHashMap()) { in Keys()
61 … self = JSHandle<JSTaggedValue>(thread, JSHandle<JSProxy>::Cast(self)->GetTarget(thread)); in Keys()
63 JSTaggedValue error = ContainerError::BusinessError(thread, ErrorFlag::BIND_ERROR, in Keys()
65 THROW_NEW_ERROR_AND_RETURN_VALUE(thread, error, JSTaggedValue::Exception()); in Keys()
69 JSAPIHashMapIterator::CreateHashMapIterator(thread, self, IterationKind::KEY); in Keys()
76 JSThread *thread = argv->GetThread(); in Values() local
77 BUILTINS_API_TRACE(thread, HashMap, Values); in Values()
78 [[maybe_unused]] EcmaHandleScope handleScope(thread); in Values()
81 … if (self->IsJSProxy() && JSHandle<JSProxy>::Cast(self)->GetTarget(thread).IsJSAPIHashMap()) { in Values()
82 … self = JSHandle<JSTaggedValue>(thread, JSHandle<JSProxy>::Cast(self)->GetTarget(thread)); in Values()
84 JSTaggedValue error = ContainerError::BusinessError(thread, ErrorFlag::BIND_ERROR, in Values()
86 THROW_NEW_ERROR_AND_RETURN_VALUE(thread, error, JSTaggedValue::Exception()); in Values()
90 JSAPIHashMapIterator::CreateHashMapIterator(thread, self, IterationKind::VALUE); in Values()
97 JSThread *thread = argv->GetThread(); in GetIteratorObj() local
98 BUILTINS_API_TRACE(thread, HashMap, GetIteratorObj); in GetIteratorObj()
99 [[maybe_unused]] EcmaHandleScope handleScope(thread); in GetIteratorObj()
102 … if (self->IsJSProxy() && JSHandle<JSProxy>::Cast(self)->GetTarget(thread).IsJSAPIHashMap()) { in GetIteratorObj()
103 … self = JSHandle<JSTaggedValue>(thread, JSHandle<JSProxy>::Cast(self)->GetTarget(thread)); in GetIteratorObj()
105 JSTaggedValue error = ContainerError::BusinessError(thread, ErrorFlag::BIND_ERROR, in GetIteratorObj()
107 THROW_NEW_ERROR_AND_RETURN_VALUE(thread, error, JSTaggedValue::Exception()); in GetIteratorObj()
111 JSAPIHashMapIterator::CreateHashMapIterator(thread, self, IterationKind::KEY_AND_VALUE); in GetIteratorObj()
118 JSThread *thread = argv->GetThread(); in Entries() local
119 BUILTINS_API_TRACE(thread, HashMap, Entries); in Entries()
120 [[maybe_unused]] EcmaHandleScope handleScope(thread); in Entries()
123 … if (self->IsJSProxy() && JSHandle<JSProxy>::Cast(self)->GetTarget(thread).IsJSAPIHashMap()) { in Entries()
124 … self = JSHandle<JSTaggedValue>(thread, JSHandle<JSProxy>::Cast(self)->GetTarget(thread)); in Entries()
126 JSTaggedValue error = ContainerError::BusinessError(thread, ErrorFlag::BIND_ERROR, in Entries()
128 THROW_NEW_ERROR_AND_RETURN_VALUE(thread, error, JSTaggedValue::Exception()); in Entries()
132 JSAPIHashMapIterator::CreateHashMapIterator(thread, self, IterationKind::KEY_AND_VALUE); in Entries()
139 JSThread *thread = argv->GetThread(); in ForEach() local
140 BUILTINS_API_TRACE(thread, HashMap, ForEach); in ForEach()
141 [[maybe_unused]] EcmaHandleScope handleScope(thread); in ForEach()
144 …if (thisHandle->IsJSProxy() && JSHandle<JSProxy>::Cast(thisHandle)->GetTarget(thread).IsJSAPIHashM… in ForEach()
145 …thisHandle = JSHandle<JSTaggedValue>(thread, JSHandle<JSProxy>::Cast(thisHandle)->GetTarget(thread… in ForEach()
147 JSTaggedValue error = ContainerError::BusinessError(thread, ErrorFlag::BIND_ERROR, in ForEach()
149 THROW_NEW_ERROR_AND_RETURN_VALUE(thread, error, JSTaggedValue::Exception()); in ForEach()
154 JSHandle<EcmaString> result = JSTaggedValue::ToString(thread, callbackFnHandle); in ForEach()
155 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in ForEach()
157 …e type of \"callbackfn\" must be callable. Received value is: " + ConvertToString(thread, *result); in ForEach()
158 …JSTaggedValue error = ContainerError::BusinessError(thread, ErrorFlag::TYPE_ERROR, errorMsg.c_str(… in ForEach()
159 THROW_NEW_ERROR_AND_RETURN_VALUE(thread, error, JSTaggedValue::Exception()); in ForEach()
163 JSHandle<TaggedHashArray> table(thread, hashMap->GetTable(thread)); in ForEach()
165 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in ForEach()
166 JSMutableHandle<TaggedQueue> queue(thread, factory->NewTaggedQueue(0)); in ForEach()
167 JSMutableHandle<TaggedNode> node(thread, JSTaggedValue::Undefined()); in ForEach()
168 JSMutableHandle<JSTaggedValue> key(thread, JSTaggedValue::Undefined()); in ForEach()
169 JSMutableHandle<JSTaggedValue> value(thread, JSTaggedValue::Undefined()); in ForEach()
171 JSHandle<JSTaggedValue> undefined = thread->GlobalConstants()->GetHandledUndefined(); in ForEach()
173 node.Update(TaggedHashArray::GetCurrentNode(thread, queue, table, index)); in ForEach()
175 key.Update(node->GetKey(thread)); in ForEach()
176 value.Update(node->GetValue(thread)); in ForEach()
178 EcmaInterpreter::NewRuntimeCallInfo(thread, callbackFnHandle, in ForEach()
180 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in ForEach()
183 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread, funcResult); in ForEach()
192 JSThread *thread = argv->GetThread(); in Set() local
193 BUILTINS_API_TRACE(thread, HashMap, Set); in Set()
194 [[maybe_unused]] EcmaHandleScope handleScope(thread); in Set()
197 … if (self->IsJSProxy() && JSHandle<JSProxy>::Cast(self)->GetTarget(thread).IsJSAPIHashMap()) { in Set()
198 … self = JSHandle<JSTaggedValue>(thread, JSHandle<JSProxy>::Cast(self)->GetTarget(thread)); in Set()
200 JSTaggedValue error = ContainerError::BusinessError(thread, ErrorFlag::BIND_ERROR, in Set()
202 THROW_NEW_ERROR_AND_RETURN_VALUE(thread, error, JSTaggedValue::Exception()); in Set()
208 JSAPIHashMap::Set(thread, hashMap, key, value); in Set()
209 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in Set()
216 JSThread *thread = argv->GetThread(); in SetAll() local
217 BUILTINS_API_TRACE(thread, HashMap, SetAll); in SetAll()
218 [[maybe_unused]] EcmaHandleScope handleScope(thread); in SetAll()
221 … if (self->IsJSProxy() && JSHandle<JSProxy>::Cast(self)->GetTarget(thread).IsJSAPIHashMap()) { in SetAll()
222 … self = JSHandle<JSTaggedValue>(thread, JSHandle<JSProxy>::Cast(self)->GetTarget(thread)); in SetAll()
224 JSTaggedValue error = ContainerError::BusinessError(thread, ErrorFlag::BIND_ERROR, in SetAll()
226 THROW_NEW_ERROR_AND_RETURN_VALUE(thread, error, JSTaggedValue::Exception()); in SetAll()
232 if (obj->IsJSProxy() && JSHandle<JSProxy>::Cast(obj)->GetTarget(thread).IsJSAPIHashMap()) { in SetAll()
233 obj = JSHandle<JSTaggedValue>(thread, JSHandle<JSProxy>::Cast(obj)->GetTarget(thread)); in SetAll()
235 JSHandle<EcmaString> result = JSTaggedValue::ToString(thread, obj); in SetAll()
236 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in SetAll()
238 … "The type of \"map\" must be HashMap. Received value is: " + ConvertToString(thread, *result); in SetAll()
239 …JSTaggedValue error = ContainerError::BusinessError(thread, ErrorFlag::TYPE_ERROR, errorMsg.c_str(… in SetAll()
240 THROW_NEW_ERROR_AND_RETURN_VALUE(thread, error, JSTaggedValue::Exception()); in SetAll()
246 JSAPIHashMap::SetAll(thread, targetMap, sourceMap); in SetAll()
253 JSThread *thread = argv->GetThread(); in Get() local
254 BUILTINS_API_TRACE(thread, HashMap, Get); in Get()
255 [[maybe_unused]] EcmaHandleScope handleScope(thread); in Get()
258 … if (self->IsJSProxy() && JSHandle<JSProxy>::Cast(self)->GetTarget(thread).IsJSAPIHashMap()) { in Get()
259 … self = JSHandle<JSTaggedValue>(thread, JSHandle<JSProxy>::Cast(self)->GetTarget(thread)); in Get()
261 JSTaggedValue error = ContainerError::BusinessError(thread, ErrorFlag::BIND_ERROR, in Get()
263 THROW_NEW_ERROR_AND_RETURN_VALUE(thread, error, JSTaggedValue::Exception()); in Get()
268 return hashMap->Get(thread, key.GetTaggedValue()); in Get()
274 JSThread *thread = argv->GetThread(); in Remove() local
275 BUILTINS_API_TRACE(thread, HashMap, Remove); in Remove()
276 [[maybe_unused]] EcmaHandleScope handleScope(thread); in Remove()
280 … if (self->IsJSProxy() && JSHandle<JSProxy>::Cast(self)->GetTarget(thread).IsJSAPIHashMap()) { in Remove()
281 … self = JSHandle<JSTaggedValue>(thread, JSHandle<JSProxy>::Cast(self)->GetTarget(thread)); in Remove()
283 JSTaggedValue error = ContainerError::BusinessError(thread, ErrorFlag::BIND_ERROR, in Remove()
285 THROW_NEW_ERROR_AND_RETURN_VALUE(thread, error, JSTaggedValue::Exception()); in Remove()
290 return JSAPIHashMap::Remove(thread, hashMap, key.GetTaggedValue()); in Remove()
296 JSThread *thread = argv->GetThread(); in HasKey() local
297 BUILTINS_API_TRACE(thread, HashMap, HasKey); in HasKey()
298 [[maybe_unused]] EcmaHandleScope handleScope(thread); in HasKey()
302 … if (self->IsJSProxy() && JSHandle<JSProxy>::Cast(self)->GetTarget(thread).IsJSAPIHashMap()) { in HasKey()
303 … self = JSHandle<JSTaggedValue>(thread, JSHandle<JSProxy>::Cast(self)->GetTarget(thread)); in HasKey()
305 JSTaggedValue error = ContainerError::BusinessError(thread, ErrorFlag::BIND_ERROR, in HasKey()
307 THROW_NEW_ERROR_AND_RETURN_VALUE(thread, error, JSTaggedValue::Exception()); in HasKey()
312 return hashMap->HasKey(thread, key.GetTaggedValue()); in HasKey()
318 JSThread *thread = argv->GetThread(); in HasValue() local
319 BUILTINS_API_TRACE(thread, HashMap, HasValue); in HasValue()
320 [[maybe_unused]] EcmaHandleScope handleScope(thread); in HasValue()
324 … if (self->IsJSProxy() && JSHandle<JSProxy>::Cast(self)->GetTarget(thread).IsJSAPIHashMap()) { in HasValue()
325 … self = JSHandle<JSTaggedValue>(thread, JSHandle<JSProxy>::Cast(self)->GetTarget(thread)); in HasValue()
327 JSTaggedValue error = ContainerError::BusinessError(thread, ErrorFlag::BIND_ERROR, in HasValue()
329 THROW_NEW_ERROR_AND_RETURN_VALUE(thread, error, JSTaggedValue::Exception()); in HasValue()
334 return JSAPIHashMap::HasValue(thread, hashMap, value); in HasValue()
340 JSThread *thread = argv->GetThread(); in Replace() local
341 BUILTINS_API_TRACE(thread, HashMap, Replace); in Replace()
342 [[maybe_unused]] EcmaHandleScope handleScope(thread); in Replace()
345 … if (self->IsJSProxy() && JSHandle<JSProxy>::Cast(self)->GetTarget(thread).IsJSAPIHashMap()) { in Replace()
346 … self = JSHandle<JSTaggedValue>(thread, JSHandle<JSProxy>::Cast(self)->GetTarget(thread)); in Replace()
348 JSTaggedValue error = ContainerError::BusinessError(thread, ErrorFlag::BIND_ERROR, in Replace()
350 THROW_NEW_ERROR_AND_RETURN_VALUE(thread, error, JSTaggedValue::Exception()); in Replace()
356 … return JSTaggedValue(jsHashMap->Replace(thread, key.GetTaggedValue(), newValue.GetTaggedValue())); in Replace()
362 JSThread *thread = argv->GetThread(); in Clear() local
363 BUILTINS_API_TRACE(thread, HashMap, Clear); in Clear()
364 [[maybe_unused]] EcmaHandleScope handleScope(thread); in Clear()
367 … if (self->IsJSProxy() && JSHandle<JSProxy>::Cast(self)->GetTarget(thread).IsJSAPIHashMap()) { in Clear()
368 … self = JSHandle<JSTaggedValue>(thread, JSHandle<JSProxy>::Cast(self)->GetTarget(thread)); in Clear()
370 JSTaggedValue error = ContainerError::BusinessError(thread, ErrorFlag::BIND_ERROR, in Clear()
372 THROW_NEW_ERROR_AND_RETURN_VALUE(thread, error, JSTaggedValue::Exception()); in Clear()
376 jsHashMap->Clear(thread); in Clear()
383 JSThread *thread = argv->GetThread(); in GetLength() local
384 BUILTINS_API_TRACE(thread, HashMap, GetLength); in GetLength()
385 [[maybe_unused]] EcmaHandleScope handleScope(thread); in GetLength()
388 … if (self->IsJSProxy() && JSHandle<JSProxy>::Cast(self)->GetTarget(thread).IsJSAPIHashMap()) { in GetLength()
389 … self = JSHandle<JSTaggedValue>(thread, JSHandle<JSProxy>::Cast(self)->GetTarget(thread)); in GetLength()
391 JSTaggedValue error = ContainerError::BusinessError(thread, ErrorFlag::BIND_ERROR, in GetLength()
393 THROW_NEW_ERROR_AND_RETURN_VALUE(thread, error, JSTaggedValue::Exception()); in GetLength()
403 JSThread *thread = argv->GetThread(); in IsEmpty() local
404 BUILTINS_API_TRACE(thread, HashMap, IsEmpty); in IsEmpty()
405 [[maybe_unused]] EcmaHandleScope handleScope(thread); in IsEmpty()
408 … if (self->IsJSProxy() && JSHandle<JSProxy>::Cast(self)->GetTarget(thread).IsJSAPIHashMap()) { in IsEmpty()
409 … self = JSHandle<JSTaggedValue>(thread, JSHandle<JSProxy>::Cast(self)->GetTarget(thread)); in IsEmpty()
411 JSTaggedValue error = ContainerError::BusinessError(thread, ErrorFlag::BIND_ERROR, in IsEmpty()
413 THROW_NEW_ERROR_AND_RETURN_VALUE(thread, error, JSTaggedValue::Exception()); in IsEmpty()