Refactor of function call codegen. Separate codegen for C and jq calls.
This commit is contained in:
1 parent
9e743d517a
commit
251f221b85
4 files changed
+44
-50
No files matched your search
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user