diff options
| author | Daniel Gavin <danielgavin5@hotmail.com> | 2021-04-19 02:13:29 +0200 |
|---|---|---|
| committer | Daniel Gavin <danielgavin5@hotmail.com> | 2021-04-19 02:13:29 +0200 |
| commit | c708f649ece3859306765964b22eba6302a1cd34 (patch) | |
| tree | 486743fccc01b2f9e15ac5c2e471f046047f922b /src/entity.cpp | |
| parent | f7b8b3a3400a28c4f35a6e10885bb0f0142441c8 (diff) | |
| parent | ae04af4e4ed4ecd521e1a915edd5b8637b1f40ce (diff) | |
Merge remote-tracking branch 'upstream/master' into prototype-fmt
Diffstat (limited to 'src/entity.cpp')
| -rw-r--r-- | src/entity.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/entity.cpp b/src/entity.cpp index 2786fcc6d..3926678fd 100644 --- a/src/entity.cpp +++ b/src/entity.cpp @@ -32,7 +32,7 @@ String const entity_strings[] = { #undef ENTITY_KIND }; -enum EntityFlag : u32 { +enum EntityFlag : u64 { EntityFlag_Visited = 1<<0, EntityFlag_Used = 1<<1, EntityFlag_Using = 1<<2, @@ -63,12 +63,13 @@ enum EntityFlag : u32 { EntityFlag_AutoCast = 1<<22, EntityFlag_Disabled = 1<<24, + EntityFlag_Cold = 1<<25, // procedure is rarely called - EntityFlag_Test = 1<<25, + EntityFlag_Test = 1<<30, }; -enum EntityState { +enum EntityState : u32 { EntityState_Unresolved = 0, EntityState_InProgress = 1, EntityState_Resolved = 2, @@ -92,13 +93,15 @@ struct ParameterValue { }; }; - +enum EntityConstantFlags : u32 { + EntityConstantFlag_ImplicitEnumValue = 1<<0, +}; // An Entity is a named "thing" in the language struct Entity { EntityKind kind; u64 id; - u32 flags; + u64 flags; EntityState state; Token token; Scope * scope; @@ -125,6 +128,7 @@ struct Entity { struct { ExactValue value; ParameterValue param_value; + u32 flags; } Constant; struct { Ast *init_expr; // only used for some variables within procedure bodies |