[pypy-svn] r10417 - pypy/dist/pypy/objspace/flow
pedronis at codespeak.net
pedronis at codespeak.net
Fri Apr 8 01:00:01 CEST 2005
Author: pedronis
Date: Fri Apr 8 01:00:01 2005
New Revision: 10417
Modified:
pypy/dist/pypy/objspace/flow/objspace.py
Log:
use a second flag skip instead of subtly distinguishing 0/None
Modified: pypy/dist/pypy/objspace/flow/objspace.py
==============================================================================
--- pypy/dist/pypy/objspace/flow/objspace.py (original)
+++ pypy/dist/pypy/objspace/flow/objspace.py Fri Apr 8 01:00:01 2005
@@ -455,15 +455,16 @@
import __builtin__
op = None
+ skip = False
if name.startswith('del') or name.startswith('set') or name.startswith('inplace_'):
# skip potential mutators
if debug: print "Skip", name
- op = 0
+ skip = True
elif name in ['id', 'hash', 'iter']:
# skip potential runtime context dependecies
if debug: print "Skip", name
- op = 0
+ skip = True
elif name in ['repr', 'str']:
rep = getattr(__builtin__, name)
def op(obj):
@@ -485,7 +486,7 @@
op = getattr(operator, name, None)
if not op:
- if op != 0:
+ if not skip:
if debug: print >> sys.stderr, "XXX missing operator:", name
else:
if debug: print "Can constant-fold operation: %s" % name
More information about the Pypy-commit
mailing list