start working on function calls

This commit is contained in:
2025-08-04 02:09:38 +01:00
parent 417d66faf3
commit af371f5b9f
12 changed files with 2185158 additions and 32 deletions

View File

@@ -21,7 +21,7 @@ void load_argon_function(Translated *translated, RuntimeState *state,
object->type = TYPE_FUNCTION;
uint64_t offset = pop_bytecode(translated, state);
uint64_t length = pop_bytecode(translated, state);
add_field(object, "__class__", new_string_object(arena_get(&translated->constants, offset), length));
add_field(object, "__name__", new_string_object(arena_get(&translated->constants, offset), length));
object->value.argon_fn.number_of_parameters = pop_bytecode(translated, state);
object->value.argon_fn.parameters =
ar_alloc(object->value.argon_fn.number_of_parameters * sizeof(struct string_struct));