aboutsummaryrefslogtreecommitdiff
path: root/include/cps/CodeGen.h
diff options
context:
space:
mode:
author_ov4 <ov4@ov4.org>2026-10-17 06:54:32 +0000
committer_ov4 <ov4@ov4.org>2026-10-17 06:54:32 +0000
commit74b6d06711afd3efbbc47436f1491900994313f3 (patch)
treeb9050214b147cd2b1b54fd27e75d669bf6146e48 /include/cps/CodeGen.h
parent39661855c0816ac248be437704c76f58359cb5f0 (diff)
feat(classes): allocate objects with NEW and rebind named class variables
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'include/cps/CodeGen.h')
-rw-r--r--include/cps/CodeGen.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/cps/CodeGen.h b/include/cps/CodeGen.h
index 1813d9d..a70d191 100644
--- a/include/cps/CodeGen.h
+++ b/include/cps/CodeGen.h
@@ -25,6 +25,7 @@ class FileHandler;
class MemoryHandler;
class ExceptionHandler;
class CastExprAST;
+class NewExprAST;
class CodeGen {
std::unique_ptr<llvm::LLVMContext> TheContext;
@@ -127,6 +128,9 @@ class CodeGen {
const std::vector<std::unique_ptr<ExprAST>> &ArgExprs,
int Line,
std::vector<llvm::Value*> &Out);
+ llvm::Value *symbolAddress(const SymbolInfo &Info);
+ void emitAssignment(const LValueInfo &Target, ExprAST *Expr,
+ const SymbolInfo *Symbol = nullptr);
void emitDeclareStmt(DeclareStmtAST *Stmt);
void emitOutputValue(llvm::Value *Val, const TypeInfo *TypeInfo, bool AppendNewline = true);