[pypy-commit] pypy kill-gen-store-back-in: hg merge default

arigo noreply at buildbot.pypy.org
Sun Jul 28 21:53:08 CEST 2013


Author: Armin Rigo <arigo at tunes.org>
Branch: kill-gen-store-back-in
Changeset: r65758:cd29aa0e80ae
Date: 2013-07-28 21:52 +0200
http://bitbucket.org/pypy/pypy/changeset/cd29aa0e80ae/

Log:	hg merge default

diff --git a/pypy/doc/config/translation.ootype.mangle.txt b/pypy/doc/config/translation.ootype.mangle.txt
deleted file mode 100644
--- a/pypy/doc/config/translation.ootype.mangle.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-Mangle the names of user defined attributes of the classes, in order
-to ensure that every name is unique. Default is true, and it should
-not be turned off unless you know what you are doing.
diff --git a/pypy/doc/config/translation.ootype.txt b/pypy/doc/config/translation.ootype.txt
deleted file mode 100644
--- a/pypy/doc/config/translation.ootype.txt
+++ /dev/null
@@ -1,1 +0,0 @@
-This group contains options specific for ootypesystem.
diff --git a/pypy/doc/dir-reference.rst b/pypy/doc/dir-reference.rst
--- a/pypy/doc/dir-reference.rst
+++ b/pypy/doc/dir-reference.rst
@@ -1,8 +1,8 @@
-PyPy directory cross-reference 
+PyPy directory cross-reference
 ------------------------------
 
-Here is a fully referenced alphabetical two-level deep 
-directory overview of PyPy: 
+Here is a fully referenced alphabetical two-level deep
+directory overview of PyPy:
 
 =================================  ============================================
 Directory                          explanation/links
@@ -24,7 +24,7 @@
 ``doc/*/``                         other specific documentation topics or tools
 
 `pypy/interpreter/`_               `bytecode interpreter`_ and related objects
-                                   (frames, functions, modules,...) 
+                                   (frames, functions, modules,...)
 
 `pypy/interpreter/pyparser/`_      interpreter-level Python source parser
 
@@ -32,7 +32,7 @@
                                    via an AST representation
 
 `pypy/module/`_                    contains `mixed modules`_
-                                   implementing core modules with 
+                                   implementing core modules with
                                    both application and interpreter level code.
                                    Not all are finished and working.  Use
                                    the ``--withmod-xxx``
@@ -45,7 +45,7 @@
                                    objects and types
 
 `pypy/tool/`_                      various utilities and hacks used
-                                   from various places 
+                                   from various places
 
 `pypy/tool/algo/`_                 general-purpose algorithmic and mathematic
                                    tools
@@ -54,7 +54,7 @@
 
 
 `rpython/annotator/`_              `type inferencing code`_ for
-                                   `RPython`_ programs 
+                                   `RPython`_ programs
 
 `rpython/config/`_                 handles the numerous options for RPython
 
@@ -65,20 +65,17 @@
 `rpython/rlib/`_                   a `"standard library"`_ for RPython_
                                    programs
 
-`rpython/rtyper/`_                 the `RPython Typer`_ 
+`rpython/rtyper/`_                 the `RPython Typer`_
 
 `rpython/rtyper/lltypesystem/`_    the `low-level type system`_ for
                                    C-like backends
 
-`rpython/rtyper/ootypesystem/`_    the `object-oriented type system`_
-                                   for OO backends
-
 `rpython/memory/`_                 the `garbage collector`_ construction
                                    framework
 
 `rpython/translator/`_             translation_ backends and support code
 
-`rpython/translator/backendopt/`_  general optimizations that run before a 
+`rpython/translator/backendopt/`_  general optimizations that run before a
                                    backend generates code
 
 `rpython/translator/c/`_           the `GenC backend`_, producing C code
@@ -93,31 +90,31 @@
 `dotviewer/`_                      `graph viewer`_
 
 ``*/test/``                        many directories have a test subdirectory
-                                   containing test 
-                                   modules (see `Testing in PyPy`_) 
+                                   containing test
+                                   modules (see `Testing in PyPy`_)
 
 ``_cache/``                        holds cache files from various purposes
 =================================  ============================================
 
 .. _`bytecode interpreter`: interpreter.html
-.. _`Testing in PyPy`: coding-guide.html#testing-in-pypy 
-.. _`mixed modules`: coding-guide.html#mixed-modules 
-.. _`modules`: coding-guide.html#modules 
+.. _`Testing in PyPy`: coding-guide.html#testing-in-pypy
+.. _`mixed modules`: coding-guide.html#mixed-modules
+.. _`modules`: coding-guide.html#modules
 .. _`basil`: http://people.cs.uchicago.edu/~jriehl/BasilTalk.pdf
 .. _`object space`: objspace.html
-.. _FlowObjSpace: objspace.html#the-flow-object-space 
+.. _FlowObjSpace: objspace.html#the-flow-object-space
 .. _`transparent proxies`: objspace-proxies.html#tproxy
 .. _`Differences between PyPy and CPython`: cpython_differences.html
 .. _`What PyPy can do for your objects`: objspace-proxies.html
 .. _`Continulets and greenlets`: stackless.html
-.. _StdObjSpace: objspace.html#the-standard-object-space 
+.. _StdObjSpace: objspace.html#the-standard-object-space
 .. _`abstract interpretation`: http://en.wikipedia.org/wiki/Abstract_interpretation
-.. _`rpython`: coding-guide.html#rpython 
-.. _`type inferencing code`: translation.html#the-annotation-pass 
-.. _`RPython Typer`: translation.html#rpython-typer 
+.. _`rpython`: coding-guide.html#rpython
+.. _`type inferencing code`: translation.html#the-annotation-pass
+.. _`RPython Typer`: translation.html#rpython-typer
 .. _`testing methods`: coding-guide.html#testing-in-pypy
-.. _`translation`: translation.html 
-.. _`GenC backend`: translation.html#genc 
+.. _`translation`: translation.html
+.. _`GenC backend`: translation.html#genc
 .. _`py.py`: getting-started-python.html#the-py.py-interpreter
 .. _`translatorshell.py`: getting-started-dev.html#try-out-the-translator
 .. _JIT: jit/index.html
diff --git a/pypy/doc/discussions.rst b/pypy/doc/discussions.rst
--- a/pypy/doc/discussions.rst
+++ b/pypy/doc/discussions.rst
@@ -7,7 +7,7 @@
 
 
 .. toctree::
-	
+
 	discussion/finalizer-order.rst
 	discussion/howtoimplementpickling.rst
 	discussion/improve-rpython.rst
diff --git a/pypy/doc/glossary.rst b/pypy/doc/glossary.rst
--- a/pypy/doc/glossary.rst
+++ b/pypy/doc/glossary.rst
@@ -26,8 +26,7 @@
     backend
         Code generator that converts an `RPython
         <coding-guide.html#restricted-python>`__ program to a `target
-        language`_ using the :term:`RPython toolchain`. A backend uses either the
-        :term:`lltypesystem` or the :term:`ootypesystem`.
+        language`_ using the :term:`RPython toolchain`.
 
     compile-time
         In the context of the :term:`JIT`, compile time is when the JIT is
diff --git a/pypy/doc/rtyper.rst b/pypy/doc/rtyper.rst
--- a/pypy/doc/rtyper.rst
+++ b/pypy/doc/rtyper.rst
@@ -559,17 +559,6 @@
         interpret_raises(IndexError, raise_exception, [42])
         interpret_raises(ValueError, raise_exception, [43])
 
-By default the ``interpret`` and ``interpret_raises`` functions use
-the low-level typesystem. If you want to use the object oriented one
-you have to set the ``type_system`` parameter to the string
-``'ootype'``::
-
-    def test_invert():
-        def f(x):
-            return ~x
-        res = interpret(f, [3], type_system='ootype')
-        assert res == ~3
-
 .. _annotator: translation.html#the-annotation-pass
 
 .. include:: _ref.txt
diff --git a/rpython/jit/codewriter/call.py b/rpython/jit/codewriter/call.py
--- a/rpython/jit/codewriter/call.py
+++ b/rpython/jit/codewriter/call.py
@@ -190,7 +190,7 @@
         return (fnaddr, calldescr)
 
     def getcalldescr(self, op, oopspecindex=EffectInfo.OS_NONE,
-                     extraeffect=None, extradescrs=None):
+                     extraeffect=None):
         """Return the calldescr that describes all calls done by 'op'.
         This returns a calldescr that we can put in the corresponding
         call operation in the calling jitcode.  It gets an effectinfo
@@ -249,7 +249,7 @@
         effectinfo = effectinfo_from_writeanalyze(
             self.readwrite_analyzer.analyze(op), self.cpu, extraeffect,
             oopspecindex, can_invalidate, call_release_gil_target,
-            extradescrs)
+        )
         #
         assert effectinfo is not None
         if elidable or loopinvariant:
diff --git a/rpython/jit/codewriter/effectinfo.py b/rpython/jit/codewriter/effectinfo.py
--- a/rpython/jit/codewriter/effectinfo.py
+++ b/rpython/jit/codewriter/effectinfo.py
@@ -96,13 +96,11 @@
                 extraeffect=EF_CAN_RAISE,
                 oopspecindex=OS_NONE,
                 can_invalidate=False,
-                call_release_gil_target=llmemory.NULL,
-                extra_descrs=None):
+                call_release_gil_target=llmemory.NULL):
         key = (frozenset_or_none(readonly_descrs_fields),
                frozenset_or_none(readonly_descrs_arrays),
                frozenset_or_none(write_descrs_fields),
                frozenset_or_none(write_descrs_arrays),
-               frozenset_or_none(extra_descrs),
                extraeffect,
                oopspecindex,
                can_invalidate)
@@ -135,7 +133,6 @@
         result.can_invalidate = can_invalidate
         result.oopspecindex = oopspecindex
         result.call_release_gil_target = call_release_gil_target
-        result.extra_descrs = extra_descrs
         if result.check_can_raise():
             assert oopspecindex in cls._OS_CANRAISE
         cls._cache[key] = result
@@ -178,8 +175,7 @@
                                  extraeffect=EffectInfo.EF_CAN_RAISE,
                                  oopspecindex=EffectInfo.OS_NONE,
                                  can_invalidate=False,
-                                 call_release_gil_target=llmemory.NULL,
-                                 extra_descrs=None):
+                                 call_release_gil_target=llmemory.NULL):
     from rpython.translator.backendopt.writeanalyze import top_set
     if effects is top_set or extraeffect == EffectInfo.EF_RANDOM_EFFECTS:
         readonly_descrs_fields = None
@@ -228,8 +224,7 @@
                       extraeffect,
                       oopspecindex,
                       can_invalidate,
-                      call_release_gil_target,
-                      extra_descrs)
+                      call_release_gil_target)
 
 def consider_struct(TYPE, fieldname):
     if fieldType(TYPE, fieldname) is lltype.Void:
diff --git a/rpython/jit/codewriter/jtransform.py b/rpython/jit/codewriter/jtransform.py
--- a/rpython/jit/codewriter/jtransform.py
+++ b/rpython/jit/codewriter/jtransform.py
@@ -359,12 +359,11 @@
         lst.append(v)
 
     def handle_residual_call(self, op, extraargs=[], may_call_jitcodes=False,
-                             oopspecindex=EffectInfo.OS_NONE, extradescrs=None):
+                             oopspecindex=EffectInfo.OS_NONE):
         """A direct_call turns into the operation 'residual_call_xxx' if it
         is calling a function that we don't want to JIT.  The initial args
         of 'residual_call_xxx' are the function to call, and its calldescr."""
-        calldescr = self.callcontrol.getcalldescr(op, oopspecindex=oopspecindex,
-                                                  extradescrs=extradescrs)
+        calldescr = self.callcontrol.getcalldescr(op, oopspecindex=oopspecindex)
         op1 = self.rewrite_call(op, 'residual_call',
                                 [op.args[0]] + extraargs, calldescr=calldescr)
         if may_call_jitcodes or self.callcontrol.calldescr_canraise(calldescr):
diff --git a/rpython/jit/codewriter/test/test_flatten.py b/rpython/jit/codewriter/test/test_flatten.py
--- a/rpython/jit/codewriter/test/test_flatten.py
+++ b/rpython/jit/codewriter/test/test_flatten.py
@@ -73,7 +73,7 @@
     def guess_call_kind(self, op):
         return 'residual'
     def getcalldescr(self, op, oopspecindex=EffectInfo.OS_NONE,
-                     extraeffect=None, extradescrs=None):
+                     extraeffect=None):
         try:
             name = op.args[0].value._obj._name
             if 'cannot_raise' in name or name.startswith('cast_'):
diff --git a/rpython/rtyper/lltypesystem/lltype.py b/rpython/rtyper/lltypesystem/lltype.py
--- a/rpython/rtyper/lltypesystem/lltype.py
+++ b/rpython/rtyper/lltypesystem/lltype.py
@@ -2108,8 +2108,7 @@
 
 def identityhash(p):
     """Returns the lltype-level hash of the given GcStruct.
-    Also works with most ootype objects.  Not for NULL.
-    See rlib.objectmodel.compute_identity_hash() for more
+    Not for NULL. See rlib.objectmodel.compute_identity_hash() for more
     information about the RPython-level meaning of this.
     """
     assert p
diff --git a/rpython/rtyper/rlist.py b/rpython/rtyper/rlist.py
--- a/rpython/rtyper/rlist.py
+++ b/rpython/rtyper/rlist.py
@@ -503,9 +503,7 @@
     return l
 
 
-# return a nullptr() if lst is a list of pointers it, else None.  Note
-# that if we are using ootypesystem there are not pointers, so we
-# always return None.
+# return a nullptr() if lst is a list of pointers it, else None.
 def ll_null_item(lst):
     LIST = typeOf(lst)
     if isinstance(LIST, Ptr):
@@ -516,25 +514,15 @@
 
 def listItemType(lst):
     LIST = typeOf(lst)
-    if isinstance(LIST, Ptr):    # lltype
-        LIST = LIST.TO
-    return LIST.ITEM
+    return LIST.TO.ITEM
 
 
 @signature(types.any(), types.any(), types.int(), types.int(), types.int(), returns=types.none())
 def ll_arraycopy(source, dest, source_start, dest_start, length):
     SRCTYPE = typeOf(source)
-    if isinstance(SRCTYPE, Ptr):
-        # lltype
-        rgc.ll_arraycopy(source.ll_items(), dest.ll_items(),
-                         source_start, dest_start, length)
-    else:
-        # ootype -- XXX improve the case of array->array copy?
-        i = 0
-        while i < length:
-            item = source.ll_getitem_fast(source_start + i)
-            dest.ll_setitem_fast(dest_start + i, item)
-            i += 1
+    # lltype
+    rgc.ll_arraycopy(source.ll_items(), dest.ll_items(),
+                     source_start, dest_start, length)
 
 
 def ll_copy(RESLIST, l):
diff --git a/rpython/rtyper/rstr.py b/rpython/rtyper/rstr.py
--- a/rpython/rtyper/rstr.py
+++ b/rpython/rtyper/rstr.py
@@ -757,9 +757,7 @@
 #  get flowed and annotated, mostly with SomePtr.
 #
 
-# this class contains low level helpers used both by lltypesystem and
-# ootypesystem; each typesystem should subclass it and add its own
-# primitives.
+# this class contains low level helpers used both by lltypesystem
 class AbstractLLHelpers:
     __metaclass__ = StaticMethods
 
diff --git a/rpython/rtyper/test/test_rvirtualizable.py b/rpython/rtyper/test/test_rvirtualizable.py
--- a/rpython/rtyper/test/test_rvirtualizable.py
+++ b/rpython/rtyper/test/test_rvirtualizable.py
@@ -57,7 +57,7 @@
         block = graph.startblock
         op_promote = block.operations[-2]
         op_getfield = block.operations[-1]
-        assert op_getfield.opname in ('getfield', 'oogetfield')
+        assert op_getfield.opname == 'getfield'
         v_inst = op_getfield.args[0]
         assert op_promote.opname == 'jit_force_virtualizable'
         assert op_promote.args[0] is v_inst
@@ -72,7 +72,7 @@
         block = graph.startblock
         op_promote = block.operations[-2]
         op_getfield = block.operations[-1]
-        assert op_getfield.opname in ('getfield', 'oogetfield')
+        assert op_getfield.opname == 'getfield'
         v_inst = op_getfield.args[0]
         assert op_promote.opname == 'jit_force_virtualizable'
         assert op_promote.args[0] is v_inst
@@ -86,7 +86,7 @@
         block = graph.startblock
         op_getfield = block.operations[-1]
         op_call = block.operations[-2]
-        assert op_getfield.opname in ('getfield', 'oogetfield')
+        assert op_getfield.opname == 'getfield'
         assert op_call.opname == 'direct_call'    # to V.__init__
 
     def test_generate_force_virtualizable_array(self):
@@ -99,7 +99,7 @@
         op_getfield = block.operations[-2]
         op_getarrayitem = block.operations[-1]
         assert op_getarrayitem.opname == 'direct_call'  # to ll_getitem_xxx
-        assert op_getfield.opname in ('getfield', 'oogetfield')
+        assert op_getfield.opname == 'getfield'
         v_inst = op_getfield.args[0]
         assert op_promote.opname == 'jit_force_virtualizable'
         assert op_promote.args[0] is v_inst
@@ -168,13 +168,13 @@
         _, rtyper, graph = self.gengraph(fn, [int])
         block = graph.startblock
         op_getfield = block.operations[-1]
-        assert op_getfield.opname in ('getfield', 'oogetfield')
+        assert op_getfield.opname == 'getfield'
         funcptr = self.replace_force_virtualizable(rtyper, [graph])
         if getattr(option, 'view', False):
             graph.show()
         op_promote = block.operations[-2]
         op_getfield = block.operations[-1]
-        assert op_getfield.opname in ('getfield', 'oogetfield')
+        assert op_getfield.opname == 'getfield'
         assert op_promote.opname == 'direct_call'
         assert op_promote.args[0].value == funcptr
         assert op_promote.args[1] == op_getfield.args[0]


More information about the pypy-commit mailing list