stale docs cleanup, semantic analyzer warning, and variable allocator refactoring#11
Open
stale docs cleanup, semantic analyzer warning, and variable allocator refactoring#11
Conversation
61b6195 to
1e0aeea
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
Shard D of the compiler rearchitecture plan: stale docs cleanup, semantic analyzer warning, and variable allocator refactoring.
newin class field initializers note to reflect that codegen now handles it. Added regression test fixture for optional chaining on interfaces and strings.new X()appears in a class field initializer, guiding developers to prefer constructor initialization.VarKindenum (27 variants) andclassifyVariable()method to variable-allocator.ts, making the priority-ordered type classification logic explicit and independently testable.allocate()with aswitchonVarKind, dispatching to the same existingallocateX()methods.Files changed
.claude/rules.md— removed stale warnings, updated class field initializer docssrc/analysis/semantic-analyzer.ts— addednew X()field initializer warningsrc/codegen/infrastructure/variable-allocator.ts— added VarKind enum, VarClassification interface, classifyVariable() method, switch dispatchtests/test-fixtures.ts— registered 2 new test fixturestests/fixtures/types/optional-chaining.ts— new regression testtests/fixtures/classes/class-field-new.ts— new regression testTest plan
npm test— all tests pass (only pre-existing try-catch failures)bash scripts/self-hosting.sh— full 3-stage self-hosting passes