I have a strange error, I'm generating code for a RPython program and get
this error:
[translation:ERROR] AttributeError: 'FrozenDesc' object has no attribute
'pycall'
Processing block:
block@9[fn_0...] is a <class 'rpython.flowspace.flowcontext.SpamBlock'>
in (?:10)make_thunk
containing the following operations:
v2 = simple_call((type Thunk_thunk10_), fn_0, args_0)
And I'm generating it thusly:
thunk_template = """
class Thunk_{sym}(ThunkBase):
def __init__(self, fn, args):
self._{sym}_fn = fn
self._{sym}_args = args
def run_thunk(self):
return self._{sym}_fn(*self._{sym}_args)
def make_thunk(fn, args):
return Thunk_{sym}(fn, args)
"""
def make_thunk():
gbls = dict(ThunkBase=ThunkBase, object=object)
sym = gen_sym.get_sym("thunk")
code = thunk_template.format(sym=sym)
exec(code, gbls)
cls = gbls["make_thunk"]
return cls
It's as if RPython isn't recognizing that the type is callable.
Any thoughts?
Thanks,
Timothy