| /arkcompiler/ets_runtime/ecmascript/tests/ |
| D | linked_hash_table_test.cpp | 88 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 …]
|
| D | tagged_dictionary_test.cpp | 91 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 …]
|
| D | js_set_test.cpp | 101 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()
|
| D | layout_info_test.cpp | 145 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: offs… in HWTEST_F_L0() 193 EXPECT_EQ(keyArray->Get(0), key3.GetTaggedValue()); in HWTEST_F_L0()
|
| D | global_dictionary_test.cpp | 238 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()
|
| D | js_map_test.cpp | 101 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()
|
| D | js_api_plain_array_iterator_test.cpp | 85 …JSHandle<JSTaggedValue> keyArray = JSHandle<JSTaggedValue>(factory->NewTaggedArray(8)); // 8 means… in CreatePlainArray() local 87 plainArray->SetKeys(thread, keyArray); in CreatePlainArray()
|
| D | js_api_deque_test.cpp | 277 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()
|
| D | tagged_tree_test.cpp | 213 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 …]
|
| /arkcompiler/ets_runtime/ecmascript/ |
| D | layout_info.cpp | 37 void LayoutInfo::GetAllKeys(const JSThread *thread, int end, int offset, TaggedArray *keyArray, in GetAllKeys() argument 41 ASSERT_PRINT(offset + end <= static_cast<int>(keyArray->GetLength()), in GetAllKeys() 52 keyArray->Set(thread, enumKeys + offset, key); in GetAllKeys() 61 keyArray->Set(thread, enumKeys + offset, key); in GetAllKeys() 68 … TaggedArray *keyArray, const JSHandle<JSObject> object, uint32_t filter) in GetAllKeysByFilter() argument 71 ASSERT_PRINT(keyArrayEffectivelength + numberOfProps <= keyArray->GetLength(), in GetAllKeysByFilter() 87 keyArray->Set(thread, keyArrayEffectivelength, key); in GetAllKeysByFilter() 102 keyArray->Set(thread, keyArrayEffectivelength, key); in GetAllKeysByFilter() 142 …d LayoutInfo::GetAllEnumKeys(JSThread *thread, int end, int offset, JSHandle<TaggedArray> keyArray, in GetAllEnumKeys() argument 147 ASSERT_PRINT(offset <= static_cast<int>(keyArray->GetLength()), in GetAllEnumKeys() [all …]
|
| D | property_accessor.cpp | 122 JSMutableHandle<TaggedArray> keyArray(thread_, JSTaggedValue::Undefined()); in InitSimplePropertiesEnumCache() local 124 keyArray.Update(factory->EmptyArray()); in InitSimplePropertiesEnumCache() 132 keyArray.Update(newArray); in InitSimplePropertiesEnumCache() 136 jsHclass->SetEnumCache(thread_, keyArray.GetTaggedValue()); in InitSimplePropertiesEnumCache() 137 fastKeysArray_.Update(keyArray.GetTaggedValue()); in InitSimplePropertiesEnumCache() 203 JSHandle<TaggedArray> keyArray = factory->NewTaggedArray(arraySize); in GetKeysFast() local 208 …JSObject::AppendOwnEnumPropertyKeys(thread_, JSHandle<JSObject>(current), keyArray, &keysNum, shad… in GetKeysFast() 214 AddKeysEndIfNeeded(keyArray); in GetKeysFast() 215 fastKeysArray_.Update(keyArray.GetTaggedValue()); in GetKeysFast() 278 JSHandle<TaggedArray> keyArray = thread_->GetEcmaVM()->GetFactory()->NewTaggedArray(arraySize); in MergeRemainings() local [all …]
|
| D | tagged_dictionary.cpp | 69 void NameDictionary::GetAllKeys(const JSThread *thread, int offset, TaggedArray *keyArray) const in GetAllKeys() 84 keyArray->Set(thread, arrayIndex + offset, entry.first); in GetAllKeys() 90 TaggedArray *keyArray, uint32_t filter) const in GetAllKeysByFilter() argument 114 keyArray->Set(thread, keyArrayEffectivelength, entry.first); in GetAllKeysByFilter() 138 void NameDictionary::GetAllEnumKeys(JSThread *thread, int offset, JSHandle<TaggedArray> keyArray, u… in GetAllEnumKeys() argument 150 …bool isDuplicated = JSObject::IsDepulicateKeys(thread, keyArray, lastLength, shadowQueue, keyHandl… in GetAllEnumKeys() 162 keyArray->Set(thread, arrayIndex + static_cast<uint32_t>(offset), entry.first); in GetAllEnumKeys() 168 void NameDictionary::GetAllEnumKeys(JSThread *thread, int offset, JSHandle<TaggedArray> keyArray, u… in GetAllEnumKeys() argument 185 keyArray->Set(thread, arrayIndex + static_cast<uint32_t>(offset), entry.first); in GetAllEnumKeys() 279 const JSHandle<TaggedArray> &keyArray) in GetAllKeys() argument [all …]
|
| D | global_dictionary-inl.h | 100 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() 177 void GlobalDictionary::GetEnumAllKeys(const JSThread *thread, int offset, TaggedArray *keyArray, in GetEnumAllKeys() argument 180 …ASSERT_PRINT(offset + GetNumOfEnumKeys().first <= static_cast<unsigned int>(keyArray->GetLength()), in GetEnumAllKeys() 199 keyArray->Set(thread, arrayIndex + offset, nameKey); in GetEnumAllKeys()
|
| D | tagged_dictionary.h | 61 void GetAllKeys(const JSThread *thread, int offset, TaggedArray *keyArray) const; 63 TaggedArray *keyArray, uint32_t filter) const; 65 … void GetAllEnumKeys(JSThread *thread, int offset, JSHandle<TaggedArray> keyArray, uint32_t *keys, 67 …void GetAllEnumKeys(JSThread *thread, int offset, JSHandle<TaggedArray> keyArray, uint32_t *keys) … 126 const JSHandle<TaggedArray> &keyArray); 128 uint32_t &keyArrayEffectivelength, const JSHandle<TaggedArray> &keyArray, uint32_t filter); 130 … const JSHandle<TaggedArray> &keyArray, uint32_t *keys, int32_t lastLength = -1);
|
| D | layout_info.h | 88 void GetAllKeys(const JSThread *thread, int end, int offset, TaggedArray *keyArray, 92 TaggedArray *keyArray, const JSHandle<JSObject> object, uint32_t filter); 94 …void GetAllEnumKeys(JSThread *thread, int end, int offset, JSHandle<TaggedArray> keyArray, uint32_… 97 …void GetAllEnumKeys(JSThread *thread, int end, int offset, JSHandle<TaggedArray> keyArray, uint32_…
|
| D | global_dictionary.h | 77 inline void GetAllKeys(const JSThread *thread, int offset, TaggedArray *keyArray) const; 79 uint32_t &keyArrayEffectivelength, TaggedArray *keyArray, uint32_t filter) const; 81 …inline void GetEnumAllKeys(const JSThread *thread, int offset, TaggedArray *keyArray, uint32_t *ke…
|
| D | js_object.cpp | 428 const JSHandle<TaggedArray> &keyArray) in GetAllKeys() argument 436 ->GetAllKeys(thread, end, offset, *keyArray, obj); in GetAllKeys() 443 return dict->GetAllKeys(thread, offset, *keyArray); in GetAllKeys() 447 dict->GetAllKeys(thread, offset, *keyArray); in GetAllKeys() 452 const JSHandle<TaggedArray> &keyArray, in GetAllKeysByFilter() argument 460 … GetAllKeysByFilter(thread, numberOfProps, keyArrayEffectivelength, *keyArray, obj, filter); in GetAllKeysByFilter() 467 return dict->GetAllKeysByFilter(thread, keyArrayEffectivelength, *keyArray, filter); in GetAllKeysByFilter() 471 dict->GetAllKeysByFilter(thread, keyArrayEffectivelength, *keyArray, filter); in GetAllKeysByFilter() 497 JSHandle<TaggedArray> keyArray = factory->NewTaggedArray(numOfKeys); in GetAllEnumKeys() local 499 dict->GetEnumAllKeys(thread, 0, *keyArray, keys); in GetAllEnumKeys() [all …]
|
| /arkcompiler/ets_runtime/ecmascript/js_api/ |
| D | js_api_plain_array.cpp | 31 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 …]
|
| D | js_api_lightweightmap.cpp | 39 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 …]
|
| D | js_api_plain_array_iterator.cpp | 61 JSHandle<TaggedArray> keyArray(thread, TaggedArray:: in Next() local 63 JSHandle<JSTaggedValue> keyHandle(thread, keyArray->Get(index)); in Next()
|
| /arkcompiler/ets_runtime/ecmascript/builtins/tests/ |
| D | builtins_date_time_format_second_test.cpp | 87 JSHandle<TaggedArray> keyArray = factory->NewTaggedArray(6); // 6 : 6 length in BuiltinsDateTimeOptionsSet() local 88 keyArray->Set(thread, 0, globalConst->GetHandledYearString()); // 0 : 0 first position in BuiltinsDateTimeOptionsSet() 89 keyArray->Set(thread, 1, globalConst->GetHandledMonthString()); // 1 : 1 second position in BuiltinsDateTimeOptionsSet() 90 keyArray->Set(thread, 2, globalConst->GetHandledDayString()); // 2 : 2 third position in BuiltinsDateTimeOptionsSet() 91 keyArray->Set(thread, 3, globalConst->GetHandledHourString()); // 3 : 3 fourth position in BuiltinsDateTimeOptionsSet() 92 keyArray->Set(thread, 4, globalConst->GetHandledMinuteString()); // 4 : 4 fifth position in BuiltinsDateTimeOptionsSet() 93 keyArray->Set(thread, 5, globalConst->GetHandledSecondString()); // 5 : 5 sixth position in BuiltinsDateTimeOptionsSet() 95 uint32_t arrayLen = keyArray->GetLength(); in BuiltinsDateTimeOptionsSet() 98 key.Update(keyArray->Get(thread, i)); in BuiltinsDateTimeOptionsSet() 283 JSHandle<TaggedArray> keyArray = factory->NewTaggedArray(6); // 6 : 6 length in JSDateTimeFormatForObj_001() local [all …]
|
| D | builtins_date_time_format_first_test.cpp | 108 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()
|
| D | builtins_set_test.cpp | 205 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()
|
| D | builtins_map_test.cpp | 189 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() 230 char keyArray[] = "key0"; in HWTEST_F_L0() local 232 keyArray[3] = '1' + i; in HWTEST_F_L0() 233 JSHandle<JSTaggedValue> key(thread, factory->NewFromASCII(keyArray).GetTaggedValue()); in HWTEST_F_L0() 249 keyArray[3] = '1' + 8; in HWTEST_F_L0() 250 JSHandle<JSTaggedValue> deleteKey(factory->NewFromASCII(keyArray)); in HWTEST_F_L0()
|
| /arkcompiler/ets_runtime/test/moduletest/ecmastringtable/ |
| D | ecmastringtable.js | 91 …let keyArray = [key1, key3, key5, key7, numkey1, numkey3, numkey5, numkey7, numkey9, numkey11, num… variable 93 for (let i = 0; i < keyArray.length; i++) { 94 getOrCreateLoad(system, keyArray[i]);
|