Repository navigation
fix(engine): correct computed class key evaluation timing - #5641
Open
shreyashsri79 wants to merge 1 commit into
Open
shreyashsri79 wants to merge 1 commit into
shreyashsri79 wants to merge 1 commit into
Conversation
Test262 conformance changes
Fixed tests (1):Tested main commit: |
This branch has not been deployed
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.
Fixes #5635.
Computed static field names were converted to property keys during static initialization, after later instance field keys and earlier static initializers. The class-name binding was also initialized before computed names were evaluated.
This change converts each static computed name to a key at its source position and initializes the class binding after the element loop, before static initializers run, following ClassDefinitionEvaluation. The later redundant key conversion for anonymous static field initializers is removed.
Five tests cover mixed method/static/instance key order, key conversion before initializers, abrupt key conversion, the class-name TDZ in declarations and named expressions, and class-name access from static and instance initializers.
Validation at
ace614acc17106f8d8633b0b1071991506583433, based on329e89748ed34e218fe593b4209b1dbe1d6eb64d, with Rust/Cargo 1.99.1:C is not defineddiagnostic andReferenceErrorkind.cargo test --locked --profile ci -p boa_engine --lib -- --nocapture --test-threads=1: 1,144 passed, no failures or ignored tests.cargo test --locked --profile ci -p insta-bytecode -- --nocapture --test-threads=1: bytecode snapshots passed without updates.cargo fmt --all --check: passed.cargo clippy --locked --profile ci -p boa_engine --all-features --all-targets -- -D warnings: passed.cargo run --locked --profile ci --bin boa_tester -- run -vv -d --test262-path <pinned-checkout> -s <suite> -o <results>fortest/language/statements/classandtest/language/expressions/class: 8,402 passed, 24 ignored, zero failures/panics on both baseline and candidate, with no case-level outcome changes. Test262 revision:d86b2294eb0a17eaa281ff12c73c473ec864c72f. These existing suites also pass on the buggy baseline; the new unit tests establish the regressions.Full workspace/all-feature test suites and full Test262 were not run locally.
Cargo.lockis unchanged.Prepared with OpenAI Codex assistance.