[pypy-svn] r26507 - in pypy/dist/pypy/rpython: . test

pedronis at codespeak.net pedronis at codespeak.net
Fri Apr 28 11:33:40 CEST 2006


Author: pedronis
Date: Fri Apr 28 11:33:36 2006
New Revision: 26507

Modified:
   pypy/dist/pypy/rpython/exceptiondata.py
   pypy/dist/pypy/rpython/rtyper.py
   pypy/dist/pypy/rpython/test/test_rclass.py
Log:
try to make sure that reprs are created only after normalisation. split make_standard_exceptions in two.
Add a finish to ExceptionData.



Modified: pypy/dist/pypy/rpython/exceptiondata.py
==============================================================================
--- pypy/dist/pypy/rpython/exceptiondata.py	(original)
+++ pypy/dist/pypy/rpython/exceptiondata.py	Fri Apr 28 11:33:36 2006
@@ -21,5 +21,10 @@
         bk = rtyper.annotator.bookkeeper
         for cls in self.standardexceptions:
             classdef = bk.getuniqueclassdef(cls)
+
+    def finish(self, rtyper):
+        bk = rtyper.annotator.bookkeeper
+        for cls in self.standardexceptions:
+            classdef = bk.getuniqueclassdef(cls)
             rclass.getclassrepr(rtyper, classdef).setup()
 

Modified: pypy/dist/pypy/rpython/rtyper.py
==============================================================================
--- pypy/dist/pypy/rpython/rtyper.py	(original)
+++ pypy/dist/pypy/rpython/rtyper.py	Fri Apr 28 11:33:36 2006
@@ -155,6 +155,7 @@
         # 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)
+        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 = {}

Modified: pypy/dist/pypy/rpython/test/test_rclass.py
==============================================================================
--- pypy/dist/pypy/rpython/test/test_rclass.py	(original)
+++ pypy/dist/pypy/rpython/test/test_rclass.py	Fri Apr 28 11:33:36 2006
@@ -101,7 +101,6 @@
         assert res == 4
 
     def test_runtime_exception(self):
-        py.test.skip("God help us")
         def pick(flag):
             if flag:
                 return TypeError



More information about the Pypy-commit mailing list