pass object into call if object is a method

This commit is contained in:
William Bell
2025-08-07 05:16:51 +01:00
parent 4b6d15336a
commit 38e2cad507
5 changed files with 64 additions and 31 deletions

View File

@@ -201,7 +201,8 @@ ArErr run_instruction(Translated *translated, RuntimeState *state,
*stack = (*stack)->prev;
break;
case OP_INIT_ARGS:;
size_t size = pop_bytecode(translated, state) * sizeof(ArgonObject *);
*state->call_args_length = pop_bytecode(translated, state);
size_t size = *state->call_args_length * sizeof(ArgonObject *);
if (*state->call_args) {
*state->call_args = realloc(*state->call_args, size);
} else {