# pypy / pypy / doc / you-want-to-help.rst

 Maciej Fijalkows… 97c883f 2012-03-23 Armin Rigo ed7d654 2012-03-23 Maciej Fijalkows… 97c883f 2012-03-23 Armin Rigo ed7d654 2012-03-23 Maciej Fijalkows… 97c883f 2012-03-23 Armin Rigo ed7d654 2012-03-23 Maciej Fijalkows… 97c883f 2012-03-23 Armin Rigo ed7d654 2012-03-23 Maciej Fijalkows… 97c883f 2012-03-23 Armin Rigo ed7d654 2012-03-23 Maciej Fijalkows… 97c883f 2012-03-23 Armin Rigo 10f0897 2012-03-25 Armin Rigo 8ae92db 2012-03-25 Maciej Fijalkows… 97c883f 2012-03-23 Armin Rigo 10f0897 2012-03-25 Maciej Fijalkows… 97c883f 2012-03-23 Armin Rigo 10f0897 2012-03-25 Armin Rigo 0b2663c 2012-03-24 Maciej Fijalkows… 97c883f 2012-03-23 Armin Rigo 0b2663c 2012-03-24 Maciej Fijalkows… 97c883f 2012-03-23   1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 You want to help with PyPy, now what? ===================================== PyPy is a very large project that has a reputation of being hard to dive into. Some of this fame is warranted, some of it is purely accidental. There are three important lessons that everyone willing to contribute should learn: * PyPy has layers. There are many pieces of architecture that are very well separated from each other. More about this below, but often the manifestation of this is that things are at a different layer than you would expect them to be. For example if you are looking for the JIT implementation, you will not find it in the implementation of the Python programming language. * Because of the above, we are very serious about Test Driven Development. It's not only what we believe in, but also that PyPy's architecture is working very well with TDD in mind and not so well without it. Often the development means progressing in an unrelated corner, one unittest at a time; and then flipping a giant switch, bringing it all together. (It generally works out of the box. If it doesn't, then we didn't write enough unit tests.) It's worth repeating - PyPy approach is great if you do TDD, not so great otherwise. * PyPy uses an entirely different set of tools - most of them included in the PyPy repository. There is no Makefile, nor autoconf. More below Architecture ============ PyPy has layers. The 100 miles view: * RPython_ is the language in which we write interpreters. Not the entire PyPy project is written in RPython, only the parts that are compiled in the translation process. The interesting point is that RPython has no parser, it's compiled from the live python objects, which make it possible to do all kinds of metaprogramming during import time. In short, Python is a meta programming language for RPython. The RPython standard library is to be found in the rlib subdirectory. .. _RPython: coding-guide.html#RPython * The translation toolchain - this is the part that takes care about translating RPython to flow graphs and then to C. There is more in the architecture_ document written about it. It mostly lives in rpython, annotator and objspace/flow. .. _architecture: architecture.html * Python Interpreter xxx * Python modules xxx * Just-in-Time Compiler (JIT): we have a tracing JIT_ that traces the interpreter written in RPython, rather than the user program that it interprets. As a result it applies to any interpreter, i.e. any language. But getting it to work correctly is not trivial: it requires a small number of precise "hints" and possibly some small refactorings of the interpreter. The JIT itself also has several almost-independent parts: the tracer itself in jit/metainterp, the optimizer in jit/metainterp/optimizer that optimizes a list of residual operations, and the backend in jit/backend/ that turns it into machine code. Writing a new backend is a traditional way to get into the project. .. _we have a tracing JIT: jit/index.html * Garbage Collectors (GC): as you can notice if you are used to CPython's C code, there are no Py_INCREF/Py_DECREF equivalents in RPython code. Garbage collection in PyPy_ is inserted during translation. Moreover, this is not reference counting; it is a real GC written as more RPython code. The best one we have so far is in rpython/memory/gc/minimark.py. .. _Garbage collection in PyPy: garbage_collection.html Toolset ======= xxx 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.