[pypy-svn] r20433 - pypy/dist/pypy/doc
cfbolz at codespeak.net
cfbolz at codespeak.net
Wed Nov 30 14:04:58 CET 2005
Author: cfbolz
Date: Wed Nov 30 14:04:56 2005
New Revision: 20433
Modified:
pypy/dist/pypy/doc/architecture.txt
pypy/dist/pypy/doc/coding-guide.txt
pypy/dist/pypy/doc/interpreter.txt
pypy/dist/pypy/doc/objspace.txt
Log:
move the big object space section from architecture to objspace, where it
serves as a very nice introductory paragraph. update links etc.
Modified: pypy/dist/pypy/doc/architecture.txt
==============================================================================
--- pypy/dist/pypy/doc/architecture.txt (original)
+++ pypy/dist/pypy/doc/architecture.txt Wed Nov 30 14:04:56 2005
@@ -140,6 +140,19 @@
Note that the *standard interpreter* can run fine on top of CPython if one
is willing to pay the performance penalty for double-interpretation.
+The division between the interpreter that dispatches bytecode and handles code
+objects and the object space that is responsible for all objects operation is
+very important as it gives a lot of flexibility. It is possible to use a
+different object space to get a different behaviour of the python objects.
+Using a special object space is also an important technique for our translation
+process.
+
+.. _`standard object space`: objspace.html#the-standard-object-space
+
+.. _`translation process in more details`:
+.. _`later in this document`:
+.. _`initialization time`:
+
The Translation Process
-----------------------
@@ -198,69 +211,7 @@
built-in modules (described `here`_).
.. _`here`: coding-guide.html#modules
-
-.. _`objectspace`:
-.. _`Object Space`:
-
-The Object Space
-================
-
-The object space creates all objects and knows how to perform operations
-on the objects. You may think of an object space as being a library
-offering a fixed API, a set of *operations*, with implementations that
-correspond to the known semantics of Python objects. An example of an
-operation is *add*: add's implementations are, for example, responsible
-for performing numeric addition when add works on numbers, concatenation
-when add works on built-in sequences.
-
-All object-space operations take and return `application-level`_ objects.
-There are only a few, very simple, object-space operations which allow the
-bytecode interpreter to gain some knowledge about the value of an
-application-level object.
-The most important one is ``is_true()``, which returns a boolean
-interpreter-level value. This is necessary to implement, for example,
-if-statements (or rather, to be pedantic, to implement the
-conditional-branching bytecodes into which if-statements get compiled).
-
-We currently have four working object spaces which can be plugged into
-the bytecode interpreter:
-
-.. _`standard object space`:
-
-- The *Standard Object Space* is a complete implementation
- of the various built-in types and objects of Python. The Standard Object
- Space, together with the bytecode interpreter, is the foundation of our Python
- implementation. Internally, it is a set of `interpreter-level`_ classes
- implementing the various `application-level`_ objects -- integers, strings,
- lists, types, etc. To draw a comparison with CPython, the Standard Object
- Space provides the equivalent of the C structures ``PyIntObject``,
- ``PyListObject``, etc.
-
-- the *Trace Object Space* wraps e.g. the standard
- object space in order to trace the execution of bytecodes,
- frames and object space operations.
-
-- the *Thunk Object Space* wraps another object space (e.g. the standard
- one) and adds two capabilities: lazily computed objects (computed only when
- an operation is performed on them), and "become", which completely and
- globally replaces one object with another.
-
-- the *Flow Object Space* transforms a Python program into a
- flow-graph representation, by recording all operations that the bytecode
- interpreter would like to perform when it is shown the given Python
- program. This technique is explained `later in this document`_.
-
-For a description of the object spaces, please see the
-`objspace document`_. The sources of PyPy contain the various object spaces
-in the directory `objspace/`_.
-
-.. _`objspace document`: objspace.html
-.. _`application-level`: coding-guide.html#application-level
-.. _`interpreter-level`: coding-guide.html#interpreter-level
-
-.. _`translation process in more details`:
-.. _`later in this document`:
-.. _`initialization time`:
+.. _`Object Space`: objspace.html
RPython, the Flow Object Space and translation
==============================================
@@ -317,6 +268,9 @@
`translation document`_. There is a graph_ that gives an overview of the
whole process.
+.. image:: image/translation-greyscale-small.pdf
+ :scale: 80
+
Status of the implementation (Oct 2005)
==========================================
Modified: pypy/dist/pypy/doc/coding-guide.txt
==============================================================================
--- pypy/dist/pypy/doc/coding-guide.txt (original)
+++ pypy/dist/pypy/doc/coding-guide.txt Wed Nov 30 14:04:56 2005
@@ -980,7 +980,7 @@
which aims to implement unmodified Python semantics.
.. _`standard object space`: objspace.html#standard-object-space
-.. _`objectspace`: architecture.html#objectspace
+.. _`objectspace`: objspace.html
.. _`py.test`: http://codespeak.net/py/current/doc/test.html
Interpreter level tests
Modified: pypy/dist/pypy/doc/interpreter.txt
==============================================================================
--- pypy/dist/pypy/doc/interpreter.txt (original)
+++ pypy/dist/pypy/doc/interpreter.txt Wed Nov 30 14:04:56 2005
@@ -94,7 +94,7 @@
.. _`initialization time`: architecture.html#initialization-time
.. _`interpreter-level and application-level`: coding-guide.html#interpreter-level
.. _`wrapped`: coding-guide.html#wrapping-rules
-.. _`object space`: architecture.html#objectspace
+.. _`object space`: objspace.html
.. _`application level exceptions`: coding-guide.html#applevel-exceptions
Modified: pypy/dist/pypy/doc/objspace.txt
==============================================================================
--- pypy/dist/pypy/doc/objspace.txt (original)
+++ pypy/dist/pypy/doc/objspace.txt Wed Nov 30 14:04:56 2005
@@ -5,15 +5,63 @@
.. contents::
.. sectnum::
+.. _`objectspace`:
+.. _`Object Space`:
-.. _`Object Spaces`: architecture.html#the-object-space
-
-
-Introduction
-============
-
-This document describes aspects of the implementation of PyPy's `Object Spaces`_.
+The Object Space
+================
+The object space creates all objects and knows how to perform operations
+on the objects. You may think of an object space as being a library
+offering a fixed API, a set of *operations*, with implementations that
+correspond to the known semantics of Python objects. An example of an
+operation is *add*: add's implementations are, for example, responsible
+for performing numeric addition when add works on numbers, concatenation
+when add works on built-in sequences.
+
+All object-space operations take and return `application-level`_ objects.
+There are only a few, very simple, object-space operations which allow the
+bytecode interpreter to gain some knowledge about the value of an
+application-level object.
+The most important one is ``is_true()``, which returns a boolean
+interpreter-level value. This is necessary to implement, for example,
+if-statements (or rather, to be pedantic, to implement the
+conditional-branching bytecodes into which if-statements get compiled).
+
+We currently have four working object spaces which can be plugged into
+the bytecode interpreter:
+
+- The *Standard Object Space* is a complete implementation
+ of the various built-in types and objects of Python. The Standard Object
+ Space, together with the bytecode interpreter, is the foundation of our Python
+ implementation. Internally, it is a set of `interpreter-level`_ classes
+ implementing the various `application-level`_ objects -- integers, strings,
+ lists, types, etc. To draw a comparison with CPython, the Standard Object
+ Space provides the equivalent of the C structures ``PyIntObject``,
+ ``PyListObject``, etc.
+
+- the *Trace Object Space* wraps e.g. the standard
+ object space in order to trace the execution of bytecodes,
+ frames and object space operations.
+
+- the *Thunk Object Space* wraps another object space (e.g. the standard
+ one) and adds two capabilities: lazily computed objects (computed only when
+ an operation is performed on them), and "become", which completely and
+ globally replaces one object with another.
+
+- the *Flow Object Space* transforms a Python program into a
+ flow-graph representation, by recording all operations that the bytecode
+ interpreter would like to perform when it is shown the given Python
+ program. This technique is explained `in another document`_.
+
+For a description of the object spaces, please see the
+`objspace document`_. The sources of PyPy contain the various object spaces
+in the directory `objspace/`_.
+
+.. _`objspace document`: objspace.html
+.. _`application-level`: coding-guide.html#application-level
+.. _`interpreter-level`: coding-guide.html#interpreter-level
+.. _`in another document`: translation.html
Object Space Interface
======================
More information about the Pypy-commit
mailing list