Lines Matching refs:Level0
61 Level0;
66 void* child[256]; /* either LevelN* or Level0* */
76 void* curr_nd; /* LevelN* or Level0* */
158 static Level0* swa_new_Level0 ( const SparseWA* swa )
160 Level0* level0 = swa->alloc_nofail( swa->cc, sizeof(Level0) );
161 VG_(memset)(level0, 0, sizeof(*level0));
162 level0->magic = Level0_MAGIC;
163 return level0;
202 Level0* level0 = (Level0*)curr_nd;
204 if (swa_bitarray_read(level0->inUse, curr_ix) == 1) {
207 *valP = level0->words[curr_ix];
210 level0 = (Level0*)curr_nd;
282 Level0* level0;
298 /* level0 */
299 level0 = (Level0*)levelN;
300 if (!level0) return False;
301 vg_assert(level0->magic == Level0_MAGIC);
302 vg_assert(level0->nInUse > 0);
304 if (swa_bitarray_read(level0->inUse, ix) == 0) return False;
305 *valP = level0->words[ix];
314 Level0* level0;
348 level0 = levelN->child[ix];
350 /* level0 is the level-0 map */
351 vg_assert(level0);
352 vg_assert(level0->magic == Level0_MAGIC);
354 if (swa_bitarray_read_then_set(level0->inUse, ix) == 0) {
355 level0->nInUse++;
360 vg_assert(level0->nInUse >= 1 && level0->nInUse <= 256);
361 level0->words[ix] = val;
372 Level0* level0;
396 level0 = (Level0*)levelN;
397 if (!level0) return False;
398 vg_assert(level0->magic == Level0_MAGIC);
399 vg_assert(level0->nInUse > 0);
402 if (swa_bitarray_read_then_clear(level0->inUse, ix) == 0)
405 *oldV = level0->words[ix];
407 level0->nInUse--;
408 if (level0->nInUse > 0)
412 swa->dealloc( level0 );
446 const Level0* level0;
448 level0 = nd;
449 return level0->nInUse;