[pypy-commit] pypy default: Removed yet more code and docs that were ootype specific.

alex_gaynor noreply at buildbot.pypy.org
Sun Jul 28 21:51:40 CEST 2013


Author: Alex Gaynor <alex.gaynor at gmail.com>
Branch: 
Changeset: r65757:deab847b00d8
Date: 2013-07-28 12:51 -0700
http://bitbucket.org/pypy/pypy/changeset/deab847b00d8/

Log:	Removed yet more code and docs that were ootype specific.

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/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
 


More information about the pypy-commit mailing list