I have a interpreter that translates fine, but when I turn on the JIT I get
the following error
[translation:ERROR] File
"/home/tim/pypy/pypy/jit/metainterp/warmspot.py", line 266, in
split_graph_and_record_jitdriver
[translation:ERROR] graph.startblock =
support.split_before_jit_merge_point(*jmpp)
[translation:ERROR] File
"/home/tim/pypy/pypy/jit/codewriter/support.py", line 79, in
split_before_jit_merge_point
[translation:ERROR] link = split_block(None, portalblock, 0, greens_v +
reds_v)
[translation:ERROR] File "/home/tim/pypy/pypy/translator/unsimplify.py",
line 105, in split_block
[translation:ERROR] assert v.concretetype is lltype.Void
[translation:ERROR] AssertionError
My merge point looks like this:
jitdriver.jit_merge_point(ip = self._ip,
func = self._call_stack[-1],
args = self._arg_stack[-1],
stack = self._sp)
>From what I can tell of the source, this is something to do with one of my
variables infact being a constant and not a variable. What am I doing
wrong? I'm generating my bytecode at runtime via an AST:
def run_benchmark(times):
max = Argument("max")
cur = Argument("cur")
ast = If(Equal(max, cur), cur, Call(CurFunc(), Add(cur,
Const(W_Int(1))), max))
f = Func([cur, max], ast)
#value = Interpreter(f.toFunction()).main_loop(W_Int(0),
W_Int(2147483648))
value = Interpreter(f.toFunction()).main_loop(W_Int(0),
W_Int(int(times)))
return value
Could it be that the translator is propagating my function through as a
constant? I.e. I'm basically hard-coding my byte code via the AST.
Thank for any help,
Timothy Baldridge
_______________________________________________
pypy-dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-dev