start working on runtime oop

This commit is contained in:
William Bell
2025-08-02 20:17:24 +01:00
parent 8ea69cce67
commit a7d7ded803
19 changed files with 142 additions and 71 deletions

View File

@@ -19,6 +19,7 @@ ArErr runtime_declaration(Translated *translated, RuntimeState *state,
SourceLocation *source_location = darray_get(&translated->source_locations, source_location_index);
return create_err(source_location->line, source_location->column, source_location->length, state->path, "Runtime Error", "Identifier '%.*s' has already been declared in the current scope", length, arena_get(&translated->constants, offset));
}
hashmap_insert_GC(stack->scope, hash, arena_get(&translated->constants, offset), state->registers[from_register], 0);
ArgonObject * key = init_string_object(arena_get(&translated->constants, offset), length);
hashmap_insert_GC(stack->scope, hash, key, state->registers[from_register], 0);
return no_err;
}