From 251f221b85216ca50329c4ef1788fc617863ce06 Mon Sep 17 00:00:00 2001 From: Stephen Dolan Date: Sat, 1 Dec 2012 19:41:36 +0000 Subject: Refactor of function call codegen. Separate codegen for C and jq calls. --- execute.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'execute.c') diff --git a/execute.c b/execute.c index fa6b1b79..74221a55 100644 --- a/execute.c +++ b/execute.c @@ -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; -- cgit v1.2.3