[pypy-svn] r65196 - pypy/branch/pyjitpl5/pypy/jit/backend/x86

arigo at codespeak.net arigo at codespeak.net
Sun May 10 13:31:27 CEST 2009


Author: arigo
Date: Sun May 10 13:31:27 2009
New Revision: 65196

Modified:
   pypy/branch/pyjitpl5/pypy/jit/backend/x86/runner.py
Log:
Another attempt at freeing memory early...


Modified: pypy/branch/pyjitpl5/pypy/jit/backend/x86/runner.py
==============================================================================
--- pypy/branch/pyjitpl5/pypy/jit/backend/x86/runner.py	(original)
+++ pypy/branch/pyjitpl5/pypy/jit/backend/x86/runner.py	Sun May 10 13:31:27 2009
@@ -299,7 +299,10 @@
 
     def get_latest_value_ptr(self, index):
         intvalue = self.assembler.fail_boxes[index]
-        return self.cast_int_to_gcref(intvalue)
+        ptrvalue = self.cast_int_to_gcref(intvalue)
+        # clear after reading (-1 instead of 0, to crash if still used)
+        self.assembler.fail_boxes[index] = -1
+        return ptrvalue
 
     def execute_call(self, loop, func, verbose):
         # help flow objspace



More information about the Pypy-commit mailing list