DEFINE LOOP (t, states, ctx) = (
let _t = t in
LOG(__ "top-down-run" 3
- "Entering node %i with loop (tag %s, context %i) with states %a"
- (Node.to_int _t)
- (Tag.to_string (Tree.tag tree _t))
- (Node.to_int (ctx))
- (StateSet.print) (states));
+ "Entering node %i with loop (tag %s, context %i) with states %a"
+ (Node.to_int _t)
+ (Tag.to_string (Tree.tag tree _t))
+ (Node.to_int (ctx))
+ (StateSet.print) (states));
if _t == Tree.nil then nil_res
else
let tag = Tree.tag tree _t in
l3jit_dispatch tr_list res1 res2 t slot1 slot2
and l2jit_dispatch_instr t ctx instr =
+ let () = LOG(__ "top-down-run" 3 "Dispatching instr: %a on node %i (context=%i)"
+ L2JIT.print_jump instr (Node.to_int t) (Node.to_int ctx))
+ in
match instr with
| L2JIT.NOP () -> nil_res
| L2JIT.FIRST_CHILD s -> LOOP ((Tree.first_child tree t), s, ctx)