[pypy-svn] r64641 - in pypy/branch/pyjitpl5/pypy/jit: backend/minimal metainterp

arigo at codespeak.net arigo at codespeak.net
Fri Apr 24 15:58:10 CEST 2009


Author: arigo
Date: Fri Apr 24 15:58:09 2009
New Revision: 64641

Modified:
   pypy/branch/pyjitpl5/pypy/jit/backend/minimal/runner.py
   pypy/branch/pyjitpl5/pypy/jit/metainterp/history.py
Log:
Small fixes found by running pypy.


Modified: pypy/branch/pyjitpl5/pypy/jit/backend/minimal/runner.py
==============================================================================
--- pypy/branch/pyjitpl5/pypy/jit/backend/minimal/runner.py	(original)
+++ pypy/branch/pyjitpl5/pypy/jit/backend/minimal/runner.py	Fri Apr 24 15:58:09 2009
@@ -357,8 +357,9 @@
         assert isinstance(calldescr, CallDescr)
         assert calldescr.call is not None
         self.clear_exception()
+        addr_self = args[0].getaddr(self)
         try:
-            box = calldescr.call(self, args[0].getaddr(self), args[1:])
+            box = calldescr.call(self, addr_self, args[1:])
         except Exception, e:
             from pypy.rpython.annlowlevel import cast_instance_to_base_ptr
             self.current_exc_inst = cast_instance_to_base_ptr(e)

Modified: pypy/branch/pyjitpl5/pypy/jit/metainterp/history.py
==============================================================================
--- pypy/branch/pyjitpl5/pypy/jit/metainterp/history.py	(original)
+++ pypy/branch/pyjitpl5/pypy/jit/metainterp/history.py	Fri Apr 24 15:58:09 2009
@@ -370,6 +370,9 @@
     def getint(self):
         return self.value
 
+    def getaddr(self, cpu):
+        return cpu.cast_int_to_adr(self.value)
+
     def get_(self):
         return self.value
 
@@ -395,6 +398,9 @@
     def getptr_base(self):
         return self.value
 
+    def getaddr(self, cpu):
+        return llmemory.cast_ptr_to_adr(self.value)
+
     def get_(self):
         return lltype.cast_ptr_to_int(self.value)
 



More information about the Pypy-commit mailing list