Home | History | Annotate | Download | only in helgrind

Lines Matching refs:ws

271    Accessing a dead ws will assert. */
272 static WordVec* do_ix2vec ( WordSetU* wsu, WordSet ws )
278 /* If this assertion fails, it may mean you supplied a 'ws'
280 tl_assert(ws < wsu->ix2vec_used); /* XXX */
281 wv = wsu->ix2vec[ws];
282 /* Make absolutely sure that 'ws' is a non dead member of 'wsu'. */
289 /* Same as do_ix2vec but returns NULL for a dead ws. */
290 static WordVec* do_ix2vec_with_dead ( WordSetU* wsu, WordSet ws )
296 /* If this assertion fails, it may mean you supplied a 'ws'
298 tl_assert(ws < wsu->ix2vec_used); /* XXX */
299 wv = wsu->ix2vec[ws];
300 /* Make absolutely sure that 'ws' is either dead or a member of 'wsu'. */
333 WordSet ws;
335 ws = wsu->ix2vec_free - &(wsu->ix2vec[0]);
336 tl_assert(wsu->ix2vec[ws] == NULL || is_dead(wsu,wsu->ix2vec[ws]));
337 wsu->ix2vec_free = (WordVec **) wsu->ix2vec[ws];
338 wsu->ix2vec[ws] = wv_new;
339 VG_(addToFM)( wsu->vec2ix, (UWord)wv_new, ws );
340 if (HG_DEBUG) VG_(printf)("aodW %s re-use free %d %p\n", wsu->cc, (Int)ws, wv_new );
341 return ws;
400 Bool HG_(isEmptyWS) ( WordSetU* wsu, WordSet ws )
402 WordVec* wv = do_ix2vec( wsu, ws );
405 tl_assert(ws == wsu->empty);
408 tl_assert(ws != wsu->empty);
413 Bool HG_(isSingletonWS) ( WordSetU* wsu, WordSet ws, UWord w )
418 wv = do_ix2vec( wsu, ws );
422 UWord HG_(cardinalityWS) ( WordSetU* wsu, WordSet ws )
426 wv = do_ix2vec( wsu, ws );
431 UWord HG_(anyElementOfWS) ( WordSetU* wsu, WordSet ws )
436 wv = do_ix2vec( wsu, ws );
448 WordSetU* wsu, WordSet ws )
451 if (HG_DEBUG) VG_(printf)("getPayloadWS %s %d\n", wsu->cc, (Int)ws);
453 wv = do_ix2vec( wsu, ws );
459 void HG_(dieWS) ( WordSetU* wsu, WordSet ws )
461 WordVec* wv = do_ix2vec_with_dead( wsu, ws );
465 ws, wv);
467 if (ws == 0)
476 wsu->ix2vec[ws] = (WordVec*) wsu->ix2vec_free;
477 wsu->ix2vec_free = &wsu->ix2vec[ws];
485 tl_assert (wv_ix == ws);
495 Bool HG_(plausibleWS) ( WordSetU* wsu, WordSet ws )
498 if (ws < 0 || ws >= wsu->ix2vec_used)
503 Bool HG_(saneWS_SLOW) ( WordSetU* wsu, WordSet ws )
508 if (ws < 0 || ws >= wsu->ix2vec_used)
510 wv = do_ix2vec( wsu, ws );
523 Bool HG_(elemWS) ( WordSetU* wsu, WordSet ws, UWord w )
526 WordVec* wv = do_ix2vec( wsu, ws );
568 void HG_(ppWS) ( WordSetU* wsu, WordSet ws )
573 wv = do_ix2vec( wsu, ws );
605 WordSet HG_(addToWS) ( WordSetU* wsu, WordSet ws, UWord w )
613 WCache_LOOKUP_AND_RETURN(WordSet, wsu->cache_addTo, ws, w);
617 wv = do_ix2vec( wsu, ws );
620 result = ws;
642 WCache_UPDATE(wsu->cache_addTo, ws, w, result);
646 WordSet HG_(delFromWS) ( WordSetU* wsu, WordSet ws, UWord w )
651 WordVec* wv = do_ix2vec( wsu, ws );
657 tl_assert(ws == wsu->empty);
658 return ws;
661 WCache_LOOKUP_AND_RETURN(WordSet, wsu->cache_delFrom, ws, w);
670 result = ws;
673 /* So w is present in ws, and the new set will be one element
693 WCache_UPDATE(wsu->cache_delFrom, ws, w, result);
925 void show_WS ( WordSetU* wsu, WordSet ws )
928 WordVec* wv = do_ix2vec( wsu, ws );
929 VG_(printf)("#%u{", ws);