• Home
  • Raw
  • Download

Lines Matching full:index

32                                                       int32_t index)  in IncreaseCapacityTo()  argument
35 if (index < DEFAULT_CAPACITY_LENGTH || num >= index) { in IncreaseCapacityTo()
41 JSHandle<TaggedArray> newHashArray = GrowCapacity(thread, hashArray, index); in IncreaseCapacityTo()
42 JSHandle<TaggedArray> newKeyArray = GrowCapacity(thread, keyArray, index); in IncreaseCapacityTo()
43 JSHandle<TaggedArray> newValueArray = GrowCapacity(thread, valueArray, index); in IncreaseCapacityTo()
51 … int32_t index, const JSHandle<JSTaggedValue> &value, AccossorsKind kind) in InsertValue() argument
57 newArray = factory->InsertElementByIndex(newArray, value, index, len); in InsertValue()
62 … int32_t index, const JSHandle<JSTaggedValue> &value, AccossorsKind kind) in ReplaceValue() argument
65 ASSERT(0 <= index || index < lightWeightMap->GetSize()); in ReplaceValue()
66 array->Set(thread, index, value.GetTaggedValue()); in ReplaceValue()
70 uint32_t index, AccossorsKind kind) in RemoveValue() argument
74 ASSERT(index < len); in RemoveValue()
76 factory->RemoveElementByIndex(array, index, len); in RemoveValue()
83 int32_t index = keyState.index; in Set() local
85 ReplaceValue(thread, lightWeightMap, index, value, AccossorsKind::VALUE); in Set()
88 InsertValue(thread, lightWeightMap, index, hashHandle, AccossorsKind::HASH); in Set()
89 InsertValue(thread, lightWeightMap, index, key, AccossorsKind::KEY); in Set()
90 InsertValue(thread, lightWeightMap, index, value, AccossorsKind::VALUE); in Set()
98 int32_t index = GetIndexOfKey(thread, lightWeightMap, key); in Get() local
99 if (index < 0) { in Get()
103 return valueArray->Get(index); in Get()
120 int32_t index = -1; in HasAll() local
126 index = BinarySearchHashes(oldHashArray, hash, len); in HasAll()
127 if (index < 0 || index >= len) { in HasAll()
131 index = AvoidHashCollision(params, index, len, hash); in HasAll()
132 if (!JSTaggedValue::SameValue(oldKeyArray->Get(index), dealKey) || in HasAll()
133 !JSTaggedValue::SameValue(oldValueArray->Get(index), newValueArray->Get(num))) { in HasAll()
165 return keyState.existed ? keyState.index : -1; in GetIndexOfKey()
174 int32_t index = BinarySearchHashes(hashArray, hash, length); in GetStateOfKey() local
175 if (index >= 0) { in GetStateOfKey()
178 int32_t right = index; in GetStateOfKey()
185 int32_t left = index - 1; in GetStateOfKey()
192 return KeyState {false, hash, right}; // first index whose element is bigger than hash in GetStateOfKey()
194 …return KeyState {false, hash, index ^ HASH_REBELLION}; // first index whose element is bigger than… in GetStateOfKey()
212 int32_t index) in GetKeyAt() argument
215 if (index < 0 || length <= index) { in GetKeyAt()
217 oss << "The value of \"index\" is out of range. It must be >= 0 && <= " << (length - 1) in GetKeyAt()
218 << ". Received value is: " << index; in GetKeyAt()
223 return keyArray->Get(index); in GetKeyAt()
227 int32_t index) in GetValueAt() argument
230 if (index < 0 || length <= index) { in GetValueAt()
232 oss << "The value of \"index\" is out of range. It must be >= 0 && <= " << (length - 1) in GetValueAt()
233 << ". Received value is: " << index; in GetValueAt()
238 return valueArray->Get(index); in GetValueAt()
263 int32_t index = keyState.index; in Remove() local
265 JSTaggedValue value = valueArray->Get(index); in Remove()
266 RemoveValue(thread, lightWeightMap, index, AccossorsKind::HASH); in Remove()
267 RemoveValue(thread, lightWeightMap, index, AccossorsKind::VALUE); in Remove()
268 RemoveValue(thread, lightWeightMap, index, AccossorsKind::KEY); in Remove()
274 … const JSHandle<JSAPILightWeightMap> &lightWeightMap, int32_t index) in RemoveAt() argument
277 if (index < 0 || length <= index) { in RemoveAt()
280 RemoveValue(thread, lightWeightMap, index, AccossorsKind::HASH); in RemoveAt()
281 RemoveValue(thread, lightWeightMap, index, AccossorsKind::VALUE); in RemoveAt()
282 RemoveValue(thread, lightWeightMap, index, AccossorsKind::KEY); in RemoveAt()
309 int32_t index, const JSHandle<JSTaggedValue> &value) in SetValueAt() argument
312 if (index < 0 || length <= index) { in SetValueAt()
314 oss << "The value of \"index\" is out of range. It must be >= 0 && <= " << (length - 1) in SetValueAt()
315 << ". Received value is: " << index; in SetValueAt()
319 ReplaceValue(thread, lightWeightMap, index, value, AccossorsKind::VALUE); in SetValueAt()
323 int32_t JSAPILightWeightMap::AvoidHashCollision(HashParams &params, int32_t index, int32_t size, in… in AvoidHashCollision() argument
325 int32_t right = index; in AvoidHashCollision()
332 int32_t left = index - 1; in AvoidHashCollision()