Commits

Maciej Fijalkowski  committed d7ca4db

hack differently

  • Participants
  • Parent commits 2b413dc
  • Branches result-in-resops

Comments (0)

Files changed (2)

File pypy/jit/metainterp/optmodel.py

 
 from pypy.tool.sourcetools import func_with_new_name
 from pypy.jit.metainterp.resoperation import opclasses, opclasses_mutable, rop,\
-     INT, ConstInt
+     INT, ConstInt, Const
 from pypy.jit.metainterp.optimizeopt.intutils import ImmutableIntUnbounded,\
      ConstantIntBound
 
     def getintbound(self):
         return ConstantIntBound(self.getint())
 
+class __extend__(Const):
+    def getlastguard(self):
+        return None
+
 def create_mutable_subclasses():
     def addattr(cls, attr, default_value=None):
         cls.attributes_to_copy.append('_' + attr)

File pypy/jit/metainterp/resoperation.py

     def is_constant(self):
         return True
 
-    def getlastguard(self):
-        return None
-
 def repr_rpython(box, typechars):
     return '%s/%s%d' % (box._get_hash_(), typechars,
                         compute_unique_id(box))