[pypy-svn] r52936 - pypy/branch/jit-hotpath/pypy/translator/goal

arigo at codespeak.net arigo at codespeak.net
Tue Mar 25 19:15:22 CET 2008


Author: arigo
Date: Tue Mar 25 19:15:21 2008
New Revision: 52936

Modified:
   pypy/branch/jit-hotpath/pypy/translator/goal/richards.py
Log:
Fix richards.py's jit enabling code.


Modified: pypy/branch/jit-hotpath/pypy/translator/goal/richards.py
==============================================================================
--- pypy/branch/jit-hotpath/pypy/translator/goal/richards.py	(original)
+++ pypy/branch/jit-hotpath/pypy/translator/goal/richards.py	Tue Mar 25 19:15:21 2008
@@ -423,15 +423,10 @@
 except ImportError:
     pass
 else:
-    import types
-    for item in globals().values():
-        if isinstance(item, types.FunctionType):
-            pypyjit.enable(item.func_code)
-        elif isinstance(item, type):
-            for it in item.__dict__.values():
-                if isinstance(it, types.FunctionType):
-                    pypyjit.enable(it.func_code)
-    
+    if len(sys.argv) >= 3:
+        pypyjit.setthreshold(int(sys.argv[2]))
+    pypyjit.enable()
+
 if __name__ == '__main__':
     import sys
     if len(sys.argv) >= 2:



More information about the Pypy-commit mailing list