Lines Matching defs:thread

22 void JSSharedSet::Add(JSThread *thread, const JSHandle<JSSharedSet> &set, const JSHandle<JSTaggedValue> &value)
25 auto error = containers::ContainerError::BusinessError(thread, containers::ErrorFlag::TYPE_ERROR,
27 THROW_NEW_ERROR_AND_RETURN(thread, error);
29 [[maybe_unused]] ConcurrentApiScope<JSSharedSet, ModType::WRITE> scope(thread,
31 RETURN_IF_ABRUPT_COMPLETION(thread);
33 JSHandle<LinkedHashSet> setHandle(thread, LinkedHashSet::Cast(set->GetLinkedSet().GetTaggedObject()));
34 JSHandle<LinkedHashSet> newSet = LinkedHashSet::Add(thread, setHandle, value);
35 set->SetLinkedSet(thread, newSet);
38 bool JSSharedSet::Delete(JSThread *thread, const JSHandle<JSSharedSet> &set, const JSHandle<JSTaggedValue> &value)
40 [[maybe_unused]] ConcurrentApiScope<JSSharedSet, ModType::WRITE> scope(thread,
42 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread, false);
43 JSHandle<LinkedHashSet> setHandle(thread, LinkedHashSet::Cast(set->GetLinkedSet().GetTaggedObject()));
44 int entry = setHandle->FindElement(thread, value.GetTaggedValue());
48 setHandle->RemoveEntry(thread, entry);
52 void JSSharedSet::Clear(JSThread *thread, const JSHandle<JSSharedSet> &set)
54 [[maybe_unused]] ConcurrentApiScope<JSSharedSet, ModType::WRITE> scope(thread,
56 RETURN_IF_ABRUPT_COMPLETION(thread);
57 JSHandle<LinkedHashSet> setHandle(thread, LinkedHashSet::Cast(set->GetLinkedSet().GetTaggedObject()));
58 JSHandle<LinkedHashSet> newSet = LinkedHashSet::Clear(thread, setHandle);
59 set->SetLinkedSet(thread, newSet);
62 bool JSSharedSet::Has(JSThread *thread, const JSHandle<JSSharedSet> &set, JSTaggedValue value)
64 [[maybe_unused]] ConcurrentApiScope<JSSharedSet> scope(thread, JSHandle<JSTaggedValue>::Cast(set));
65 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread, false);
66 return LinkedHashSet::Cast(set->GetLinkedSet().GetTaggedObject())->Has(thread, value);
69 uint32_t JSSharedSet::GetSize(JSThread *thread, const JSHandle<JSSharedSet> &set)
71 [[maybe_unused]] ConcurrentApiScope<JSSharedSet> scope(thread, JSHandle<JSTaggedValue>::Cast(set));
72 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread, 0);
76 JSTaggedValue JSSharedSet::GetValue(JSThread *thread, const JSHandle<JSSharedSet> &set, int entry)
78 [[maybe_unused]] ConcurrentApiScope<JSSharedSet> scope(thread, JSHandle<JSTaggedValue>::Cast(set));
79 ASSERT_PRINT(entry >= 0 && static_cast<uint32_t>(entry) < GetSize(thread, set),
81 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread, JSTaggedValue::Undefined());