PageRenderTime 605ms queryFilters 1ms Sphinxql 222ms GetByIds 259ms meta 0ms repositoryFilters 0ms languageFilters 0ms sourceFilters 0ms

1,556 results for 'rpython repo:pypy/pypy' (605 ms)

Source

Language

Repository

interp_sre.py https://bitbucket.org/pypy/pypy/ | Python | 655 lines
7from pypy.interpreter.error import OperationError, oefmt
8from rpython.rlib.rarithmetic import intmask
9from rpython.rlib import jit
9from rpython.rlib import jit
10from rpython.rlib.rstring import StringBuilder, UnicodeBuilder
11
15
16from rpython.rlib.rsre import rsre_core
17from rpython.rlib.rsre.rsre_char import MAGIC, CODESIZE, MAXREPEAT, getlower, set_unicode_db
52def do_flatten_marks(ctx, num_groups):
53    # Returns a list of RPython-level integers.
54    # Unlike the app-level groups() method, groups are numbered from 0
interp_epoll.py https://bitbucket.org/pypy/pypy/ | Python | 194 lines
9from pypy.interpreter.typedef import TypeDef, GetSetProperty
10from rpython.rtyper.lltypesystem import lltype, rffi
11from rpython.rtyper.tool import rffi_platform
11from rpython.rtyper.tool import rffi_platform
12from rpython.rlib._rsocket_rffi import socketclose, FD_SETSIZE
13from rpython.rlib.rposix import get_saved_errno
13from rpython.rlib.rposix import get_saved_errno
14from rpython.rlib.rarithmetic import intmask
15from rpython.translator.tool.cbuild import ExternalCompilationInfo
fficurses.py https://bitbucket.org/pypy/pypy/ | Python | 144 lines
1""" The ffi for rpython, need to be imported for side effects
2"""
3
4from rpython.rtyper.lltypesystem import rffi
5from rpython.rtyper.lltypesystem import lltype
5from rpython.rtyper.lltypesystem import lltype
6from rpython.rtyper.tool import rffi_platform
7from rpython.rtyper.extfunc import register_external
8from pypy.module._minimal_curses import interp_curses
9from rpython.translator.tool.cbuild import ExternalCompilationInfo
10
sandbox.rst https://bitbucket.org/pypy/pypy/ | Unknown | 145 lines
64The pypy-c-sandbox program is obtained by adding a transformation during
65translation, which turns all RPython-level external function calls into
66stubs that do the marshalling/waiting/unmarshalling.  An attacker that
88
89Translating an RPython program with sandboxing enabled also uses a special flag
90that enables all sorts of C-level assertions against index-out-of-bounds
93By the way, as you should have realized, it's really independent from
94the fact that it's PyPy that we are translating.  Any RPython program
95should do.  I've successfully tried it on the JS interpreter.  The
107
108   ../../rpython/bin/rpython -O2 --sandbox targetpypystandalone.py
109
140the controller crashes with an exception and the subprocess is killed.
141Other operations make the subprocess die directly with a "Fatal RPython
142error".  None of this is a security hole.  More importantly, *most other
index.rst https://bitbucket.org/pypy/pypy/ | Unknown | 62 lines
17
18and the ``rpython/bin/rpython`` translation entry
19point which takes arguments of this form:
22
23    ./rpython/bin/rpython <`translation options`_> <target>
24
30
31    ./rpython/bin/rpython <`translation options`_> targetpypystandalone.py <`objspace options`_>
32
unaryop.py https://bitbucket.org/pypy/pypy/ | Python | 887 lines
16from pypy.annotation.binaryop import _clone ## XXX where to put this?
17from pypy.rpython import extregistry
18from pypy.tool.error import AnnotatorError
102    def hash(obj):
103        raise TypeError, ("cannot use hash() in RPython; "
104                          "see objectmodel.compute_xxx()")
126    def id(obj):
127        raise Exception("cannot use id() in RPython; "
128                        "see objectmodel.compute_xxx()")
141            getbookkeeper().warning(
142                ("delattr on potentally non-SomeObjects is not RPythonic: delattr(%r,%r)" %
143                 (obj, s_attr)))
165        else:
166            getbookkeeper().warning('getattr(%r, %r) is not RPythonic enough' %
167                                    (obj, s_attr))
llmodel.py https://bitbucket.org/pypy/pypy/ | Python | 655 lines
1from pypy.rpython.lltypesystem import lltype, llmemory, rffi, rclass, rstr
2from pypy.rpython.lltypesystem.lloperation import llop
2from pypy.rpython.lltypesystem.lloperation import llop
3from pypy.rpython.llinterp import LLInterpreter
4from pypy.rpython.annlowlevel import llhelper
136            addr.address[0] = llmemory.NULL
137            # from now on, the state is again consistent -- no more RPython
138            # exception is set.  The following code produces a write barrier
142        def save_exception_memoryerr():
143            from pypy.rpython.annlowlevel import cast_instance_to_base_ptr
144            save_exception()
test_warmspot.py https://bitbucket.org/pypy/pypy/ | Python | 382 lines
82    def test_set_param_enable_opts(self):
83        from pypy.rpython.annlowlevel import llstr, hlstr
84        
264        py.test.skip("crashes because a is a constant")
265        from pypy.rpython.lltypesystem import lltype, rffi
266        mydriver = JitDriver(greens=['a'], reds=['m'])
274    def test_bug_rawptrs(self):
275        from pypy.rpython.lltypesystem import lltype, rffi
276        mydriver = JitDriver(greens=['a'], reds=['m'])
300        from pypy.jit.metainterp.warmspot import WarmRunnerDesc
301        from pypy.rpython.lltypesystem.rclass import OBJECT, OBJECT_VTABLE
302        from pypy.rpython.lltypesystem import lltype, llmemory
370    def test_call_helper(self):
371        from pypy.rpython.llinterp import LLException
372
test_rerased.py https://bitbucket.org/pypy/pypy/ | Python | 326 lines
4from pypy.annotation import model as annmodel
5from pypy.annotation.annrpython import RPythonAnnotator
6from pypy.rpython.test.test_llinterp import interpret
6from pypy.rpython.test.test_llinterp import interpret
7from pypy.rpython.lltypesystem.rclass import OBJECTPTR
8from pypy.rpython.ootypesystem.rclass import OBJECT
8from pypy.rpython.ootypesystem.rclass import OBJECT
9from pypy.rpython.lltypesystem import lltype, llmemory
10
10
11from pypy.rpython.test.tool import BaseRtypingTest, LLRtypeMixin, OORtypeMixin
12
13def make_annotator():
14    a = RPythonAnnotator()
15    a.translator.config.translation.taggedpointers = True
llmodel.py git://github.com/pypy/pypy.git | Python | 658 lines
1from pypy.rpython.lltypesystem import lltype, llmemory, rffi, rclass, rstr
2from pypy.rpython.lltypesystem.lloperation import llop
2from pypy.rpython.lltypesystem.lloperation import llop
3from pypy.rpython.llinterp import LLInterpreter
4from pypy.rpython.annlowlevel import llhelper
136            addr.address[0] = llmemory.NULL
137            # from now on, the state is again consistent -- no more RPython
138            # exception is set.  The following code produces a write barrier
142        def save_exception_memoryerr():
143            from pypy.rpython.annlowlevel import cast_instance_to_base_ptr
144            save_exception()
rlist.py git://github.com/pypy/pypy.git | Python | 426 lines
3from pypy.rlib.objectmodel import enforceargs
4from pypy.rpython.lltypesystem import rstr
5from pypy.rpython.lltypesystem.lltype import (GcForwardReference, Ptr, GcArray,
6     GcStruct, Void, Signed, malloc, typeOf, nullptr, typeMethod)
7from pypy.rpython.rlist import (AbstractBaseListRepr, AbstractListRepr,
8    AbstractFixedSizeListRepr, AbstractListIteratorRepr, ll_setitem_nonneg,
9    ADTIList, ADTIFixedList, dum_nocheck)
10from pypy.rpython.rmodel import Repr, inputconst, externalvsinternal
11from pypy.tool.pairtype import pairtype, pair
15#
16#  Concrete implementation of RPython lists:
17#
415def ll_listnext_foldable(iter):
416    from pypy.rpython.rlist import ll_getitem_foldable_nonneg
417    l = iter.list
typedef.py https://bitbucket.org/pypy/pypy/ | Python | 780 lines
8
9from rpython.rlib.jit import promote
10from rpython.rlib.objectmodel import compute_identity_hash, specialize
10from rpython.rlib.objectmodel import compute_identity_hash, specialize
11from rpython.tool.sourcetools import compile2, func_with_new_name
12
16                 __buffer=None, **rawdict):
17        "NOT_RPYTHON: initialization-time only"
18        self.name = __name
30        self.hasdict = '__dict__' in rawdict
31        # no __del__: use an RPython _finalize_() method and register_finalizer
32        assert '__del__' not in rawdict
112def get_unique_interplevel_subclass(space, cls):
113    "NOT_RPYTHON: initialization-time only"
114    assert cls.typedef.acceptable_as_base_class
executioncontext.py https://bitbucket.org/pypy/pypy/ | Python | 626 lines
2from pypy.interpreter.error import OperationError, get_cleared_operation_error
3from rpython.rlib.unroll import unrolling_iterable
4from rpython.rlib.objectmodel import specialize
4from rpython.rlib.objectmodel import specialize
5from rpython.rlib import jit, rgc
6
424    def register_periodic_action(self, action, use_bytecode_counter):
425        """NOT_RPYTHON:
426        Register the PeriodicAsyncAction action to be called whenever the
591
592        # Call the RPython-level _finalize_() method.
593        try:
604        addrstring = w_obj.getaddrstring(space)
605        msg = ("RPython exception %s in %s<%s at 0x%s> ignored\n" % (
606                   str(e), where, space.type(w_obj).name, addrstring))
pyopcode.py https://bitbucket.org/pypy/pypy/ | Python | 1,660 lines
6
7from rpython.rlib import jit, rstackovf
8from rpython.rlib.debug import check_nonneg
8from rpython.rlib.debug import check_nonneg
9from rpython.rlib.objectmodel import we_are_translated
10from rpython.rlib.rarithmetic import r_uint, intmask
10from rpython.rlib.rarithmetic import r_uint, intmask
11from rpython.tool.sourcetools import func_with_new_name
12
22def unaryoperation(operationname):
23    """NOT_RPYTHON"""
24    def opimpl(self, *ignored):
33def binaryoperation(operationname):
34    """NOT_RPYTHON"""
35    def opimpl(self, *ignored):
setobject.py https://bitbucket.org/pypy/pypy/ | Python | 1,727 lines
10
11from rpython.rlib.objectmodel import r_dict
12from rpython.rlib.objectmodel import iterkeys_with_hash, contains_with_hash
12from rpython.rlib.objectmodel import iterkeys_with_hash, contains_with_hash
13from rpython.rlib.objectmodel import setitem_with_hash, delitem_with_hash
14from rpython.rlib.rarithmetic import intmask, r_uint
14from rpython.rlib.rarithmetic import intmask, r_uint
15from rpython.rlib import rerased, jit
16
unicodeobject.py https://bitbucket.org/pypy/pypy/ | Python | 1,146 lines
2
3from rpython.rlib.objectmodel import (
4    compute_hash, compute_unique_id, import_from_mixin)
4    compute_hash, compute_unique_id, import_from_mixin)
5from rpython.rlib.buffer import StringBuffer
6from rpython.rlib.rstring import StringBuilder, UnicodeBuilder
6from rpython.rlib.rstring import StringBuilder, UnicodeBuilder
7from rpython.rlib.runicode import (
8    make_unicode_escape_function, str_decode_ascii, str_decode_utf_8,
83    def readbuf_w(self, space):
84        from rpython.rlib.rstruct.unichar import pack_unichar, UNICODE_SIZE
85        builder = StringBuilder(len(self._value) * UNICODE_SIZE)
interp_ucd.py https://bitbucket.org/pypy/pypy/ | Python | 331 lines
8from pypy.interpreter.typedef import TypeDef, interp_attrproperty
9from rpython.rlib.rarithmetic import r_longlong
10from rpython.rlib.objectmodel import we_are_translated
10from rpython.rlib.objectmodel import we_are_translated
11from rpython.rlib.runicode import MAXUNICODE
12from rpython.rlib.unicodedata import unicodedb_5_2_0, unicodedb_3_2_0
12from rpython.rlib.unicodedata import unicodedb_5_2_0, unicodedb_3_2_0
13from rpython.rlib.runicode import code_to_unichr, ord_accepts_surrogate
14import sys
interp_win32.py https://bitbucket.org/pypy/pypy/ | Python | 218 lines
1from rpython.rlib import rwin32
2from rpython.rlib.rarithmetic import r_uint
2from rpython.rlib.rarithmetic import r_uint
3from rpython.rtyper.lltypesystem import lltype, rffi
4from rpython.rtyper.tool import rffi_platform
4from rpython.rtyper.tool import rffi_platform
5from rpython.translator.tool.cbuild import ExternalCompilationInfo
6
191def win32_namespace(space):
192    "NOT_RPYTHON"
193    w_win32 = space.call_function(space.w_type,
typeobject.py https://bitbucket.org/pypy/pypy/ | Python | 912 lines
2
3from rpython.rlib import jit
4from rpython.rlib.objectmodel import specialize
4from rpython.rlib.objectmodel import specialize
5from rpython.rlib.rstring import rsplit
6from rpython.rtyper.annlowlevel import llhelper
6from rpython.rtyper.annlowlevel import llhelper
7from rpython.rtyper.lltypesystem import rffi, lltype
8
test_translate.py https://bitbucket.org/pypy/pypy/ | Python | 72 lines
1from rpython.translator.c.test.test_genc import compile
2import pypy.module.cpyext.api
3from pypy.module.cpyext.api import cpython_api
4from rpython.rtyper.annlowlevel import llhelper
5from rpython.rtyper.lltypesystem import lltype
5from rpython.rtyper.lltypesystem import lltype
6from rpython.rlib.objectmodel import specialize
7from rpython.rlib.nonconst import NonConstant
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21