Example #1
0
def int_between(n, m, p):
    """ check that n <= m < p. This assumes that n <= p. This is useful because
    the JIT special-cases it. """
    from pypy.rpython.lltypesystem import lltype
    from pypy.rpython.lltypesystem.lloperation import llop
    if not objectmodel.we_are_translated():
        assert n <= p
    return llop.int_between(lltype.Bool, n, m, p)
Example #2
0
def int_between(n, m, p):
    """ check that n <= m < p. This assumes that n <= p. This is useful because
    the JIT special-cases it. """
    from pypy.rpython.lltypesystem import lltype
    from pypy.rpython.lltypesystem.lloperation import llop
    if not objectmodel.we_are_translated():
        assert n <= p
    return llop.int_between(lltype.Bool, n, m, p)
Example #3
0
 def f(n, m, p):
     return llop.int_between(lltype.Bool, n, m, p)
Example #4
0
def ll_issubclass_const(subcls, minid, maxid):
    return llop.int_between(Bool, minid, subcls.subclassrange_min, maxid)
Example #5
0
def ll_issubclass(subcls, cls):
    return llop.int_between(Bool, cls.subclassrange_min,
                            subcls.subclassrange_min, cls.subclassrange_max)
Example #6
0
def ll_issubclass_const(subcls, minid, maxid):
    return llop.int_between(Bool, minid, subcls.subclassrange_min, maxid)
Example #7
0
def ll_issubclass(subcls, cls):
    return llop.int_between(Bool, cls.subclassrange_min, subcls.subclassrange_min, cls.subclassrange_max)
Example #8
0
 def f(n, m, p):
     return llop.int_between(lltype.Bool, n, m, p)