[pypy-svn] r67628 - in pypy/branch/spine-of-frames/pypy/jit/metainterp: . test
cfbolz at codespeak.net
cfbolz at codespeak.net
Thu Sep 10 19:18:44 CEST 2009
Author: cfbolz
Date: Thu Sep 10 19:18:43 2009
New Revision: 67628
Modified:
pypy/branch/spine-of-frames/pypy/jit/metainterp/pyjitpl.py
pypy/branch/spine-of-frames/pypy/jit/metainterp/test/test_recursive.py
Log:
do things in the other order, to make it possible to call stuff in the leave
hook
Modified: pypy/branch/spine-of-frames/pypy/jit/metainterp/pyjitpl.py
==============================================================================
--- pypy/branch/spine-of-frames/pypy/jit/metainterp/pyjitpl.py (original)
+++ pypy/branch/spine-of-frames/pypy/jit/metainterp/pyjitpl.py Thu Sep 10 19:18:43 2009
@@ -1089,13 +1089,13 @@
def generate_bytecode(self, policy):
self._codewriter = codewriter.CodeWriter(self, policy)
- self.portal_code = self._codewriter.make_portal_bytecode(
- self.portal_graph)
self.leave_code = None
if self.leave_graph:
self.leave_code = self._codewriter.make_one_bytecode(
(self.leave_graph, None),
False)
+ self.portal_code = self._codewriter.make_portal_bytecode(
+ self.portal_graph)
self._class_sizes = self._codewriter.class_sizes
# ---------- construction-time interface ----------
Modified: pypy/branch/spine-of-frames/pypy/jit/metainterp/test/test_recursive.py
==============================================================================
--- pypy/branch/spine-of-frames/pypy/jit/metainterp/test/test_recursive.py (original)
+++ pypy/branch/spine-of-frames/pypy/jit/metainterp/test/test_recursive.py Thu Sep 10 19:18:43 2009
@@ -384,9 +384,13 @@
def c(code, pc):
return "L" not in hlstr(code)
- def leave(code, pc, frame):
+ def really_leave(frame):
frame.hookcalled = True
+ def leave(code, pc, frame):
+ # use an indirection, because that case was buggy before
+ really_leave(frame)
+
class ExpectedHook(Exception):
pass
class UnexpectedHook(Exception):
More information about the Pypy-commit
mailing list