[pypy-svn] r51965 - pypy/branch/jit-refactoring/pypy/jit/rainbow
cfbolz at codespeak.net
cfbolz at codespeak.net
Fri Feb 29 19:29:51 CET 2008
Author: cfbolz
Date: Fri Feb 29 19:29:50 2008
New Revision: 51965
Modified:
pypy/branch/jit-refactoring/pypy/jit/rainbow/codewriter.py
pypy/branch/jit-refactoring/pypy/jit/rainbow/interpreter.py
Log:
enable an assert and fix a bug that it found
Modified: pypy/branch/jit-refactoring/pypy/jit/rainbow/codewriter.py
==============================================================================
--- pypy/branch/jit-refactoring/pypy/jit/rainbow/codewriter.py (original)
+++ pypy/branch/jit-refactoring/pypy/jit/rainbow/codewriter.py Fri Feb 29 19:29:50 2008
@@ -786,7 +786,8 @@
def handle_residual_call(self, op, withexc):
fnptr = op.args[0]
pos = self.calldesc_position(lltype.typeOf(fnptr.value))
- has_result = self.varcolor(op.result) != "gray"
+ has_result = (self.varcolor(op.result) != "gray" and
+ op.result.concretetype != lltype.Void)
func = self.serialize_oparg("red", fnptr)
emitted_args = []
for v in op.args[1:]:
@@ -795,7 +796,8 @@
self.emit(func, pos, withexc, has_result, len(emitted_args))
self.emit(*emitted_args)
self.emit(self.promotiondesc_position(lltype.Signed))
- self.register_redvar(op.result)
+ if has_result:
+ self.register_redvar(op.result)
def handle_rpyexc_raise_call(self, op, withexc):
emitted_args = []
Modified: pypy/branch/jit-refactoring/pypy/jit/rainbow/interpreter.py
==============================================================================
--- pypy/branch/jit-refactoring/pypy/jit/rainbow/interpreter.py (original)
+++ pypy/branch/jit-refactoring/pypy/jit/rainbow/interpreter.py Fri Feb 29 19:29:50 2008
@@ -228,8 +228,8 @@
bytecode = self.load_2byte()
assert bytecode >= 0
result = self.opcode_implementations[bytecode](self)
- #assert (self.frame is None or not self.frame.local_boxes or
- # self.frame.local_boxes[-1] is not None)
+ assert (self.frame is None or not self.frame.local_boxes or
+ self.frame.local_boxes[-1] is not None)
if result is STOP:
return
else:
More information about the Pypy-commit
mailing list