[pypy-commit] pypy default: Remove dead code: Bookkeeper._find_current_op()

rlamy pypy.commits at gmail.com
Mon Feb 15 12:43:40 EST 2016


Author: Ronan Lamy <ronan.lamy at gmail.com>
Branch: 
Changeset: r82271:4bec5c63bc9e
Date: 2016-02-15 17:42 +0000
http://bitbucket.org/pypy/pypy/changeset/4bec5c63bc9e/

Log:	Remove dead code: Bookkeeper._find_current_op()

diff --git a/rpython/annotator/bookkeeper.py b/rpython/annotator/bookkeeper.py
--- a/rpython/annotator/bookkeeper.py
+++ b/rpython/annotator/bookkeeper.py
@@ -551,20 +551,6 @@
                 emulated = callback
             return self.pbc_call(pbc, args, emulated=emulated)
 
-    def _find_current_op(self, opname=None, arity=None, pos=None, s_type=None):
-        """ Find operation that is currently being annotated. Do some
-        sanity checks to see whether the correct op was found."""
-        # XXX XXX HACK HACK HACK
-        fn, block, i = self.position_key
-        op = block.operations[i]
-        if opname is not None:
-            assert op.opname == opname
-        if arity is not None:
-            assert len(op.args) == arity
-        if pos is not None:
-            assert self.annotator.binding(op.args[pos]) == s_type
-        return op
-
     def whereami(self):
         return self.annotator.whereami(self.position_key)
 


More information about the pypy-commit mailing list