Did I find the right examples for you? yes no

All Samples(401)  |  Call(307)  |  Derive(0)  |  Import(94)

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
    def add(self, offset):
        res = self.clone()
        try:
            res.lower = ovfcheck(res.lower + offset)
        except OverflowError:
            res.has_lower = False
        try:
            res.upper = ovfcheck(res.upper + offset)
    def add_bound(self, other):
        res = self.clone()
        if other.has_upper:
            try:
                res.upper = ovfcheck(res.upper + other.upper)
        if other.has_lower:
            try:
                res.lower = ovfcheck(res.lower + other.lower)
            except OverflowError:
                res.has_lower = False            

src/s/y/Sypy-HEAD/jit/metainterp/blackhole.py   Sypy(Download)
from pypy.rlib.debug import debug_start, debug_stop, ll_assert, make_sure_not_resized
from pypy.rlib.objectmodel import we_are_translated
from pypy.rlib.rarithmetic import intmask, LONG_BIT, r_uint, ovfcheck
from pypy.rlib.rtimer import read_timestamp
from pypy.rlib.unroll import unrolling_iterable
    def bhimpl_int_add_ovf(a, b):
        return ovfcheck(a + b)
 
    @arguments("i", "i", returns="i")
    def bhimpl_int_sub_ovf(a, b):
        return ovfcheck(a - b)
 
    @arguments("i", "i", returns="i")
    def bhimpl_int_mul_ovf(a, b):
        return ovfcheck(a * b)

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/objspace/flow/operation.py   plexnet(Download)
import operator, types, __future__
from pypy.tool.sourcetools import compile2
from pypy.rlib.rarithmetic import ovfcheck, ovfcheck_lshift
 
FunctionByName = {}   # dict {"operation_name": <built-in function>}
def neg_ovf(x):
    return ovfcheck(-x)
 
def abs_ovf(x):
    return ovfcheck(abs(x))
 
def add_ovf(x, y):
    return ovfcheck(x + y)
def sub_ovf(x, y):
    return ovfcheck(x - y)
 
def mul_ovf(x, y):
    return ovfcheck(x * y)

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/rpython/llinterp.py   plexnet(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, ovfcheck_lshift
from pypy.rpython.lltypesystem import lltype, llmemory, lloperation, llheap
from pypy.rpython.lltypesystem import rclass
    def op_int_neg_ovf(self, x):
        assert type(x) is int
        try:
            return ovfcheck(-x)
        except OverflowError:
    def op_int_abs_ovf(self, x):
        assert type(x) is int
        try:
            return ovfcheck(abs(x))
        except OverflowError:
    def op_llong_neg_ovf(self, x):
        assert type(x) is r_longlong
        try:
            return ovfcheck(-x)
        except OverflowError:
    def op_llong_abs_ovf(self, x):
        assert type(x) is r_longlong
        try:
            return ovfcheck(abs(x))
        except OverflowError:

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 add__Int_Int(space, w_int1, w_int2):
    x = w_int1.intval
    y = w_int2.intval
    try:
        z = ovfcheck(x + y)
def sub__Int_Int(space, w_int1, w_int2):
    x = w_int1.intval
    y = w_int2.intval
    try:
        z = ovfcheck(x - y)
def mul__Int_Int(space, w_int1, w_int2):
    x = w_int1.intval
    y = w_int2.intval
    try:
        z = ovfcheck(x * y)
def floordiv__Int_Int(space, w_int1, w_int2):
    x = w_int1.intval
    y = w_int2.intval
    try:
        z = ovfcheck(x // y)

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:
    def op_int_abs_ovf(self, x):
        assert is_valid_int(x)
        try:
            return ovfcheck(abs(x))
        except OverflowError:
    def op_int_lshift_ovf(self, x, y):
        assert is_valid_int(x)
        assert is_valid_int(y)
        try:
            return ovfcheck(x << y)

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/rlib/rbigint.py   plexnet(Download)
from pypy.rlib.rarithmetic import LONG_BIT, intmask, r_uint, r_ulonglong
from pypy.rlib.rarithmetic import ovfcheck, r_longlong, widen
from pypy.rlib.debug import make_sure_not_resized
 
import math, sys
    else:
        try:
            y = ovfcheck(-x)
        except OverflowError:
            y = -1

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/objspace/std/intobject.py   plexnet(Download)
from pypy.objspace.std.objspace import *
from pypy.objspace.std.noneobject import W_NoneObject
from pypy.rlib.rarithmetic import ovfcheck, ovfcheck_lshift, LONG_BIT, r_uint
from pypy.rlib.rbigint import rbigint
from pypy.objspace.std.inttype import wrapint
def add__Int_Int(space, w_int1, w_int2):
    x = w_int1.intval
    y = w_int2.intval
    try:
        z = ovfcheck(x + y)
def sub__Int_Int(space, w_int1, w_int2):
    x = w_int1.intval
    y = w_int2.intval
    try:
        z = ovfcheck(x - y)
def mul__Int_Int(space, w_int1, w_int2):
    x = w_int1.intval
    y = w_int2.intval
    try:
        z = ovfcheck(x * y)
def floordiv__Int_Int(space, w_int1, w_int2):
    x = w_int1.intval
    y = w_int2.intval
    try:
        z = ovfcheck(x // y)

src/s/y/Sypy-HEAD/objspace/flow/operation.py   Sypy(Download)
from pypy.interpreter.error import OperationError
from pypy.tool.sourcetools import compile2
from pypy.rlib.rarithmetic import ovfcheck
from pypy.objspace.flow import model
 
def neg_ovf(x):
    return ovfcheck(-x)
 
def abs_ovf(x):
    return ovfcheck(abs(x))
 
def add_ovf(x, y):
    return ovfcheck(x + y)
def sub_ovf(x, y):
    return ovfcheck(x - y)
 
def mul_ovf(x, y):
    return ovfcheck(x * y)

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/objspace/std/smallintobject.py   plexnet(Download)
from pypy.objspace.std.objspace import *
from pypy.objspace.std.noneobject import W_NoneObject
from pypy.rlib.rarithmetic import ovfcheck, ovfcheck_lshift, LONG_BIT, r_uint
from pypy.objspace.std.inttype import wrapint
from pypy.objspace.std.intobject import W_IntObject
def add__SmallInt_SmallInt(space, w_int1, w_int2):
    x = w_int1.intval
    y = w_int2.intval
    try:
        z = ovfcheck(x + y)
def sub__SmallInt_SmallInt(space, w_int1, w_int2):
    x = w_int1.intval
    y = w_int2.intval
    try:
        z = ovfcheck(x - y)
def mul__SmallInt_SmallInt(space, w_int1, w_int2):
    x = w_int1.intval
    y = w_int2.intval
    try:
        z = ovfcheck(x * y)
def div__SmallInt_SmallInt(space, w_int1, w_int2):
    x = w_int1.intval
    y = w_int2.intval
    try:
        z = ovfcheck(x // y)

  1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9  Next