Skip to content

runtime/object-model: support primitive receiver boxing and temporary property visibility #3577

@andrewtdiz

Description

@andrewtdiz

Summary

Primitive property access and writes follow ECMAScript wrapper semantics for number primitives, including visible temporary values only where the spec permits.

Affected Test262 rows

Perry actual behavior from report

  • 1 x runtime-fail: Uncaught exception: (5).x == 5
  • 1 x runtime-fail: Uncaught exception: (5).x === 5
  • 1 x runtime-fail: Uncaught exception: typeof (5).x Expected SameValue(«"undefined"», «"number"») to be true
  • 1 x runtime-fail: Uncaught exception: typeof (5).x Expected SameValue(«"undefined"», «"object"») to be true

Node / ECMAScript expected behavior

Primitive property access and writes follow ECMAScript wrapper semantics for number primitives, including visible temporary values only where the spec permits.

Likely subsystem

ToObject/primitive wrapper object model

Acceptance criteria

  • The (5).x and typeof (5).x rows match Node/Test262.
  • Number primitive ToObject behavior remains consistent with Number.prototype access.
  • No persistent property is incorrectly stored on primitive values.

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/function-code --sample-cap 99999 --report /tmp/FUNC_PRIMITIVE_BOXING.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
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions