Author: Ronan Lamy <[email protected]>
Branch:
Changeset: r73974:2b2a57a336fd
Date: 2014-10-16 02:42 +0100
http://bitbucket.org/pypy/pypy/changeset/2b2a57a336fd/
Log: kill dead code
diff --git a/rpython/annotator/description.py b/rpython/annotator/description.py
--- a/rpython/annotator/description.py
+++ b/rpython/annotator/description.py
@@ -14,7 +14,6 @@
objects, where the equivalence relation is the transitive closure of
'd1~d2 if d1 and d2 might be called at the same call site'.
"""
- overridden = False
normalized = False
modified = True
@@ -175,7 +174,6 @@
class FunctionDesc(Desc):
knowntype = types.FunctionType
- overridden = False
def __init__(self, bookkeeper, pyobj=None,
name=None, signature=None, defaults=None,
diff --git a/rpython/rtyper/normalizecalls.py b/rpython/rtyper/normalizecalls.py
--- a/rpython/rtyper/normalizecalls.py
+++ b/rpython/rtyper/normalizecalls.py
@@ -19,15 +19,6 @@
def normalize_calltable(annotator, callfamily):
"""Try to normalize all rows of a table."""
- overridden = False
- for desc in callfamily.descs:
- if getattr(desc, 'overridden', False):
- overridden = True
- if overridden:
- if len(callfamily.descs) > 1:
- raise Exception("non-static call to overridden function")
- callfamily.overridden = True
- return
nshapes = len(callfamily.calltables)
for shape, table in callfamily.calltables.items():
for row in table:
diff --git a/rpython/rtyper/rpbc.py b/rpython/rtyper/rpbc.py
--- a/rpython/rtyper/rpbc.py
+++ b/rpython/rtyper/rpbc.py
@@ -29,12 +29,9 @@
sample = self.any_description()
callfamily = sample.querycallfamily()
if callfamily and callfamily.total_calltable_size > 0:
- if sample.overridden:
- getRepr = OverriddenFunctionPBCRepr
- else:
- getRepr = FunctionsPBCRepr
- if small_cand(rtyper, self):
- getRepr = SmallFunctionSetPBCRepr
+ getRepr = FunctionsPBCRepr
+ if small_cand(rtyper, self):
+ getRepr = SmallFunctionSetPBCRepr
else:
getRepr = getFrozenPBCRepr
elif issubclass(kind, description.ClassDesc):
@@ -338,16 +335,6 @@
return inputconst(lltype.Void, None)
return NotImplemented
-class OverriddenFunctionPBCRepr(Repr):
- def __init__(self, rtyper, s_pbc):
- self.rtyper = rtyper
- self.s_pbc = s_pbc
- assert len(s_pbc.descriptions) == 1
- self.lowleveltype = lltype.Void
-
- def rtype_simple_call(self, hop):
- from rpython.rtyper.rspecialcase import rtype_call_specialcase
- return rtype_call_specialcase(hop)
def getFrozenPBCRepr(rtyper, s_pbc):
from rpython.rtyper.lltypesystem.rpbc import (
@@ -863,7 +850,6 @@
r_class = self.r_im_self.rclass
mangled_name, r_func = r_class.clsfields[self.methodname]
assert isinstance(r_func, (FunctionsPBCRepr,
- OverriddenFunctionPBCRepr,
SmallFunctionSetPBCRepr))
# s_func = r_func.s_pbc -- not precise enough, see
# test_precise_method_call_1. Build a more precise one...
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit