Skip to content

[PBT] Admit pure computed class keys and static cache initialization - #599

Open
CaelmBleidd wants to merge 1 commit into
caelmbleidd/pbt-compact-experiment-replayfrom
caelmbleidd/pbt-pure-computed-class-keys
Open

CaelmBleidd wants to merge 1 commit into
caelmbleidd/pbt-compact-experiment-replayfrom
caelmbleidd/pbt-pure-computed-class-keys

Conversation

@CaelmBleidd

Copy link
Copy Markdown
Member

The checked source-closure gate rejected every computed class member and every static field initializer. This blocked unchanged SegmentTree/Matrix classes at [Symbol.iterator] and PGOrbit at its empty static cache before the class coverage guard could report its actual limitation.

Reuse the existing initializer purity check for primitive computed names and ordinary named static fields. Also admit unshadowed Symbol.iterator under the checked closure's standard-runtime-global contract; the source-only TypeScript program has no default library, so any source binding named Symbol keeps the case unsupported. Dynamic keys, reference-to-key coercion, mutable/shadowed bindings, other Symbol properties, effects, decorators, static blocks, constructor built-in property writes, and static member collisions remain rejected. Inspection does not execute source.

Validation: all 233 Node adapter tests pass; the 74 closure tests include pure literal/numeric/constant keys, intrinsic iterator keys, empty static caches, aliases, and negative effect/shadow/accessor controls. Replacing only this helper with its parent version makes all six new positive cases fail; the source was restored and the full suite rerun successfully. git diff --check passes.

Preparation was repeated on the seven unchanged previously blocked real scenarios. All six module-initialization blockers now reach the existing CLASS_UNIVERSE_UNSUPPORTED guard: SegmentTree/Matrix still report computed-member coverage, PGOrbit still reports static initialization outside constructor coverage, and Doc retains its nested-closure boundary. Sources and their frozen hashes remain unchanged. No callable-universe guard, instrumentation, symbolic frontend, corpus selection, or comparative experiment was changed; this PR does not claim additional fully supported real scenarios.

Depends on #597.

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.

1 participant