js-on-sx: Error.isError + [[ErrorData]] slot + verifyEqualTo
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 37s
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 37s
This commit is contained in:
@@ -158,6 +158,8 @@ Each item: implement → tests → update progress. Mark `[x]` when tests green.
|
||||
|
||||
Append-only record of completed iterations. Loop writes one line per iteration: date, what was done, test count delta.
|
||||
|
||||
- 2026-05-08 — **`Error.isError` static + `[[ErrorData]]` slot + `verifyEqualTo` harness helper.** Added `Error.isError(v)` per the Stage-3 proposal: returns `true` only for objects with the internal `[[ErrorData]]` slot. Implemented as `__js_error_data__: true` set on `this` by every Error subclass constructor (Error/TypeError/RangeError/SyntaxError/ReferenceError/URIError/EvalError); `js-error-is-error` walks `__proto__` looking for the marker. Wired through the lambda-static-prop path next to the existing `Promise.resolve` / `Promise.reject` lookup. Defined `AggregateError` and `SuppressedError` as `:js-undefined` so `typeof AggregateError !== 'undefined'` resolves cleanly (without these, the bare ident lookup throws ReferenceError). Added `verifyEqualTo` to the harness — `propertyHelper.js` includes it, used by `Error/message_property.js` etc. Result: built-ins/Error 6/30 → 11/30 (+5), Error/isError sub-suite 0/9 → 5/9. Map/Object unchanged. conformance.sh: 148/148.
|
||||
|
||||
- 2026-05-08 — **Harness: `$DONE` / `asyncTest` and `checkSequence` / `checkSettledPromises` stubs added.** Async-flagged Promise tests call `$DONE(err?)` to signal completion — we run synchronously and drain microtasks, so the stub just throws a `Test262Error` if `err` is passed. `asyncTest(fn)` wraps the test fn in `Promise.resolve().then(..., $DONE)`. `checkSequence(arr, msg)` (from `promiseHelper.js`) verifies `arr[i] === i+1` — used by ordering tests on `Promise.all` / `Promise.race`. `checkSettledPromises(actual, expected, msg)` matches what `Promise.allSettled` tests expect. Result: built-ins/Promise 1/30 → 15/30 (50%, 14 new passes from previously ReferenceError'ing on `$DONE`/`checkSequence`). conformance.sh: 148/148.
|
||||
|
||||
- 2026-05-08 — **`Map` and `Set` constructors with full instance API.** Both were undefined globally — every test in those categories died at `new Map()` / `new Set()` with ReferenceError. Implemented as plain SX storage on the instance dict (`__map_keys__` + `__map_vals__` parallel lists for Map, `__set_items__` for Set) using SX `=` for key/value comparisons. Wired prototype methods: `.get`, `.set`, `.has`, `.delete`, `.clear`, `.forEach`, `.keys`, `.values`, `.entries` for Map; `.add`, `.has`, `.delete`, `.clear`, `.forEach`, `.keys`, `.values`, `.entries` for Set. `.size` is a real own property updated on every mutation (no getters). Constructors use the dict-with-`__callable__` pattern (like `Object`) so `Map.length`, `Map.name`, `Map.prototype` work as regular dict reads. Constructor accepts an iterable of `[k,v]` pairs (Map) or values (Set). Added `Map`/`Set` to `js-global` and to the prototype-chain post-init block. Result: built-ins/Map 1/30 → 18/30 (60%), built-ins/Set 0/30 → 15/30 (50%, rest mostly timeouts on iterator-protocol tests). conformance.sh: 148/148.
|
||||
|
||||
Reference in New Issue
Block a user