| File |
Date |
Author |
Commit |
|
bench
|
2008-12-23
|
Paolo Giarrusso
|
[e877ee]
Addition and update of tests - gc2 and gc3 need...
|
|
docs
|
unknown
|
|
|
|
old
|
unknown
|
|
|
|
presentation
|
2010-04-23
|
Paolo Giarrusso
|
[b60e08]
Add compiled versions of our report and present...
|
|
report
|
2010-04-23
|
Paolo Giarrusso
|
[b60e08]
Add compiled versions of our report and present...
|
|
sample
|
unknown
|
|
|
|
test
|
2010-03-30
|
Paolo Giarrusso
|
[8ff0c6]
Make test/test_attr_init.py more verbose, as ne...
|
|
test_err
|
unknown
|
|
|
|
.hgignore
|
2008-12-23
|
Paolo Giarrusso
|
[265f9f]
Update .hgignore
|
|
.vimrc
|
2010-03-28
|
Paolo Giarrusso
|
[7c2715]
Add default editing settings (hard tabs, shiftw...
|
|
ChangeLog
|
unknown
|
|
|
|
CodingStyle.txt
|
unknown
|
|
|
|
Makefile
|
unknown
|
|
|
|
OpcodeList.txt
|
unknown
|
|
|
|
README
|
2010-04-11
|
Paolo Giarrusso
|
[555f3c]
README: actually, we don't support Python2.5 an...
|
|
TODO
|
2010-04-11
|
Paolo Giarrusso
|
[3c1661]
Update TODO for last commit, start moving compl...
|
|
boxedinteger.h
|
2008-12-16
|
Sigurd Meldgaard
|
[1f73bb]
All allocations (except a few) are now with maps.
|
|
class.c
|
unknown
|
|
|
|
class.h
|
2010-03-30
|
Paolo Giarrusso
|
[99ae73]
Method.klass: fix type (it must be Class *) and...
|
|
code.c
|
2010-04-11
|
Paolo Giarrusso
|
[3068da]
Write a more general get_obj_size(), inspired b...
|
|
code.h
|
unknown
|
|
|
|
compiler.py
|
2010-04-11
|
Paolo Giarrusso
|
[20e390]
compiler.py: use 'repr' for printing constants,...
|
|
cxx.h
|
unknown
|
|
|
|
dictionary.c
|
2010-03-29
|
Paolo Giarrusso
|
[5264af]
Add Dict_repr for dictionaries, using __String_...
|
|
dictionary.h
|
2008-12-16
|
Paolo Giarrusso
|
[abf80e]
Add Dict_copy and raw_array_copy.
|
|
err.h
|
unknown
|
|
|
|
gc.c
|
2010-04-11
|
Paolo Giarrusso
|
[3068da]
Write a more general get_obj_size(), inspired b...
|
|
gc.h
|
2010-03-30
|
Paolo Giarrusso
|
[8fd529]
Cause a failure when using ALLOCATE_TYPE*WITH_M...
|
|
globals.c
|
unknown
|
|
|
|
globals.h
|
unknown
|
|
|
|
hash.c
|
2008-12-05
|
Sigurd Meldgaard
|
[feeee2]
Added hashing to strings (Still not used).
|
|
hash.h
|
2008-12-16
|
Sigurd Meldgaard
|
[7ad0bb]
Moved hash to object.h
|
|
heapstring.c
|
2010-04-11
|
Paolo Giarrusso
|
[3068da]
Write a more general get_obj_size(), inspired b...
|
|
heapstring.h
|
2010-03-29
|
Paolo Giarrusso
|
[4c84eb]
Add __String_concat to reduce the need for cast...
|
|
interpret.c
|
unknown
|
|
|
|
interpret.h
|
unknown
|
|
|
|
list.c
|
unknown
|
|
|
|
list.h
|
2010-03-28
|
Paolo Giarrusso
|
[4a587d]
Rename raw_array->length as ->size, since it be...
|
|
main.c
|
2008-12-23
|
Paolo Giarrusso
|
[38760c]
main.c: multiply by ten the heap size
|
|
map.c
|
2010-03-30
|
Paolo Giarrusso
|
[99ae73]
Method.klass: fix type (it must be Class *) and...
|
|
map.h
|
2008-12-22
|
Paolo Giarrusso
|
[0e6aa5]
Fix maps using List_extend - when reusing a tra...
|
|
notes
|
unknown
|
|
|
|
object-inl.h
|
2010-03-30
|
Paolo Giarrusso
|
[4fbe27]
object-inl.h: local cleanup, add implicit else ...
|
|
object.c
|
2010-04-11
|
Paolo Giarrusso
|
[644dc7]
__unused__ macro: remove, it's a copy of _attri...
|
|
object.h
|
2010-04-11
|
Paolo Giarrusso
|
[3068da]
Write a more general get_obj_size(), inspired b...
|
|
parser.c
|
2010-04-11
|
Paolo Giarrusso
|
[db91ad]
parser.c: avoid 'warning: ignoring return value...
|
|
parser.h
|
unknown
|
|
|
|
platform-deps.h
|
unknown
|
|
|
|
python2.5-opcode.h
|
2010-03-28
|
Paolo Giarrusso
|
[b88850]
Add STORE_MAP opcode (it was missing, I don't k...
|
|
runtests.bash
|
2010-04-11
|
Paolo Giarrusso
|
[c19517]
Make runtests.bash less verbose (no disassembly...
|
|
runtests_valgrind.bash
|
2010-04-11
|
Paolo Giarrusso
|
[767f80]
runtests_valgrind.bash: avoid joining together ...
|
|
stack-layout.txt
|
unknown
|
|
|
|
tagged-el.h
|
2010-03-28
|
Paolo Giarrusso
|
[3fd90f]
tagged-el.h: add comment on an implementation c...
|
|
tuple.c
|
unknown
|
|
|
|
tuple.h
|
2008-12-14
|
Paolo Giarrusso
|
[465511]
Tuple datatype implementation
|
|
util.h
|
2010-03-28
|
Paolo Giarrusso
|
[8b2d15]
Move platform dependent stuff from util.h to pl...
|
Read Me
== Introduction ==
This project is a proof-of-concept fast Python interpreter. It's really minimal.
Run "make" to try building on your system.
Three interpreters will be built, with different settings:
- interp_release: release mode, optimizations active.
- interp: verbose debugging mode, prints what it is doing at each opcode
dispatch.
- interp_valgrind: same as interp, but some code is changed to shut up false
positive warnings from Valgrind, or to give more real warnings (for instance,
the gc does not clear the heap when it's emptied in this interpreter, to have
a bigger chance to catch 'uninitialized memory' warnings).
Compile one of the included test programs with ./compiler.py, and run it with
./interp_release, ./interp or ./interp_valgrind.
For more info, see report/report.pdf.
== Portability ==
It has been tested on Ubuntu 7.10 (when it was first written), Ubuntu 9.10
(now) and Mac OS X (dunno which release). It supports only x86/x86_64 currently.
Requirements:
- GCC (it probably will not work well with ICC, becuase computed gotos are
implemented in a different way).
- Python2.6. The provided examples worked with Python2.5 when they were
developed, and support for the STORE_MAP opcode (not really used by version
2.5) was added, allowing us to work under Python2.6; now we don't test any
more against Python2.5 however.
== History ==
This project was born as a proof-of-concept for three features:
- indirect threading.
- using maps with transitions (à la V8) for Python (not really complete).
- writing a real GC for Python instead of using reference counting.
Some other intended features were:
- using code-copying without writing the interpreter in assembly (and this part
of the project failed).
- being a multithreaded GIL-less fast interpreter (but right now it does not
even support imports, or a builtin library).
== Planned supported features (for our term project) ==
We should try to cover all features which have a significant runtime cost, or
which are fundamental, and we should ignore the rest.
For instance, we don't plan to support:
- True/False (they are just wrappers around 1 and 0 which are displayed in a
nicer way).
- long integers (just interfacing to GMP). We check for overflow however, to get
the performance impact of that.
- built-in functions, although they would be easy to add.