Home
last modified time | relevance | path

Searched refs:set (Results 1 - 25 of 448) sorted by relevance

12345678910>>...18

/arkcompiler/ets_runtime/test/moduletest/container/
H A Dcontainer_treeset.js33 let set = new fastset();
34 set.add("aa");
35 set.add("bb");
38 map.set("test has:", set.length == 2 && set.has("aa") && set.has("bb") && !set.has("cc"));
40 set.add("cc");
42 map.set("tes
[all...]
H A Dcontainer_hashset.js27 let set = new fastset();
28 set.add("aa");
29 set.add("bb");
32 map.set("test has:", set.length == 2 && set.has("aa") && set.has("bb") && !set.has("cc"));
34 set.add("cc");
37 let iteratorSetValues = set
[all...]
H A Dcontainer_treemap.js31 map.set("a", "aa");
32 map.set("b", "bb");
35 res.set("test get:", map.length == 2 && map.get("a") == "aa" && map.get("b") == "bb");
37 res.set("test hasKey and hasValue:", map.hasKey("a") && map.hasKey("b") && map.hasValue("aa") &&
40 map.set("c", "cc");
42 res.set("test getFirstKey and getLastKey:", map.getFirstKey() == "a" && map.getLastKey() == "c");
44 res.set("test getLowerKey and getHigherKey:", map.getLowerKey("b") == "a" && map.getLowerKey("a") == undefined &&
52 res.set("test setAll:", dmap.length == 3);
54 res.set("test remove:", dmap.remove("a") == "aa" && dmap.length == 2);
56 res.set("tes
[all...]
H A Dcontainer_lightweightmap.js32 res.set("test isEmpty:", proxy.isEmpty());
33 proxy.set("a", "aa");
34 proxy.set("b", "bb");
37 res.set("test get:", proxy.length == 2 && proxy.get("a") == "aa" && proxy.get("b") == "bb");
39 res.set("test hasKey and hasValue:", proxy.hasKey("a") && proxy.hasKey("b") && proxy.hasValue("aa") &&
42 proxy.set("c", "cc");
44 res.set("test getIndexOfKey and getIndexOfValue:", proxy.getIndexOfKey("a") === 0 && proxy.getIndexOfValue("bb") === 1);
46 res.set("test getKeyAt-1:", proxy.getKeyAt(1) == "b");
47 res.set("test getKeyAt-2:", proxy.getKeyAt(Math.floor(1.3)) == "b");
54 res.set("tes
[all...]
H A Dcontainer_hashmap.js33 res.set("test isEmpty ture:", map.isEmpty() == true)
35 map.set("a", "aa");
36 map.set("b", "bb");
39 res.set("test isEmpty false:", map.isEmpty() == false)
41 res.set("test get:", map.length == 2 && map.get("a") == "aa" && map.get("b") == "bb");
43 res.set("test hasKey and hasValue:", map.hasKey("a") && map.hasKey("b") && map.hasValue("aa") &&
46 map.set("c", "cc");
52 doublemap.set(i, i);
62 myTest.set(Math.floor(1.4), 2);
63 res.set("tes
[all...]
H A Dcontainer_vector.js34 map.set("test add and toString:", res);
37 map.set("test length:", vector.length == 6);
38 map.set("test get(index is 2):", vector.get(2) == 2);
39 map.set("test get(index is 3):", vector.get(3) !== 3); // false
40 map.set("test getIndexOf(target is 3):", vector.getIndexOf(3) == 1); // true
41 map.set("test getIndexOf(target is 2):", vector.getIndexOf(2) !== 5); // false
43 map.set("test isEmpty:", !vector.isEmpty());
48 map.set("test clear:", vector.isEmpty());
49 // // test set, clone
50 vec.set(
[all...]
H A Dcontainer_lightweightset.js27 let set = new fastset();
28 let proxy = new Proxy(set, {});
30 res.set("test isEmpty:", proxy.isEmpty());
35 res.set("test has 1:", proxy.has(1));
36 res.set("test has 2:", proxy.has(2));
37 res.set("test has 3:", proxy.has(3));
39 res.set("test has 4:", proxy.has(4) == false);
42 res.set("test values:", iteratorValues1.next().value == 1 && iteratorValues1.next().value == 2 &&
48 res.set("test entries1:", iteratorEntries1.next().value != undefined);
49 res.set("ites
[all...]
H A Dcontainer_list.js28 map.set("test list isEmpty1:", list.isEmpty() === true);
34 map.set("test list isEmpty2:", list.isEmpty() === false);
35 map.set("test list get 1:", list.get(1) === 1);
36 map.set("test list has:", list.has(8));
37 map.set("test list not has:", list.has(123) === false);
46 map.set("test list equal:", list.equal(list1));
49 map.set("test list equal:", list.equal(list1) === false);
50 map.set("test list getLastIndexOf:", list.getLastIndexOf(1) === 1);
51 map.set("test list getIndexOf:", list.getIndexOf(5) === 5);
61 map.set("tes
[all...]
H A Dcontainer_plainarray.js43 map.set("test plainarray add:", res)
44 map.set("test plainarray 'add' ret:", ret === undefined)
45 map.set("test plainarray length:", proxy.length === 6)
46 map.set("test plainarray has:", proxy.has(2))
47 map.set("test plainarray getIndexOfValue:", proxy.getIndexOfValue("1") === 1)
48 map.set("test plainarray getIndexOfKey:", proxy.getIndexOfKey(5) === 5)
49 map.set("test plainarray getKeyAt:", proxy.getKeyAt(1) === 1)
50 map.set("test plainarray getValueAt:", proxy.getValueAt(2) === "2")
59 map.set("test plainarray clone:", res)
63 map.set("tes
[all...]
H A Dcontainer_linked_list.js32 map.set("test linkedlist has:", list.has(8));
33 map.set("test linkedlist not has:", list.has(2));
34 map.set("test linkedlist getLastIndexOf:", list.getLastIndexOf(1) === 1);
35 map.set("test linkedlist getIndexOf:", list.getIndexOf(5) === 5);
46 map.set("test linkedlist removeByIndex:", res);
56 map.set("test linkedlist remove:", res);
57 map.set("test linkedlist remove1:", removeRes);
58 map.set("test linkedlist getFirst:", list.getFirst() === 0);
59 map.set("test linkedlist getLast:", list.getLast() === 7);
69 map.set("tes
[all...]
H A Dutility.js18 res.set("test keys:", iteratorKey1.next().value == "a" && iteratorKey1.next().value == "b" &&
22 res.set("test values:", iteratorValues1.next().value == "aa" && iteratorValues1.next().value == "bb" &&
28 res.set("test entries1:", iteratorEntries1.next().value != undefined);
29 res.set("itest entries2:", iteratorEntries1.next().value == undefined);
35 res.set(arr1[j], item[1] == arr1[j]);
40 res.set("test forin", false);
47 res.set("test setAll:", dProxy.length == 3);
49 res.set("test remove:", dProxy.remove("a") == "aa" && dProxy.length == 2);
51 res.set("test replace:", dProxy.replace("b", "dd") && dProxy.get("b") == "dd");
54 res.set("tes
[all...]
H A Dcontainer_arraylist.js38 map.set("flag1", flag1);
47 map.set("flag2", flag2);
63 map.set("test arraylist add:", res)
65 map.set("test arraylist has:", proxy.has(2))
66 map.set("test arraylist getCapacity:", proxy.getCapacity() === 15)
67 map.set("test arraylist getLastIndexOf:", proxy.getLastIndexOf(1) === 1)
68 map.set("test arraylist getIndexOf:", proxy.getIndexOf(5) === 5)
78 map.set("test arraylist convertToArray:", res)
87 map.set("test arraylist clone:", res)
97 map.set("tes
[all...]
H A Dcontainer_deque.js45 map.set("test deque insertFront:", res)
58 map.set("test deque insertEnd:", res)
67 map.set("test deque forEach:", res)
77 map.set("test deque for of:", res);
80 map.set("test deque Symbol.iterator:", res)
82 map.set("test deque has:", proxy.has(7))
83 map.set("test deque popFirst:", proxy.getFirst() === 0)
84 map.set("test deque popLast:", proxy.getLast() === 19)
85 map.set("test deque popFirst:", proxy.popFirst() === 0)
86 map.set("tes
[all...]
/arkcompiler/ets_runtime/ecmascript/mem/
H A Dfree_object_list.cpp147 auto set = region->GetFreeObjectSet(type); in FreeImpl() local
148 if (set == nullptr) { in FreeImpl()
149 LOG_FULL(FATAL) << "The set of region is nullptr"; in FreeImpl()
152 set->Free(start, size); in FreeImpl()
155 if (set->isAdded_ == 0) { in FreeImpl()
156 AddSet(set); in FreeImpl()
184 EnumerateSets([](FreeObjectSet<T> *set) { set->Rebuild(); }); in Rebuild()
197 bool FreeObjectList<T>::MatchFreeObjectInSet(FreeObjectSet<T> *set, size_t size) in MatchFreeObjectInSet() argument
199 if (set in MatchFreeObjectInSet()
219 AddSet(FreeObjectSet<T> *set) AddSet() argument
249 RemoveSet(FreeObjectSet<T> *set) RemoveSet() argument
[all...]
H A Dregion-inl.h137 inline void Region::MergeLocalToShareRSetForCM(RememberedSet *set) in MergeLocalToShareRSetForCM() argument
140 packedData_.localToShareSet_ = set; in MergeLocalToShareRSetForCM()
142 packedData_.localToShareSet_->Merge(set); in MergeLocalToShareRSetForCM()
143 nativeAreaAllocator_->Free(set, set->Size()); in MergeLocalToShareRSetForCM()
193 auto set = packedData_.newToEdenSet_; in TestNewToEden() local
194 if (set == nullptr) { in TestNewToEden()
197 return set->TestBit(ToUintPtr(this), addr); in TestNewToEden()
205 auto set = packedData_.oldToNewSet_; in TestOldToNew() local
206 if (set in TestOldToNew()
239 auto set = GetOrCreateCrossRegionRememberedSet(); InsertCrossRegionRSet() local
245 auto set = GetOrCreateCrossRegionRememberedSet(); AtomicInsertCrossRegionRSet() local
256 RememberedSet *set = packedData_.localToShareSet_; ExtractLocalToShareRSet() local
263 auto set = GetOrCreateLocalToShareRememberedSet(); InsertLocalToShareRSet() local
275 auto set = GetOrCreateLocalToShareRememberedSet(); AtomicInsertLocalToShareRSet() local
363 auto set = GetOrCreateNewToEdenRememberedSet(); InsertNewToEdenRSet() local
369 auto set = GetOrCreateNewToEdenRememberedSet(); AtomicInsertNewToEdenRSet() local
375 auto set = GetOrCreateNewToEdenRememberedSet(); ClearNewToEdenRSet() local
381 auto set = GetOrCreateOldToNewRememberedSet(); InsertOldToNewRSet() local
387 auto set = GetOrCreateOldToNewRememberedSet(); ClearOldToNewRSet() local
516 auto set = region_.GetOrCreateLocalToShareRememberedSet(); Consume() local
520 auto set = region_.GetOrCreateNewToEdenRememberedSet(); Consume() local
524 auto set = region_.GetOrCreateOldToNewRememberedSet(); Consume() local
[all...]
/arkcompiler/ets_runtime/ecmascript/shared_objects/
H A Djs_shared_set.cpp22 void JSSharedSet::Add(JSThread *thread, const JSHandle<JSSharedSet> &set, const JSHandle<JSTaggedValue> &value) in Add() argument
30 JSHandle<JSTaggedValue>::Cast(set)); in Add()
33 JSHandle<LinkedHashSet> setHandle(thread, LinkedHashSet::Cast(set->GetLinkedSet().GetTaggedObject())); in Add()
35 set->SetLinkedSet(thread, newSet); in Add()
38 bool JSSharedSet::Delete(JSThread *thread, const JSHandle<JSSharedSet> &set, const JSHandle<JSTaggedValue> &value) in Delete() argument
41 JSHandle<JSTaggedValue>::Cast(set)); in Delete()
43 JSHandle<LinkedHashSet> setHandle(thread, LinkedHashSet::Cast(set->GetLinkedSet().GetTaggedObject())); in Delete()
52 void JSSharedSet::Clear(JSThread *thread, const JSHandle<JSSharedSet> &set) in Clear() argument
55 JSHandle<JSTaggedValue>::Cast(set)); in Clear()
57 JSHandle<LinkedHashSet> setHandle(thread, LinkedHashSet::Cast(set in Clear()
62 Has(JSThread *thread, const JSHandle<JSSharedSet> &set, JSTaggedValue value) Has() argument
69 GetSize(JSThread *thread, const JSHandle<JSSharedSet> &set) GetSize() argument
76 GetValue(JSThread *thread, const JSHandle<JSSharedSet> &set, int entry) GetValue() argument
[all...]
/arkcompiler/toolchain/tooling/test/testcases/js/
H A Dcontainer.js56 hashMap.set(3, 1);
57 hashMap.set(0, 19);
58 hashMap.set(2, 8);
59 hashMap.set(9, 8);
60 hashMap.set(38, 1);
61 hashMap.set('three', 8);
62 hashMap.set(98, 88);
63 hashMap.set(0, 8);
64 hashMap.set(103, 99);
65 hashMap.set(7
[all...]
H A Dwatch_variable.js194 map3.set(NaN, 'NaN');
198 map5.set(0, 'zero');
199 map5.set(1, 'one');
200 map5.set(2, 'two');
201 map5.set(3, 'three');
203 map6.set(set0, "set0");
205 map7.set(number0, "number0");
207 map8.set(string0, "string0");
209 map9.set(obj0, "object0");
211 map10.set(undefined
[all...]
H A Dvariable_first.js191 map3.set(NaN, 'NaN');
195 map5.set(0, 'zero');
196 map5.set(1, 'one');
197 map5.set(2, 'two');
198 map5.set(3, 'three');
200 map6.set(set0, "set0");
202 map7.set(number0, "number0");
204 map8.set(string0, "string0");
206 map9.set(obj0, "object0");
208 map10.set(undefined
[all...]
/arkcompiler/ets_runtime/ecmascript/tests/
H A Djs_set_test.cpp43 JSHandle<JSSet> set = in CreateSet() local
46 set->SetLinkedSet(thread, hashSet); in CreateSet()
47 return JSSet::Cast(set.GetTaggedValue().GetTaggedObject()); in CreateSet()
53 JSSet *set = CreateSet(); in HWTEST_F_L0() local
54 EXPECT_TRUE(set != nullptr); in HWTEST_F_L0()
61 JSHandle<JSSet> set(thread, CreateSet()); in HWTEST_F_L0()
64 JSSet::Add(thread, set, key); in HWTEST_F_L0()
65 EXPECT_TRUE(set->Has(thread, key.GetTaggedValue())); in HWTEST_F_L0()
72 JSHandle<JSSet> set(thread, CreateSet()); in HWTEST_F_L0()
79 JSSet::Add(thread, set, ke in HWTEST_F_L0()
[all...]
/arkcompiler/ets_runtime/ecmascript/js_api/
H A Djs_api_tree_set.cpp24 void JSAPITreeSet::Add(JSThread *thread, const JSHandle<JSAPITreeSet> &set, const JSHandle<JSTaggedValue> &value) in Add() argument
34 JSHandle<TaggedTreeSet> setHandle(thread, TaggedTreeSet::Cast(set->GetTreeSet().GetTaggedObject())); in Add()
38 set->SetTreeSet(thread, newSet); in Add()
53 bool JSAPITreeSet::Delete(JSThread *thread, const JSHandle<JSAPITreeSet> &set, const JSHandle<JSTaggedValue> &key) in Delete() argument
55 JSHandle<TaggedTreeSet> setHandle(thread, TaggedTreeSet::Cast(set->GetTreeSet().GetTaggedObject())); in Delete()
63 set->SetTreeSet(thread, newSet); in Delete()
67 bool JSAPITreeSet::Has(JSThread *thread, const JSHandle<JSAPITreeSet> &set, const JSHandle<JSTaggedValue> &key) in Has() argument
69 JSHandle<TaggedTreeSet> setHandle(thread, TaggedTreeSet::Cast(set->GetTreeSet().GetTaggedObject())); in Has()
73 void JSAPITreeSet::Clear(const JSThread *thread, const JSHandle<JSAPITreeSet> &set) in Clear() argument
75 int cap = set in Clear()
88 PopFirst(JSThread *thread, const JSHandle<JSAPITreeSet> &set) PopFirst() argument
101 PopLast(JSThread *thread, const JSHandle<JSAPITreeSet> &set) PopLast() argument
[all...]
/arkcompiler/ets_frontend/es2panda/test/bytecode_file_size_comparison/test_cases/java_test_framework/java_cases/
H A DHashSetTest.java24 HashSet<String> set = new HashSet<>(); in main()
25 set.add("Apple"); in main()
26 set.add("Banana"); in main()
27 set.add("Cherry"); in main()
29 // Test if the set contains a certain element in main()
30 if (set.contains("Banana")) { in main()
31 System.out.println("The set contains the element 'Banana'."); in main()
34 // Test removing an element from the set in main()
35 set.remove("Banana"); in main()
36 if (!set in main()
[all...]
/arkcompiler/ets_runtime/ecmascript/
H A Djs_set_iterator.cpp39 THROW_TYPE_ERROR_AND_RETURN(thread, "this value is not a set iterator", JSTaggedValue::Exception()); in NextInternal()
54 JSHandle<LinkedHashSet> set(iteratedSet); in NextInternal()
55 int totalElements = set->NumberOfElements() + set->NumberOfDeletedElements(); in NextInternal()
58 if (!set->GetKey(index).IsHole()) { in NextInternal()
60 JSHandle<JSTaggedValue> key(thread, set->GetKey(index)); in NextInternal()
87 LinkedHashSet *set = LinkedHashSet::Cast(iteratedSet.GetTaggedObject()); in Update() local
88 if (set->GetNextTable().IsHole()) { in Update()
92 JSTaggedValue nextTable = set->GetNextTable(); in Update()
94 index -= set in Update()
[all...]
H A Djs_set.cpp20 void JSSet::Add(JSThread *thread, const JSHandle<JSSet> &set, const JSHandle<JSTaggedValue> &value) in Add() argument
26 JSHandle<LinkedHashSet> setHandle(thread, LinkedHashSet::Cast(set->GetLinkedSet().GetTaggedObject())); in Add()
29 set->SetLinkedSet(thread, newSet); in Add()
32 bool JSSet::Delete(const JSThread *thread, const JSHandle<JSSet> &set, const JSHandle<JSTaggedValue> &value) in Delete() argument
34 JSHandle<LinkedHashSet> setHandle(thread, LinkedHashSet::Cast(set->GetLinkedSet().GetTaggedObject())); in Delete()
43 void JSSet::Clear(const JSThread *thread, const JSHandle<JSSet> &set) in Clear() argument
45 LinkedHashSet *linkedSet = LinkedHashSet::Cast(set->GetLinkedSet().GetTaggedObject()); in Clear()
46 JSHandle<LinkedHashSet> setHandle(thread, LinkedHashSet::Cast(set->GetLinkedSet().GetTaggedObject())); in Clear()
48 set->SetLinkedSet(thread, newSet); in Clear()
/arkcompiler/ets_runtime/test/aottest/pgo_builtins/
H A Dpgo_builtins.js41 map.set("1", "2")
44 let set = new Set()
45 set.add("1")
46 set.add(23)
47 set.add("c")
48 for (const item of set) {

Completed in 8 milliseconds

12345678910>>...18