diff options
| author | _ov4 <ov4@ov4.org> | 2026-10-17 09:15:18 +0000 |
|---|---|---|
| committer | _ov4 <ov4@ov4.org> | 2026-10-17 09:15:18 +0000 |
| commit | 39e50838bd12057d9305575f50c63990984df01a (patch) | |
| tree | 6ff2b45ed79aff00582c62942c2a283d92329b4f /include/cps | |
| parent | e1f41ed9fafaf7eb4f2da6878a3fabcf2f7c021e (diff) | |
feat(codegen): GLOBAL variables as LLVM globals
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'include/cps')
| -rw-r--r-- | include/cps/CodeGen.h | 1 | ||||
| -rw-r--r-- | include/cps/TypeSystem.h | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/include/cps/CodeGen.h b/include/cps/CodeGen.h index 6e0fab1..d624ca6 100644 --- a/include/cps/CodeGen.h +++ b/include/cps/CodeGen.h @@ -41,6 +41,7 @@ class CodeGen { bool isVisible(size_t Owner) const; void selectUnit(size_t Unit); void importSymbols(); + void runGlobalPrePass(const SourceUnit &Unit, int Phase); IdentifierMap<SymbolInfo> Symbols; IdentifierMap<IdentifierMap<FunctionDefAST*>> ClassMethods; std::string CurrentClass; diff --git a/include/cps/TypeSystem.h b/include/cps/TypeSystem.h index d699067..1391345 100644 --- a/include/cps/TypeSystem.h +++ b/include/cps/TypeSystem.h @@ -112,6 +112,7 @@ struct SymbolInfo { llvm::Constant *ConstantValue = nullptr; // Non-null for CONSTANT; no storage. unsigned ScopeID = 0; bool IsReference = false; // Storage is a slot containing the current object address. + bool IsGlobal = false; }; class TypeSystem { |
