[pypy-svn] r64679 - pypy/branch/pyjitpl5/pypy/jit/metainterp
arigo at codespeak.net
arigo at codespeak.net
Sat Apr 25 19:44:08 CEST 2009
Author: arigo
Date: Sat Apr 25 19:44:08 2009
New Revision: 64679
Modified:
pypy/branch/pyjitpl5/pypy/jit/metainterp/pyjitpl.py
Log:
Save/restore the exception_box and exc_value_box too.
This is clearly not looking safe...
Modified: pypy/branch/pyjitpl5/pypy/jit/metainterp/pyjitpl.py
==============================================================================
--- pypy/branch/pyjitpl5/pypy/jit/metainterp/pyjitpl.py (original)
+++ pypy/branch/pyjitpl5/pypy/jit/metainterp/pyjitpl.py Sat Apr 25 19:44:08 2009
@@ -120,6 +120,8 @@
class MIFrame(object):
+ exception_box = None
+ exc_value_box = None
def __init__(self, metainterp, jitcode):
assert isinstance(jitcode, codewriter.JitCode)
@@ -987,6 +989,14 @@
framestack = []
for f in self.framestack:
newenv = []
+ #
+ box = f.exception_box
+ if isinstance(box, Box):
+ saved_env.append(box.clonebox())
+ box = f.exc_value_box
+ if isinstance(box, Box):
+ saved_env.append(box.clonebox())
+ #
for box in f.env:
if isinstance(box, Box):
saved_env.append(box.clonebox())
@@ -1008,6 +1018,14 @@
assert len(pseudoframe._saved_framestack) == len(self.framestack)
for j in range(len(self.framestack)):
f = self.framestack[j]
+ #
+ if isinstance(f.exception_box, BoxInt):
+ box.changevalue_int(saved_env[i].getint())
+ i += 1
+ if isinstance(f.exc_value_box, BoxPtr):
+ box.changevalue_ptr(saved_env[i].getptr_base())
+ i += 1
+ #
pseudoenv = pseudoframe._saved_framestack[j]
assert len(f.env) == len(pseudoenv)
for k in range(len(f.env)):
More information about the Pypy-commit
mailing list