[pypy-commit] pypy kill-ootype: remove the last (?) oosend references

rlamy noreply at buildbot.pypy.org
Thu Jul 25 22:31:26 CEST 2013


Author: Ronan Lamy <ronan.lamy at gmail.com>
Branch: kill-ootype
Changeset: r65662:d9308fb479f6
Date: 2013-07-25 21:30 +0100
http://bitbucket.org/pypy/pypy/changeset/d9308fb479f6/

Log:	remove the last (?) oosend references

diff --git a/rpython/jit/codewriter/call.py b/rpython/jit/codewriter/call.py
--- a/rpython/jit/codewriter/call.py
+++ b/rpython/jit/codewriter/call.py
@@ -65,7 +65,7 @@
         while todo:
             top_graph = todo.pop()
             for _, op in top_graph.iterblockops():
-                if op.opname not in ("direct_call", "indirect_call", "oosend"):
+                if op.opname not in ("direct_call", "indirect_call"):
                     continue
                 kind = self.guess_call_kind(op, is_candidate)
                 # use callers() to view the calling chain in pdb
@@ -90,13 +90,8 @@
             if is_candidate(graph):
                 return [graph]     # common case: look inside this graph
         else:
-            assert op.opname in ('indirect_call', 'oosend')
-            if op.opname == 'indirect_call':
-                graphs = op.args[-1].value
-            else:
-                v_obj = op.args[1].concretetype
-                graphs = v_obj._lookup_graphs(op.args[0].value)
-            #
+            assert op.opname == 'indirect_call'
+            graphs = op.args[-1].value
             if graphs is None:
                 # special case: handle the indirect call that goes to
                 # the 'instantiate' methods.  This check is a bit imprecise
@@ -141,10 +136,6 @@
                     return 'residual'
                 if hasattr(targetgraph.func, 'oopspec'):
                     return 'builtin'
-        elif op.opname == 'oosend':
-            SELFTYPE, methname, opargs = support.decompose_oosend(op)
-            if SELFTYPE.oopspec_name is not None:
-                return 'builtin'
         if self.graphs_from(op, is_candidate) is None:
             return 'residual'
         return 'regular'
diff --git a/rpython/jit/codewriter/support.py b/rpython/jit/codewriter/support.py
--- a/rpython/jit/codewriter/support.py
+++ b/rpython/jit/codewriter/support.py
@@ -814,15 +814,3 @@
     rtyper._builtin_func_for_spec_cache[key] = (c_func, LIST_OR_DICT)
     #
     return c_func, LIST_OR_DICT
-
-
-def decompose_oosend(op):
-    name = op.args[0].value
-    opargs = op.args[1:]
-    SELFTYPE = opargs[0].concretetype
-    return SELFTYPE, name, opargs
-
-def lookup_oosend_method(op):
-    SELFTYPE, methname, args_v = decompose_oosend(op)
-    _, meth = SELFTYPE._lookup(methname)
-    return SELFTYPE, methname, meth
diff --git a/rpython/jit/metainterp/jitprof.py b/rpython/jit/metainterp/jitprof.py
--- a/rpython/jit/metainterp/jitprof.py
+++ b/rpython/jit/metainterp/jitprof.py
@@ -112,7 +112,7 @@
     def count_ops(self, opnum, kind=Counters.OPS):
         from rpython.jit.metainterp.resoperation import rop
         self.counters[kind] += 1
-        if opnum == rop.CALL and kind == Counters.RECORDED_OPS:# or opnum == rop.OOSEND:
+        if opnum == rop.CALL and kind == Counters.RECORDED_OPS:
             self.calls += 1
 
     def print_stats(self):
diff --git a/rpython/translator/backendopt/graphanalyze.py b/rpython/translator/backendopt/graphanalyze.py
--- a/rpython/translator/backendopt/graphanalyze.py
+++ b/rpython/translator/backendopt/graphanalyze.py
@@ -156,10 +156,6 @@
                 break
         return self.finalize_builder(result)
 
-    def analyze_oosend(self, TYPE, name, seen=None):
-        graphs = TYPE._lookup_graphs(name)
-        return self.analyze_indirect_call(graphs, seen)
-
     def analyze_all(self, graphs=None):
         if graphs is None:
             graphs = self.translator.graphs


More information about the pypy-commit mailing list