/arkcompiler/toolchain/tooling/base/ |
H A D | pt_json.cpp | 61 bool PtJson::Add(const char *key, bool value) const in Add() argument 63 ASSERT(key != nullptr && !Contains(key)); in Add() 70 cJSON_bool ret = cJSON_AddItemToObject(object_, key, node); in Add() 79 bool PtJson::Add(const char *key, int32_t value) const in Add() argument 81 return Add(key, static_cast<double>(value)); in Add() 84 bool PtJson::Add(const char *key, int64_t value) const in Add() argument 86 return Add(key, static_cast<double>(value)); in Add() 89 bool PtJson::Add(const char *key, uint32_t value) const in Add() argument 91 return Add(key, static_cas in Add() 94 Add(const char *key, double value) const Add() argument 112 Add(const char *key, const char *value) const Add() argument 130 Add(const char *key, const std::unique_ptr<PtJson> &value) const Add() argument 360 GetBool(const char *key, bool *value) const GetBool() argument 374 GetInt(const char *key, int32_t *value) const GetInt() argument 384 GetInt64(const char *key, int64_t *value) const GetInt64() argument 394 GetUInt(const char *key, uint32_t *value) const GetUInt() argument 404 GetUInt64(const char *key, uint64_t *value) const GetUInt64() argument 414 GetDouble(const char *key, double *value) const GetDouble() argument 428 GetString(const char *key, std::string *value) const GetString() argument 442 GetObject(const char *key, std::unique_ptr<PtJson> *value) const GetObject() argument 456 GetArray(const char *key, std::unique_ptr<PtJson> *value) const GetArray() argument 470 GetAny(const char *key, std::unique_ptr<PtJson> *value) const GetAny() argument [all...] |
H A D | pt_json.h | 52 bool Add(const char *key, bool value) const; 53 bool Add(const char *key, int32_t value) const; 54 bool Add(const char *key, int64_t value) const; 55 bool Add(const char *key, uint32_t value) const; 56 bool Add(const char *key, double value) const; 57 bool Add(const char *key, const char *value) const; 58 bool Add(const char *key, const std::unique_ptr<PtJson> &value) const; 70 bool Remove(const char *key) const; 72 bool Contains(const char *key) const; 100 Result GetBool(const char *key, boo [all...] |
/arkcompiler/ets_runtime/test/moduletest/forin/ |
H A D | forin.js | 29 for (const key in arrayLong) { 30 print(key); 40 for (const key in arrayLong) { 41 print(key); 56 for (const key in arrayLong) { 57 print(key); 80 has: (target, key) => { 81 print("key==",key) 82 if (key [all...] |
/arkcompiler/ets_runtime/ecmascript/ic/ |
H A D | ic_runtime.cpp | 26 void ICRuntime::UpdateLoadHandler(const ObjectOperator &op, JSHandle<JSTaggedValue> key, in UpdateLoadHandler() argument 33 key = JSHandle<JSTaggedValue>(); in UpdateLoadHandler() 78 if (key.IsEmpty()) { in UpdateLoadHandler() 87 icAccessor_.AddHandlerWithKey(key, JSHandle<JSTaggedValue>::Cast(hclass), handlerValue); in UpdateLoadHandler() 112 void ICRuntime::UpdateStoreHandler(const ObjectOperator &op, JSHandle<JSTaggedValue> key, in UpdateStoreHandler() argument 119 key = JSHandle<JSTaggedValue>(); in UpdateStoreHandler() 142 if (key.IsEmpty()) { in UpdateStoreHandler() 151 icAccessor_.AddHandlerWithKey(key, receiverHClass_, handlerValue); in UpdateStoreHandler() 156 [[maybe_unused]] JSHandle<JSTaggedValue> key) const in TraceIC() 161 if (key in TraceIC() 174 LoadValueMiss(JSHandle<JSTaggedValue> receiver, JSHandle<JSTaggedValue> key) LoadValueMiss() argument 192 ObjectOperator op(GetThread(), receiver, key); LoadValueMiss() local 225 LoadMiss(JSHandle<JSTaggedValue> receiver, JSHandle<JSTaggedValue> key) LoadMiss() argument 257 ObjectOperator op(GetThread(), receiver, key); LoadMiss() local 283 LoadOrdinaryGet(JSHandle<JSTaggedValue> receiver, JSHandle<JSTaggedValue> key) LoadOrdinaryGet() argument 291 CallPrivateGetter(JSHandle<JSTaggedValue> receiver, JSHandle<JSTaggedValue> key) CallPrivateGetter() argument 302 LoadTypedArrayValueMiss(JSHandle<JSTaggedValue> receiver, JSHandle<JSTaggedValue> key) LoadTypedArrayValueMiss() argument 319 ObjectOperator op(GetThread(), receiver, key); LoadTypedArrayValueMiss() local 342 StoreMiss(JSHandle<JSTaggedValue> receiver, JSHandle<JSTaggedValue> key, JSHandle<JSTaggedValue> value, bool isOwn) StoreMiss() argument 395 ObjectOperator op(GetThread(), receiver, key, isOwn ? OperatorType::OWN : OperatorType::PROTOTYPE_CHAIN); StoreMiss() local 431 CallPrivateSetter(JSHandle<JSTaggedValue> receiver, JSHandle<JSTaggedValue> key, JSHandle<JSTaggedValue> value) CallPrivateSetter() argument 444 StoreTypedArrayValueMiss(JSHandle<JSTaggedValue> receiver, JSHandle<JSTaggedValue> key, JSHandle<JSTaggedValue> value) StoreTypedArrayValueMiss() argument 467 ObjectOperator op(GetThread(), receiver, key); StoreTypedArrayValueMiss() local [all...] |
H A D | properties_cache.h | 30 inline int Get(JSHClass *jsHclass, JSTaggedValue key) in Get() argument 32 int hash = Hash(jsHclass, key); in Get() 34 if ((prop.hclass_ == jsHclass) && (prop.key_ == key)) { in Get() 39 inline void Set(JSHClass *jsHclass, JSTaggedValue key, int index) in Set() argument 41 int hash = Hash(jsHclass, key); in Set() 44 prop.key_ = key; in Set() 49 for (auto &key : keys_) { in Clear() 50 key.hclass_ = nullptr; in Clear() 51 key.key_ = JSTaggedValue::Hole(); in Clear() 56 for (auto &key in IsCleared() 117 Hash(JSHClass *cls, JSTaggedValue key) Hash() argument [all...] |
H A D | ic_runtime_stub.h | 27 JSTaggedValue globalValue, JSTaggedValue key, uint32_t slotId, 30 JSTaggedValue globalValue, JSTaggedValue key, 33 JSTaggedValue receiver, JSTaggedValue key, uint32_t slotId); 40 JSTaggedValue receiver, JSTaggedValue key, 46 JSTaggedValue handler, JSTaggedValue key); 63 static inline JSTaggedValue TryLoadICByValue(JSThread *thread, JSTaggedValue receiver, JSTaggedValue key, 66 JSTaggedValue receiver, JSTaggedValue key, uint32_t slotId); 67 static inline JSTaggedValue TryStoreICByValue(JSThread *thread, JSTaggedValue receiver, JSTaggedValue key, 71 JSTaggedValue receiver, JSTaggedValue key, JSTaggedValue value, 74 JSTaggedValue receiver, JSTaggedValue key, [all...] |
/arkcompiler/ets_runtime/ecmascript/builtins/tests/ |
H A D | builtins_lazy_test.cpp | 36 JSHandle<JSTaggedValue> key(factory->NewFromUtf8("Date")); in HWTEST_F_L0() 39 bool success = JSObject::GetOwnProperty(thread, globalObj, key, desc); in HWTEST_F_L0() 49 JSHandle<JSTaggedValue> key(factory->NewFromUtf8("Date")); in HWTEST_F_L0() 52 bool success = JSObject::SetProperty(thread, globalObj, key, value); in HWTEST_F_L0() 55 JSObject::GetOwnProperty(thread, JSHandle<JSObject>::Cast(globalObj), key, desc); in HWTEST_F_L0() 66 JSHandle<JSTaggedValue> key(factory->NewFromUtf8("now")); in HWTEST_F_L0() 67 ASSERT_TRUE(JSTaggedValue::HasProperty(thread, dateFunction, key)); in HWTEST_F_L0() 75 auto key = factory->NewFromUtf8("Date"); in HWTEST_F_L0() local 77 auto dateFunction = FastRuntimeStub::GetGlobalOwnProperty(thread, globalObj, key.GetTaggedValue()); in HWTEST_F_L0() 90 JSHandle<JSTaggedValue> key(factor in HWTEST_F_L0() 99 JSTaggedValue key = factory->NewFromUtf8("Set").GetTaggedValue(); HWTEST_F_L0() local 123 JSTaggedValue key = factory->NewFromUtf8("Map").GetTaggedValue(); HWTEST_F_L0() local 147 JSTaggedValue key = factory->NewFromUtf8("WeakMap").GetTaggedValue(); HWTEST_F_L0() local 171 JSTaggedValue key = factory->NewFromUtf8("WeakSet").GetTaggedValue(); HWTEST_F_L0() local 195 JSTaggedValue key = factory->NewFromUtf8("WeakRef").GetTaggedValue(); HWTEST_F_L0() local 218 JSTaggedValue key = factory->NewFromUtf8("FinalizationRegistry").GetTaggedValue(); HWTEST_F_L0() local 241 JSTaggedValue key = factory->NewFromUtf8("Int8Array").GetTaggedValue(); HWTEST_F_L0() local 264 JSTaggedValue key = factory->NewFromUtf8("ArrayBuffer").GetTaggedValue(); HWTEST_F_L0() local 287 JSTaggedValue key = factory->NewFromUtf8("DataView").GetTaggedValue(); HWTEST_F_L0() local 310 JSTaggedValue key = factory->NewFromUtf8("SharedArrayBuffer").GetTaggedValue(); HWTEST_F_L0() local 333 JSTaggedValue key = factory->NewFromUtf8("Locale").GetTaggedValue(); HWTEST_F_L0() local [all...] |
/arkcompiler/ets_runtime/ecmascript/ |
H A D | linked_hash_table.cpp | 44 const JSHandle<JSTaggedValue> &key, in Insert() 47 ASSERT(IsKey(key.GetTaggedValue())); in Insert() 48 int hash = LinkedHash::Hash(thread, key.GetTaggedValue()); in Insert() 49 int entry = table->FindElement(thread, key.GetTaggedValue()); in Insert() 60 newTable->SetKey(thread, entry, key.GetTaggedValue()); in Insert() 69 const JSHandle<Derived> &table, const JSHandle<JSTaggedValue> &key, const JSHandle<JSTaggedValue> &value) in InsertWeakRef() 72 ASSERT(IsKey(key.GetTaggedValue())); in InsertWeakRef() 73 int hash = LinkedHash::Hash(thread, key.GetTaggedValue()); in InsertWeakRef() 74 int entry = table->FindElement(thread, key.GetTaggedValue()); in InsertWeakRef() 85 JSTaggedValue weakKey(key in InsertWeakRef() 43 Insert(const JSThread *thread, const JSHandle<Derived> &table, const JSHandle<JSTaggedValue> &key, const JSHandle<JSTaggedValue> &value) Insert() argument 68 InsertWeakRef(const JSThread *thread, const JSHandle<Derived> &table, const JSHandle<JSTaggedValue> &key, const JSHandle<JSTaggedValue> &value) InsertWeakRef() argument 111 Remove(const JSThread *thread, const JSHandle<Derived> &table, const JSHandle<JSTaggedValue> &key) Remove() argument 145 Delete(const JSThread *thread, const JSHandle<LinkedHashMap> &obj, const JSHandle<JSTaggedValue> &key) Delete() argument 151 Set(const JSThread *thread, const JSHandle<LinkedHashMap> &obj, const JSHandle<JSTaggedValue> &key, const JSHandle<JSTaggedValue> &value) Set() argument 157 SetWeakRef(const JSThread *thread, const JSHandle<LinkedHashMap> &obj, const JSHandle<JSTaggedValue> &key, const JSHandle<JSTaggedValue> &value) SetWeakRef() argument 208 Delete(const JSThread *thread, const JSHandle<LinkedHashSet> &obj, const JSHandle<JSTaggedValue> &key) Delete() argument 214 Add(const JSThread *thread, const JSHandle<LinkedHashSet> &obj, const JSHandle<JSTaggedValue> &key) Add() argument 220 AddWeakRef(const JSThread *thread, const JSHandle<LinkedHashSet> &obj, const JSHandle<JSTaggedValue> &key) AddWeakRef() argument 256 Hash(const JSThread *thread, JSTaggedValue key) Hash() argument [all...] |
H A D | tagged_node.h | 26 void InitTaggedNode(JSThread *thread, int hash, JSHandle<JSTaggedValue> key, JSHandle<JSTaggedValue> value)
in InitTaggedNode() argument 29 SetKey(thread, key.GetTaggedValue());
in InitTaggedNode() 46 static int Hash(const JSThread *thread, JSTaggedValue key)
in Hash() argument 48 if (key.IsInt()) {
in Hash() 49 return key.GetInt();
in Hash() 51 if (key.IsDouble()) {
in Hash() 52 double keyDoubleVal = key.GetDouble();
in Hash() 57 uint64_t keyValue = key.GetRawData();
in Hash() 60 if (key.IsSymbol()) {
in Hash() 61 auto symbolString = JSSymbol::Cast(key in Hash() 89 InitLinkedNode(JSThread *thread, int hash, JSHandle<JSTaggedValue> key, JSHandle<JSTaggedValue> value, JSHandle<LinkedNode> next) InitLinkedNode() argument [all...] |
H A D | layout_info.cpp | 41 JSTaggedValue key = GetKey(i); in GetAllKeys() local 42 if (key.IsString()) { in GetAllKeys() 46 keyArray->Set(thread, enumKeys + offset, key); in GetAllKeys() 53 JSTaggedValue key = GetKey(i); in GetAllKeys() local 54 if (key.IsSymbol()) { in GetAllKeys() 55 keyArray->Set(thread, enumKeys + offset, key); in GetAllKeys() 71 JSTaggedValue key = GetKey(static_cast<int>(i)); in GetAllKeysByFilter() local 72 if (key.IsString() && !(filter & NATIVE_KEY_SKIP_STRINGS)) { in GetAllKeysByFilter() 81 keyArray->Set(thread, keyArrayEffectivelength, key); in GetAllKeysByFilter() 89 JSTaggedValue key in GetAllKeysByFilter() local 107 JSTaggedValue key = GetKey(i); GetAllKeysForSerialization() local 120 JSTaggedValue key = GetKey(i); GetNumOfEnumKeys() local 199 GetSymbolKeyString(JSTaggedValue key) GetSymbolKeyString() argument 222 auto key = GetKey(index); DumpFieldIndexByPGO() local 241 auto key = GetKey(index); UpdateFieldIndexByPGO() local [all...] |
H A D | js_arguments.cpp | 23 const JSHandle<JSTaggedValue> &key, PropertyDescriptor &desc) in GetOwnProperty() 26 JSObject::OrdinaryGetOwnProperty(thread, JSHandle<JSObject>(args), key, desc); in GetOwnProperty() 34 if (desc.IsDataDescriptor() && JSTaggedValue::SameValue(key.GetTaggedValue(), caller.GetTaggedValue()) && in GetOwnProperty() 43 const JSHandle<JSTaggedValue> &key, const PropertyDescriptor &desc) in DefineOwnProperty() 46 bool allowed = JSObject::OrdinaryDefineOwnProperty(thread, JSHandle<JSObject>(args), key, desc); in DefineOwnProperty() 56 const JSHandle<JSTaggedValue> &key, const JSHandle<JSTaggedValue> &receiver) in GetProperty() 61 return JSTaggedValue::GetProperty(thread, JSHandle<JSTaggedValue>::Cast(args), key, receiver); in GetProperty() 64 bool JSArguments::SetProperty(JSThread *thread, const JSHandle<JSArguments> &args, const JSHandle<JSTaggedValue> &key, in SetProperty() argument 69 return JSTaggedValue::SetProperty(thread, JSHandle<JSTaggedValue>::Cast(args), key, value, receiver); in SetProperty() 73 const JSHandle<JSTaggedValue> &key) in DeleteProperty() 22 GetOwnProperty(JSThread *thread, const JSHandle<JSArguments> &args, const JSHandle<JSTaggedValue> &key, PropertyDescriptor &desc) GetOwnProperty() argument 42 DefineOwnProperty(JSThread *thread, const JSHandle<JSArguments> &args, const JSHandle<JSTaggedValue> &key, const PropertyDescriptor &desc) DefineOwnProperty() argument 55 GetProperty(JSThread *thread, const JSHandle<JSArguments> &args, const JSHandle<JSTaggedValue> &key, const JSHandle<JSTaggedValue> &receiver) GetProperty() argument 72 DeleteProperty(JSThread *thread, const JSHandle<JSArguments> &args, const JSHandle<JSTaggedValue> &key) DeleteProperty() argument [all...] |
H A D | js_tagged_value.cpp | 313 JSHandle<JSTaggedValue> key(thread, ToPrimitive(thread, tagged, PREFER_STRING)); in ToPropertyKey() 315 if (key->IsSymbol()) { in ToPropertyKey() 316 return key; in ToPropertyKey() 318 JSHandle<EcmaString> string = ToString(thread, key); in ToPropertyKey() 947 const JSHandle<JSTaggedValue> &key, SCheckMode sCheckMode) in GetProperty() 950 std::string keyStr = EcmaStringAccessor(ToString(thread, key)).ToStdString(); in GetProperty() 957 ASSERT_PRINT(JSTaggedValue::IsPropertyKey(key), "Key is not a property key"); in GetProperty() 960 return JSProxy::GetProperty(thread, JSHandle<JSProxy>(obj), key); in GetProperty() 963 return JSTypedArray::GetProperty(thread, obj, key); in GetProperty() 946 GetProperty(JSThread *thread, const JSHandle<JSTaggedValue> &obj, const JSHandle<JSTaggedValue> &key, SCheckMode sCheckMode) GetProperty() argument 976 GetProperty(JSThread *thread, const JSHandle<JSTaggedValue> &obj, uint32_t key) GetProperty() argument 1003 GetProperty(JSThread *thread, const JSHandle<JSTaggedValue> &obj, const JSHandle<JSTaggedValue> &key, const JSHandle<JSTaggedValue> &receiver) GetProperty() argument 1031 SetProperty(JSThread *thread, const JSHandle<JSTaggedValue> &obj, const JSHandle<JSTaggedValue> &key, const JSHandle<JSTaggedValue> &value, bool mayThrow, SCheckMode checkMode) SetProperty() argument 1061 SetProperty(JSThread *thread, const JSHandle<JSTaggedValue> &obj, uint32_t key, const JSHandle<JSTaggedValue> &value, bool mayThrow) SetProperty() argument 1091 SetProperty(JSThread *thread, const JSHandle<JSTaggedValue> &obj, const JSHandle<JSTaggedValue> &key, const JSHandle<JSTaggedValue> &value, const JSHandle<JSTaggedValue> &receiver, bool mayThrow) SetProperty() argument 1121 DeleteProperty(JSThread *thread, const JSHandle<JSTaggedValue> &obj, const JSHandle<JSTaggedValue> &key) DeleteProperty() argument 1144 DeletePropertyOrThrow(JSThread *thread, const JSHandle<JSTaggedValue> &obj, const JSHandle<JSTaggedValue> &key) DeletePropertyOrThrow() argument 1165 DefinePropertyOrThrow(JSThread *thread, const JSHandle<JSTaggedValue> &obj, const JSHandle<JSTaggedValue> &key, const PropertyDescriptor &desc) DefinePropertyOrThrow() argument 1182 DefineOwnProperty(JSThread *thread, const JSHandle<JSTaggedValue> &obj, const JSHandle<JSTaggedValue> &key, const PropertyDescriptor &desc, SCheckMode sCheckMode) DefineOwnProperty() argument 1213 GetOwnProperty(JSThread *thread, const JSHandle<JSTaggedValue> &obj, const JSHandle<JSTaggedValue> &key, PropertyDescriptor &desc) GetOwnProperty() argument 1335 HasProperty(JSThread *thread, const JSHandle<JSTaggedValue> &obj, const JSHandle<JSTaggedValue> &key) HasProperty() argument 1353 HasProperty(JSThread *thread, const JSHandle<JSTaggedValue> &obj, uint32_t key) HasProperty() argument 1370 HasOwnProperty(JSThread *thread, const JSHandle<JSTaggedValue> &obj, const JSHandle<JSTaggedValue> &key) HasOwnProperty() argument 1379 GlobalHasOwnProperty(JSThread *thread, const JSHandle<JSTaggedValue> &key) GlobalHasOwnProperty() argument 1397 JSTaggedValue key = table->FindSymbol(tagged.GetTaggedValue()); CanBeHeldWeakly() local 1486 HasContainerProperty(JSThread *thread, const JSHandle<JSTaggedValue> &obj, const JSHandle<JSTaggedValue> &key) HasContainerProperty() argument 1623 GetContainerProperty(JSThread *thread, const JSHandle<JSTaggedValue> &obj, const JSHandle<JSTaggedValue> &key, PropertyDescriptor &desc) GetContainerProperty() argument 1712 GetJSAPIProperty(JSThread *thread, const JSHandle<JSTaggedValue> &obj, const JSHandle<JSTaggedValue> &key) GetJSAPIProperty() argument 1756 SetJSAPIProperty(JSThread *thread, const JSHandle<JSTaggedValue> &obj, const JSHandle<JSTaggedValue> &key, const JSHandle<JSTaggedValue> &value) SetJSAPIProperty() argument [all...] |
/arkcompiler/ets_runtime/ecmascript/compiler/ |
H A D | hash_stub_builder.cpp | 20 GateRef HashStubBuilder::GetHash(GateRef key)
in GetHash() argument 29 BRANCH(TaggedIsInt(key), &intKey, &symbolCheck);
in GetHash() 31 res = TaggedGetInt(key);
in GetHash() 37 BRANCH(TaggedIsSymbol(key), &symbolKey, &stringCheck);
in GetHash() 40 res = Load(VariableType::INT32(), key, IntPtr(JSSymbol::HASHFIELD_OFFSET));
in GetHash() 45 BRANCH(TaggedIsString(key), &stringKey, &objectCheck);
in GetHash() 47 res = GetHashcodeFromString(glue_, key);
in GetHash() 53 BRANCH(TaggedIsHeapObject(key), &heapObjectKey, &numberCheck);
in GetHash() 57 BRANCH(TaggedObjectIsEcmaObject(key), &ecmaObjectKey, &slowGetHash);
in GetHash() 59 CalcHashcodeForObject(glue_, key, in GetHash() 78 CalcHashcodeForNumber(GateRef key, Variable *res, Label *exit) CalcHashcodeForNumber() argument [all...] |
/arkcompiler/ets_runtime/test/moduletest/mapget/ |
H A D | mapget.js | 24 map.set('key', 'value'); 25 print(map.get('key')) 37 let key = Number.parseFloat("1392210229"); 38 map.set(key, "success"); 39 let value = map.get(key); 43 function check(key) { 44 let irHash = ArkTools.hashCode(key); 45 let rtHash = ArkTools.hashCode(key, true); 47 throw new Error("Mismatch hash for " + key + ": expected " + rtHash + ", but got " + irHash); 125 map.forEach((value, key) [all...] |
/arkcompiler/ets_runtime/ecmascript/tests/ |
H A D | js_api_tree_map_test.cpp | 54 JSMutableHandle<JSTaggedValue> key(thread, JSTaggedValue::Undefined()); in HWTEST_F_L0() 64 key.Update(factory->NewFromStdString(ikey).GetTaggedValue()); in HWTEST_F_L0() 66 JSAPITreeMap::Set(thread, tmap, key, value); in HWTEST_F_L0() 71 key.Update(JSTaggedValue::Hole()); in HWTEST_F_L0() 72 JSAPITreeMap::Set(thread, tmap, key, value); in HWTEST_F_L0() 78 key.Update(factory->NewFromStdString(ikey).GetTaggedValue()); in HWTEST_F_L0() 82 JSTaggedValue gvalue = JSAPITreeMap::Get(thread, tmap, key); in HWTEST_F_L0() 92 JSMutableHandle<JSTaggedValue> key(thread, JSTaggedValue::Undefined()); in HWTEST_F_L0() 102 key.Update(factory->NewFromStdString(ikey).GetTaggedValue()); in HWTEST_F_L0() 104 JSAPITreeMap::Set(thread, tmap, key, valu in HWTEST_F_L0() [all...] |
H A D | js_api_tree_set_test.cpp | 49 JSHandle<JSAPITreeSet> TestCommon(JSMutableHandle<JSTaggedValue>& key, std::string& myKey, uint32_t nums) in TestCommon() argument 56 key.Update(factory->NewFromStdString(ikey).GetTaggedValue()); in TestCommon() 57 JSAPITreeSet::Add(thread, tset, key); in TestCommon() 74 JSMutableHandle<JSTaggedValue> key(thread, JSTaggedValue::Undefined()); in HWTEST_F_L0() 78 auto tset = TestCommon(key, myKey, NODE_NUMBERS); in HWTEST_F_L0() 81 key.Update(JSTaggedValue::Hole()); in HWTEST_F_L0() 82 JSAPITreeSet::Add(thread, tset, key); in HWTEST_F_L0() 87 key.Update(factory->NewFromStdString(ikey).GetTaggedValue()); in HWTEST_F_L0() 90 bool has = JSAPITreeSet::Has(thread, tset, key); in HWTEST_F_L0() 100 JSMutableHandle<JSTaggedValue> key(threa in HWTEST_F_L0() [all...] |
H A D | js_arguments_test.cpp | 44 JSHandle<JSTaggedValue> key(thread->GetEcmaVM()->GetFactory()->NewFromASCII(array)); in HWTEST_F_L0() 49 EXPECT_TRUE(JSArguments::SetProperty(thread, arg, key, value, receiver)); in HWTEST_F_L0() 50 EXPECT_EQ(JSObject::GetProperty(thread, JSHandle<JSTaggedValue>(jsarg), key).GetValue()->GetInt(), 1); in HWTEST_F_L0() 51 EXPECT_EQ(JSArguments::GetProperty(thread, jsarg, key).GetValue()->GetInt(), 1); in HWTEST_F_L0() 54 EXPECT_TRUE(JSArguments::SetProperty(thread, arg, key, value2, receiver)); in HWTEST_F_L0() 55 EXPECT_EQ(JSObject::GetProperty(thread, JSHandle<JSTaggedValue>(jsarg), key).GetValue()->GetInt(), 2); in HWTEST_F_L0() 56 EXPECT_EQ(JSArguments::GetProperty(thread, jsarg, key).GetValue()->GetInt(), 2); in HWTEST_F_L0() 67 JSHandle<JSTaggedValue> key(thread->GetEcmaVM()->GetFactory()->NewFromASCII(array)); in HWTEST_F_L0() 71 JSArguments::SetProperty(thread, arg, key, value, receiver); in HWTEST_F_L0() 72 EXPECT_EQ(JSObject::GetProperty(thread, JSHandle<JSTaggedValue>(jsarg), key) in HWTEST_F_L0() [all...] |
/arkcompiler/runtime_core/static_core/templates/ |
H A D | plugin_options.rb | 46 def assign_data_level(cur_hash, key, cur_data) 55 wrap_hash_level(cur_hash, key, cur_data) 57 wrap_array_level(cur_hash, key, cur_data) 59 if !cur_hash[key] 60 cur_hash[key] = cur_data.to_s 61 elsif cur_hash[key].class == Array 62 cur_hash[key].append(cur_data.to_s) 64 cur_hash[key] = [cur_hash[key]].append(cur_data.to_s) 69 def wrap_array_level(cur_hash, key, cur_dat [all...] |
/arkcompiler/ets_runtime/ecmascript/dfx/hprof/ |
H A D | string_hashmap.cpp | 23 StringKey key = GenerateStringKey(cstr); in FindOrInsertString() local 24 auto it = hashmap_.find(key); in FindOrInsertString() 31 hashmap_.emplace(key, newStr); in FindOrInsertString() 32 orderedKey_.emplace_back(key); in FindOrInsertString() 33 indexMap_.emplace(key, index_); in FindOrInsertString() 44 CString *StringHashMap::GetStringByKey(StringKey key) const in GetStringByKey() 46 auto it = hashmap_.find(key); in GetStringByKey() 53 std::pair<uint64_t, CString *> StringHashMap::GetStringAndIdPair(StringKey key) const in GetStringAndIdPair() 55 auto it = hashmap_.find(key); in GetStringAndIdPair() 57 return {indexMap_.at(key), i in GetStringAndIdPair() 65 StringKey key = GenerateStringKey(cstr); InsertStrAndGetStringId() local [all...] |
/arkcompiler/ets_frontend/es2panda/ir/ |
H A D | astDump.h | 76 Property(const char *key, const char *string) : key_(key), value_(string) {} in Property() argument 77 Property(const char *key, util::StringView str) : key_(key), value_(str) {} in Property() argument 78 Property(const char *key, bool boolean) : key_(key), value_(boolean) {} in Property() argument 79 Property(const char *key, double number) : key_(key), value_(number) {} in Property() argument 80 Property(const char *key, lexer::TokenType token) : key_(key), value in Property() argument 81 Property(const char *key, std::initializer_list<Property> props) Property() argument 82 Property(const char *key, const ir::AstNode *node) Property() argument 84 Property(const char *key, Constant constant) Property() argument 85 Property(const char *key, Nullable nullable) Property() argument 94 Property(const char *key, Optional optional) Property() argument 116 Property(const char *key, const ArenaVector<T> &array) Property() argument [all...] |
/arkcompiler/ets_runtime/ecmascript/require/ |
H A D | js_cjs_module_cache.h | 68 static inline uint32_t Hash(const JSTaggedValue &key) in Hash() argument 70 ASSERT(key.IsString()); in Hash() 71 EcmaString *nameStr = static_cast<EcmaString *>(key.GetTaggedObject()); in Hash() 82 inline int FindEntry(const JSTaggedValue &key) in FindEntry() argument 87 uint32_t hash = Hash(key); in FindEntry() 97 if (IsMatch(key, keyValue)) { in FindEntry() 104 inline bool ContainsModule(const JSTaggedValue &key) in ContainsModule() argument 106 int entry = FindEntry(key); in ContainsModule() 110 inline JSTaggedValue GetModule(const JSTaggedValue &key) in GetModule() argument 112 int entry = FindEntry(key); in GetModule() 117 SetEntry(const JSThread *thread, int entry, const JSHandle<JSTaggedValue> &key, const JSHandle<JSTaggedValue> &value) SetEntry() argument [all...] |
/arkcompiler/ets_runtime/test/fuzztest/containerstreemapcommon_fuzzer/ |
H A D | containerstreemapcommon_fuzzer.h | 56 JSHandle<JSTaggedValue> key(factory->NewFromASCII("ArkPrivate")); in InitializeTreeMapConstructor() 58 JSObject::GetProperty(thread, JSHandle<JSTaggedValue>(globalObject), key).GetValue(); in InitializeTreeMapConstructor() 81 static bool InitFuzzTest(const uint8_t *data, size_t &size, int32_t &key, EcmaVM *&vm, JSThread *&thread) in InitFuzzTest() argument 95 if (memcpy_s(&key, maxByteLen, data, size) != EOK) { in InitFuzzTest() 106 int32_t key = 0; in ContainersTreeMapClearFuzzTest() local 107 if (!InitFuzzTest(data, size, key, vm, thread)) { in ContainersTreeMapClearFuzzTest() 116 callInfo->SetCallArg(1, JSTaggedValue(key)); in ContainersTreeMapClearFuzzTest() 131 int32_t key = 0; in ContainersTreeMapConstructorFuzzTest() local 132 if (!InitFuzzTest(data, size, key, vm, thread)) { in ContainersTreeMapConstructorFuzzTest() 140 callInfo->SetCallArg(0, JSTaggedValue(key)); in ContainersTreeMapConstructorFuzzTest() 149 int32_t key = 0; ContainersTreeMapEntriesFuzzTest() local 179 int32_t key = 0; ContainersTreeMapForEachFuzzTest() local 210 int32_t key = 0; ContainersTreeMapGetFuzzTest() local 229 int32_t key = 0; ContainersTreeMapGetFirstKeyFuzzTest() local 254 int32_t key = 0; ContainersTreeMapGetHigherKeyFuzzTest() local 280 int32_t key = 0; ContainersTreeMapGetLastKeyFuzzTest() local 305 int32_t key = 0; ContainersTreeMapGetLengthFuzzTest() local 331 int32_t key = 0; ContainersTreeMapGetLowerKeyFuzzTest() local 357 int32_t key = 0; ContainersTreeMapCheckKeyFuzzTest() local 376 int32_t key = 0; ContainersTreeMapCheckValueFuzzTest() local 395 int32_t key = 0; ContainersTreeMapIsEmptyFuzzTest() local 415 int32_t key = 0; ContainersTreeMapKeysFuzzTest() local 439 int32_t key = 0; ContainersTreeMapRemoveFuzzTest() local 466 int32_t key = 0; ContainersTreeMapReplaceFuzzTest() local 495 int32_t key = 0; ContainersTreeMapSetFuzzTest() local 515 int32_t key = 0; ContainersTreeMapSetAllFuzzTest() local 542 int32_t key = 0; ContainersTreeMapValuesFuzzTest() local [all...] |
/arkcompiler/ets_runtime/ecmascript/compiler/codegen/maple/maple_util/include/ |
H A D | factory.h | 30 void Register(const key_type &key, creator_type func) in Register() argument 32 if (creator.find(key) == creator.end()) { in Register() 33 creator[key] = func; in Register() 37 std::unique_ptr<TObject> Create(const key_type &key, TArgs... args) const in Create() argument 39 auto it = creator.find(key); in Create() 76 inline auto CreateProductObject(const typename TFactory::key_type &key, TArgs &&... args) in CreateProductObject() argument 78 return TFactory::ins().Create(key, std::forward<TArgs>(args)...); in CreateProductObject() 87 void Register(const key_type &key, creator_type func) in Register() argument 89 if (creator.find(key) == creator.end()) { in Register() 90 creator[key] in Register() 121 RegisterFactoryFunction(const typename TFactory::key_type &key, typename TFactory::creator_type func) RegisterFactoryFunction() argument 127 CreateProductFunction(const typename TFactory::key_type &key) CreateProductFunction() argument [all...] |
/arkcompiler/ets_frontend/test/scripts/performance_test/ |
H A D | performance_build.py | 50 def append_into_dic(key, value, dic): 51 if key not in dic: 52 dic[key] = [] 53 dic[key].append(value) 267 for key in self.preview_all_time_dic: 268 task_count = len(self.preview_all_time_dic[key]) 280 self.preview_all_time_dic[key].insert(index + 1, 0) 281 sum_build_time = sum_build_time + self.preview_all_time_dic[key][index] 283 PerformanceBuild.append_into_dic(key, cost, self.preview_avg_time_dic) 286 for i in range(1, len(self.preview_all_time_dic[key]), [all...] |
/arkcompiler/ets_frontend/ets2panda/ir/ |
H A D | astDump.h | 90 Property(const char *key, const char *string) : key_(key), value_(string) {} in Property() argument 91 Property(const char *key, util::StringView str) : key_(key), value_(str) {} in Property() argument 92 Property(const char *key, bool boolean) : key_(key), value_(boolean) {} in Property() argument 93 Property(const char *key, char16_t c16) : key_(key), value_(c16) {} in Property() argument 94 Property(const char *key, lexer::Number number) : key_(key), value in Property() argument 95 Property(const char *key, lexer::TokenType token) Property() argument 96 Property(const char *key, std::initializer_list<Property> props) Property() argument 97 Property(const char *key, const ir::AstNode *node) Property() argument 99 Property(const char *key, Constant constant) Property() argument 100 Property(const char *key, Nullish nullish) Property() argument 109 Property(const char *key, const Optional &optional) Property() argument 140 Property(const char *key, const ArenaVector<T> &array) Property() argument 158 Property(const char *key, const ArenaVector<T> &array, const std::function<bool(AstNode *)> &filter) Property() argument [all...] |