From 3425b95cb654f8e1adc98365a4b370aa1fff8b4d Mon Sep 17 00:00:00 2001 From: _ov4 Date: Sat, 17 Oct 2026 06:02:21 +0000 Subject: feat(classes): support ordinary member methods and this references Co-Authored-By: Claude Fable 5.1 --- lib/CodeGen/CodeGen.cc | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'lib/CodeGen/CodeGen.cc') diff --git a/lib/CodeGen/CodeGen.cc b/lib/CodeGen/CodeGen.cc index ffabf8d..01393a9 100644 --- a/lib/CodeGen/CodeGen.cc +++ b/lib/CodeGen/CodeGen.cc @@ -169,6 +169,13 @@ void CodeGen::compile(const std::vector> &Statements) { } } + for (const auto &[Class, Methods] : ClassMethods) { + for (const auto &[Name, Method] : Methods) { + SaveAndRestore Location(DiagnosticLine, Method->getLine()); + FuncGen->emitPrototype(Method->getProto()); + } + } + for (const auto &Stmt : Statements) { SaveAndRestore Location(DiagnosticLine, Stmt->getLine()); emitStmt(Stmt.get()); -- cgit v1.3.1-4-g156e