aboutsummaryrefslogtreecommitdiff
path: root/include/cps/CodeGen.h
diff options
context:
space:
mode:
author_ov4 <ov4@ov4.org>2026-10-17 06:02:21 +0000
committer_ov4 <ov4@ov4.org>2026-10-17 06:02:21 +0000
commit3425b95cb654f8e1adc98365a4b370aa1fff8b4d (patch)
tree4d81b91d0bd807cd6f7ced037533d6e60f5c307f /include/cps/CodeGen.h
parent4e22f464387725a5a282f3d72e11cfb694a31a5a (diff)
feat(classes): support ordinary member methods and this references
Co-Authored-By: Claude Fable 5.1 <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 94aacb7..1c80434 100644
--- a/include/cps/CodeGen.h
+++ b/include/cps/CodeGen.h
@@ -32,6 +32,10 @@ class CodeGen {
std::unique_ptr<llvm::IRBuilder<>> Builder;
int DiagnosticLine = 0;
IdentifierMap<SymbolInfo> Symbols;
+ IdentifierMap<IdentifierMap<FunctionDefAST*>> ClassMethods;
+ std::string CurrentClass;
+ const PrototypeAST *findMethod(const std::string &Class, const std::string &Name) const;
+ llvm::Value *emitMemberCall(MemberCallExprAST *Call);
struct ConstantScope {
unsigned ID;
IdentifierMap<std::optional<SymbolInfo>> Saved;