Esempio n. 1
0
    def __init__(self, descr, size, is_virtual=False):
        from rpython.jit.metainterp.optimizeopt import intutils

        self.length = size
        lgt = len(descr.get_all_fielddescrs())
        self.lenbound = intutils.ConstIntBound(size)
        self.descr = descr
        self._items = [None] * (size * lgt)
        self._is_virtual = is_virtual
Esempio n. 2
0
    def getlenbound(self, mode):
        from rpython.jit.metainterp.optimizeopt import intutils

        if self.lenbound is None:
            if self.length == -1:
                self.lenbound = intutils.IntBound(0, intutils.MAXINT)
            else:
                self.lenbound = intutils.ConstIntBound(self.length)
        return self.lenbound
Esempio n. 3
0
 def __init__(self, descr, const=None, size=0, clear=False,
              is_virtual=False):
     from rpython.jit.metainterp.optimizeopt import intutils
     assert descr is not None
     self.descr = descr
     self._is_virtual = is_virtual
     if is_virtual:
         self._init_items(const, size, clear)
         self.lenbound = intutils.ConstIntBound(size)
     self._clear = clear