diff options
| author | gingerBill <gingerBill@users.noreply.github.com> | 2020-12-06 00:49:48 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-12-06 00:49:48 +0000 |
| commit | f0683c910231513db9adab83f7c2fca9dd8d2613 (patch) | |
| tree | 2539634b5b71caf5148d8927c9298ba20bad5246 /src/entity.cpp | |
| parent | 54fbdabc380905a925ab5e922749fa2b1ccb2621 (diff) | |
| parent | ca4657fd31b9efc7ab52f7e1b6f4145d5ed28fb7 (diff) | |
Merge branch 'master' into parser-experiments
Diffstat (limited to 'src/entity.cpp')
| -rw-r--r-- | src/entity.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/entity.cpp b/src/entity.cpp index 3d354b9c8..0aece39c3 100644 --- a/src/entity.cpp +++ b/src/entity.cpp @@ -120,6 +120,7 @@ struct Entity { union { struct { ExactValue value; + ParameterValue param_value; } Constant; struct { Ast *init_expr; // only used for some variables within procedure bodies @@ -164,7 +165,7 @@ struct Entity { Scope *scope; } ImportName; struct { - Array<String> paths; + Slice<String> paths; String name; } LibraryName; i32 Nil; @@ -219,7 +220,7 @@ bool entity_has_deferred_procedure(Entity *e) { gb_global u64 global_entity_id = 0; Entity *alloc_entity(EntityKind kind, Scope *scope, Token token, Type *type) { - gbAllocator a = heap_allocator(); + gbAllocator a = permanent_allocator(); Entity *entity = gb_alloc_item(a, Entity); entity->kind = kind; entity->state = EntityState_Unresolved; @@ -332,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; |