Lines Matching defs:lightWeightMap
27 const JSHandle<JSAPILightWeightMap> &lightWeightMap,
30 uint32_t num = lightWeightMap->GetSize();
34 JSHandle<TaggedArray> hashArray = GetArrayByKind(thread, lightWeightMap, AccossorsKind::HASH);
35 JSHandle<TaggedArray> keyArray = GetArrayByKind(thread, lightWeightMap, AccossorsKind::KEY);
36 JSHandle<TaggedArray> valueArray = GetArrayByKind(thread, lightWeightMap, AccossorsKind::VALUE);
40 lightWeightMap->SetHashes(thread, newHashArray);
41 lightWeightMap->SetKeys(thread, newKeyArray);
42 lightWeightMap->SetValues(thread, newValueArray);
46 void JSAPILightWeightMap::InsertValue(const JSThread *thread, const JSHandle<JSAPILightWeightMap> &lightWeightMap,
49 JSHandle<TaggedArray> array = GetArrayByKind(thread, lightWeightMap, kind);
50 uint32_t len = lightWeightMap->GetSize();
53 SetArrayByKind(thread, lightWeightMap, newArray, kind);
56 void JSAPILightWeightMap::ReplaceValue(const JSThread *thread, const JSHandle<JSAPILightWeightMap> &lightWeightMap,
59 JSHandle<TaggedArray> array = GetArrayByKind(thread, lightWeightMap, kind);
60 ASSERT(0 <= index || index < static_cast<int32_t>(lightWeightMap->GetSize()));
64 void JSAPILightWeightMap::RemoveValue(const JSThread *thread, const JSHandle<JSAPILightWeightMap> &lightWeightMap,
67 JSHandle<TaggedArray> array = GetArrayByKind(thread, lightWeightMap, kind);
68 uint32_t len = lightWeightMap->GetLength();
73 void JSAPILightWeightMap::Set(JSThread *thread, const JSHandle<JSAPILightWeightMap> &lightWeightMap,
76 KeyState keyState = GetStateOfKey(thread, lightWeightMap, key);
79 ReplaceValue(thread, lightWeightMap, index, value, AccossorsKind::VALUE);
82 InsertValue(thread, lightWeightMap, index, hashHandle, AccossorsKind::HASH);
83 InsertValue(thread, lightWeightMap, index, key, AccossorsKind::KEY);
84 InsertValue(thread, lightWeightMap, index, value, AccossorsKind::VALUE);
85 lightWeightMap->SetLength(lightWeightMap->GetLength() + 1);
89 JSTaggedValue JSAPILightWeightMap::Get(JSThread *thread, const JSHandle<JSAPILightWeightMap> &lightWeightMap,
92 int32_t index = GetIndexOfKey(thread, lightWeightMap, key);
96 JSHandle<TaggedArray> valueArray = GetArrayByKind(thread, lightWeightMap, AccossorsKind::VALUE);
100 JSTaggedValue JSAPILightWeightMap::HasAll(JSThread *thread, const JSHandle<JSAPILightWeightMap> &lightWeightMap,
104 uint32_t len = lightWeightMap->GetSize();
108 JSHandle<TaggedArray> oldHashArray = GetArrayByKind(thread, lightWeightMap, AccossorsKind::HASH);
109 JSHandle<TaggedArray> oldKeyArray = GetArrayByKind(thread, lightWeightMap, AccossorsKind::KEY);
110 JSHandle<TaggedArray> oldValueArray = GetArrayByKind(thread, lightWeightMap, AccossorsKind::VALUE);
135 JSTaggedValue JSAPILightWeightMap::HasKey(JSThread *thread, const JSHandle<JSAPILightWeightMap> &lightWeightMap,
138 KeyState keyState = GetStateOfKey(thread, lightWeightMap, key);
142 JSTaggedValue JSAPILightWeightMap::HasValue(JSThread *thread, const JSHandle<JSAPILightWeightMap> &lightWeightMap,
145 JSHandle<TaggedArray> valueArray = GetArrayByKind(thread, lightWeightMap, AccossorsKind::VALUE);
146 uint32_t length = lightWeightMap->GetSize();
155 int32_t JSAPILightWeightMap::GetIndexOfKey(JSThread *thread, const JSHandle<JSAPILightWeightMap> &lightWeightMap,
158 KeyState keyState = GetStateOfKey(thread, lightWeightMap, key);
162 KeyState JSAPILightWeightMap::GetStateOfKey(JSThread *thread, const JSHandle<JSAPILightWeightMap> &lightWeightMap,
166 int32_t length = static_cast<int32_t>(lightWeightMap->GetSize());
167 JSHandle<TaggedArray> hashArray = GetArrayByKind(thread, lightWeightMap, AccossorsKind::HASH);
171 JSHandle<TaggedArray> keyArray = GetArrayByKind(thread, lightWeightMap, AccossorsKind::KEY);
191 int32_t JSAPILightWeightMap::GetIndexOfValue(JSThread *thread, const JSHandle<JSAPILightWeightMap> &lightWeightMap,
194 JSHandle<TaggedArray> valueArray = GetArrayByKind(thread, lightWeightMap, AccossorsKind::VALUE);
195 uint32_t length = lightWeightMap->GetSize();
205 JSTaggedValue JSAPILightWeightMap::GetKeyAt(JSThread *thread, const JSHandle<JSAPILightWeightMap> &lightWeightMap,
208 int32_t length = static_cast<int32_t>(lightWeightMap->GetSize());
220 JSHandle<TaggedArray> keyArray = GetArrayByKind(thread, lightWeightMap, AccossorsKind::KEY);
224 JSTaggedValue JSAPILightWeightMap::GetValueAt(JSThread *thread, const JSHandle<JSAPILightWeightMap> &lightWeightMap,
227 int32_t length = static_cast<int32_t>(lightWeightMap->GetSize());
239 JSHandle<TaggedArray> valueArray = GetArrayByKind(thread, lightWeightMap, AccossorsKind::VALUE);
243 void JSAPILightWeightMap::SetAll(JSThread *thread, const JSHandle<JSAPILightWeightMap> &lightWeightMap,
254 JSAPILightWeightMap::Set(thread, lightWeightMap, key, value);
258 JSTaggedValue JSAPILightWeightMap::Remove(JSThread *thread, const JSHandle<JSAPILightWeightMap> &lightWeightMap,
261 KeyState keyState = GetStateOfKey(thread, lightWeightMap, key);
266 JSHandle<TaggedArray> valueArray = GetArrayByKind(thread, lightWeightMap, AccossorsKind::VALUE);
268 RemoveValue(thread, lightWeightMap, index, AccossorsKind::HASH);
269 RemoveValue(thread, lightWeightMap, index, AccossorsKind::VALUE);
270 RemoveValue(thread, lightWeightMap, index, AccossorsKind::KEY);
271 ASSERT(lightWeightMap->GetLength() > 0);
272 lightWeightMap->SetLength(lightWeightMap->GetLength() - 1);
277 const JSHandle<JSAPILightWeightMap> &lightWeightMap, int32_t index)
279 uint32_t length = lightWeightMap->GetSize();
283 RemoveValue(thread, lightWeightMap, index, AccossorsKind::HASH);
284 RemoveValue(thread, lightWeightMap, index, AccossorsKind::VALUE);
285 RemoveValue(thread, lightWeightMap, index, AccossorsKind::KEY);
286 lightWeightMap->SetLength(length - 1);
299 void JSAPILightWeightMap::Clear(JSThread *thread, const JSHandle<JSAPILightWeightMap> &lightWeightMap)
305 lightWeightMap->SetHashes(thread, hashArray.GetTaggedValue());
306 lightWeightMap->SetKeys(thread, keyArray.GetTaggedValue());
307 lightWeightMap->SetValues(thread, valueArray.GetTaggedValue());
308 lightWeightMap->SetLength(0);
311 JSTaggedValue JSAPILightWeightMap::SetValueAt(JSThread *thread, const JSHandle<JSAPILightWeightMap> &lightWeightMap,
314 int32_t length = static_cast<int32_t>(lightWeightMap->GetSize());
326 ReplaceValue(thread, lightWeightMap, index, value, AccossorsKind::VALUE);
360 JSTaggedValue JSAPILightWeightMap::ToString(JSThread *thread, const JSHandle<JSAPILightWeightMap> &lightWeightMap)
365 uint32_t length = lightWeightMap->GetLength();
372 valueHandle.Update(lightWeightMap->GetValueAt(thread, lightWeightMap, k));
381 keyHandle.Update(lightWeightMap->GetKeyAt(thread, lightWeightMap, k));
420 const JSHandle<JSAPILightWeightMap> &lightWeightMap,
426 lightWeightMap->SetHashes(thread, array);
429 lightWeightMap->SetKeys(thread, array);
432 lightWeightMap->SetValues(thread, array);
441 const JSHandle<JSAPILightWeightMap> &lightWeightMap,
447 array = JSHandle<TaggedArray>(thread, lightWeightMap->GetHashes());
450 array = JSHandle<TaggedArray>(thread, lightWeightMap->GetKeys());
453 array = JSHandle<TaggedArray>(thread, lightWeightMap->GetValues());