[pypy-svn] r62884 - pypy/branch/pyjitpl5/pypy/jit/metainterp

arigo at codespeak.net arigo at codespeak.net
Thu Mar 12 13:19:23 CET 2009


Author: arigo
Date: Thu Mar 12 13:19:23 2009
New Revision: 62884

Modified:
   pypy/branch/pyjitpl5/pypy/jit/metainterp/codewriter.py
Log:
Dump to the udir, instead of at a random hard-coded place.


Modified: pypy/branch/pyjitpl5/pypy/jit/metainterp/codewriter.py
==============================================================================
--- pypy/branch/pyjitpl5/pypy/jit/metainterp/codewriter.py	(original)
+++ pypy/branch/pyjitpl5/pypy/jit/metainterp/codewriter.py	Thu Mar 12 13:19:23 2009
@@ -7,6 +7,7 @@
 from pypy.rlib.jit import _we_are_jitted
 from pypy.jit.metainterp.history import Const, getkind
 from pypy.jit.metainterp import heaptracker, support, history
+from pypy.tool.udir import udir
 
 import py, sys
 from pypy.tool.ansi_print import ansi_log
@@ -225,7 +226,8 @@
             self.bytecode.dump()
         else:
             print repr(self.bytecode)
-            self.bytecode.dump(open("/tmp/jitcodes/%s" % self.bytecode.name, "w"))
+            dir = udir.ensure("jitcodes", dir=1)
+            self.bytecode.dump(open(str(dir.join(self.bytecode.name)), "w"))
 
     def const_position(self, constvalue):
         """Generate a constant of the given value.



More information about the Pypy-commit mailing list