refactor: remove dead AST splitting code and fix misleading fallback message#484
Merged
refactor: remove dead AST splitting code and fix misleading fallback message#484
Conversation
DESTROY and weaken/isweak/unweaken are now implemented (PR #464 merged). Update all documentation that previously listed these as unsupported: - changelog.md: move from WIP to released features - feature-matrix.md: mark DESTROY as supported, remove from unsupported list - roadmap.md: mark DESTROY and weak references as completed - relation-perlito.md: update JVM limitations paragraph - AGENTS.md: remove "on feature/destroy-weaken branch" qualifier - blog post README: update Moo results to 841/841 Generated with [Devin](https://cli.devin.ai/docs) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
- Verify all 6 architecture docs + README against source code - Fix wrong file paths in control-flow.md (packages reorganized) - Add missing RETURN control flow type and non-local map/grep return - Remove all stale TABLESWITCH references (actual: conditional branches) - Rewrite large-code-refactoring.md: was describing non-existent retry architecture; now documents actual two-tier strategy (proactive block refactoring + interpreter fallback) - Fix lexical-pragmas.md: wrong stack types, non-existent StrictOptions class, missing warning stacks and CompilerFlagNode fields - Fix dynamic-scope.md: wrong DeferBlock types, missing implementors, missing blessId/reset-to-undef in save - Fix block-dispatcher-optimization.md: wrong per-site bytecode size, missing Dereference.java as implementation file - Fix weaken-destroy.md: wrong pop/shift deferred decrement claim, wrong code ref birth-tracking path, wrong type check order - Update inline-cache.md and method-call-optimization.md status: inline caching IS implemented in RuntimeCode.java - Move unimplemented design docs to dev/design/ - Add dev/architecture/ to make check-links target - Fix 2 broken doc links (warnings-scope.md -> lexical-warnings.md) - Fix 3 stale Java code comments (WeakRefRegistry, RuntimeScalar, DestroyDispatch) - Add RuntimeList, org.perlonjava.app to README overview - All links clean (368 checked, 0 errors), make passes Generated with [Devin](https://cli.devin.ai/docs) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…message Remove dead code from the large-code refactoring subsystem: - Delete DepthFirstLiteralRefactorVisitor (never called) - Delete LargeNodeRefactorer (only called from dead code) - Delete ControlFlowFinder (only used by dead code) - Strip dead methods from LargeBlockRefactorer: forceRefactorForCodegen(), trySmartChunking(), findChunkStartByEstimatedSize(), shouldBreakChunk(), processPendingRefactors(), and associated fields - Strip dead methods from BlockRefactor: buildNestedStructure(), createBlockNode(), wrapInListNode() - Remove dead cachedHasAnyControlFlow field from AbstractNode - Remove dead queuedForRefactor/chunkAlreadyRefactored annotation flags Fix misleading "after AST splitting" in interpreter fallback message. No AST splitting actually occurs — the system only does whole-block wrapping. New message: "Note: Method too large, using interpreter backend." Clean up stale javadoc references to deleted classes in BytecodeSizeEstimator, ListNode, HashLiteralNode, ArrayLiteralNode, BlockNode. Update architecture doc and STATUS.md to reflect actual behavior. Generated with [Devin](https://cli.devin.ai/docs) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
bfd4b44 to
8139c8c
Compare
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
DepthFirstLiteralRefactorVisitor,LargeNodeRefactorer,ControlFlowFinder(1,087 lines)LargeBlockRefactorer(501 → 127 lines) andBlockRefactor(140 → 31 lines)cachedHasAnyControlFlowfield fromAbstractNode, dead annotation flags (queuedForRefactor,chunkAlreadyRefactored)BytecodeSizeEstimator,ListNode,HashLiteralNode,ArrayLiteralNode,BlockNodelarge-code-refactoring.mdandSTATUS.mdto reflect actual behaviorNet: 16 files changed, +37 -1,687 lines.
Test plan
makepasses (build + all unit tests)JPERL_SHOW_FALLBACK=1 ./jperlshows "Note: Method too large, using interpreter backend."Generated with Devin