[pypy-commit] pypy inline-dict-ops: (fijal, arigo) a test and a fix

fijal noreply at buildbot.pypy.org
Sat Jul 23 20:40:53 CEST 2011


Author: Maciej Fijalkowski <fijall at gmail.com>
Branch: inline-dict-ops
Changeset: r45910:f46f701cd3b8
Date: 2011-07-23 20:40 +0200
http://bitbucket.org/pypy/pypy/changeset/f46f701cd3b8/

Log:	(fijal, arigo) a test and a fix

diff --git a/pypy/jit/codewriter/jtransform.py b/pypy/jit/codewriter/jtransform.py
--- a/pypy/jit/codewriter/jtransform.py
+++ b/pypy/jit/codewriter/jtransform.py
@@ -707,7 +707,7 @@
         else:
             v_inst, v_index, c_field = op.args
             if op.result.concretetype is lltype.Void:
-                return
+                return Constant(None, lltype.Void)
             # only GcArray of Struct supported
             assert isinstance(v_inst.concretetype.TO, lltype.GcArray)
             STRUCT = v_inst.concretetype.TO.OF
diff --git a/pypy/jit/codewriter/test/test_jtransform.py b/pypy/jit/codewriter/test/test_jtransform.py
--- a/pypy/jit/codewriter/test/test_jtransform.py
+++ b/pypy/jit/codewriter/test/test_jtransform.py
@@ -661,7 +661,7 @@
     op = SpaceOperation('getinteriorfield', [v, i, Constant('v', lltype.Void)],
                         Constant(None, lltype.Void))
     op1 = Transformer(FakeCPU()).rewrite_operation(op)
-    assert not op1
+    assert op1 == Constant(None, lltype.Void)
 
 def test_str_setinteriorfield():
     v = varoftype(lltype.Ptr(rstr.STR))


More information about the pypy-commit mailing list