Author: Manuel Jacob Branch: rpython-doc Changeset: r62078:8753a754df24 Date: 2013-03-05 14:35 +0100 http://bitbucket.org/pypy/pypy/changeset/8753a754df24/
Log: Be more general in rpython/doc/jit/. In some passages it's not obvious because they are historical notes or examples from the PyPy interpreter. diff --git a/rpython/doc/jit/index.rst b/rpython/doc/jit/index.rst --- a/rpython/doc/jit/index.rst +++ b/rpython/doc/jit/index.rst @@ -4,7 +4,7 @@ :abstract: - When PyPy is translated into an executable such as ``pypy-c``, the + When a interpreter written in RPython is translated into an executable, the executable contains a full virtual machine that can optionally include a Just-In-Time compiler. This JIT compiler is **generated automatically from the interpreter** that we wrote in RPython. @@ -26,4 +26,5 @@ .. _Overview: overview.html .. _Notes: pyjitpl5.html +.. TODO: Update link .. _Hooks: ../jit-hooks.html diff --git a/rpython/doc/jit/overview.rst b/rpython/doc/jit/overview.rst --- a/rpython/doc/jit/overview.rst +++ b/rpython/doc/jit/overview.rst @@ -4,7 +4,7 @@ .. contents:: -This is a non-technical introduction and motivation for PyPy's approach +This is a non-technical introduction and motivation for RPython's approach to Just-In-Time compiler generation. @@ -65,7 +65,7 @@ The closest comparison to our current JIT is Tamarin's TraceMonkey. However, this JIT compiler is written manually, which is quite some -effort. In PyPy, we write a JIT generator at the level of RPython, +effort. Instead, we write a JIT generator at the level of RPython, which means that our final JIT does not have to -- indeed, cannot -- be written to encode all the details of the full Python language. These details are automatically supplied by the fact that we have an @@ -187,7 +187,7 @@ Further reading ======================================================================== -The description of the current PyPy JIT generator is given in PyJitPl5_ +The description of the current RPython JIT generator is given in PyJitPl5_ (draft). .. _`JSR 292`: http://jcp.org/en/jsr/detail?id=292 diff --git a/rpython/doc/jit/pyjitpl5.rst b/rpython/doc/jit/pyjitpl5.rst --- a/rpython/doc/jit/pyjitpl5.rst +++ b/rpython/doc/jit/pyjitpl5.rst @@ -2,18 +2,18 @@ PyJitPl5 ========== -This document describes the fifth generation of PyPy's JIT. +This document describes the fifth generation of the RPython JIT generator. Implementation of the JIT ========================= The JIT's `theory`_ is great in principle, but the actual code is a different -story. This section tries to give a high level overview of how PyPy's JIT is +story. This section tries to give a high level overview of how RPython's JIT is implemented. It's helpful to have an understanding of how the `RPython translation toolchain`_ works before digging into the sources. -Almost all JIT specific code is found in pypy/jit subdirectories. Translation +Almost all JIT specific code is found in rpython subdirectories. Translation time code is in the codewriter directory. The metainterp directory holds platform independent code including the the tracer and the optimizer. Code in the backend directory is responsible for generating machine code. @@ -25,7 +25,7 @@ JIT hints --------- -To add a JIT to an interpreter, PyPy only requires that two hints be added to +To add a JIT to an interpreter, RPython only requires two hints to be added to the target interpreter. These are jit_merge_point and can_enter_jit. jit_merge_point is supposed to go at the start of opcode dispatch. It allows the JIT to bail back to the interpreter in case running machine code is no @@ -34,7 +34,7 @@ interpreter defines its hints in pypy/module/pypyjit/interp_jit.py in a few overridden methods of the default interpreter loop. -An interpreter wishing to use the PyPy's JIT must define a list of *green* +An interpreter wishing to use the RPython JIT generator must define a list of *green* variables and a list of *red* variables. The *green* variables are loop constants. They are used to identify the current loop. Red variables are for everything else used in the execution loop. For example, the Python interpreter @@ -152,7 +152,7 @@ loop. Since it is only used by the JIT, it can be "optimized out"; the value doesn't have to be allocated at all and its fields can be stored as first class values instead of deferencing them in memory. Virtuals allow temporary objects -in the interpreter to be unwrapped. For example, a W_IntObject in the PyPy can +in the interpreter to be unwrapped. For example, a W_IntObject in the PyPy interpreter can be unwrapped to just be its integer value as long as the object is known not to escape the machine code. _______________________________________________ pypy-commit mailing list pypy-commit@python.org http://mail.python.org/mailman/listinfo/pypy-commit