fix(semantic-utils): remove unused block depth cache by jinchuntan · Pull Request #1101 · 8f4e/8f4e · GitHub
Skip to content

fix(semantic-utils): remove unused block depth cache - #1101

Merged
andorthehood merged 1 commit into
8f4e:mainfrom
jinchuntan:fix/remove-dead-block-state
Oct 20, 2026
Merged

andorthehood merged 1 commit into
8f4e:mainfrom
jinchuntan:fix/remove-dead-block-state

Conversation

@jinchuntan

Copy link
Copy Markdown
Contributor

Fixes #954.

Removes the unused activeBlockDepths cache from the shared block-state contract, context construction and push/pop helpers. The old boolean flags are already absent from main.

Keeps the ordered block stack and active loop/map caches. Drops obsolete depth assertions and checks that seeded stacks still derive the live caches correctly.

Validated on Node 24.16.0:

npx nx run-many --targets=test,typecheck --projects=@8f4e/language-spec,@8f4e/semantic-utils,@8f4e/stack-analyzer,@8f4e/semantic-reference-resolver,@8f4e/wasm-codegen,@8f4e/compiler --parallel=1

The compiler identifier audit, Biome and pre-commit checks also pass.

@irimias57 irimias57 added contributor compiler Compiler, tokenizer, codegen, and language-semantics work labels Oct 18, 2026

@irimias57 irimias57 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, Nigel — this is a clean, focused cleanup with good coverage for the retained block-state behavior.

For a next contribution, issue #1122 would be a good fit: #1122

@andorthehood andorthehood left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@andorthehood
andorthehood merged commit 1419c40 into 8f4e:main Oct 20, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

compiler Compiler, tokenizer, codegen, and language-semantics work contributor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove dead compiler block-state caches

3 participants