From 31e443264ac621b812ec5a1a5b0f4b67e4cc25e3 Mon Sep 17 00:00:00 2001 From: _ov4 Date: Thu, 22 Oct 2026 04:40:15 +0000 Subject: refactor(codegen): move call marshalling and resolution into CallGen.cc Pure move of both marshalCallArgs overloads, emitVariadicArgument and resolveCall out of CodeGen.cc; no behavior change. Co-Authored-By: Claude Sonnet 5.5 --- AGENTS/ARCH/LAYOUT.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'AGENTS') diff --git a/AGENTS/ARCH/LAYOUT.md b/AGENTS/ARCH/LAYOUT.md index 6c70d3b..2586cf1 100644 --- a/AGENTS/ARCH/LAYOUT.md +++ b/AGENTS/ARCH/LAYOUT.md @@ -10,10 +10,11 @@ | `lib/Parser/ParserFile.cc` | OPENFILE/READFILE/WRITEFILE/CLOSEFILE parsing | | `lib/Parser/ParserType.cc` | Type names, variable/array/constant declarations, TYPE/ENDTYPE and CLASS/ENDCLASS declarations, shared field and method parsing, SET/DEFINE reserved stubs | | `include/cps/TemplateAST.h`, `lib/Parser/ParserType.cc` | TEMPLATE declarations, type parameter packs and canonical template ids; call and pack parsing also uses ParserExpression.cc/ParserFunction.cc | -| `lib/CodeGen/CodeGen.cc` | Initialization, symbols, call arguments and main() compilation | +| `lib/CodeGen/CodeGen.cc` | Initialization, symbols and main() compilation | +| `lib/CodeGen/CallGen.cc` | Call-argument marshalling (`marshalCallArgs`, variadic arguments) and call resolution (`resolveCall`) | | `lib/CodeGen/ExpressionGen.cc`, `StatementGen.cc`, `ControlFlowGen.cc` | Expression/statement dispatch and control-flow emission | | `lib/CodeGen/OperatorGen.cc`, `include/cps/Operator.h` | Exact global/member operator selection, calls and temporary receivers; shared operator spellings | -| `lib/CodeGen/TemplateGen.cc`, `TemplateClone.h`, `TemplateClone.cc` | Template registry validation, cached function/class instantiation, structural type substitution, pack expansion and deferred bodies; call deduction/selection lives in CodeGen.cc | +| `lib/CodeGen/TemplateGen.cc`, `TemplateClone.h`, `TemplateClone.cc` | Template registry validation, cached function/class instantiation, structural type substitution, pack expansion and deferred bodies; call deduction/selection lives in CallGen.cc | | `lib/CodeGen/ConstructorGen.cc` | Construction, copying, assignment, destruction and deferred object cleanup | | `lib/CodeGen/GlobalGen.cc` | GLOBAL declarations and scalar/owning STRING initializers | | `lib/CodeGen/ConstantGen.cc` | Literal constants, declaration conflicts and lexical binding restoration | -- cgit v1.3.1-4-g156e