Commit Graph

7 Commits

Author SHA1 Message Date
3aa8034a0b js-on-sx: runner harness — assert() callable, verify* tolerate more args
Many test262 tests write 'assert(condition, msg)' as a plain call, not
'assert.sameValue(...)'. The stub now sets assert.__callable__ to
__assert_call__ so the dispatch in js-call-plain finds a callable.

Also widens verifyNotEnumerable etc. to 5-arg signatures — some tests call
them with (o, name, value, writable, configurable).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-24 08:49:53 +00:00
e5346d5ea3 js-on-sx: runner classifier maps parser errors to SyntaxError
classify_error now catches 'unexpected token', 'unexpected char',
'expected ident/punct/keyword' as SyntaxError variants.

classify_negative_result maps parser errors to SyntaxError for negative:parse
tests that expect a SyntaxError. Also maps 'undefined symbol' to
ReferenceError for negative:runtime tests. This reclassifies ~39+36 tests
per wide run from 'fail' to 'pass (negative)'.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-24 06:44:05 +00:00
65d4c70638 js-on-sx: parallel test262 runner with raw-fd line buffer
Rework test262-runner.py to support --workers N parallel shards, each running
a long-lived sx_server session. Replace thread-per-readline with a select-based
raw-fd line buffer.

On 2-core machines, 1 worker still beats 2 (OCaml eval is CPU-bound and starves
when shared). Auto-defaults n_workers=1 on <=2 CPU, nproc-1 (up to 8) otherwise.

Throughput baseline: ~1.1 Math tests/s serial on 2-core (unchanged; the
evaluator dominates). The runner framework is now ready to scale on bigger
machines without further code changes.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-24 06:18:48 +00:00
ce46420c2e js-on-sx: regex literal lex+parse+transpile+runtime stub
Lexer: js-regex-context? disambiguates / based on prior token;
read-regex handles [...] classes and \ escapes. Emits
{:type "regex" :value {:pattern :flags}}.

Parser: new primary branch → (js-regex pat flags).

Transpile: (js-regex-new pat flags).

Runtime: js-regex? predicate, js-regex-new builds tagged dict with
source/flags/global/ignoreCase/multiline/sticky/unicode/dotAll/
hasIndices/lastIndex. js-regex-invoke-method dispatches .test/.exec/
.toString. js-invoke-method detects regex receivers. Stub engine
uses js-string-index-of; __js_regex_platform__ + override! let a
real engine plug in later.

Runner: repeatable --filter flags (OR'd).

308/310 unit (+30 regex tests), 148/148 slice unchanged.
2026-04-23 20:27:19 +00:00
8984520f05 js-on-sx: runner fix, 8-test smoke 3/7 (was 0/8)
Agent committed before monitor-exit. Full tree still TODO.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-23 20:08:46 +00:00
1613f551ef HS add/append: Set dedup, @attr support, when-clause result tracking
- runtime hs-add-to!/hs-append: dedupe on list targets (Set semantics)
- compiler emit-set: set result to X now syncs it too
- compiler append!: handle (local)/(ref) targets via emit-set so scoped
  vars get rebound to the returned list
- parser add/remove: accept bare @attr (not just [@attr])
- parser add-attr: support when-clause → emits add-attr-when
- compiler add-class-when/add-attr-when: collect matched items into
  the-result / it so subsequent "if the result is empty" works

+6 upstream tests in early range (add 13→17, append 10→12).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-23 19:55:27 +00:00
9e568ad886 js-on-sx: baseline commit (278/280 unit, 148/148 slice, runner stub)
Initial commit of the lib/js/ tree and plans/ directory. A previous
session left template-string work in progress — 278/280 unit tests pass
(2 failing: tpl part-count off-by-one, escaped-backtick ident lookup).
test262-runner.py and scoreboard are placeholders (0/8 with 7 timeouts);
fixing the runner is the next queue item.
2026-04-23 19:42:16 +00:00