[pypy-commit] pypy kill-typesystem: kill TypeSystem.perform_normalizations()

rlamy noreply at buildbot.pypy.org
Sat Aug 3 21:39:23 CEST 2013


Author: Ronan Lamy <ronan.lamy at gmail.com>
Branch: kill-typesystem
Changeset: r65935:db51479f78c1
Date: 2013-08-03 20:18 +0100
http://bitbucket.org/pypy/pypy/changeset/db51479f78c1/

Log:	kill TypeSystem.perform_normalizations()

diff --git a/rpython/rtyper/annlowlevel.py b/rpython/rtyper/annlowlevel.py
--- a/rpython/rtyper/annlowlevel.py
+++ b/rpython/rtyper/annlowlevel.py
@@ -7,6 +7,7 @@
 from rpython.annotator.policy import AnnotatorPolicy
 from rpython.annotator.signature import Sig
 from rpython.annotator.specialize import flatten_star_args
+from rpython.rtyper.normalizecalls import perform_normalizations
 from rpython.rtyper.lltypesystem import lltype, llmemory
 from rpython.flowspace.model import Constant
 from rpython.rlib.objectmodel import specialize
@@ -251,7 +252,7 @@
         rtyper = self.rtyper
         translator = rtyper.annotator.translator
         original_graph_count = len(translator.graphs)
-        rtyper.type_system.perform_normalizations(rtyper)
+        perform_normalizations(rtyper)
         for r in self.delayedreprs:
             r.set_setup_delayed(False)
         rtyper.call_all_setups()
diff --git a/rpython/rtyper/rtyper.py b/rpython/rtyper/rtyper.py
--- a/rpython/rtyper/rtyper.py
+++ b/rpython/rtyper/rtyper.py
@@ -26,6 +26,7 @@
     attachRuntimeTypeInfo, Primitive)
 from rpython.rtyper.rmodel import Repr, inputconst, BrokenReprTyperError
 from rpython.rtyper.typesystem import LowLevelTypeSystem
+from rpython.rtyper.normalizecalls import perform_normalizations
 from rpython.tool.pairtype import pair
 from rpython.translator.unsimplify import insert_empty_block
 
@@ -172,12 +173,12 @@
 
         # first make sure that all functions called in a group have exactly
         # the same signature, by hacking their flow graphs if needed
-        self.type_system.perform_normalizations(self)
+        perform_normalizations(self)
         self.exceptiondata.finish(self)
+
         # new blocks can be created as a result of specialize_block(), so
         # we need to be careful about the loop here.
         self.already_seen = {}
-
         self.specialize_more_blocks()
         if self.exceptiondata is not None:
             self.exceptiondata.make_helpers(self)
diff --git a/rpython/rtyper/typesystem.py b/rpython/rtyper/typesystem.py
--- a/rpython/rtyper/typesystem.py
+++ b/rpython/rtyper/typesystem.py
@@ -71,13 +71,6 @@
 in a graph."""
         raise NotImplementedError()
 
-    def perform_normalizations(self, rtyper):
-        """Prepare the annotator's internal data structures for rtyping
-        with the specified type system.
-        """
-        # default implementation
-        from rpython.rtyper.normalizecalls import perform_normalizations
-        perform_normalizations(rtyper)
 
 class LowLevelTypeSystem(TypeSystem):
     name = "lltypesystem"


More information about the pypy-commit mailing list