Author: Ronan Lamy <[email protected]>
Branch: online-transforms-2
Changeset: r76004:5fffc446489a
Date: 2014-10-15 23:35 +0100
http://bitbucket.org/pypy/pypy/changeset/5fffc446489a/

Log:    kill unused _emulate_call()

diff --git a/rpython/annotator/unaryop.py b/rpython/annotator/unaryop.py
--- a/rpython/annotator/unaryop.py
+++ b/rpython/annotator/unaryop.py
@@ -687,13 +687,6 @@
         if not self.can_be_None:
             s.const = True
 
-    def _emulate_call(self, meth_name, *args_s):
-        bk = getbookkeeper()
-        s_attr = self._true_getattr(meth_name)
-        # record for calltables
-        bk.emulate_pbc_call(bk.position_key, s_attr, args_s)
-        return s_attr.call(simple_args(args_s))
-
 @op.len.register_transform(SomeInstance)
 def len_SomeInstance(annotator, v_arg):
     get_len = op.getattr(v_arg, const('__len__'))
diff --git a/rpython/rtyper/rclass.py b/rpython/rtyper/rclass.py
--- a/rpython/rtyper/rclass.py
+++ b/rpython/rtyper/rclass.py
@@ -820,25 +820,6 @@
         vinst, = hop.inputargs(self)
         return hop.genop('ptr_nonzero', [vinst], resulttype=Bool)
 
-    def _emulate_call(self, hop, meth_name):
-        vinst = hop.args_v[0]
-        clsdef = hop.args_s[0].classdef
-        s_unbound_attr = clsdef.find_attribute(meth_name).getvalue()
-        s_attr = clsdef.lookup_filter(s_unbound_attr, meth_name,
-                                      hop.args_s[0].flags)
-        # does that even happen?
-        assert not s_attr.is_constant()
-        if '__iter__' in self.allinstancefields:
-            raise Exception("__iter__ on instance disallowed")
-        r_method = self.rtyper.getrepr(s_attr)
-        r_method.get_method_from_instance(self, vinst, hop.llops)
-        hop2 = hop.copy()
-        hop2.spaceop = op.simple_call(*hop.spaceop.args)
-        hop2.spaceop.result = hop.spaceop.result
-        hop2.args_r[0] = r_method
-        hop2.args_s[0] = s_attr
-        return hop2.dispatch()
-
     def ll_str(self, i):  # doesn't work for non-gc classes!
         from rpython.rtyper.lltypesystem.ll_str import ll_int2hex
         from rpython.rlib.rarithmetic import r_uint
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to