ref: merge stack and arg_stack into single stack

This commit is contained in:
samsonium
2026-10-11 06:00:26 +03:00
parent e01bf6e4ab
commit 028c8270f7
5 changed files with 38 additions and 48 deletions
-4
View File
@@ -113,7 +113,6 @@ bool walk(fzl_walker_t *walker, fzl_node_t *node)
{
if (!walk(walker, node->call.args[i]))
return false;
push_op(walker, FZL_OPCODE_PUSHARG);
}
}
// NOTE: you need to implement dynamic names call
@@ -157,11 +156,9 @@ bool walk(fzl_walker_t *walker, fzl_node_t *node)
case FZL_NODETYPE_MOD:
if (!walk(walker, node->binary_op.left))
return false;
push_op(walker, FZL_OPCODE_PUSHARG);
if (!walk(walker, node->binary_op.right))
return false;
push_op(walker, FZL_OPCODE_PUSHARG);
switch (node->type)
{
@@ -193,7 +190,6 @@ bool walk(fzl_walker_t *walker, fzl_node_t *node)
if (!walk(walker, node->unary_op.operand))
return false;
push_op(walker, FZL_OPCODE_PUSHARG);
push_op(walker, FZL_OPCODE_NEG);
break;
}