[pypy-svn] r65733 - in pypy/branch/pyjitpl5-experiments/pypy/jit/backend: llvm test
arigo at codespeak.net
arigo at codespeak.net
Wed Jun 10 18:54:06 CEST 2009
Author: arigo
Date: Wed Jun 10 18:54:05 2009
New Revision: 65733
Modified:
pypy/branch/pyjitpl5-experiments/pypy/jit/backend/llvm/compile.py
pypy/branch/pyjitpl5-experiments/pypy/jit/backend/test/runner_test.py
Log:
Test and fix (a typo, really).
Modified: pypy/branch/pyjitpl5-experiments/pypy/jit/backend/llvm/compile.py
==============================================================================
--- pypy/branch/pyjitpl5-experiments/pypy/jit/backend/llvm/compile.py (original)
+++ pypy/branch/pyjitpl5-experiments/pypy/jit/backend/llvm/compile.py Wed Jun 10 18:54:05 2009
@@ -225,7 +225,7 @@
value_ref = self.vars[v]
except KeyError:
return self.cpu._make_const(v.getaddr(self.cpu),
- self.cpu.ty_char_ptr_ptr)
+ self.cpu.ty_char_ptr)
else:
ty = llvm_rffi.LLVMTypeOf(value_ref)
if ty == self.cpu.ty_int:
Modified: pypy/branch/pyjitpl5-experiments/pypy/jit/backend/test/runner_test.py
==============================================================================
--- pypy/branch/pyjitpl5-experiments/pypy/jit/backend/test/runner_test.py (original)
+++ pypy/branch/pyjitpl5-experiments/pypy/jit/backend/test/runner_test.py Wed Jun 10 18:54:05 2009
@@ -312,6 +312,14 @@
res = self.execute_operation(rop.GETFIELD_GC, [t_box],
'ptr', descr=fielddescr2)
assert res.value == u_box.value
+ #
+ null_const = self.null_instance().constbox()
+ res = self.execute_operation(rop.SETFIELD_GC, [t_box, null_const],
+ 'void', descr=fielddescr2)
+ assert res is None
+ res = self.execute_operation(rop.GETFIELD_GC, [t_box],
+ 'ptr', descr=fielddescr2)
+ assert res.value == null_const.value
def test_passing_guards(self):
for (opname, args) in [(rop.GUARD_TRUE, [BoxInt(1)]),
More information about the Pypy-commit
mailing list