1
0
mirror of https://github.com/stedolan/jq.git synced 2024-05-11 05:55:39 +00:00

Clean up implementation of builtin functions.

This commit is contained in:
Stephen Dolan
2012-12-02 22:12:08 +00:00
parent b6f2fbbe62
commit ea9db414ed
4 changed files with 163 additions and 171 deletions

View File

@@ -490,7 +490,8 @@ static block expand_call_arglist(block b) {
block body = i->subfn;
i->subfn = gen_noop();
inst_free(i);
prelude = BLOCK(prelude, gen_subexp(expand_call_arglist(body)));
// arguments should be pushed in reverse order, prepend them to prelude
prelude = BLOCK(gen_subexp(expand_call_arglist(body)), prelude);
nargs++;
}
assert(curr->op == CALL_JQ);