[pypy-svn] r54525 - pypy/dist/pypy/objspace/std
arigo at codespeak.net
arigo at codespeak.net
Wed May 7 13:20:18 CEST 2008
Author: arigo
Date: Wed May 7 13:20:17 2008
New Revision: 54525
Modified:
pypy/dist/pypy/objspace/std/multimethod.py
Log:
Also dump the non-baked perform_call expressions.
Modified: pypy/dist/pypy/objspace/std/multimethod.py
==============================================================================
--- pypy/dist/pypy/objspace/std/multimethod.py (original)
+++ pypy/dist/pypy/objspace/std/multimethod.py Wed May 7 13:20:17 2008
@@ -607,8 +607,14 @@
checklines.append(self.body)
body = '\n '.join(checklines)
source = 'def %s(%s):\n %s\n' % (name, ', '.join(fnargs), body)
+ self.debug_dump(source)
+ exec compile2(source) in self.miniglobals
+ self._function = self.miniglobals[name]
+ return self._function
+ def debug_dump(self, source):
if 0: # for debugging the generated mm sources
+ name = self.get_function_name()
f = open('/tmp/mm-source/%s' % name, 'a')
for possiblename in self.possiblenames:
print >> f, '#',
@@ -619,10 +625,6 @@
print >> f, source
f.close()
- exec compile2(source) in self.miniglobals
- self._function = self.miniglobals[name]
- return self._function
-
def register_valid_types(self, types):
node = self.typetree
for t1 in types[:-1]:
@@ -829,6 +831,7 @@
else:
assert entry.body.startswith('return ')
expr = entry.body[len('return '):]
+ entry.debug_dump(entry.body)
return self.fnargs, expr, entry.miniglobals, entry.fallback
def build_funcentry(self, funcnameparts, calllist, **extranames):
More information about the Pypy-commit
mailing list