Exemple #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 rpython.rtyper.lltypesystem import lltype
    from rpython.rtyper.lltypesystem.lloperation import llop
    if not objectmodel.we_are_translated():
        assert n <= p
    return llop.int_between(lltype.Bool, n, m, p)
Exemple #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 rpython.rtyper.lltypesystem import lltype
    from rpython.rtyper.lltypesystem.lloperation import llop
    if not objectmodel.we_are_translated():
        assert n <= p
    return llop.int_between(lltype.Bool, n, m, p)
Exemple #3
0
 def ll_isinstance_const_nonnull(obj):
     objid = obj.typeptr.subclassrange_min
     return llop.int_between(Bool, minid, objid, maxid)
Exemple #4
0
def ll_issubclass_const(subcls, minid, maxid):
    return llop.int_between(Bool, minid, subcls.subclassrange_min, maxid)
Exemple #5
0
def ll_issubclass(subcls, cls):
    return llop.int_between(Bool, cls.subclassrange_min,
                            subcls.subclassrange_min, cls.subclassrange_max)
Exemple #6
0
def ll_issubclass_const(subcls, minid, maxid):
    return llop.int_between(Bool, minid, subcls.subclassrange_min, maxid)
Exemple #7
0
def ll_issubclass(subcls, cls):
    return llop.int_between(Bool, cls.subclassrange_min,
                                  subcls.subclassrange_min,
                                  cls.subclassrange_max)
Exemple #8
0
 def ll_isinstance_const_nonnull(obj):
     objid = obj.typeptr.subclassrange_min
     return llop.int_between(Bool, minid, objid, maxid)
Exemple #9
0
 def f(n, m, p):
     return llop.int_between(lltype.Bool, n, m, p)
Exemple #10
0
 def f(n, m, p):
     return llop.int_between(lltype.Bool, n, m, p)