js-on-sx: Function.prototype.isPrototypeOf recognises callable recvs (+3)

Tests expected Function.prototype.isPrototypeOf(Number/String/…) ===
true because every built-in ctor inherits from Function.prototype.
Our model doesn't link Number.__proto__ anywhere, so the default
Object.isPrototypeOf walked an empty chain and returned false.

Fix: post-definition dict-set! adds an explicit isPrototypeOf override
on js-function-global.prototype that returns (js-function? x) — which
accepts lambdas, functions, components, and __callable__ dicts. Good
enough to satisfy the spec for every case that isn't a bespoke proto
chain.

Unit 521/522, slice 148/148 unchanged.
Wide scoreboard: 156/300 → 159/300 (+3, Number/S15.7.3_A7 and the
three S15.5.3_A2 / S15.6.3_A2 / S15.9.3_A2 twins).
This commit is contained in:
2026-04-24 13:07:33 +00:00
parent 52fc87f222
commit 81059861fd
3 changed files with 97 additions and 87 deletions

View File

@@ -1,12 +1,12 @@
{
"totals": {
"pass": 156,
"fail": 133,
"pass": 159,
"fail": 131,
"skip": 1597,
"timeout": 11,
"timeout": 10,
"total": 1897,
"runnable": 300,
"pass_rate": 52.0
"pass_rate": 53.0
},
"categories": [
{
@@ -35,15 +35,15 @@
{
"category": "built-ins/Number",
"total": 340,
"pass": 75,
"fail": 21,
"pass": 77,
"fail": 19,
"skip": 240,
"timeout": 4,
"pass_rate": 75.0,
"pass_rate": 77.0,
"top_failures": [
[
"Test262Error (assertion failed)",
21
19
],
[
"Timeout",
@@ -54,23 +54,23 @@
{
"category": "built-ins/String",
"total": 1223,
"pass": 38,
"pass": 39,
"fail": 56,
"skip": 1123,
"timeout": 6,
"pass_rate": 38.0,
"timeout": 5,
"pass_rate": 39.0,
"top_failures": [
[
"Test262Error (assertion failed)",
42
],
[
"Timeout",
6
40
],
[
"TypeError: not a function",
6
7
],
[
"Timeout",
5
],
[
"ReferenceError (undefined symbol)",
@@ -96,15 +96,15 @@
"top_failure_modes": [
[
"Test262Error (assertion failed)",
83
79
],
[
"TypeError: not a function",
42
43
],
[
"Timeout",
11
10
],
[
"ReferenceError (undefined symbol)",
@@ -125,9 +125,13 @@
[
"Unhandled: Not callable: {:__proto__ {:valueOf <lambda()> :propertyIsEn",
1
],
[
"Unhandled: js-transpile-binop: unsupported op: >>>\\",
1
]
],
"pinned_commit": "d5e73fc8d2c663554fb72e2380a8c2bc1a318a33",
"elapsed_seconds": 269.2,
"elapsed_seconds": 268.6,
"workers": 1
}