aboutsummaryrefslogtreecommitdiff
path: root/include/cps/CodeGen.h
diff options
context:
space:
mode:
author_ov4 <ov4@ov4.org>2026-10-17 08:32:43 +0000
committer_ov4 <ov4@ov4.org>2026-10-17 08:32:43 +0000
commit59e3c50bcd58130e81e1f57b21d6e57b4d4aba6d (patch)
treec5f6c5b1bd367feadca0c2e7d0f47c8dedb91b20 /include/cps/CodeGen.h
parente847e4c53cf21fcb96f7ed7765e305a7ec8e6c19 (diff)
feat(classes): destroy and release heap objects with DELETE
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'include/cps/CodeGen.h')
-rw-r--r--include/cps/CodeGen.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/cps/CodeGen.h b/include/cps/CodeGen.h
index a70d191..9d71df7 100644
--- a/include/cps/CodeGen.h
+++ b/include/cps/CodeGen.h
@@ -40,6 +40,8 @@ class CodeGen {
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 typeNeedsDestruction(const std::string &TypeName) const;
+ bool emitDestroy(const std::string &TypeName, llvm::Value *Addr, 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);