# HG changeset patch # User lost@l-w.ca # Date 1314562653 21600 # Node ID 02804b7c051c7e92229e444f9a8d887cd1cca7bb # Parent 8967eb9073244715ceb1c311f873d1810d4d5894 Don't error out on dlen set and len not for insn length resolution diff -r 8967eb907324 -r 02804b7c051c lwasm/pass4.c --- a/lwasm/pass4.c Sun Aug 28 14:16:45 2011 -0600 +++ b/lwasm/pass4.c Sun Aug 28 14:17:33 2011 -0600 @@ -76,7 +76,7 @@ if (sl -> len == -1 && sl -> insn >= 0 && instab[sl -> insn].resolve) { (instab[sl -> insn].resolve)(as, sl, 1); - if (force && sl -> len == -1) + if (force && sl -> len == -1 && sl -> dlen == -1) { lwasm_register_error(as, sl, "Instruction failed to resolve."); return; diff -r 8967eb907324 -r 02804b7c051c lwasm/pass6.c --- a/lwasm/pass6.c Sun Aug 28 14:16:45 2011 -0600 +++ b/lwasm/pass6.c Sun Aug 28 14:17:33 2011 -0600 @@ -83,7 +83,7 @@ lwasm_reduce_expr(as, le -> expr); if (!exprok(as, le -> expr)) { - lwasm_register_error(as, cl, "Invalid expression"); + lwasm_register_error(as, cl, "Invalid expression: %s", lw_expr_print(le -> expr)); } } }