Skip to content

runtime: complete own name/length descriptors on builtins (follow-on to closed #3143) #3655

Description

@proggeramlug

Summary

Built-in functions and constructors are still missing own name / length data
properties across a wide swath of the standard library. Test262 verifyProperty
checks fail with "name should be an own property" / "length should be an own
property"
on ~131 cases spanning ~25 categories.

This is a follow-on to the now-closed #3143 ("Built-in property descriptors &
.name/.length conformance"). That issue landed partial coverage, but a full
parity sweep shows the conformance is far from complete — many builtins still
lack the own name/length properties (with the spec-required
{writable:false, enumerable:false, configurable:true} descriptor shape).

Evidence

From a test262 + node-core parity sweep (2026-05-31): 131 failures with this
exact signature. Affected categories (top): Function (9), RegExp (6), Math (6),
Reflect (6), TypedArrayConstructors (6), NativeErrors (5), Date (5), Object (5),
plus single/double-digit hits across ArrayBuffer, AsyncFunction, BigInt,
DataView, Array, Map, Set, WeakMap, WeakSet, Promise, and more.

Representative cases:

  • built-ins/Array/from/Array.from-name.js — "name should be an own property"
  • built-ins/Array/from/Array.from_arity.js — "length should be an own property"
  • built-ins/ArrayBuffer/isView/{name,length}.js
  • built-ins/AsyncFunction/{instance-has-name,instance-length}.js
  • built-ins/BigInt/asIntN/{name,length}.js, asUintN/{name,length}.js
  • built-ins/Reflect/apply/{name,length}.js, defineProperty/{name,length}.js
  • built-ins/DataView/{name,length}.js

Repro

// All of these should print the spec values; today the own-property lookup fails.
console.log(Object.getOwnPropertyDescriptor(Array.from, 'name'));   // {value:'from', writable:false, enumerable:false, configurable:true}
console.log(Object.getOwnPropertyDescriptor(BigInt.asIntN, 'length')); // length 2
console.log(Reflect.apply.name, Reflect.apply.length);

Why it's high-leverage

This is a single semantic (own name/length descriptors on builtins) that, once
generalized, clears ~131 failures at once. It also unblocks verifyProperty-based
assertions in many other categories that currently abort early on this check.

Suggested scope

Audit how .name/.length are installed on builtin function/constructor objects
(the mechanism #3143 introduced) and extend it to cover every builtin
function/constructor uniformly, with the correct descriptor attributes.


Filed from the parity-gap radar (scripts/parity_gap_report.py). Cluster: 131
failures, "name/length should be an own property".

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