Skip to content

[codex] Fix object numeric index assignment#4176

Merged
proggeramlug merged 1 commit into
PerryTS:mainfrom
andrewtdiz:codex/c262-parity-scan-20260602
Jun 3, 2026
Merged

[codex] Fix object numeric index assignment#4176
proggeramlug merged 1 commit into
PerryTS:mainfrom
andrewtdiz:codex/c262-parity-scan-20260602

Conversation

@andrewtdiz
Copy link
Copy Markdown
Contributor

Summary

  • canonicalize property keys in the ordinary PutValue target setter before writing object fields
  • fixes numeric computed assignment on ordinary objects, e.g. obj[1] = value creating/updating property "1"
  • adds a focused c262 regression for creating and overwriting numeric object keys

Scan notes

Initial baseline after building only the Perry CLI was infrastructure noise: scripts/test262_focused_report.py --root vendor/test262 --dir language/expressions --max 500 --sample-cap 1000000 --timeout 20 reported 285 compile-fail, all Error: Could not find libperry_runtime.a.

After building static archives with cargo build --release -p perry-runtime -p perry-stdlib, the same baseline was real parity signal: 500 judged, 482 pass, 18 runtime-fail, 0 compile-fail, 0 skip.

The fixed failures were:

  • language/expressions/assignment/S8.12.5_A1.js: obj[1] = ... did not create property "1"
  • language/expressions/assignment/S8.12.5_A2.js: obj[1] = ... did not overwrite existing property "1"

Post-fix language/expressions --max 500: 500 judged, 484 pass, 16 runtime-fail, 0 compile-fail, 0 skip.

Focused assignment follow-up: scripts/test262_focused_report.py --root vendor/test262 --dir language/expressions/assignment --max 500 --sample-cap 1000000 --timeout 20 --skip-vendor --skip-build reported 207 judged, 196 pass, 11 runtime-fail, 0 compile-fail, 0 skip; S8.12.5_A1/A2 no longer appear in the problem TSV.

Validation

  • cargo build --release -p perry-runtime -p perry
  • cargo fmt --package perry-runtime --check
  • tests/test_c262_object_numeric_index_assignment.sh
  • scripts/test262_focused_report.py --root vendor/test262 --dir language/expressions/assignment --max 500 --sample-cap 1000000 --timeout 20 --skip-vendor --skip-build
  • scripts/test262_focused_report.py --root vendor/test262 --dir language/expressions --max 500 --sample-cap 1000000 --timeout 20 --skip-vendor --skip-build

@andrewtdiz andrewtdiz marked this pull request as ready for review June 2, 2026 23:01
@proggeramlug proggeramlug merged commit 4798bf7 into PerryTS:main Jun 3, 2026
11 checks passed
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