[pypy-svn] r74924 - pypy/branch/blackhole-improvement/pypy/jit/codewriter

arigo at codespeak.net arigo at codespeak.net
Sun May 30 18:13:13 CEST 2010


Author: arigo
Date: Sun May 30 18:13:12 2010
New Revision: 74924

Modified:
   pypy/branch/blackhole-improvement/pypy/jit/codewriter/assembler.py
   pypy/branch/blackhole-improvement/pypy/jit/codewriter/jtransform.py
Log:
Fixes.


Modified: pypy/branch/blackhole-improvement/pypy/jit/codewriter/assembler.py
==============================================================================
--- pypy/branch/blackhole-improvement/pypy/jit/codewriter/assembler.py	(original)
+++ pypy/branch/blackhole-improvement/pypy/jit/codewriter/assembler.py	Sun May 30 18:13:12 2010
@@ -3,6 +3,7 @@
 from pypy.jit.codewriter.flatten import ListOfKind, IndirectCallTargets
 from pypy.jit.codewriter.format import format_assembler
 from pypy.jit.codewriter.jitcode import SwitchDictDescr, JitCode
+from pypy.rlib.objectmodel import ComputedIntSymbolic
 from pypy.objspace.flow.model import Constant
 from pypy.rpython.lltypesystem import lltype, llmemory, rclass
 
@@ -71,6 +72,8 @@
                     value = llmemory.cast_adr_to_int(value)
                 else:
                     value = lltype.cast_primitive(lltype.Signed, value)
+                    if isinstance(value, ComputedIntSymbolic):
+                        value = value.compute_fn()
                     if allow_short and -128 <= value <= 127:  # xxx symbolic
                         # emit the constant as a small integer
                         self.code.append(chr(value & 0xFF))

Modified: pypy/branch/blackhole-improvement/pypy/jit/codewriter/jtransform.py
==============================================================================
--- pypy/branch/blackhole-improvement/pypy/jit/codewriter/jtransform.py	(original)
+++ pypy/branch/blackhole-improvement/pypy/jit/codewriter/jtransform.py	Sun May 30 18:13:12 2010
@@ -106,7 +106,7 @@
 
     def _killed_exception_raising_operation(self, block):
         assert block.exits[0].exitcase is None
-        del block.exits[1:]
+        block.exits = block.exits[:1]
         block.exitswitch = None
 
     # ----------



More information about the Pypy-commit mailing list