refactor(generator): merge Accept + EmptyClone stages (C32d Step 5) - #1134
Merged
Conversation
…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)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
CreateAcceptMethodStage(36 lines) +CreateEmptyCloneMethodStage(33 lines) intoCreateNodeImplMethodsStage(38 lines)findEntities("").filter(isLeaf)to add a single method class each — now one loop, one stageNote: couldn't merge into
CreateImplMethodsStagebecause accept needs visitor interfaces which are created later in the pipeline. The new combined stage stays at the same position (afterCreateVisitorInterfacesStage).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