From 74b6d06711afd3efbbc47436f1491900994313f3 Mon Sep 17 00:00:00 2001 From: _ov4 Date: Sat, 17 Oct 2026 06:54:32 +0000 Subject: feat(classes): allocate objects with NEW and rebind named class variables Co-Authored-By: Claude Opus 5.5 --- lib/CodeGen/FunctionGen.cc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'lib/CodeGen/FunctionGen.cc') diff --git a/lib/CodeGen/FunctionGen.cc b/lib/CodeGen/FunctionGen.cc index d5bc5d4..e344410 100644 --- a/lib/CodeGen/FunctionGen.cc +++ b/lib/CodeGen/FunctionGen.cc @@ -90,7 +90,14 @@ void FunctionGen::createArgumentAllocas(Function *F, const std::vectorIsClass) { + AllocaInst *Slot = TmpB.CreateAlloca(PointerType::getUnqual(Context), nullptr, P.Name + ".ref"); + Builder.CreateStore(Alloca, Slot); + Symbols[P.Name] = {Slot, P.TypeName, false, nullptr, 0, true}; + } else { + Symbols[P.Name] = {Alloca, P.TypeName, false}; + } } } -- cgit v1.3.1-4-g156e