[pypy-svn] r13721 - pypy/dist/pypy/rpython
hpk at codespeak.net
hpk at codespeak.net
Thu Jun 23 17:06:21 CEST 2005
Author: hpk
Date: Thu Jun 23 17:06:20 2005
New Revision: 13721
Modified:
pypy/dist/pypy/rpython/llinterp.py
Log:
(hpk,arre)
add support for 'int_and' and 'int_or'
Modified: pypy/dist/pypy/rpython/llinterp.py
==============================================================================
--- pypy/dist/pypy/rpython/llinterp.py (original)
+++ pypy/dist/pypy/rpython/llinterp.py Thu Jun 23 17:06:20 2005
@@ -259,13 +259,14 @@
for typ in (float, int):
typname = typ.__name__
- optup = ('add', 'sub', 'mul', 'div', 'mod', 'gt', 'lt', 'ge', 'ne', 'le', 'eq')
+ optup = ('add', 'sub', 'mul', 'div', 'mod', 'gt', 'lt', 'ge', 'ne', 'le', 'eq', 'and_', 'or_')
if typ is int:
optup += 'truediv', 'floordiv'
for opname in optup:
assert opname in opimpls
+ pureopname = opname.rstrip('_')
exec py.code.Source("""
- def %(typname)s_%(opname)s(x, y):
+ def %(typname)s_%(pureopname)s(x, y):
assert isinstance(x, %(typname)s)
assert isinstance(y, %(typname)s)
func = opimpls[%(opname)r]
More information about the Pypy-commit
mailing list