[pypy-svn] r22812 - pypy/dist/pypy/translator/goal

rxe at codespeak.net rxe at codespeak.net
Sat Jan 28 22:12:31 CET 2006


Author: rxe
Date: Sat Jan 28 22:12:29 2006
New Revision: 22812

Modified:
   pypy/dist/pypy/translator/goal/richards.py
Log:
tcchh - isinstance() is at applevel... think it is fairer test to not do applevel things for comparision against CPython.  Last run with genllvm was at 5.2x slower.



Modified: pypy/dist/pypy/translator/goal/richards.py
==============================================================================
--- pypy/dist/pypy/translator/goal/richards.py	(original)
+++ pypy/dist/pypy/translator/goal/richards.py	Sat Jan 28 22:12:29 2006
@@ -244,7 +244,7 @@
 
     def fn(self,pkt,r):
         d = r
-        assert isinstance(d, DeviceTaskRec)
+        assert d.__class__ is DeviceTaskRec
         if pkt is None:
             pkt = d.pending
             if pkt is None:
@@ -265,7 +265,7 @@
 
     def fn(self,pkt,r):
         h = r
-        assert isinstance(h, HandlerTaskRec)
+        assert h.__class__ is HandlerTaskRec
         if pkt is not None:
             if pkt.kind == K_WORK:
                 h.workInAdd(pkt)
@@ -297,7 +297,7 @@
 
     def fn(self,pkt,r):
         i = r
-        assert isinstance(i, IdleTaskRec)
+        assert i.__class__ is IdleTaskRec
         i.count -= 1
         if i.count == 0:
             return self.hold()
@@ -320,7 +320,7 @@
 
     def fn(self,pkt,r):
         w = r
-        assert isinstance(w, WorkerTaskRec)
+        assert w.__class__ is WorkerTaskRec
         if pkt is None:
             return self.waitTask()
 



More information about the Pypy-commit mailing list