[pypy-commit] pypy result-in-resops: hack differently

fijal noreply at buildbot.pypy.org
Fri Oct 26 13:28:34 CEST 2012


Author: Maciej Fijalkowski <fijall at gmail.com>
Branch: result-in-resops
Changeset: r58448:d7ca4dbc4ab7
Date: 2012-10-25 15:29 +0200
http://bitbucket.org/pypy/pypy/changeset/d7ca4dbc4ab7/

Log:	hack differently

diff --git a/pypy/jit/metainterp/optmodel.py b/pypy/jit/metainterp/optmodel.py
--- a/pypy/jit/metainterp/optmodel.py
+++ b/pypy/jit/metainterp/optmodel.py
@@ -4,7 +4,7 @@
 
 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
 
@@ -12,6 +12,10 @@
     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)
diff --git a/pypy/jit/metainterp/resoperation.py b/pypy/jit/metainterp/resoperation.py
--- a/pypy/jit/metainterp/resoperation.py
+++ b/pypy/jit/metainterp/resoperation.py
@@ -296,9 +296,6 @@
     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))


More information about the pypy-commit mailing list