Skip to content

Move function family out-of-line into MLIRGenFunctions.cpp (§1)#223

Merged
ASDAlexander77 merged 1 commit into
mainfrom
refactor/split-functions
Jul 13, 2026
Merged

Move function family out-of-line into MLIRGenFunctions.cpp (§1)#223
ASDAlexander77 merged 1 commit into
mainfrom
refactor/split-functions

Conversation

@ASDAlexander77

Copy link
Copy Markdown
Owner

Summary

§1 TU split, next slice — same pattern as #217#222.

23 function-machinery methods move from MLIRGenImpl.h into a new MLIRGenFunctions.cpp TU: mlirGenParameters, getNameOfFunction, mlirGenFunctionPrototype, discoverFunctionReturnTypeAndCapturedVars, mlirGen(FunctionDeclaration), mlirGenFunctionGenerator, registerFunctionOp, mlirGenFunctionLikeDeclaration (+ DynamicImport), entry/exit, captured-param handling, params/bindings, captures, both mlirGenFunctionBody overloads, mlirGenResolveCapturedVars/mlirGenCreateCapture, and resolveFunctionWithCapture.

  • 1,408 lines out of the header (17,624 → 16,219); default arguments preserved on declarations, stripped from definitions
  • Extraction verified by a reconciliation diff: every line removed from the header appears verbatim in the new TU except the 12 expected signature transformations (the extractor missed two multi-line declarations on the first pass and injected a stray byte into one default-arg line; both were caught by the compiler + reconciliation and fixed before this commit)

Remaining §1 families: classes, then the tail utilities.

Test plan

  • Clean rebuild with the new TU layout
  • Reconciliation diff clean (no body lines lost)
  • 683/683 ctest tests passed (149 s)

🤖 Generated with Claude Code

…c 1)

23 function-machinery methods (parameters, prototype, name resolution,
return-type/captured-vars discovery, FunctionDeclaration, generator,
function-like declaration incl. dynamic import, entry/exit, captured
params, params/bindings, captures, both mlirGenFunctionBody overloads,
resolve/create capture, resolveFunctionWithCapture, registerFunctionOp)
move from MLIRGenImpl.h into a new MLIRGenFunctions.cpp TU; header
keeps declarations (defaults preserved on declarations, stripped from
definitions). 1408 lines out of the header (17624 -> 16219).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@ASDAlexander77 ASDAlexander77 merged commit f510229 into main Jul 13, 2026
2 checks passed
@ASDAlexander77 ASDAlexander77 deleted the refactor/split-functions branch July 13, 2026 10:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant