Did I find the right examples for you? yes no

All Samples(496)  |  Call(334)  |  Derive(0)  |  Import(162)

src/s/y/Sypy-HEAD/objspace/std/objspace.py   Sypy(Download)
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
 
    def createframe(self, code, w_globals, outer_func=None):
        from pypy.objspace.std.fake import CPythonFakeCode, CPythonFakeFrame
        if not we_are_translated() and isinstance(code, CPythonFakeCode):
            return CPythonFakeFrame(self, code, w_globals)
        else:
                cls = cls.typedef.applevel_subclasses_base
            #
            if not we_are_translated():
                if issubclass(cls, model.W_Object):
                    # If cls is missing from model.typeorder, then you

src/s/y/Sypy-HEAD/jit/metainterp/history.py   Sypy(Download)
 
from pypy.rpython.extregistry import ExtRegistryEntry
from pypy.rpython.lltypesystem import lltype, llmemory, rffi
from pypy.rpython.ootypesystem import ootype
from pypy.rlib.objectmodel import we_are_translated, Symbolic
    def clone_if_mutable(self):
        clone = self._clone_if_mutable()
        if not we_are_translated():
            assert clone.__class__ is self.__class__
        return clone
    def __init__(self, value):
        if not we_are_translated():
            if is_valid_int(value):
                value = int(value)    # bool -> int
            else:
    def __init__(self, value=0):
        if not we_are_translated():
            if is_valid_int(value):
                value = int(value)    # bool -> int
            else:
def make_hashable_int(i):
    from pypy.rpython.lltypesystem.ll2ctypes import NotCtypesAllocatedStructure
    if not we_are_translated() and isinstance(i, llmemory.AddressAsInt):
        # Warning: such a hash changes at the time of translation
        adr = heaptracker.int2adr(i)

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/jit/metainterp/history.py   plexnet(Download)
 
from pypy.rpython.extregistry import ExtRegistryEntry
from pypy.rpython.lltypesystem import lltype, llmemory, rffi
from pypy.rpython.ootypesystem import ootype
from pypy.rlib.objectmodel import we_are_translated, r_dict, Symbolic
        if kind == "int":
            if isinstance(T, lltype.Ptr):
                if not we_are_translated():
                    # cannot store integers representing casted addresses
                    # inside ConstInt() instances that are going through
    def __init__(self, value):
        if not we_are_translated():
            if isinstance(value, int):
                value = int(value)    # bool -> int
            else:
    def __init__(self, adrvalue, cpu):
        "NOT_RPYTHON"
        assert not we_are_translated()
        if isinstance(lltype.typeOf(adrvalue), lltype.Ptr):
            adrvalue = llmemory.cast_ptr_to_adr(adrvalue)    # convenience
    def __init__(self, value=0):
        if not we_are_translated():
            if isinstance(value, int):
                value = int(value)    # bool -> int
            else:

src/s/y/Sypy-HEAD/jit/backend/x86/assembler.py   Sypy(Download)
                                         imm0, imm1, FloatImmedLoc)
 
from pypy.rlib.objectmodel import we_are_translated, specialize
from pypy.jit.backend.x86 import rx86, regloc, codebuf
from pypy.jit.metainterp.resoperation import rop, ResOperation
        clt.allgcrefs = []
        looptoken.compiled_loop_token = clt
        if not we_are_translated():
            # Arguments should be unique
            assert len(set(inputargs)) == len(inputargs)
        #
        ops_offset = self.mc.ops_offset
        if not we_are_translated():
            # used only by looptoken.dump() -- useful in tests
            looptoken._x86_rawstart = rawstart
    def assemble_bridge(self, faildescr, inputargs, operations,
                        original_loop_token, log):
        if not we_are_translated():
            # Arguments should be unique
            assert len(set(inputargs)) == len(inputargs)
 
        arglocs = self.rebuild_faillocs_from_descr(failure_recovery)
        if not we_are_translated():
            assert ([loc.assembler() for loc in arglocs] ==
                    [loc.assembler() for loc in faildescr._x86_debug_faillocs])

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/rpython/lltypesystem/rffi.py   plexnet(Download)
from pypy.translator.backendopt.canraise import RaiseAnalyzer
from pypy.rpython.annlowlevel import llhelper
from pypy.rlib.objectmodel import we_are_translated
from pypy.rpython.lltypesystem import llmemory
import os, sys

src/s/y/Sypy-HEAD/rpython/lltypesystem/rffi.py   Sypy(Download)
from pypy.translator.tool.cbuild import ExternalCompilationInfo
from pypy.rpython.annlowlevel import llhelper
from pypy.rlib.objectmodel import we_are_translated
from pypy.rlib.rstring import StringBuilder, UnicodeBuilder, assert_str0
from pypy.rlib import jit

src/s/y/Sypy-HEAD/rlib/rgc.py   Sypy(Download)
import gc
import types
 
from pypy.rlib import jit
from pypy.rlib.objectmodel import we_are_translated, enforceargs, specialize
    on objects that are already a bit old, so have a chance to be
    already non-movable."""
    if not we_are_translated():
        return
    i = 0
 
    # supports non-overlapping copies only
    if not we_are_translated():
        if source == dest:
            assert (source_start + length <= dest_start or
def cast_gcref_to_int(gcref):
    if we_are_translated():
        return lltype.cast_ptr_to_int(gcref)
    else:
        return id(gcref._x)
def cast_instance_to_gcref(x):
    # Before translation, casts an RPython instance into a _GcRef.
    # After translation, it is a variant of cast_object_to_ptr(GCREF).
    if we_are_translated():
        from pypy.rpython import annlowlevel

src/s/y/Sypy-HEAD/objspace/std/stringobject.py   Sypy(Download)
from pypy.interpreter import gateway
from pypy.rlib.rarithmetic import ovfcheck
from pypy.rlib.objectmodel import we_are_translated, compute_hash, specialize
from pypy.rlib.objectmodel import compute_unique_id
from pypy.objspace.std.inttype import wrapint

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/jit/metainterp/warmstate.py   plexnet(Download)
from pypy.rpython.annlowlevel import hlstr, cast_base_ptr_to_instance
from pypy.rpython.annlowlevel import cast_object_to_ptr
from pypy.rlib.objectmodel import specialize, we_are_translated, r_dict
from pypy.rlib.rarithmetic import intmask
from pypy.rlib.nonconst import NonConstant
        def get_jitcell(*greenargs):
            fn = support.maybe_on_top_of_llinterp(rtyper, get_jitcell_at_ptr)
            cellref = fn(*greenargs)
            # <hacks>
            if we_are_translated():
                cell = JitCell()
                # <hacks>
                if we_are_translated():
                    cellref = cast_object_to_ptr(BASEJITCELL, cell)
                elif BASEJITCELL is None:
            def get_location_str(greenkey):
                greenargs = unwrap_greenkey(greenkey)
                fn = support.maybe_on_top_of_llinterp(rtyper, get_location_ptr)
                res = fn(*greenargs)
                if not we_are_translated() and not isinstance(res, str):

src/s/y/Sypy-HEAD/jit/metainterp/warmstate.py   Sypy(Download)
from pypy.rpython.annlowlevel import hlstr, cast_base_ptr_to_instance
from pypy.rpython.annlowlevel import cast_object_to_ptr
from pypy.rlib.objectmodel import specialize, we_are_translated, r_dict
from pypy.rlib.rarithmetic import intmask
from pypy.rlib.nonconst import NonConstant
            curgen = warmrunnerdesc.memory_manager.current_generation
            curgen = chr(intmask(curgen) & 0xFF)    # only use 8 bits
            if we_are_translated() and curgen != cell.extra_delay:
                cell.counter = int(self.THRESHOLD_LIMIT * 0.98)
                cell.extra_delay = curgen
        def get_jitcell(build, *greenargs):
            fn = support.maybe_on_top_of_llinterp(rtyper, get_jitcell_at_ptr)
            cellref = fn(*greenargs)
            # <hacks>
            if we_are_translated():
                cell = JitCell()
                # <hacks>
                if we_are_translated():
                    cellref = cast_object_to_ptr(BASEJITCELL, cell)
                else:
            def get_location_str(greenkey):
                greenargs = unwrap_greenkey(greenkey)
                fn = support.maybe_on_top_of_llinterp(rtyper, get_location_ptr)
                llres = fn(*greenargs)
                if not we_are_translated() and isinstance(llres, str):

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