[pypy-svn] r57684 - in pypy/branch/oo-jit/pypy/jit: codegen/cli rainbow/test
antocuni at codespeak.net
antocuni at codespeak.net
Fri Aug 29 16:45:56 CEST 2008
Author: antocuni
Date: Fri Aug 29 16:45:55 2008
New Revision: 57684
Modified:
pypy/branch/oo-jit/pypy/jit/codegen/cli/operation.py
pypy/branch/oo-jit/pypy/jit/rainbow/test/test_interpreter.py
Log:
revert r57683, and put a workaround in operation.{GetField, SetField}
Modified: pypy/branch/oo-jit/pypy/jit/codegen/cli/operation.py
==============================================================================
--- pypy/branch/oo-jit/pypy/jit/codegen/cli/operation.py (original)
+++ pypy/branch/oo-jit/pypy/jit/codegen/cli/operation.py Fri Aug 29 16:45:55 2008
@@ -184,7 +184,7 @@
clitype = gv_obj.getCliType() # XXX: it's a Record, need to think how to fix
else:
clitype = class2type(fieldtoken.cls)
- self.fieldinfo = clitype.GetField(fieldtoken.name)
+ self.fieldinfo = clitype.GetField(str(fieldtoken.name))
def restype(self):
return self.fieldinfo.get_FieldType()
@@ -206,7 +206,7 @@
clitype = gv_obj.getCliType() # XXX: it's a Record, need to think how to fix
else:
clitype = class2type(fieldtoken.cls)
- self.fieldinfo = clitype.GetField(fieldtoken.name)
+ self.fieldinfo = clitype.GetField(str(fieldtoken.name))
def restype(self):
return None
Modified: pypy/branch/oo-jit/pypy/jit/rainbow/test/test_interpreter.py
==============================================================================
--- pypy/branch/oo-jit/pypy/jit/rainbow/test/test_interpreter.py (original)
+++ pypy/branch/oo-jit/pypy/jit/rainbow/test/test_interpreter.py Fri Aug 29 16:45:55 2008
@@ -724,15 +724,15 @@
def test_complex_struct(self):
S = self.GcStruct('S', ('n', lltype.Signed))
PTRS = self.Ptr(S)
- T = self.GcStruct('T', ('succ', PTRS), ('n', lltype.Signed))
+ T = self.GcStruct('T', ('s', PTRS), ('n', lltype.Signed))
malloc = self.malloc
def ll_function(x, y):
t = malloc(T)
- t.succ = malloc(S)
- t.succ.n = y
+ t.s = malloc(S)
+ t.s.n = y
t.n = x
- return t.n + t.succ.n
+ return t.n + t.s.n
res = self.interpret(ll_function, [20, 22])
assert res == 42
@@ -778,7 +778,7 @@
malloc = self.malloc
def ll_function():
s = malloc(S)
- s.x = 123
+ s.xx = 123
return s
res = self.interpret(ll_function, [], [])
assert res.x == 123
More information about the Pypy-commit
mailing list