[pypy-svn] r51270 - in pypy/branch/jit-refactoring/pypy/jit/rainbow: . test

cfbolz at codespeak.net cfbolz at codespeak.net
Mon Feb 4 21:57:29 CET 2008


Author: cfbolz
Date: Mon Feb  4 21:57:28 2008
New Revision: 51270

Modified:
   pypy/branch/jit-refactoring/pypy/jit/rainbow/codewriter.py
   pypy/branch/jit-refactoring/pypy/jit/rainbow/test/test_interpreter.py
Log:
nex


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	Mon Feb  4 21:57:28 2008
@@ -471,6 +471,17 @@
     def serialize_op_zero_gc_pointers_inside(self, op):
         pass # XXX is that right?
 
+    def serialize_op_cast_pointer(self, op):
+        color = self.varcolor(op.result)
+        assert color == self.varcolor(op.args[0])
+        if color == "green":
+            self.register_greenvar(op.result, self.green_position(op.args[0]))
+        else:
+            self.register_redvar(op.result, self.redvar_position(op.args[0]))
+
+    def serialize_op_keepalive(self, op):
+        pass
+
     def serialize_op_getfield(self, op):
         assert self.opcolor(op) == "red"
         args = op.args

Modified: pypy/branch/jit-refactoring/pypy/jit/rainbow/test/test_interpreter.py
==============================================================================
--- pypy/branch/jit-refactoring/pypy/jit/rainbow/test/test_interpreter.py	(original)
+++ pypy/branch/jit-refactoring/pypy/jit/rainbow/test/test_interpreter.py	Mon Feb  4 21:57:28 2008
@@ -14,6 +14,7 @@
 from pypy.annotation import model as annmodel
 from pypy.objspace.flow.model import summary
 from pypy.rlib.jit import hint
+from pypy.rlib.objectmodel import keepalive_until_here
 from pypy import conftest
 
 def getargtypes(annotator, values):
@@ -850,7 +851,6 @@
 
 
     def test_red_subcontainer_cast(self):
-        py.test.skip("arrays and structs are not working")
         S = lltype.GcStruct('S', ('n', lltype.Signed))
         T = lltype.GcStruct('T', ('s', S), ('n', lltype.Float))
         def ll_function(k):
@@ -862,7 +862,7 @@
             result = s.n * (k-1)
             keepalive_until_here(t)
             return result
-        res = self.interpret(ll_function, [7], [], policy=P_NOVIRTUAL)
+        res = self.interpret(ll_function, [7], [])
         assert res == 42
         self.check_insns({'int_lt': 1, 'int_mul': 1, 'int_sub': 1})
 



More information about the Pypy-commit mailing list