change the built in slots to be allocated on the fly, making the objects smaller but faster

This commit is contained in:
William Bell
2025-09-09 17:55:54 +01:00
parent fc7cfc7cfb
commit 774890de1d
5 changed files with 69 additions and 27 deletions

View File

@@ -498,7 +498,6 @@ void init_small_ints() {
small_ints[i].type = TYPE_NUMBER;
small_ints[i].dict = createHashmap_GC();
add_builtin_field(&small_ints[i], __class__, ARGON_NUMBER_TYPE);
add_builtin_field(&small_ints[i], __base__, BASE_CLASS);
small_ints[i].value.as_number.is_int64 = true;
small_ints[i].value.as_number.n.i64 = n;
small_ints[i].as_bool = n;