Commits

Alex Gaynor committed 6a6e860

Remove unused feature

  • Participants
  • Parent commits a8d706f

Comments (0)

Files changed (2)

File rpython/flowspace/test/test_unroll.py

 import operator
+
 from rpython.flowspace.test.test_objspace import Base
-from rpython.rlib.unroll import unrolling_zero, unrolling_iterable
+from rpython.rlib.unroll import unrolling_iterable
+
 
 class TestUnroll(Base):
-
-    def test_unrolling_int(self):
-        l = range(10)
-        def f(tot):
-            i = unrolling_zero
-            while i < len(l):
-                tot += l[i]
-                i = i + 1
-            return tot*2
-        assert f(0) == sum(l)*2
-
-        graph = self.codetest(f)
-        ops = self.all_operations(graph)
-        assert ops == {'inplace_add': 10, 'mul': 1}
-
     def test_unroller(self):
         l = unrolling_iterable(range(10))
         def f(tot):

File rpython/rlib/unroll.py

 
 class SpecTag(object):
     __slots__ = ()
-    
+
     def __repr__(self):
         return '%s(0x%x)' % (self.__class__.__name__, uid(self))
+
     def _freeze_(self):
         return True
 
 
-class unrolling_int(int, SpecTag):
-
-    def __add__(self, other):
-        return unrolling_int(int.__add__(self, other))
-
-    __radd__ = __add__
-
-    def __sub__(self, other):
-        return unrolling_int(int.__sub__(self, other))
-
-    def __rsub__(self, other):
-        return unrolling_int(int.__rsub__(self, other))
-
-
-unrolling_zero = unrolling_int(0)
-
-# ____________________________________________________________
-
 # 'for' iteration over iterables wrapped in an instance
 # of unrolling_iterable will be unrolled by the flow space,
 # like in: