diff options
author | Stephen Dolan <mu@netsoc.tcd.ie> | 2012-12-01 19:41:36 +0000 |
---|---|---|
committer | Stephen Dolan <mu@netsoc.tcd.ie> | 2012-12-02 20:45:06 +0000 |
commit | 251f221b85216ca50329c4ef1788fc617863ce06 (patch) | |
tree | 7467aa51c1373848b98c1a70c47f876311d34fa9 /execute.c | |
parent | 9e743d517a047566996181549f05383948c0d0c0 (diff) |
Refactor of function call codegen. Separate codegen for C and jq calls.
Diffstat (limited to 'execute.c')
-rw-r--r-- | execute.c | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -411,9 +411,8 @@ jv jq_next() { } case CALL_BUILTIN_1_1: { - assert(*pc == 1); // no closure args allowed + assert(*pc == 2); pc++; // skip nclosures - pc++; // skip level stackval top = stack_pop(); cfunc_input[0] = top.value; struct cfunction* func = &frame_current_bytecode(&frame_stk)->globals->cfunctions[*pc++]; @@ -429,9 +428,8 @@ jv jq_next() { } case CALL_BUILTIN_3_1: { - assert(*pc == 1); // no closure args allowed + assert(*pc == 4); // no closure args allowed pc++; // skip nclosures - pc++; // skip level stackval top = stack_pop(); jv a = stack_pop().value; jv b = stack_pop().value; |