diff options
| author | _ov4 <ov4@ov4.org> | 2026-10-16 13:21:05 +0000 |
|---|---|---|
| committer | _ov4 <ov4@ov4.org> | 2026-10-16 13:21:05 +0000 |
| commit | e44bdc6a2a0cf624b08046ecc7e5c5d5d9d2d66c (patch) | |
| tree | f5276cc0dd2f34e4d30a58f80223912265a1c5a0 /include/cps/ArrayHandler.h | |
| parent | e1e789ac0249149a4aa1671f5f9260d488cb617a (diff) | |
fix(compiler): correct CIE semantics and diagnostic locations
Use standard WHILE headers and default-public class fields, resolve
pseudocode identifiers without case sensitivity, and check signed i64
literal boundaries before conversion. Preserve source locations across
recursive emission and function diagnostics.
Add 22 regression cases and update compiler examples and documentation.
Validated all 69 CTest entries with the original Linux Actions seed and
verified the release package's embedded, native and IR output paths.
Diffstat (limited to 'include/cps/ArrayHandler.h')
| -rw-r--r-- | include/cps/ArrayHandler.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/include/cps/ArrayHandler.h b/include/cps/ArrayHandler.h index def174a..843bdc8 100644 --- a/include/cps/ArrayHandler.h +++ b/include/cps/ArrayHandler.h @@ -1,4 +1,5 @@ #pragma once +#include "cps/Identifier.h" #include "llvm/IR/IRBuilder.h" #include "llvm/IR/LLVMContext.h" #include "llvm/IR/Module.h" @@ -28,10 +29,10 @@ class ArrayHandler { llvm::LLVMContext *TheContext; llvm::IRBuilder<> *Builder; llvm::Module *TheModule; - std::map<std::string, SymbolInfo> *Symbols; + IdentifierMap<SymbolInfo> *Symbols; TypeSystem &Types; - std::map<std::string, ArrayMetadata> ArrayTable; + IdentifierMap<ArrayMetadata> ArrayTable; RuntimeCheck &RuntimeChecker; llvm::FunctionCallee MallocFunc; @@ -63,7 +64,7 @@ public: ArrayHandler(llvm::LLVMContext &C, llvm::IRBuilder<> &B, llvm::Module &M, - std::map<std::string, SymbolInfo> &Sym, + IdentifierMap<SymbolInfo> &Sym, TypeSystem &TS, RuntimeCheck &RC); @@ -89,12 +90,12 @@ public: // Swap in a fresh table (function bodies get their own scope, mirroring // the Symbols save/clear/restore discipline); returns the previous table. - std::map<std::string, ArrayMetadata> exchangeTable(std::map<std::string, ArrayMetadata> NewTable); + IdentifierMap<ArrayMetadata> exchangeTable(IdentifierMap<ArrayMetadata> NewTable); // Copy for block-scoping: control-flow bodies snapshot before and restore // after, so an array declared inside a branch cannot be referenced past it // (its buffer setup and bound SSA values live inside the branch). - std::map<std::string, ArrayMetadata> snapshotTable() const { return ArrayTable; } + IdentifierMap<ArrayMetadata> snapshotTable() const { return ArrayTable; } // Callee side of an array parameter: rebuild metadata from the incoming // data pointer + per-dim bounds. MakeCopy (BYVAL) mallocs and memcpys the |
