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

arigo at codespeak.net arigo at codespeak.net
Sun Mar 15 12:58:48 CET 2009


Author: arigo
Date: Sun Mar 15 12:58:46 2009
New Revision: 62959

Modified:
   pypy/branch/pyjitpl5/pypy/jit/backend/x86/codebuf.py
   pypy/branch/pyjitpl5/pypy/jit/backend/x86/runner.py
Log:
Minor cleanups.


Modified: pypy/branch/pyjitpl5/pypy/jit/backend/x86/codebuf.py
==============================================================================
--- pypy/branch/pyjitpl5/pypy/jit/backend/x86/codebuf.py	(original)
+++ pypy/branch/pyjitpl5/pypy/jit/backend/x86/codebuf.py	Sun Mar 15 12:58:46 2009
@@ -66,7 +66,6 @@
 class MachineCodeDumper:
     enabled = True
     log_fd = -1
-    sys_executable = None
 
     def _freeze_(self):
         # reset the machine_code_dumper global instance to its default state

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 Mar 15 12:58:46 2009
@@ -644,7 +644,11 @@
 
     @staticmethod
     def cast_int_to_adr(x):
-        return llmemory.cast_ptr_to_adr(rffi.cast(llmemory.GCREF, x))
+        if we_are_translated():
+            return rffi.cast(llmemory.Address, x)
+        else:
+            # indirect casting because the above doesn't work with ll2ctypes
+            return llmemory.cast_ptr_to_adr(rffi.cast(llmemory.GCREF, x))
 
     def cast_gcref_to_int(self, x):
         return rffi.cast(lltype.Signed, x)
@@ -652,10 +656,6 @@
     def cast_int_to_gcref(self, x):
         return rffi.cast(llmemory.GCREF, x)
 
-DEFINED_INT_VALUE = {
-    'MALLOC_ZERO_FILLED': 1,   # using Boehm for now
-    }
-
 def uhex(x):
     if we_are_translated():
         return hex(x)



More information about the Pypy-commit mailing list