Home
last modified time | relevance | path

Searched full:map (Results 1 – 25 of 462) sorted by relevance

12345678910>>...19

/arkcompiler/ets_runtime/test/moduletest/container/
Dcontainer_list.js27 let map = new Map(); variable
28 map.set("test list isEmpty1:", list.isEmpty() === true)
34 map.set("test list isEmpty2:", list.isEmpty() === false) variable
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)
[all …]
Dcontainer_vector.js26 let map = new Map(); variable
34 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());
51 map.set("test set:", vec.get(2) == 8 && vec.length == 6);
[all …]
Dcontainer_linked_list.js27 let map = new Map(); variable
32 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)
[all …]
Dcontainer_treeset.js26 let map = new Map(); variable
32 map.set("test has:", set.length == 2 && set.has("aa") && set.has("bb") && !set.has("cc"));
36map.set("test getFirstKey and getLastKey:", set.getFirstValue() == "aa" && set.getLastValue() == "…
38 map.set("test getLowerValue and getHigherValue", set.getLowerValue("bb") == "aa" &&
44map.set("test values:", iteratorSetValues.next().value == "aa" && iteratorSetValues.next().value =…
50 map.set("test entries1:", iteratorSetEntries.next().value != undefined);
51 map.set("test entries2:", iteratorSetEntries.next().value == undefined);
57 map.set(arr[i], item == arr[i]);
63 map.set("test forin:", item);
70 map.set("test forEach" + key, setFlag);
[all …]
Dcontainer_hashset.js26 let map = new Map(); variable
32 map.set("test has:", set.length == 2 && set.has("aa") && set.has("bb") && !set.has("cc"));
38map.set("test values:", iteratorSetValues.next().value == "aa" && iteratorSetValues.next().value =…
44 map.set("test entries1:", iteratorSetEntries.next().value != undefined);
45 map.set("test entries2:", iteratorSetEntries.next().value == undefined);
51 map.set(arr[i], item == arr[i]);
57 map.set("test forin:", item);
63 map.set("test forEach:", true)
65 map.set("test isEmpty:", !set.isEmpty());
70 map.set("test remove:", set.remove("bb"));
[all …]
Dcontainer_arraylist.js29 let map = new Map(); variable
36 map.set("flag1", flag1);
45 map.set("flag2", flag2);
61 map.set("test arraylist add:", res)
63 map.set("test arraylist has:", proxy.has(2))
64 map.set("test arraylist getCapacity:", proxy.getCapacity() === 15)
65 map.set("test arraylist getLastIndexOf:", proxy.getLastIndexOf(1) === 1)
66 map.set("test arraylist getIndexOf:", proxy.getIndexOf(5) === 5)
76 map.set("test arraylist convertToArray:", res)
85 map.set("test arraylist clone:", res)
[all …]
Dcontainer_treemap.js26 let res = new Map();
27 let map = new fastmap(); variable
28 map.set("a", "aa");
29 map.set("b", "bb");
32 res.set("test get:", map.length == 2 && map.get("a") == "aa" && map.get("b") == "bb");
34 res.set("test hasKey and hasValue:", map.hasKey("a") && map.hasKey("b") && map.hasValue("aa") &&
35 map.hasValue("bb") && !map.hasKey("c") && !map.hasValue("cc"));
37 map.set("c", "cc");
39 … res.set("test getFirstKey and getLastKey:", map.getFirstKey() == "a" && map.getLastKey() == "c");
41 …res.set("test getLowerKey and getHigherKey:", map.getLowerKey("b") == "a" && map.getLowerKey("a") …
[all …]
Dcontainer_plainarray.js26 let map = new Map(); variable
43 map.set("test plainarray add:", res)
44 map.set("test plainarray length:", proxy.length === 6)
45 map.set("test plainarray has:", proxy.has(2))
46 map.set("test plainarray getIndexOfValue:", proxy.getIndexOfValue("1") === 1)
47 map.set("test plainarray getIndexOfKey:", proxy.getIndexOfKey(5) === 5)
48 map.set("test plainarray getKeyAt:", proxy.getKeyAt(1) === 1)
49 map.set("test plainarray getValueAt:", proxy.getValueAt(2) === "2")
58 map.set("test plainarray clone:", res)
62 map.set("test plainarray removeRes:", removeRes)
[all …]
Dcontainer_hashmap.js26 let res = new Map();
27 let map = new fastmap(); variable
30 res.set("test isEmpty ture:", map.isEmpty() == true)
32 map.set("a", "aa");
33 map.set("b", "bb");
36 res.set("test isEmpty false:", map.isEmpty() == false)
38 res.set("test get:", map.length == 2 && map.get("a") == "aa" && map.get("b") == "bb");
40 res.set("test hasKey and hasValue:", map.hasKey("a") && map.hasKey("b") && map.hasValue("aa") &&
41 map.hasValue("bb") && !map.hasKey("c") && !map.hasValue("cc"));
43 map.set("c", "cc");
[all …]
Dcontainer_stack.js29 let map = new Map(); variable
32 map.set("test proxy isEmpty ture:", proxy.isEmpty() == true)
40 map.set("test proxy isEmpty false:", proxy.isEmpty() == false)
48 map.set("test stack add:", res)
57 map.set("test stack forEach:", res)
67 map.set("test stack for of:", res)
82 map.set("test stack Symbol.iterator:", res) variable
84 map.set("test stack peek:", proxy.peek() === 9)
85 map.set("test stack locate:", proxy.locate(5) === 5)
94 map.set("test proxy stack pop:" + i, popProxy.pop() == i);
[all …]
Dcontainer_deque.js29 let map = new Map(); variable
43 map.set("test deque insertFront:", res)
56 map.set("test deque insertEnd:", res)
65 map.set("test deque forEach:", res)
75 map.set("test deque for of:", res)
90 map.set("test deque Symbol.iterator:", res)
92 map.set("test deque has:", proxy.has(7))
93 map.set("test deque popFirst:", proxy.getFirst() === 0)
94 map.set("test deque popLast:", proxy.getLast() === 19)
95 map.set("test deque popFirst:", proxy.popFirst() === 0)
[all …]
Dcontainer_queue.js29 let map = new Map(); variable
41 map.set("test queue add:", res)
50 map.set("test queue forEach:", res)
60 map.set("test queue for of:", res)
75 map.set("test queue Symbol.iterator:", res)
77 map.set("test queue popFirst:", proxy.getFirst() === 0)
78 map.set("test queue pop:", proxy.pop() === 0)
81 function elements(value, key, map) { argument
118 map.forEach(elements);
/arkcompiler/runtime_core/irtoc/lang/tests/
Dregmask_test.rb57 map = Regmap.from_hash({a: 1, b: 2, c: 3, d: 4, e: 5, f: 6})
58 mask = RegMask.new(map, :a, :b, :c, :d, :e, :f)
59 m1 = RegMask.new(map[:b], map[:d])
60 m2 = RegMask.new(map, :b, :d)
62 m3 = RegMask.new(map, :a, :c, :e)
64 assert_equal(m4, RegMask.new(map, :a, :b, :c, :d, :e))
67 assert_equal(RegMask.new(map, :a) + map[:b], RegMask.new(map, :a, :b))
68 assert_equal(RegMask.new(map, :a, :b) - map[:b], RegMask.new(map, :a))
71 assert_equal(RegMask.new(map, :b, :d) + :a + :c + :e + :f, mask)
72 assert_equal(mask - :c - :e - :f, RegMask.new(map, :a, :b, :d))
[all …]
/arkcompiler/runtime_core/isa/
Dasserts.rb25 map(&block).sorted?
33 assert('Unique opcodes') { Panda.instructions.map(&:opcode).uniq? }
48 Panda.prefixes.map do |prefix|
54 Panda.instructions.map do |insn|
60 Panda.instructions.map do |insn|
63 Panda.prefixes.map(&:name).include?(insn.prefix.name)
68 Panda.prefixes.map(&:name).uniq?
80 %i[verification exceptions properties].flat_map { |type| Panda.send(type).map(&:tag) }.uniq?
84 %i[verification exceptions properties].map do |type|
86 defs = Panda.send(type).map(&:tag)
[all …]
/arkcompiler/runtime_core/verification/cflow/tests/
Dinstructions_map_test.cpp29 InstructionsMap map {&code[5], &code[147]}; in TEST_F() local
32 EXPECT_FALSE(map.PutInstruction(&code[4], 3)); in TEST_F()
33 EXPECT_TRUE(map.PutInstruction(&code[5], 2)); in TEST_F()
34 EXPECT_TRUE(map.CanJumpTo(&code[5])); in TEST_F()
35 EXPECT_FALSE(map.CanJumpTo(&code[6])); in TEST_F()
36 EXPECT_TRUE(map.CanJumpTo(&code[7])); in TEST_F()
38 map.MarkCodeBlock(&code[10], 104); in TEST_F()
39 EXPECT_TRUE(map.CanJumpTo(&code[9])); in TEST_F()
40 EXPECT_TRUE(map.CanJumpTo(&code[114])); in TEST_F()
42 EXPECT_FALSE(map.CanJumpTo(&code[addr])); in TEST_F()
[all …]
Djumps_map_test.cpp28 JumpsMap map {&code[5], &code[147]}; in TEST_F() local
31 EXPECT_FALSE(map.PutJump(&code[5], &code[4])); in TEST_F()
32 EXPECT_TRUE(map.PutJump(&code[5], &code[5])); in TEST_F()
33 EXPECT_TRUE(map.PutJump(&code[5], &code[128])); in TEST_F()
34 EXPECT_FALSE(map.PutJump(&code[3], &code[6])); in TEST_F()
35 EXPECT_TRUE(map.PutJump(&code[147], &code[145])); in TEST_F()
36 EXPECT_FALSE(map.PutJump(&code[148], &code[145])); in TEST_F()
37 EXPECT_FALSE(map.PutJump(&code[143], &code[148])); in TEST_F()
39 EXPECT_TRUE(map.PutJump(&code[13], &code[5])); in TEST_F()
40 EXPECT_TRUE(map.PutJump(&code[12], &code[5])); in TEST_F()
[all …]
/arkcompiler/ets_frontend/ts2panda/src/
DtypeRecorder.ts26 private type2Index: Map<ts.Node, number> = new Map<ts.Node, number>();
27 private variable2Type: Map<ts.Node, number> = new Map<ts.Node, number>();
30 private class2InstanceMap: Map<number, number> = new Map<number, number>();
31 private builtinContainer2InstanceMap: Map<object, number> = new Map<object, number>();
32 private arrayTypeMap: Map<number, number> = new Map<number, number>();
33 private unionTypeMap: Map<string, number> = new Map<string, number>();
34 private exportedType: Map<string, number> = new Map<string, number>();
35 private declaredType: Map<string, number> = new Map<string, number>();
37 // In PropertyAccessExpression we'll need this to map the symbol to filepath
38 private namespaceMap: Map<string, string> = new Map<string, string>();
[all …]
/arkcompiler/ets_runtime/ecmascript/tests/
Djs_map_test.cpp68 JSHandle<JSMap> map = in CreateMap() local
71 map->SetLinkedMap(thread, hashMap); in CreateMap()
72 return *map; in CreateMap()
78 JSMap *map = CreateMap(); in HWTEST_F_L0() local
79 EXPECT_TRUE(map != nullptr); in HWTEST_F_L0()
86 JSHandle<JSMap> map(thread, CreateMap()); in HWTEST_F_L0() local
90 JSMap::Set(thread, map, key, value); in HWTEST_F_L0()
91 EXPECT_TRUE(map->Has(key.GetTaggedValue())); in HWTEST_F_L0()
98 JSHandle<JSMap> map(thread, CreateMap()); in HWTEST_F_L0() local
106 JSMap::Set(thread, map, key, value); in HWTEST_F_L0()
[all …]
/arkcompiler/ets_runtime/ecmascript/js_api/
Djs_api_tree_map.cpp25 void JSAPITreeMap::Set(JSThread *thread, const JSHandle<JSAPITreeMap> &map, const JSHandle<JSTagged… in Set() argument
35 …JSHandle<TaggedTreeMap> mapHandle(thread, TaggedTreeMap::Cast(map->GetTreeMap().GetTaggedObject())… in Set()
39 map->SetTreeMap(thread, newMap); in Set()
42 JSTaggedValue JSAPITreeMap::Get(JSThread *thread, const JSHandle<JSAPITreeMap> &map, const JSHandle… in Get() argument
44 …JSHandle<TaggedTreeMap> mapHandle(thread, TaggedTreeMap::Cast(map->GetTreeMap().GetTaggedObject())… in Get()
67 JSTaggedValue JSAPITreeMap::Delete(JSThread *thread, const JSHandle<JSAPITreeMap> &map, in Delete() argument
70 …JSHandle<TaggedTreeMap> mapHandle(thread, TaggedTreeMap::Cast(map->GetTreeMap().GetTaggedObject())… in Delete()
78 map->SetTreeMap(thread, newMap); in Delete()
82 bool JSAPITreeMap::HasKey(JSThread *thread, const JSHandle<JSAPITreeMap> &map, const JSHandle<JSTag… in HasKey() argument
84 …JSHandle<TaggedTreeMap> mapHandle(thread, TaggedTreeMap::Cast(map->GetTreeMap().GetTaggedObject())… in HasKey()
[all …]
/arkcompiler/ets_runtime/ecmascript/
Djs_map_iterator.cpp34 …// 3.If O does not have all of the internal slots of a Map Iterator Instance (23.1.5.3), throw a T… in Next()
37 …THROW_TYPE_ERROR_AND_RETURN(thread, "this value is not a map iterator", JSTaggedValue::Exception()… in Next()
52 JSHandle<LinkedHashMap> map(iteratedMap); in Next() local
53 int totalElements = map->NumberOfElements() + map->NumberOfDeletedElements(); in Next()
57 JSTaggedValue key = map->GetKey(index); in Next()
65 JSHandle<JSTaggedValue> value(thread, map->GetValue(index)); in Next()
92 LinkedHashMap *map = LinkedHashMap::Cast(iteratedMap.GetTaggedObject()); in Update() local
93 if (map->GetNextTable().IsHole()) { in Update()
97 JSTaggedValue nextTable = map->GetNextTable(); in Update()
99 index -= map->GetDeletedElementsAt(index); in Update()
[all …]
Djs_map.cpp23 void JSMap::Set(JSThread *thread, const JSHandle<JSMap> &map, const JSHandle<JSTaggedValue> &key, in Set() argument
29 …JSHandle<LinkedHashMap> mapHandle(thread, LinkedHashMap::Cast(map->GetLinkedMap().GetTaggedObject(… in Set()
32 map->SetLinkedMap(thread, newMap); in Set()
35 bool JSMap::Delete(const JSThread *thread, const JSHandle<JSMap> &map, const JSHandle<JSTaggedValue… in Delete() argument
37 …JSHandle<LinkedHashMap> mapHandle(thread, LinkedHashMap::Cast(map->GetLinkedMap().GetTaggedObject(… in Delete()
46 void JSMap::Clear(const JSThread *thread, const JSHandle<JSMap> &map) in Clear() argument
48 LinkedHashMap *linkedMap = LinkedHashMap::Cast(map->GetLinkedMap().GetTaggedObject()); in Clear()
49 …JSHandle<LinkedHashMap> mapHandle(thread, LinkedHashMap::Cast(map->GetLinkedMap().GetTaggedObject(… in Clear()
51 map->SetLinkedMap(thread, newMap); in Clear()
/arkcompiler/ets_runtime/ecmascript/containers/
Dcontainers_treemap.cpp49 // Set map’s internal slot with a new empty List. in TreeMapConstructor()
50 JSHandle<JSAPITreeMap> map = JSHandle<JSAPITreeMap>::Cast(obj); in TreeMapConstructor() local
52 map->SetTreeMap(thread, internal); in TreeMapConstructor()
57 return map.GetTaggedValue(); in TreeMapConstructor()
68 return map.GetTaggedValue(); in TreeMapConstructor()
78 // get and check this map in Set()
92 JSHandle<JSAPITreeMap> map = JSHandle<JSAPITreeMap>::Cast(self); in Set() local
93 JSAPITreeMap::Set(thread, map, key, value); in Set()
95 return map.GetTaggedValue(); in Set()
104 // get and check this map in Get()
[all …]
/arkcompiler/runtime_core/compiler/optimizer/ir/
Daot_data.h19 #include <map>
58 std::map<std::pair<const File *, uint32_t>, int32_t> *got_plt, in AotData()
59 std::map<std::pair<const File *, uint32_t>, int32_t> *got_virt_indexes, in AotData()
60 std::map<std::pair<const File *, uint32_t>, int32_t> *got_class, in AotData()
61 std::map<std::pair<const File *, uint32_t>, int32_t> *got_string, in AotData()
62 std::map<std::pair<const File *, uint64_t>, int32_t> *got_intf_inline_cache, in AotData()
117 std::map<std::pair<const File *, uint32_t>, int32_t> *got_plt_;
118 std::map<std::pair<const File *, uint32_t>, int32_t> *got_virt_indexes_;
119 std::map<std::pair<const File *, uint32_t>, int32_t> *got_class_;
120 std::map<std::pair<const File *, uint32_t>, int32_t> *got_string_;
[all …]
/arkcompiler/ets_runtime/ecmascript/builtins/
Dbuiltins_map.cpp29 BUILTINS_API_TRACE(argv->GetThread(), Map, Constructor); in MapConstructor()
39 // 2.Let Map be OrdinaryCreateFromConstructor(NewTarget, "%MapPrototype%", «‍[[MapData]]» ). in MapConstructor()
44 JSHandle<JSMap> map = JSHandle<JSMap>::Cast(obj); in MapConstructor() local
46 // 4.Set map’s [[MapData]] internal slot to a new empty List. in MapConstructor()
48 map->SetLinkedMap(thread, linkedMap); in MapConstructor()
55 return map.GetTaggedValue(); in MapConstructor()
60 // Let adder be Get(map, "set"). in MapConstructor()
62 …JSHandle<JSTaggedValue> adder = JSObject::GetProperty(thread, JSHandle<JSTaggedValue>(map), adderK… in MapConstructor()
70 BUILTINS_API_TRACE(argv->GetThread(), Map, Set); in Set()
84 JSHandle<JSMap> map(self); in Set() local
[all …]
/arkcompiler/runtime_core/disassembler/
Daccumulators.h19 #include <map>
26 using LabelTable = std::map<size_t, std::string>;
46 std::map<std::string, RecordInfo> records_info;
47 std::map<std::string, MethodInfo> methods_info;
54 std::map<std::string, AnnotationList> field_annotations;
58 std::map<std::string, AnnotationList> method_annotations;
59 std::map<std::string, RecordAnnotations> record_annotations;

12345678910>>...19