diff options
| author | _ov4 <ov4@ov4.org> | 2026-10-17 06:52:23 +0000 |
|---|---|---|
| committer | _ov4 <ov4@ov4.org> | 2026-10-17 06:52:23 +0000 |
| commit | 39661855c0816ac248be437704c76f58359cb5f0 (patch) | |
| tree | 202b014805e40208e3adb861f4a97d31770f13e6 /include/cps/CodeGen.h | |
| parent | c89477d615fb0ce4d89786ef848ffe6aca1da088 (diff) | |
feat(classes): construct declared objects and nested fields and arrays
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'include/cps/CodeGen.h')
| -rw-r--r-- | include/cps/CodeGen.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/cps/CodeGen.h b/include/cps/CodeGen.h index 593cde0..1813d9d 100644 --- a/include/cps/CodeGen.h +++ b/include/cps/CodeGen.h @@ -36,6 +36,13 @@ class CodeGen { std::string CurrentClass; const PrototypeAST *findMethod(const std::string &Class, const std::string &Name) const; llvm::Value *emitMemberCall(MemberCallExprAST *Call); + llvm::Value *emitMethodCall(const std::string &Class, llvm::Value *Receiver, + const std::string &Name, + const std::vector<std::unique_ptr<ExprAST>> &Args, int Line); + bool typeNeedsConstruction(const std::string &TypeName) const; + bool emitConstruct(const std::string &TypeName, llvm::Value *Addr, + const std::vector<std::unique_ptr<ExprAST>> &Args, int Line); + bool emitDefaultConstruct(const std::string &TypeName, llvm::Value *Addr, int Line); struct ConstantScope { unsigned ID; IdentifierMap<std::optional<SymbolInfo>> Saved; |
