/arkcompiler/ets_runtime/ecmascript/builtins/tests/ |
H A D | builtins_weak_map_test.cpp | 99 JSHandle<JSWeakMap> weakMap(thread, JSWeakMap::Cast(reinterpret_cast<TaggedObject *>(result1.GetRawData()))); in HWTEST_F_L0() 100 EXPECT_EQ(weakMap->GetSize(), 1); in HWTEST_F_L0() 106 JSHandle<JSWeakMap> weakMap(thread, CreateBuiltinsWeakMap(thread)); in HWTEST_F_L0() 111 ecmaRuntimeCallInfo->SetThis(weakMap.GetTaggedValue()); in HWTEST_F_L0() 144 void KeySetCommon(JSThread* thread, JSHandle<JSWeakMap>& weakMap, JSHandle<JSTaggedValue>& key, int32_t val) in KeySetCommon() argument 148 ecmaRuntimeCallInfo->SetThis(weakMap.GetTaggedValue()); in KeySetCommon() 164 JSHandle<JSWeakMap> weakMap(thread, CreateBuiltinsWeakMap(thread)); in HWTEST_F_L0() 170 KeySetCommon(thread, weakMap, key, static_cast<int32_t>(i)); in HWTEST_F_L0() 178 ecmaRuntimeCallInfo1->SetThis(weakMap.GetTaggedValue()); in HWTEST_F_L0() 201 JSHandle<JSWeakMap> weakMap(threa in HWTEST_F_L0() [all...] |
/arkcompiler/ets_runtime/test/fuzztest/weakmapref_fuzzer/ |
H A D | weakmapref_fuzzer.cpp | 49 JSHandle<JSWeakMap> weakMap = in WeakMapRefFuzzTest() local 53 weakMap->SetLinkedMap(thread, hashMap); in WeakMapRefFuzzTest() 54 JSHandle<JSTaggedValue> weakMapTag = JSHandle<JSTaggedValue>::Cast(weakMap); in WeakMapRefFuzzTest() 58 JSWeakMap::Set(thread, weakMap, key, value); in WeakMapRefFuzzTest()
|
/arkcompiler/ets_runtime/ecmascript/builtins/ |
H A D | builtins_weak_map.cpp | 41 JSHandle<JSWeakMap> weakMap = JSHandle<JSWeakMap>::Cast(obj); in WeakMapConstructor() local 45 weakMap->SetLinkedMap(thread, linkedMap); in WeakMapConstructor() 52 return weakMap.GetTaggedValue(); in WeakMapConstructor() 57 // Let adder be Get(weakMap, "set"). in WeakMapConstructor() 60 JSObject::GetProperty(thread, JSHandle<JSTaggedValue>(weakMap), adderKey).GetValue(); in WeakMapConstructor() 83 JSHandle<JSWeakMap> weakMap(self); in Delete() 89 return GetTaggedBoolean(JSWeakMap::Delete(thread, weakMap, key)); in Delete()
|
/arkcompiler/ets_runtime/ecmascript/napi/test/ |
H A D | jsnapi_sample.cpp | 2369 Local<WeakMapRef> weakMap = WeakMapRef::New(vm_); in HWTEST_F_L0() local 2370 weakMap->Set(vm_, StringRef::NewFromUtf8(vm_, "key1"), StringRef::NewFromUtf8(vm_, "val1")); in HWTEST_F_L0() 2372 weakMap->Set(vm_, StringRef::NewFromUtf8(vm_, "key2"), NumberRef::New(vm_, num2)); in HWTEST_F_L0() 2373 weakMap->Set(vm_, StringRef::NewFromUtf8(vm_, "key3"), BooleanRef::New(vm_, true)); in HWTEST_F_L0() 2374 weakMap->Set(vm_, StringRef::NewFromUtf8(vm_, "key4"), SymbolRef::New(vm_, StringRef::NewFromUtf8(vm_, "val4"))); in HWTEST_F_L0() 2375 weakMap->Set(vm_, IntegerRef::New(vm_, 55), StringRef::NewFromUtf8(vm_, "val5")); in HWTEST_F_L0() 2377 weakMap->Set(vm_, IntegerRef::New(vm_, 66), IntegerRef::New(vm_, num6)); in HWTEST_F_L0() 2378 weakMap->Set(vm_, BooleanRef::New(vm_, true), StringRef::NewFromUtf8(vm_, "val7")); in HWTEST_F_L0() 2380 weakMap->Set(vm_, key8, StringRef::NewFromUtf8(vm_, "val8")); in HWTEST_F_L0() 2382 int size = weakMap in HWTEST_F_L0() [all...] |
H A D | jsnapi_third_tests.cpp | 843 JSHandle<JSWeakMap> weakMap = in HWTEST_F_L0() local 846 weakMap->SetLinkedMap(thread, hashMap); in HWTEST_F_L0() 847 JSHandle<JSTaggedValue> weakMapTag = JSHandle<JSTaggedValue>::Cast(weakMap); in HWTEST_F_L0() 853 JSWeakMap::Set(thread, weakMap, key, value); in HWTEST_F_L0()
|
H A D | jsnapi_first_tests.cpp | 1222 // new with Builtins::weakMap Prototype in HWTEST_F_L0() 1223 JSHandle<JSTaggedValue> weakMap = env->GetBuiltinsWeakMapFunction(); in HWTEST_F_L0() local 1224 Local<FunctionRef> weakMapLocal = JSNApiHelper::ToLocal<FunctionRef>(weakMap); in HWTEST_F_L0() 1232 bool success1 = JSObject::DefineOwnProperty(thread_, JSHandle<JSObject>::Cast(weakMap), property1String, desc1); in HWTEST_F_L0()
|
/arkcompiler/ets_runtime/ecmascript/napi/ |
H A D | jsnapi_expo.cpp | 6180 JSHandle<JSWeakMap> weakMap(JSNApiHelper::ToJSHandle(this)); in GetSize() 6181 return weakMap->GetSize(); in GetSize() 6188 JSHandle<JSWeakMap> weakMap(JSNApiHelper::ToJSHandle(this)); in GetTotalElements() 6189 return weakMap->GetSize() + in GetTotalElements() 6190 LinkedHashMap::Cast(weakMap->GetLinkedMap().GetTaggedObject())->NumberOfDeletedElements(); in GetTotalElements() 6197 JSHandle<JSWeakMap> weakMap(JSNApiHelper::ToJSHandle(this)); in GetKey() 6198 LOG_IF_SPECIAL(weakMap, FATAL); in GetKey() 6199 JSTaggedValue key = weakMap->GetKey(entry); in GetKey() 6206 JSHandle<JSWeakMap> weakMap(JSNApiHelper::ToJSHandle(this)); in GetValue() 6207 LOG_IF_SPECIAL(weakMap, FATA in GetValue() 6218 JSHandle<JSWeakMap> weakMap = New() local [all...] |