Skip to content

sa: read enumerators from the session table - #244

Merged
rieske merged 1 commit into
masterfrom
sa/session-enum-facade
Aug 30, 2026
Merged

sa: read enumerators from the session table#244
rieske merged 1 commit into
masterfrom
sa/session-enum-facade

Conversation

@rieske

@rieske rieske commented Aug 30, 2026

Copy link
Copy Markdown
Owner

Summary

Wave 1.4b. LexicalSession is the single enumerator store. analyze no longer copies session.enums into SymbolTable. Deleted enumConstants, defineEnumConstant, hasEnumConstant, getEnumConstant, and importParseEnumConstant.

SA identifier fold and file-scope object/function clash use session().isEnumerator / lookupEnumerator. session() throws if setSession was not called (same shape as vlaTable()). Still TU-flat. Redefinition is still diagnosed at parse. No NameTable.

Tests

  • LexicalSession.isEnumeratorDelegatesToRegistry
  • enterBlockSharesShadowAndObjectFrames also asserts the enumerator survives leaveBlock
  • SemanticAnalyzer.missingSessionIsInternalError
  • Existing sessionEnumeratorConflictsWithFileScopeObject / fileScopeObjectWithoutSessionEnumeratorIsOk
  • Existing EnumsTest pins, including enumeratorVisibleAfterDeclaringBlock and enumFileScopeObjectRedeclIsError

Git gate

Sibling git clean-rebuilt with CC=trans. t/ suite: 32614 success, 0 failed, 373 known breakage.

Out of scope

NameTable. C-scoped enumerators (5.2). ObjectTypeRegistry. Deleting TypedefRegistry.

SymbolTable no longer copies session.enums. Identifier fold and
file-scope clash go through LexicalSession::isEnumerator /
lookupEnumerator. A missing session is an internal error.
@mergify

mergify Bot commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

@rieske
rieske merged commit 2bf9ad0 into master Aug 30, 2026
3 checks passed
@rieske
rieske deleted the sa/session-enum-facade branch August 30, 2026 14:39
@coveralls

Copy link
Copy Markdown

Coverage Status

coverage: 94.037% (+0.004%) from 94.033% — sa/session-enum-facade into master

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.

2 participants