Example #1
0
    def test_known_nullity(self):
        h = HeapCache()
        assert not h.is_nullity_known(1)
        assert not h.is_nullity_known(2)
        h.nullity_now_known(1)
        assert h.is_nullity_known(1)
        assert not h.is_nullity_known(2)

        h.reset()
        assert not h.is_nullity_known(1)
        assert not h.is_nullity_known(2)
Example #2
0
    def test_known_nullity(self):
        h = HeapCache()
        box1 = RefFrontendOp(1)
        box2 = RefFrontendOp(2)
        assert not h.is_nullity_known(box1)
        assert not h.is_nullity_known(box2)
        h.nullity_now_known(box1)
        assert h.is_nullity_known(box1)
        assert not h.is_nullity_known(box2)

        h.reset()
        assert not h.is_nullity_known(box1)
        assert not h.is_nullity_known(box2)
Example #3
0
    def test_known_nullity(self):
        h = HeapCache()
        box1 = RefFrontendOp(1)
        box2 = RefFrontendOp(2)
        assert not h.is_nullity_known(box1)
        assert not h.is_nullity_known(box2)
        h.nullity_now_known(box1)
        assert h.is_nullity_known(box1)
        assert not h.is_nullity_known(box2)

        h.reset()
        assert not h.is_nullity_known(box1)
        assert not h.is_nullity_known(box2)