Skip to content

refactor(generator): merge Accept + EmptyClone stages (C32d Step 5) - #1134

Merged
jsenko merged 2 commits into
mainfrom
merge-trivial-stages
Jun 29, 2026
Merged

refactor(generator): merge Accept + EmptyClone stages (C32d Step 5)#1134
jsenko merged 2 commits into
mainfrom
merge-trivial-stages

Conversation

@jsenko

@jsenko jsenko commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Merged CreateAcceptMethodStage (36 lines) + CreateEmptyCloneMethodStage (33 lines) into CreateNodeImplMethodsStage (38 lines)
  • Both iterated findEntities("").filter(isLeaf) to add a single method class each — now one loop, one stage
  • Pipeline: 69 → 68 stages

Note: couldn't merge into CreateImplMethodsStage because accept needs visitor interfaces which are created later in the pipeline. The new combined stage stays at the same position (after CreateVisitorInterfacesStage).

Also evaluated all other stages for merging opportunities — no other strong candidates. Remaining small stages (28-50 lines) each have distinct pipeline positions and responsibilities.

Context

C32d Step 5 in #1042. Skipped Step 4 (thin AbstractJavaStage) — analysis showed almost all methods are still actively used by non-IO stages, so the reduction would be ~25 lines. Not worth a PR.

Test plan

  • All 1129 data-models tests pass
  • Generated output unchanged

jsenko added 2 commits June 29, 2026 03:34
…hodsStage (C32d Step 5)

Both stages iterated leaf entities to add a single method class.
Merged into one CreateNodeImplMethodsStage that runs at the same
pipeline position (after CreateVisitorInterfacesStage).

Pipeline: 69 → 68 stages.
…lock (C32d polish)

- Replace all static MethodClass.methodName(args) with instance-based
  new MethodClass(args).getName() across 80 call sites / 34 files
- Remove static methodName() from all 12 method classes
- Add naming-only constructors: GetterMethod(PropertyModel),
  SetterMethod(PropertyModel), FactoryMethod(String), AddMethod(String)
- Convert 3+ consecutive addContext calls to Map.of (12 files)
- Convert 4+ consecutive append calls to appendBlock text blocks (5 files)
@jsenko
jsenko merged commit ec8d142 into main Jun 29, 2026
2 checks passed
@jsenko
jsenko deleted the merge-trivial-stages branch June 29, 2026 07:21
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