mirror of
https://github.com/odin-lang/Odin.git
synced 2025-12-30 09:54:45 +00:00
Minimize memory usage for AST nodes by using Slice<T> rather than Array<T> when the parameter doesn't need to grow
This commit is contained in:
@@ -165,7 +165,7 @@ struct Entity {
|
||||
Scope *scope;
|
||||
} ImportName;
|
||||
struct {
|
||||
Array<String> paths;
|
||||
Slice<String> paths;
|
||||
String name;
|
||||
} LibraryName;
|
||||
i32 Nil;
|
||||
@@ -333,7 +333,7 @@ Entity *alloc_entity_import_name(Scope *scope, Token token, Type *type,
|
||||
}
|
||||
|
||||
Entity *alloc_entity_library_name(Scope *scope, Token token, Type *type,
|
||||
Array<String> paths, String name) {
|
||||
Slice<String> paths, String name) {
|
||||
Entity *entity = alloc_entity(Entity_LibraryName, scope, token, type);
|
||||
entity->LibraryName.paths = paths;
|
||||
entity->LibraryName.name = name;
|
||||
|
||||
Reference in New Issue
Block a user