Home
last modified time | relevance | path

Searched refs:keyArray (Results 1 – 25 of 41) sorted by relevance

12

/arkcompiler/ets_runtime/ecmascript/tests/
Dlinked_hash_table_test.cpp88 char keyArray[] = "hello"; in HWTEST_F_L0() local
89 JSHandle<EcmaString> stringKey1 = factory->NewFromASCII(keyArray); in HWTEST_F_L0()
129 char keyArray[] = "hello"; in HWTEST_F_L0() local
130 JSHandle<EcmaString> stringKey1 = factory->NewFromASCII(keyArray); in HWTEST_F_L0()
165 char keyArray[7] = "hello"; in HWTEST_F_L0() local
167 keyArray[5] = '1' + static_cast<uint32_t>(i); in HWTEST_F_L0()
168 keyArray[6] = 0; in HWTEST_F_L0()
169 JSHandle<JSTaggedValue> key(factory->NewFromASCII(keyArray)); in HWTEST_F_L0()
179 keyArray[5] = '1' + static_cast<uint32_t>(i); in HWTEST_F_L0()
180 keyArray[6] = 0; in HWTEST_F_L0()
[all …]
Dtagged_dictionary_test.cpp91 char keyArray[] = "hello"; in HWTEST_F_L0() local
92 JSHandle<EcmaString> stringKey1 = thread->GetEcmaVM()->GetFactory()->NewFromASCII(keyArray); in HWTEST_F_L0()
135 char keyArray[7] = "hello"; in HWTEST_F_L0() local
138 keyArray[5] = '1' + static_cast<uint32_t>(i); in HWTEST_F_L0()
139 keyArray[6] = 0; in HWTEST_F_L0()
140 JSHandle<EcmaString> stringKey = thread->GetEcmaVM()->GetFactory()->NewFromASCII(keyArray); in HWTEST_F_L0()
166 uint8_t keyArray[7] = "hello"; in HWTEST_F_L0() local
170 keyArray[5] = '0' + static_cast<uint32_t>(i); in HWTEST_F_L0()
171 keyArray[6] = 0; in HWTEST_F_L0()
172 …e<JSTaggedValue> key(thread, stringTable->GetOrInternString(keyArray, utf::Mutf8Size(keyArray), tr… in HWTEST_F_L0()
[all …]
Djs_set_test.cpp101 char keyArray[] = "key0"; in HWTEST_F_L0() local
103 keyArray[3] = '1' + i; in HWTEST_F_L0()
104 JSHandle<JSTaggedValue> key(factory->NewFromASCII(keyArray)); in HWTEST_F_L0()
110 keyArray[3] = '1' + 8; in HWTEST_F_L0()
111 JSHandle<JSTaggedValue> deleteKey(factory->NewFromASCII(keyArray)); in HWTEST_F_L0()
Dlayout_info_test.cpp145 JSHandle<TaggedArray> keyArray = factory->NewTaggedArray(infoLength); in HWTEST_F_L0() local
156 layoutInfoHandle->GetAllKeys(thread, infoLength, 0, *keyArray, objectHandle); // 0: offset in HWTEST_F_L0()
158 EXPECT_EQ(keyArray->GetLength(), keyVector.size()); in HWTEST_F_L0()
161 bool result = JSTaggedValue::SameValue(keyArray->Get(i), keyVector[i]); in HWTEST_F_L0()
174 JSHandle<TaggedArray> keyArray = factory->NewTaggedArray(infoLength); in HWTEST_F_L0() local
192 …layoutInfoHandle->GetAllEnumKeys(thread, infoLength, 0, *keyArray, &keys, objectHandle); // 0: off… in HWTEST_F_L0()
193 EXPECT_EQ(keyArray->Get(0), key3.GetTaggedValue()); in HWTEST_F_L0()
Dglobal_dictionary_test.cpp238 JSHandle<TaggedArray> keyArray = factory->NewTaggedArray(arraySize); in HWTEST_F_L0() local
239 dictHandle->GetAllKeys(thread, offset, *keyArray); in HWTEST_F_L0()
242 EXPECT_TRUE(keyArray->Get(i).IsHole()); in HWTEST_F_L0()
245 JSHandle<EcmaString> resultFirstKey(thread, keyArray->Get(offset)); in HWTEST_F_L0()
246 JSHandle<EcmaString> resultLastKey(thread, keyArray->Get(arraySize - 1)); in HWTEST_F_L0()
286 JSHandle<TaggedArray> keyArray = factory->NewTaggedArray(arraySize); in HWTEST_F_L0() local
287 dictHandle->GetEnumAllKeys(thread, offset, *keyArray, &keys); in HWTEST_F_L0()
289 JSHandle<EcmaString> resultFirstKey(thread, keyArray->Get(offset)); in HWTEST_F_L0()
290 JSHandle<EcmaString> resultLastKey(thread, keyArray->Get(offset + keys - 1U)); in HWTEST_F_L0()
Djs_map_test.cpp101 char keyArray[] = "key0"; in HWTEST_F_L0() local
103 keyArray[3] = '1' + i; in HWTEST_F_L0()
104 JSHandle<JSTaggedValue> key(factory->NewFromASCII(keyArray)); in HWTEST_F_L0()
111 keyArray[3] = '1' + 8; in HWTEST_F_L0()
112 JSHandle<JSTaggedValue> deleteKey(factory->NewFromASCII(keyArray)); in HWTEST_F_L0()
Djs_api_plain_array_iterator_test.cpp85 …JSHandle<JSTaggedValue> keyArray = JSHandle<JSTaggedValue>(factory->NewTaggedArray(8)); // 8 means… in CreatePlainArray() local
87 plainArray->SetKeys(thread, keyArray); in CreatePlainArray()
Djs_api_deque_test.cpp277 JSHandle<TaggedArray> keyArray = JSAPIDeque::OwnKeys(thread, toor); in HWTEST_F_L0() local
278 EXPECT_TRUE(keyArray->GetClass()->IsTaggedArray()); in HWTEST_F_L0()
279 EXPECT_TRUE(keyArray->GetLength() == elementsNums); in HWTEST_F_L0()
282 EcmaString::Cast(keyArray->Get(i).GetTaggedObject()))); in HWTEST_F_L0()
Djs_api_lightweightmap_iterator_test.cpp88 … JSHandle<JSTaggedValue> keyArray = JSHandle<JSTaggedValue>(factory->NewTaggedArray(DEFAULT_SIZE)); in CreateLightWeightMap() local
91 lightWeightMap->SetKeys(thread, keyArray); in CreateLightWeightMap()
Dtagged_tree_test.cpp213 char keyArray[] = "mykey1"; in HWTEST_F_L0() local
214 JSHandle<EcmaString> stringKey1 = factory->NewFromStdString(keyArray); in HWTEST_F_L0()
248 char keyArray[] = "mykey1"; in HWTEST_F_L0() local
249 JSHandle<EcmaString> stringKey1 = factory->NewFromStdString(keyArray); in HWTEST_F_L0()
278 char keyArray[7] = "mykey"; // 7 means array length in HWTEST_F_L0() local
280 keyArray[5] = '1' + static_cast<uint32_t>(i); // 5 means index of keyArray in HWTEST_F_L0()
281 keyArray[6] = 0; // 6 means index of keyArray in HWTEST_F_L0()
282 JSHandle<JSTaggedValue> key(factory->NewFromStdString(keyArray)); in HWTEST_F_L0()
290 keyArray[5] = '1' + static_cast<uint32_t>(i); // 5 means index of keyArray in HWTEST_F_L0()
291 keyArray[6] = 0; // 6 means index of keyArray in HWTEST_F_L0()
[all …]
Djs_api_stack_test.cpp328 JSHandle<TaggedArray> keyArray = JSAPIStack::OwnKeys(thread, toor); in HWTEST_F_L0() local
329 EXPECT_TRUE(keyArray->GetClass()->IsTaggedArray()); in HWTEST_F_L0()
330 EXPECT_TRUE(keyArray->GetLength() == elementsNums); in HWTEST_F_L0()
333 EcmaString::Cast(keyArray->Get(i).GetTaggedObject()))); in HWTEST_F_L0()
/arkcompiler/ets_runtime/ecmascript/
Dlayout_info.cpp58 void LayoutInfo::GetAllKeys(const JSThread *thread, int end, int offset, TaggedArray *keyArray, in GetAllKeys() argument
62 ASSERT_PRINT(offset + end <= static_cast<int>(keyArray->GetLength()), in GetAllKeys()
73 keyArray->Set(thread, enumKeys + offset, key); in GetAllKeys()
82 keyArray->Set(thread, enumKeys + offset, key); in GetAllKeys()
89 … TaggedArray *keyArray, const JSHandle<JSObject> object, uint32_t filter) in GetAllKeysByFilter() argument
92 ASSERT_PRINT(keyArrayEffectivelength + numberOfProps <= keyArray->GetLength(), in GetAllKeysByFilter()
108 keyArray->Set(thread, keyArrayEffectivelength, key); in GetAllKeysByFilter()
123 keyArray->Set(thread, keyArrayEffectivelength, key); in GetAllKeysByFilter()
144 void LayoutInfo::GetAllEnumKeys(const JSThread *thread, int end, int offset, TaggedArray *keyArray, in GetAllEnumKeys() argument
148 ASSERT_PRINT(offset + end <= static_cast<int>(keyArray->GetLength()), in GetAllEnumKeys()
[all …]
Dtagged_dictionary.cpp65 void NameDictionary::GetAllKeys(const JSThread *thread, int offset, TaggedArray *keyArray) const in GetAllKeys()
80 keyArray->Set(thread, arrayIndex + offset, entry.first); in GetAllKeys()
86 TaggedArray *keyArray, uint32_t filter) const in GetAllKeysByFilter() argument
110 keyArray->Set(thread, keyArrayEffectivelength, entry.first); in GetAllKeysByFilter()
115 void NameDictionary::GetAllEnumKeys(const JSThread *thread, int offset, TaggedArray *keyArray, uint… in GetAllEnumKeys() argument
132 keyArray->Set(thread, arrayIndex + static_cast<uint32_t>(offset), entry.first); in GetAllEnumKeys()
226 const JSHandle<TaggedArray> &keyArray) in GetAllKeys() argument
228 ASSERT_PRINT(offset + obj->EntriesCount() <= static_cast<int>(keyArray->GetLength()), in GetAllKeys()
244 keyArray->Set(thread, arrayIndex + offset, str.GetTaggedValue()); in GetAllKeys()
250 … uint32_t &keyArrayEffectivelength, const JSHandle<TaggedArray> &keyArray, in GetAllKeysByFilter() argument
[all …]
Dtagged_dictionary.h62 void GetAllKeys(const JSThread *thread, int offset, TaggedArray *keyArray) const;
64 TaggedArray *keyArray, uint32_t filter) const;
65 …void GetAllEnumKeys(const JSThread *thread, int offset, TaggedArray *keyArray, uint32_t *keys) con…
114 const JSHandle<TaggedArray> &keyArray);
116 uint32_t &keyArrayEffectivelength, const JSHandle<TaggedArray> &keyArray, uint32_t filter);
118 const JSHandle<TaggedArray> &keyArray, uint32_t *keys);
Dglobal_dictionary-inl.h100 void GlobalDictionary::GetAllKeys(const JSThread *thread, int offset, TaggedArray *keyArray) const in GetAllKeys() argument
102 ASSERT_PRINT(offset + EntriesCount() <= static_cast<int>(keyArray->GetLength()), in GetAllKeys()
119 keyArray->Set(thread, arrayIndex + offset, nameKey); in GetAllKeys()
125 uint32_t &keyArrayEffectivelength, TaggedArray *keyArray, uint32_t filter) const in GetAllKeysByFilter() argument
127 …ASSERT_PRINT(keyArrayEffectivelength + static_cast<uint32_t>(EntriesCount()) <= keyArray->GetLengt… in GetAllKeysByFilter()
153 keyArray->Set(thread, keyArrayEffectivelength, nameKey); in GetAllKeysByFilter()
158 void GlobalDictionary::GetEnumAllKeys(const JSThread *thread, int offset, TaggedArray *keyArray, in GetEnumAllKeys() argument
161 ASSERT_PRINT(offset + EntriesCount() <= static_cast<int>(keyArray->GetLength()), in GetEnumAllKeys()
180 keyArray->Set(thread, arrayIndex + offset, nameKey); in GetEnumAllKeys()
Dglobal_dictionary.h78 inline void GetAllKeys(const JSThread *thread, int offset, TaggedArray *keyArray) const;
80 uint32_t &keyArrayEffectivelength, TaggedArray *keyArray, uint32_t filter) const;
82 …inline void GetEnumAllKeys(const JSThread *thread, int offset, TaggedArray *keyArray, uint32_t *ke…
Dlayout_info.h82 void GetAllKeys(const JSThread *thread, int end, int offset, TaggedArray *keyArray,
86 TaggedArray *keyArray, const JSHandle<JSObject> object, uint32_t filter);
87 …void GetAllEnumKeys(const JSThread *thread, int end, int offset, TaggedArray *keyArray, uint32_t *…
Djs_object.cpp317 const JSHandle<TaggedArray> &keyArray) in GetAllKeys() argument
325 ->GetAllKeys(thread, end, offset, *keyArray, obj); in GetAllKeys()
332 return dict->GetAllKeys(thread, offset, *keyArray); in GetAllKeys()
336 dict->GetAllKeys(thread, offset, *keyArray); in GetAllKeys()
341 const JSHandle<TaggedArray> &keyArray, in GetAllKeysByFilter() argument
349 … GetAllKeysByFilter(thread, numberOfProps, keyArrayEffectivelength, *keyArray, obj, filter); in GetAllKeysByFilter()
356 return dict->GetAllKeysByFilter(thread, keyArrayEffectivelength, *keyArray, filter); in GetAllKeysByFilter()
360 dict->GetAllKeysByFilter(thread, keyArrayEffectivelength, *keyArray, filter); in GetAllKeysByFilter()
385 JSHandle<TaggedArray> keyArray = factory->NewTaggedArray(numOfKeys); in GetAllEnumKeys() local
387 dict->GetEnumAllKeys(thread, offset, *keyArray, keys); in GetAllEnumKeys()
[all …]
/arkcompiler/ets_runtime/ecmascript/js_api/
Djs_api_plain_array.cpp31 JSHandle<TaggedArray> keyArray(thread, obj->GetKeys()); in Add() local
34 int32_t index = obj->BinarySearch(*keyArray, 0, size, key.GetTaggedValue().GetNumber()); in Add()
36 keyArray->Set(thread, index, key); in Add()
42 obj->AdjustArray(thread, *keyArray, index, size, true); in Add()
48 keyArray = in Add()
49 thread->GetEcmaVM()->GetFactory()->CopyArray(keyArray, capacity, newCapacity); in Add()
52 obj->SetKeys(thread, keyArray); in Add()
55 keyArray->Set(thread, index, key); in Add()
170 TaggedArray *keyArray = TaggedArray::Cast(obj->GetKeys().GetTaggedObject()); in GetOwnProperty() local
172 int32_t index = obj->BinarySearch(keyArray, 0, size, key.GetTaggedValue().GetInt()); in GetOwnProperty()
[all …]
Djs_api_plain_array_iterator.cpp61 JSHandle<TaggedArray> keyArray(thread, TaggedArray:: in Next() local
63 JSHandle<JSTaggedValue> keyHandle(thread, keyArray->Get(index)); in Next()
Djs_api_lightweightmap.cpp39 JSHandle<TaggedArray> keyArray = GetArrayByKind(thread, lightWeightMap, AccossorsKind::KEY); in IncreaseCapacityTo() local
42 JSHandle<TaggedArray> newKeyArray = GrowCapacity(thread, keyArray, index); in IncreaseCapacityTo()
175 JSHandle<TaggedArray> keyArray = GetArrayByKind(thread, lightWeightMap, AccossorsKind::KEY); in GetStateOfKey() local
178 if (JSTaggedValue::SameValue(keyArray->Get(right), key.GetTaggedValue())) { in GetStateOfKey()
185 if (JSTaggedValue::SameValue(keyArray->Get(left), key.GetTaggedValue())) { in GetStateOfKey()
220 JSHandle<TaggedArray> keyArray = GetArrayByKind(thread, lightWeightMap, AccossorsKind::KEY); in GetKeyAt() local
221 return keyArray->Get(index); in GetKeyAt()
298 JSHandle<TaggedArray> keyArray = factory->NewTaggedArray(DEFAULT_CAPACITY_LENGTH); in Clear() local
301 lightWeightMap->SetKeys(thread, keyArray.GetTaggedValue()); in Clear()
325 if (JSTaggedValue::SameValue((params.keyArray)->Get(right), *(params.key))) { in AvoidHashCollision()
[all …]
/arkcompiler/ets_runtime/ecmascript/builtins/tests/
Dbuiltins_date_time_format_test.cpp108 JSHandle<TaggedArray> keyArray = factory->NewTaggedArray(6); // 6 : 6 length in BuiltinsDateTimeOptionsSet() local
109 keyArray->Set(thread, 0, globalConst->GetHandledYearString()); // 0 : 0 first position in BuiltinsDateTimeOptionsSet()
110 keyArray->Set(thread, 1, globalConst->GetHandledMonthString()); // 1 : 1 second position in BuiltinsDateTimeOptionsSet()
111 keyArray->Set(thread, 2, globalConst->GetHandledDayString()); // 2 : 2 third position in BuiltinsDateTimeOptionsSet()
112 keyArray->Set(thread, 3, globalConst->GetHandledHourString()); // 3 : 3 fourth position in BuiltinsDateTimeOptionsSet()
113 keyArray->Set(thread, 4, globalConst->GetHandledMinuteString()); // 4 : 4 fifth position in BuiltinsDateTimeOptionsSet()
114 keyArray->Set(thread, 5, globalConst->GetHandledSecondString()); // 5 : 5 sixth position in BuiltinsDateTimeOptionsSet()
116 uint32_t arrayLen = keyArray->GetLength(); in BuiltinsDateTimeOptionsSet()
119 key.Update(keyArray->Get(thread, i)); in BuiltinsDateTimeOptionsSet()
491 JSHandle<TaggedArray> keyArray = factory->NewTaggedArray(6); // 6 : 6 length in JSDateTimeFormatForObj_001() local
[all …]
Dbuiltins_set_test.cpp205 char keyArray[] = "key0"; in HWTEST_F_L0() local
207 keyArray[3] = '1' + i; in HWTEST_F_L0()
208 JSHandle<JSTaggedValue> key(factory->NewFromASCII(keyArray)); in HWTEST_F_L0()
248 char keyArray[] = "key0"; in HWTEST_F_L0() local
250 keyArray[3] = '1' + i; in HWTEST_F_L0()
251 JSHandle<JSTaggedValue> key(factory->NewFromASCII(keyArray)); in HWTEST_F_L0()
267 keyArray[3] = '1' + 8; in HWTEST_F_L0()
268 JSHandle<JSTaggedValue> deleteKey(factory->NewFromASCII(keyArray)); in HWTEST_F_L0()
Dbuiltins_map_test.cpp189 char keyArray[] = "key0"; in HWTEST_F_L0() local
191 keyArray[3] = '1' + i; in HWTEST_F_L0()
192 JSHandle<JSTaggedValue> key(factory->NewFromASCII(keyArray)); in HWTEST_F_L0()
231 char keyArray[] = "key0"; in HWTEST_F_L0() local
233 keyArray[3] = '1' + i; in HWTEST_F_L0()
234 JSHandle<JSTaggedValue> key(thread, factory->NewFromASCII(keyArray).GetTaggedValue()); in HWTEST_F_L0()
250 keyArray[3] = '1' + 8; in HWTEST_F_L0()
251 JSHandle<JSTaggedValue> deleteKey(factory->NewFromASCII(keyArray)); in HWTEST_F_L0()
/arkcompiler/ets_runtime/test/moduletest/ecmastringtable/
Decmastringtable.js57 let keyArray = [key1, key3, key5, key7]; variable
59 for (let i = 0; i < keyArray.length; i++) {
60 getOrCreateLoad(system, keyArray[i]);

12