Author: Spenser Bauman <[email protected]>
Branch: value-classes
Changeset: r87428:eb82006f754f
Date: 2016-09-27 21:34 -0400
http://bitbucket.org/pypy/pypy/changeset/eb82006f754f/

Log:    Stop gap for dealing with Virtual/ConstPtr case

diff --git a/rpython/jit/metainterp/optimizeopt/virtualstate.py 
b/rpython/jit/metainterp/optimizeopt/virtualstate.py
--- a/rpython/jit/metainterp/optimizeopt/virtualstate.py
+++ b/rpython/jit/metainterp/optimizeopt/virtualstate.py
@@ -1,7 +1,7 @@
 from rpython.jit.metainterp.walkvirtual import VirtualVisitor
 from rpython.jit.metainterp.history import ConstInt, ConstPtr, ConstFloat
 from rpython.jit.metainterp.optimizeopt.info import ArrayPtrInfo,\
-     ArrayStructInfo, AbstractStructPtrInfo
+     ArrayStructInfo, AbstractStructPtrInfo, ConstPtrInfo
 from rpython.jit.metainterp.optimizeopt.intutils import \
      MININT, MAXINT, IntBound, IntLowerBound, IntUnbounded
 from rpython.jit.metainterp.resoperation import rop, ResOperation, \
@@ -310,7 +310,9 @@
 
         if runtime_box is not None:
             opinfo = state.optimizer.getptrinfo(box)
-            assert opinfo is None or isinstance(opinfo, AbstractStructPtrInfo)
+            if opinfo is not None and not isinstance(opinfo, 
AbstractStructPtrInfo):
+                assert isinstance(opinfo, ConstPtrInfo)
+                raise VirtualStatesCantMatch("cannot yet handle const 
pointers")
         else:
             opinfo = None
 
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to