[pypy-svn] r35878 - pypy/dist/pypy/jit/codegen/i386

arigo at codespeak.net arigo at codespeak.net
Tue Dec 19 12:36:32 CET 2006


Author: arigo
Date: Tue Dec 19 12:36:31 2006
New Revision: 35878

Modified:
   pypy/dist/pypy/jit/codegen/i386/codebuf.py
Log:
When compiling, reset the machine_code_dumper global instance to its
default state.


Modified: pypy/dist/pypy/jit/codegen/i386/codebuf.py
==============================================================================
--- pypy/dist/pypy/jit/codegen/i386/codebuf.py	(original)
+++ pypy/dist/pypy/jit/codegen/i386/codebuf.py	Tue Dec 19 12:36:31 2006
@@ -63,6 +63,13 @@
     log_fd = -1
     sys_executable = None
 
+    def _freeze_(self):
+        # reset the machine_code_dumper global instance to its default state
+        if self.log_fd >= 0:
+            os.close(self.log_fd)
+        self.__dict__.clear()
+        return False
+
     def open(self):
         if self.log_fd < 0:
             # check the environment for a file name



More information about the Pypy-commit mailing list