[pypy-svn] r63972 - in pypy/branch/pyjitpl5-simplify/pypy/jit/metainterp: . test
arigo at codespeak.net
arigo at codespeak.net
Sat Apr 11 11:54:24 CEST 2009
Author: arigo
Date: Sat Apr 11 11:54:22 2009
New Revision: 63972
Added:
pypy/branch/pyjitpl5-simplify/pypy/jit/metainterp/test/test_zrpy_recursive.py (contents, props changed)
Modified:
pypy/branch/pyjitpl5-simplify/pypy/jit/metainterp/history.py
pypy/branch/pyjitpl5-simplify/pypy/jit/metainterp/warmspot.py
Log:
Fix translation of recursive portals.
Modified: pypy/branch/pyjitpl5-simplify/pypy/jit/metainterp/history.py
==============================================================================
--- pypy/branch/pyjitpl5-simplify/pypy/jit/metainterp/history.py (original)
+++ pypy/branch/pyjitpl5-simplify/pypy/jit/metainterp/history.py Sat Apr 11 11:54:22 2009
@@ -153,7 +153,10 @@
def __hash__(self):
if isinstance(self.value, Symbolic):
return id(self.value)
- return self.get_()
+ try:
+ return self.get_()
+ except lltype.DelayedPointer:
+ return -2 # xxx risk of changing hash...
class ConstInt(Const):
Added: pypy/branch/pyjitpl5-simplify/pypy/jit/metainterp/test/test_zrpy_recursive.py
==============================================================================
--- (empty file)
+++ pypy/branch/pyjitpl5-simplify/pypy/jit/metainterp/test/test_zrpy_recursive.py Sat Apr 11 11:54:22 2009
@@ -0,0 +1,9 @@
+import py
+from pypy.jit.metainterp.test import test_recursive
+from pypy.jit.metainterp.test.test_zrpy_basic import LLInterpJitMixin
+
+
+class TestLLRecursive(test_recursive.RecursiveTests, LLInterpJitMixin):
+ pass
+
+ # ==========> test_recursive.py
Modified: pypy/branch/pyjitpl5-simplify/pypy/jit/metainterp/warmspot.py
==============================================================================
--- pypy/branch/pyjitpl5-simplify/pypy/jit/metainterp/warmspot.py (original)
+++ pypy/branch/pyjitpl5-simplify/pypy/jit/metainterp/warmspot.py Sat Apr 11 11:54:22 2009
@@ -224,7 +224,8 @@
FUNC = FUNCPTR.TO
args_s = [annmodel.lltype_to_annotation(ARG) for ARG in FUNC.ARGS]
s_result = annmodel.lltype_to_annotation(FUNC.RESULT)
- return self.annhelper.delayedfunction(func, args_s, s_result)
+ graph = self.annhelper.getgraph(func, args_s, s_result)
+ return self.annhelper.graph2delayed(graph, FUNC)
def rewrite_jit_merge_point(self):
#
More information about the Pypy-commit
mailing list