Skip to content

language/runtime: install computed accessors and duplicate accessor definitions #3558

Description

@andrewtdiz

Summary

Computed getters and setters create accessor descriptors; duplicate accessors compose/override per ECMAScript and invoke when properties are read/written.

Affected Test262 rows

Perry actual behavior from report

  • 2 x runtime-fail: Uncaught exception: The value of calls is 1, after executing new C().a = 'A'; Expected SameValue(«0», «1») to be true
  • 2 x runtime-fail: Uncaught exception: The value of new C().a is 'A' Expected SameValue(«undefined», «"A"») to be true
  • 1 x runtime-fail: Uncaught exception: The value of A[1] is 1 Expected SameValue(«0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
  • 1 x runtime-fail: Uncaught exception: The value of calls is 1, after executing A.a = 'A'; A[1] = 1; A[s] = s; Expected SameValue(«2», «3») to be true

Node / ECMAScript expected behavior

Computed getters and setters create accessor descriptors; duplicate accessors compose/override per ECMAScript and invoke when properties are read/written.

Likely subsystem

HIR object/class member lowering and runtime descriptors

Acceptance criteria

  • Class and object computed getters return expected values instead of data-property fallbacks.
  • Computed setters run exactly when expected and update counters/values per Test262.
  • Duplicate getter/setter cases match Node descriptor behavior.

Validation

Run the Test262 differential against the affected area and confirm these rows leave the gap report:

scripts/test262_subset.py --root vendor/test262 --dir language/computed-property-names/class/accessor language/computed-property-names/object/accessor --sample-cap 99999 --report /tmp/COMPUTED_ACCESSORS.json

This is Perry language/runtime semantics triage, not a Node core API compatibility issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions