[pypy-svn] r53378 - in pypy/branch/less-meta-instances/pypy: rpython/lltypesystem translator/backendopt

arigo at codespeak.net arigo at codespeak.net
Sat Apr 5 10:54:25 CEST 2008


Author: arigo
Date: Sat Apr  5 10:54:24 2008
New Revision: 53378

Modified:
   pypy/branch/less-meta-instances/pypy/rpython/lltypesystem/rclass.py
   pypy/branch/less-meta-instances/pypy/translator/backendopt/inline.py
Log:
Refix inline.py to pass to getruntime() exactly the type that it expects.


Modified: pypy/branch/less-meta-instances/pypy/rpython/lltypesystem/rclass.py
==============================================================================
--- pypy/branch/less-meta-instances/pypy/rpython/lltypesystem/rclass.py	(original)
+++ pypy/branch/less-meta-instances/pypy/rpython/lltypesystem/rclass.py	Sat Apr  5 10:54:24 2008
@@ -168,7 +168,7 @@
         return vtable
 
     def getruntime(self, expected_type):
-        assert lltype.castable(CLASSTYPE, expected_type) >= 0
+        assert expected_type == CLASSTYPE
         return self.getvtable()
 
     def setup_vtable(self, vtable, rsubcls):

Modified: pypy/branch/less-meta-instances/pypy/translator/backendopt/inline.py
==============================================================================
--- pypy/branch/less-meta-instances/pypy/translator/backendopt/inline.py	(original)
+++ pypy/branch/less-meta-instances/pypy/translator/backendopt/inline.py	Sat Apr  5 10:54:24 2008
@@ -378,7 +378,8 @@
         # this rewiring does not always succeed. in the cases where it doesn't
         # there will be generic code inserted
         rclass = self.translator.rtyper.type_system.rclass
-        exc_match = self.translator.rtyper.getexceptiondata().fn_exception_match
+        excdata = self.translator.rtyper.getexceptiondata()
+        exc_match = excdata.fn_exception_match
         for link in self.entrymap[self.graph_to_inline.exceptblock]:
             copiedblock = self.copy_block(link.prevblock)
             VALUE, copiedlink = _find_exception_type(copiedblock)
@@ -388,7 +389,7 @@
             classdef = self.lltype_to_classdef[VALUE]
             rtyper = self.translator.rtyper
             classrepr = rclass.getclassrepr(rtyper, classdef)
-            vtable = classrepr.getruntime(classrepr.lowleveltype)
+            vtable = classrepr.getruntime(excdata.lltype_of_exception_type)
             var_etype = copiedlink.args[0]
             var_evalue = copiedlink.args[1]
             for exceptionlink in afterblock.exits[1:]:


More information about the pypy-svn mailing list