The attached files pfloatobject.[ch] add basic
floating point support to psyco using the 'quick'
method described by Armin. Not all floating point
methods are implemented, but the remainder should be
easy to add if desired. Currently implemented are:
add, subtract, mulitply, divide (but not floor
divide), pos, neg, abs, nonzero and cmp. All that
needs to be done, other than to place these files in
the Objects directory is (a) add pfloatobject.c to the
srcs and/or to hack.c and (b)add psy_floatobject_init
() to psyco_pycompiler_init() in pycompiler.c.
The tar file also contains a modified version of
test.py that does some silly floating point operations.
Log in to post a comment.