[pypy-svn] r65598 - pypy/branch/pyjitpl5-experiments/pypy/jit/metainterp

fijal at codespeak.net fijal at codespeak.net
Fri Jun 5 00:02:24 CEST 2009


Author: fijal
Date: Fri Jun  5 00:02:24 2009
New Revision: 65598

Modified:
   pypy/branch/pyjitpl5-experiments/pypy/jit/metainterp/virtualizable.py
Log:
don't catch Void names.


Modified: pypy/branch/pyjitpl5-experiments/pypy/jit/metainterp/virtualizable.py
==============================================================================
--- pypy/branch/pyjitpl5-experiments/pypy/jit/metainterp/virtualizable.py	(original)
+++ pypy/branch/pyjitpl5-experiments/pypy/jit/metainterp/virtualizable.py	Fri Jun  5 00:02:24 2009
@@ -26,17 +26,19 @@
         return self.catch_all_fields_lltype(cpu, S)
 
     def catch_all_fields_lltype(self, cpu, S):
-        lst = []
         p = S
+        fields = []
         while True:
             for name in p._names:
-                lst.append((p, name))
+                if name.startswith('inst_'):
+                    TP = getattr(p, name)
+                    if TP != lltype.Void:
+                        fields.append(cpu.fielddescrof(p, name))
             if getattr(p, 'super', None) is not None:
                 p = p.super
             else:
                 break
-        return [cpu.fielddescrof(p, name) for p, name in lst if
-                name.startswith('inst_')]
+        return fields
 
     def catch_all_fields_ootype(self, cpu, S):
         lst = S._allfields().keys()



More information about the Pypy-commit mailing list