Author: Maciej Fijalkowski <[email protected]>
Branch: optresult
Changeset: r77692:a4f685f2bb01
Date: 2015-05-29 17:56 +0200
http://bitbucket.org/pypy/pypy/changeset/a4f685f2bb01/

Log:    fix copying value in one more place

diff --git a/rpython/jit/metainterp/history.py 
b/rpython/jit/metainterp/history.py
--- a/rpython/jit/metainterp/history.py
+++ b/rpython/jit/metainterp/history.py
@@ -762,6 +762,8 @@
 
     def record_default_val(self, opnum, argboxes, descr=None):
         op = ResOperation(opnum, argboxes, descr)
+        assert op.is_same_as()
+        op.copy_value_from(argboxes[0])
         self.operations.append(op)
         return op        
 
diff --git a/rpython/jit/metainterp/resoperation.py 
b/rpython/jit/metainterp/resoperation.py
--- a/rpython/jit/metainterp/resoperation.py
+++ b/rpython/jit/metainterp/resoperation.py
@@ -232,6 +232,9 @@
     def is_call(self):
         return rop._CALL_FIRST <= self.getopnum() <= rop._CALL_LAST
 
+    def is_same_as(self):
+        return self.opnum in (rop.SAME_AS_I, rop.SAME_AS_F, rop.SAME_AS_R)
+
     def is_getfield(self):
         return self.opnum in (rop.GETFIELD_GC_I, rop.GETFIELD_GC_F,
                               rop.GETFIELD_GC_R, rop.GETFIELD_GC_PURE_I,
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to