Author: Armin Rigo <[email protected]>
Branch: stmgc-c7
Changeset: r76496:ea2e519614ab
Date: 2015-03-21 12:34 +0100
http://bitbucket.org/pypy/pypy/changeset/ea2e519614ab/

Log:    fix some more conflicts

diff --git a/rpython/rtyper/rdict.py b/rpython/rtyper/rdict.py
--- a/rpython/rtyper/rdict.py
+++ b/rpython/rtyper/rdict.py
@@ -25,8 +25,10 @@
                         custom_eq_hash, force_non_null)
 
     def rtyper_makekey(self):
-        self.dictdef.dictkey  .dont_change_any_more = True
-        self.dictdef.dictvalue.dont_change_any_more = True
+        if not self.dictdef.dictkey.dont_change_any_more:
+            self.dictdef.dictkey.dont_change_any_more = True
+        if not self.dictdef.dictvalue.dont_change_any_more:
+            self.dictdef.dictvalue.dont_change_any_more = True
         return (self.__class__, self.dictdef.dictkey, self.dictdef.dictvalue)
 
 class __extend__(annmodel.SomeOrderedDict):
diff --git a/rpython/rtyper/rtyper.py b/rpython/rtyper/rtyper.py
--- a/rpython/rtyper/rtyper.py
+++ b/rpython/rtyper/rtyper.py
@@ -337,23 +337,19 @@
         assert isinstance(v, Variable)
         v.concretetype = self.bindingrepr(v).lowleveltype
 
-    def setup_block_entry(self, block):
+    def get_block_entry(self, block):
         if block.operations == () and len(block.inputargs) == 2:
             # special case for exception blocks: force them to return an
             # exception type and value in a standardized format
-            v1, v2 = block.inputargs
-            v1.concretetype = self.exceptiondata.lltype_of_exception_type
-            v2.concretetype = self.exceptiondata.lltype_of_exception_value
             return [self.exceptiondata.r_exception_type,
                     self.exceptiondata.r_exception_value]
         else:
             # normal path
-            result = []
-            for a in block.inputargs:
-                r = self.bindingrepr(a)
-                a.concretetype = r.lowleveltype
-                result.append(r)
-            return result
+            return [self.bindingrepr(a) for a in block.inputargs]
+
+    def setup_block_entry(self, block, entry_reprs):
+        for r, a in zip(entry_reprs, block.inputargs):
+            a.concretetype = r.lowleveltype
 
     def make_new_lloplist(self, block):
         return LowLevelOpList(self, block)
@@ -379,7 +375,7 @@
     def _specialize_block(self, block):
         # give the best possible types to the input args
         try:
-            self.setup_block_entry(block)
+            self.setup_block_entry(block, self.get_block_entry(block))
         except TyperError, e:
             self.gottypererror(e, block, "block-entry", None)
             return  # cannot continue this block
@@ -469,7 +465,7 @@
         can_insert_here = block.exitswitch is None and len(block.exits) == 1
         for link in block.exits[skip:]:
             self._convert_link(block, link)
-            inputargs_reprs = self.setup_block_entry(link.target)
+            inputargs_reprs = self.get_block_entry(link.target)
             newops = self.make_new_lloplist(block)
             newlinkargs = {}
             for i in range(len(link.args)):
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to