[pypy-svn] r36786 - in pypy/dist/pypy/jit/codegen: dump llgraph
arigo at codespeak.net
arigo at codespeak.net
Mon Jan 15 19:26:59 CET 2007
Author: arigo
Date: Mon Jan 15 19:26:58 2007
New Revision: 36786
Modified:
pypy/dist/pypy/jit/codegen/dump/rgenop.py
pypy/dist/pypy/jit/codegen/llgraph/llimpl.py
Log:
With these fixes, the dump backend can now be used (with --dump) to
run timeshifter tests including the promotion ones.
Modified: pypy/dist/pypy/jit/codegen/dump/rgenop.py
==============================================================================
--- pypy/dist/pypy/jit/codegen/dump/rgenop.py (original)
+++ pypy/dist/pypy/jit/codegen/dump/rgenop.py Mon Jan 15 19:26:58 2007
@@ -97,6 +97,7 @@
def end(self):
self.dump("%s.end()" % (self.name,))
+ self.llbuilder.end()
@specialize.arg(1)
def genop1(self, opname, gv_arg):
Modified: pypy/dist/pypy/jit/codegen/llgraph/llimpl.py
==============================================================================
--- pypy/dist/pypy/jit/codegen/llgraph/llimpl.py (original)
+++ pypy/dist/pypy/jit/codegen/llgraph/llimpl.py Mon Jan 15 19:26:58 2007
@@ -201,8 +201,11 @@
elif T == llmemory.Address:
return llmemory.cast_ptr_to_adr(c.value)
else:
- if lltype.typeOf(c.value) == llmemory.Address:
+ T1 = lltype.typeOf(c.value)
+ if T1 is llmemory.Address:
value = llmemory.cast_adr_to_int(c.value)
+ elif isinstance(T1, lltype.Ptr):
+ value = lltype.cast_ptr_to_int(c.value)
else:
value = c.value
return lltype.cast_primitive(T, value)
More information about the Pypy-commit
mailing list