summaryrefslogtreecommitdiffstats
path: root/execute.c
diff options
context:
space:
mode:
authorStephen Dolan <mu@netsoc.tcd.ie>2012-12-01 19:41:36 +0000
committerStephen Dolan <mu@netsoc.tcd.ie>2012-12-02 20:45:06 +0000
commit251f221b85216ca50329c4ef1788fc617863ce06 (patch)
tree7467aa51c1373848b98c1a70c47f876311d34fa9 /execute.c
parent9e743d517a047566996181549f05383948c0d0c0 (diff)
Refactor of function call codegen. Separate codegen for C and jq calls.
Diffstat (limited to 'execute.c')
-rw-r--r--execute.c6
1 files changed, 2 insertions, 4 deletions
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;