Did I find the right examples for you? yes no

All Samples(108)  |  Call(77)  |  Derive(0)  |  Import(31)

src/s/y/Sypy-HEAD/rpython/lltypesystem/opimpl.py   Sypy(Download)
from pypy.rpython.lltypesystem.lloperation import opimpls
from pypy.rlib import debug
from pypy.rlib.rarithmetic import is_valid_int
 
 
def op_direct_ptradd(obj, index):
    checkptr(obj)
    assert is_valid_int(index)
    return lltype.direct_ptradd(obj, index)
 
def op_int_sub(x, y):
    if not is_valid_int(x):
        from pypy.rpython.lltypesystem import llgroup
        assert isinstance(x, llgroup.CombinedSymbolic)
    assert is_valid_int(y)
def op_int_ge(x, y):
    # special case for 'AddressOffset >= 0'
    assert isinstance(x, (int, long, llmemory.AddressOffset))
    assert is_valid_int(y)
    return x >= y

src/s/y/Sypy-HEAD/jit/metainterp/optimizeopt/intutils.py   Sypy(Download)
from pypy.rlib.rarithmetic import ovfcheck, LONG_BIT, maxint, is_valid_int
from pypy.rlib.objectmodel import we_are_translated
from pypy.jit.metainterp.resoperation import rop, ResOperation
from pypy.jit.metainterp.history import BoxInt, ConstInt
MAXINT = maxint
        # check for unexpected overflows:
        if not we_are_translated():
            assert type(upper) is not long or is_valid_int(upper)
            assert type(lower) is not long or is_valid_int(lower)
 

src/s/y/Sypy-HEAD/objspace/std/objspace.py   Sypy(Download)
from pypy.rlib.objectmodel import instantiate, r_dict, specialize, is_annotation_constant
from pypy.rlib.debug import make_sure_not_resized
from pypy.rlib.rarithmetic import base_int, widen, maxint, is_valid_int
from pypy.rlib.objectmodel import we_are_translated
from pypy.rlib import jit
        # we might get there in non-translated versions if 'x' is
        # a long that fits the correct range.
        if is_valid_int(x):
            return self.newint(x)
 

src/s/y/Sypy-HEAD/rlib/rbigint.py   Sypy(Download)
from pypy.rlib.rarithmetic import LONG_BIT, intmask, r_uint, r_ulonglong
from pypy.rlib.rarithmetic import ovfcheck, r_longlong, widen, is_valid_int
from pypy.rlib.rarithmetic import most_neg_value_of_same_type
from pypy.rlib.rfloat import isfinite
from pypy.rlib.debug import make_sure_not_resized, check_regular_int
def _widen_digit(x):
    if not we_are_translated():
        assert is_valid_int(x), "widen_digit() takes an int, got a %r" % type(x)
    if SHIFT <= 15:
        return int(x)
    return r_longlong(x)
 
def _store_digit(x):
    if not we_are_translated():
        assert is_valid_int(x), "store_digit() takes an int, got a %r" % type(x)

src/s/y/Sypy-HEAD/rpython/llinterp.py   Sypy(Download)
from pypy.objspace.flow.model import FunctionGraph, Constant, Variable, c_last_exception
from pypy.rlib.rarithmetic import intmask, r_uint, ovfcheck, r_longlong
from pypy.rlib.rarithmetic import r_ulonglong, is_valid_int
from pypy.rpython.lltypesystem import lltype, llmemory, lloperation, llheap
from pypy.rpython.lltypesystem import rclass
    def op_int_neg_ovf(self, x):
        assert is_valid_int(x)
        try:
            return ovfcheck(-x)
        except OverflowError:
            self.make_llexception()
 
    def op_int_abs_ovf(self, x):
        assert is_valid_int(x)
    def op_int_lshift_ovf(self, x, y):
        assert is_valid_int(x)
        assert is_valid_int(y)
        try:
            return ovfcheck(x << y)

src/s/y/Sypy-HEAD/rpython/lltypesystem/lltype.py   Sypy(Download)
from pypy.tool import leakfinder
from types import NoneType
from pypy.rlib.rarithmetic import maxint, is_valid_int, is_emulated_long
import weakref
 
    def __init__(self, TYPE, n, initialization=None, parent=None, parentindex=None):
        if not is_valid_int(n):
            raise TypeError, "array length must be an int"
        if n < 0:
            raise ValueError, "negative array length"

src/s/y/Sypy-HEAD/objspace/std/intobject.py   Sypy(Download)
from pypy.objspace.std.register_all import register_all
from pypy.rlib import jit
from pypy.rlib.rarithmetic import ovfcheck, LONG_BIT, r_uint, is_valid_int
from pypy.rlib.rbigint import rbigint
 
    def __init__(w_self, intval, is_symbolic=False, symval=''):
        assert is_valid_int(intval)
        w_self.intval = intval
        w_self.__is_symbolic = is_symbolic
        w_self.symval = symval

src/s/y/Sypy-HEAD/module/signal/interp_signal.py   Sypy(Download)
from pypy.tool import autopath
from pypy.rlib import jit, rposix
from pypy.rlib.rarithmetic import intmask, is_valid_int
 
def setup():
    for key, value in cpy_signal.__dict__.items():
        if (key.startswith('SIG') or key.startswith('CTRL_')) and \
                is_valid_int(value) and \

src/s/y/Sypy-HEAD/rpython/memory/gc/markcompact.py   Sypy(Download)
from pypy.rpython.lltypesystem import rffi
from pypy.rpython.memory.gcheader import GCHeaderBuilder
from pypy.rlib.rarithmetic import is_valid_int
 
 
    def header_forwarded(self, addr):
        # like header(), but asserts that we have a forwarding header
        hdr = MovingGCBase.header(self, addr)
        if not we_are_translated():
            assert is_valid_int(hdr.tid)

src/s/y/Sypy-HEAD/objspace/flow/model.py   Sypy(Download)
from pypy.tool.descriptor import roproperty
from pypy.tool.sourcetools import PY_IDENTIFIER, nice_repr_for_func
from pypy.rlib.rarithmetic import is_valid_int, r_longlong, r_ulonglong, r_uint
 
 
                    has_default = cases[-1] == 'default'
                    for n in cases[:len(cases)-has_default]:
                        if is_valid_int(n):
                            continue
                        if isinstance(n, (r_longlong, r_ulonglong, r_uint)):

  1 | 2 | 3 | 4  Next