Skip to content

Fix prototype and super assignment parity#4233

Merged
proggeramlug merged 2 commits into
PerryTS:mainfrom
andrewtdiz:codex/c262-prototype-super-set
Jun 3, 2026
Merged

Fix prototype and super assignment parity#4233
proggeramlug merged 2 commits into
PerryTS:mainfrom
andrewtdiz:codex/c262-prototype-super-set

Conversation

@andrewtdiz
Copy link
Copy Markdown
Contributor

@andrewtdiz andrewtdiz commented Jun 3, 2026

Summary

  • add explicit HIR/codegen/runtime support for class instance super[property] = value using parent-prototype lookup with the current receiver
  • preserve existing static-super assignment behavior and computed-key/RHS error ordering
  • route inherited class setters/getter-only accessors through the super [[Set]] path, including setter alias registration and implicit-this scoping
  • keep methods containing lexical SuperPropertySet out of the generic inliner so the method receiver is not lost
  • add focused c262 assignment regression coverage and save the DeepWiki ecma262 reference under reference/deepwiki/

Verification

  • cargo fmt --check
  • git diff --check
  • cargo check -p perry-transform -p perry-hir -p perry-codegen -p perry-runtime
  • cargo build -p perry -p perry-runtime -p perry-stdlib
  • tests/test_c262_assignment_parity.sh -> PASS
  • python3 scripts/test262_focused_report.py --root vendor/test262 --perry-bin target/debug/perry --dir language/expressions/assignment --max 80 --sample-cap 1000000 --skip-build -> pass=74, diff=0, runtime-fail=6, compile-fail=0, parity=92.5%

Remaining Assignment Slice Buckets

  • language/expressions/assignment/8.14.4-8-b_1.js: Object.defineProperty called on non-object
  • language/expressions/assignment/8.14.4-8-b_2.js: Object.defineProperty called on non-object
  • language/expressions/assignment/S11.13.1_A5_T1.js: Perry ran clean; Node rejected
  • language/expressions/assignment/S11.13.1_A5_T2.js: Perry ran clean; Node rejected
  • language/expressions/assignment/S11.13.1_A7_T4.js: Expected true but got false
  • language/expressions/assignment/destructuring/keyed-destructuring-property-reference-target-evaluation-order-with-bindings.js: runtime panic in field_get_set.rs

Notes

  • The focused regression asserts the scoped [[Set]] behavior: inherited setter receiver, computed super key-before-RHS ordering, static-super preservation, and inherited getter-only write rejection without creating an own property.
  • Class prototype/accessor reads and broader object-literal home-context parity remain follow-up surfaces outside this PR's primary scope.

@proggeramlug proggeramlug force-pushed the codex/c262-prototype-super-set branch from 4044338 to 80c43e9 Compare June 3, 2026 08:25
@proggeramlug proggeramlug merged commit dc79cf9 into PerryTS:main Jun 3, 2026
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