function old new delta
zdc_parse_expr 470 479 +9
zxc_vm_process 839 814 -25
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/1 up/down: 9/-25) Total: -16 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
BcParse *p = &G.prs;
int i;
+ if (p->lex == XC_LEX_NLINE)
+ RETURN_STATUS(zxc_lex_next());
+
i = (int)p->lex - (int)XC_LEX_OP_POWER;
if (i >= 0) {
BcInst inst = dc_LEX_to_INST[i];
#endif
} else {
#if ENABLE_DC
- // Most of dc parsing assumes all whitespace,
- // including '\n', is eaten.
- while (G.prs.lex == XC_LEX_NLINE) {
- s = zxc_lex_next();
- if (s) goto err;
- if (G.prs.lex == XC_LEX_EOF)
- goto done;
- }
s = zdc_parse_expr();
#endif
}
bc_vec_pop_all(&f->code);
ip->inst_idx = 0;
}
- IF_DC(done:)
+
dbg_lex_done("%s:%d done", __func__, __LINE__);
RETURN_STATUS(s);
}
"16\n" \
"" ""
+testing "dc read" \
+ "dc -finput" \
+ "2\n9\n1\n" \
+ "1?2\nf" "9\n"
+
optional FEATURE_DC_BIG
# All tests below depend on FEATURE_DC_BIG