Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
0461ea5
Plan Phase 9: a proven baseline JIT, JavaScript first, Wasm-ready
claude Nov 16, 2026
4eba306
Fold the JIT into Phase 7: x86-64 and Windows from the start
claude Nov 16, 2026
0e702ba
Record the JIT plan's J.0 decisions; require batching, measure the va…
claude Nov 16, 2026
62bf566
Plan Phase 7: JavaScript
claude Nov 16, 2026
3710e2b
Take Phase 7's 7.0 decisions on the maintainer's delegation
claude Nov 16, 2026
d2f2068
Add the clazel-js-lexer crate skeleton (item 7.1)
atiernan Nov 16, 2026
27eec9a
Add the Test262 converter (item 7.1)
atiernan Nov 16, 2026
3189670
Pin ECMA-262 2026 and Test262 for item 7.1
atiernan Nov 16, 2026
e0e8935
Add empty clazel-web, clazel-webidl and clazel-js-regexp crates (7.1)
atiernan Nov 16, 2026
1f94f81
xtask testdata: inventories for Phase 7's vendored files (7.1)
atiernan Nov 16, 2026
43ed03d
Vendor the WebIDL of the web standards from w3c/webref (7.1)
atiernan Nov 16, 2026
eb4c1d0
Vendor the Unicode 18.0.0 files RegExp needs (7.1)
atiernan Nov 16, 2026
97be384
Vendor TodoMVC's vanilla, React and Vue implementations (7.1)
atiernan Nov 16, 2026
d814333
Vendor WPT's DOM, events, timers, fetch and XHR tests (7.1)
atiernan Nov 16, 2026
b2e8aca
Merge the Test262 part of item 7.1
atiernan Nov 16, 2026
3c3297d
Make Test262 a tree suite and hash its files in the table
atiernan Nov 16, 2026
fcffbf4
Vendor the syntax subset of Test262 at e91219cb (item 7.1)
atiernan Nov 16, 2026
7a01dfc
Generate the Test262 table (5,212 tests, 263 expected failures)
atiernan Nov 16, 2026
f29fcac
Keep only the ECMA-262 pin in SPEC-PIN.md; Test262's is in its SOURCE.md
atiernan Nov 16, 2026
ce71925
Re-vendor Test262 byte for byte (the first copy had CRLF line endings)
atiernan Nov 16, 2026
48eb51c
Plan the JS engine as an embeddable library
atiernan Nov 16, 2026
6c4ce11
xtask: skip the inventory walk test under Miri, which forbids file ac…
atiernan Nov 16, 2026
0fc2558
Merge main into claude/js-jit-compiler-next-21ddc8 (CI tests only the…
atiernan Nov 20, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Line endings are part of the data: vendored test suites and certdata.txt are
# compared byte for byte, so a checkout must never rewrite them to CRLF.
* text=auto eol=lf

# Test262 tests use CR, CRLF, U+2028 and lone line terminators on purpose: store them as they are.
crates/clazel-js-lexer/tests/data/test262/** -text
16 changes: 16 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 19 additions & 0 deletions crates/clazel-js-lexer/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[package]
name = "clazel-js-lexer"
version = "0.0.0"
edition.workspace = true
license.workspace = true
publish.workspace = true
description = "The JavaScript lexer for Clazel's Phase 7 browser (phase-7.md item 7.2): ECMA-262 section 12 source text to tokens, the goal symbol an input."

# Verification tier (docs/VERIFICATION.md). `tier` is what is proven about the
# shipped code today; `target-tier` is what the policy requires, since this
# lexes scripts a page chose (phase-7.md 7.0(a)). Tier 0: this is only the
# skeleton that holds the test data of item 7.1. The contracts come first
# (rule 3), in item 7.2.
[package.metadata.clazel]
tier = 0
target-tier = 2

[lints]
workspace = true
23 changes: 23 additions & 0 deletions crates/clazel-js-lexer/SPEC-PIN.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# The language spec pin (phase-7.md item 7.1)

## The language spec: ECMA-262, 2026 edition

Upstream: https://github.com/tc39/ecma262
Edition: ES2026, tag `es2026` (an annotated tag, object `f7db29f16c5175a93f0d6e8fb27a8e3cb9b97a9e`, dated 2026-07-02)
Commit: 0248456c758431e4bb8e5d26333ff1865123c9cd
Commit date: 2026-03-31 (the `es2026-candidate-2026-03-31` tag is the same commit)
License: Ecma International's software and document licences (the text is not copied here)

**The spec text is not vendored.** Nothing reads it: the lexer's spec (item 7.2) is
transcribed by hand with the section and step numbers quoted (CLAUDE.md rule 5,
docs/SPEC-STYLE.md), and its header names this commit. A copy of `spec.html`
(about 3 MB, plus its Unicode property tables) would be a file no tool checks. Vendor
it, with a converter, only if a later item reads it (for example, to check the
transcribed grammar against the spec's own grammar productions).

The newer tag `es2026-errata` (`d89c03f2db8a597bc915b363a6518d0cc8acdbc0`) holds
editorial fixes made after publication. It is not the edition, so it is not the pin.


Test262's pin is in `tests/data/test262/SOURCE.md`, with the subset vendored and why.
It is the last Test262 commit before the commit above.
7 changes: 7 additions & 0 deletions crates/clazel-js-lexer/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
//! The JavaScript lexer for Clazel's Phase 7 browser (phase-7.md item 7.2).
//!
//! Empty for now: item 7.1 only creates the crate, so that the test data
//! (`tests/data/`) has a home. The spec and its contracts come first (CLAUDE.md
//! rule 3), then the implementation.
//!
//! Tier: see `[package.metadata.clazel]` in `Cargo.toml` and `docs/VERIFICATION.md`.
28 changes: 28 additions & 0 deletions crates/clazel-js-lexer/tests/data/test262/LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
Test262: ECMAScript Test Suite ("Software") is protected by copyright and is being
made available under the "BSD License", included below. This Software may be subject to third party rights (rights
from parties other than Ecma International), including patent rights, and no licenses under such third party rights
are granted under this license even if the third party concerned is a member of Ecma International. SEE THE ECMA
CODE OF CONDUCT IN PATENT MATTERS AVAILABLE AT https://www.ecma-international.org/ipr FOR
INFORMATION REGARDING THE LICENSING OF PATENT CLAIMS THAT ARE REQUIRED TO IMPLEMENT ECMA INTERNATIONAL STANDARDS*.

Copyright (C) 2012 Ecma International
All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following
disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
following disclaimer in the documentation and/or other materials provided with the distribution.
3. Neither the name of the authors nor Ecma International may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE ECMA INTERNATIONAL "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
SHALL ECMA INTERNATIONAL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE.

* Ecma International Standards hereafter means Ecma International Standards as well as Ecma Technical Reports
32 changes: 32 additions & 0 deletions crates/clazel-js-lexer/tests/data/test262/SOURCE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Test262, the ECMAScript conformance suite (the syntax subset)

Upstream: https://github.com/tc39/test262
Commit: e91219cb6b87865703ce8619b5bc0f7c2bf608e1
License: BSD-3-Clause (`LICENSE.md`, the repository's `LICENSE`; each test file also carries its own copyright header, kept as it is)
Subset: from `test/language/`, every test whose frontmatter has `negative:` with phase `parse`, `early` or `resolution`, and every test under the lexical directories `asi`, `comments`, `directive-prologue`, `future-reserved-words`, `identifier-resolution`, `identifiers`, `keywords`, `line-terminators`, `literals`, `punctuators`, `reserved-words`, `source-text`, `statementList`, `types` and `white-space`; plus every `*_FIXTURE.js` in a directory that holds a vendored test, all of `harness/`, and `features.txt`.

The commit is Test262's last before the pinned ECMA-262 2026 commit (2026-03-30; see
`SPEC-PIN.md` in the crate's root). Test262 has no edition tags.

The files are copied byte for byte, under the same paths as upstream (`test/language/...`,
`harness/...`, `features.txt`). `.gitattributes` stores them without line-ending conversion: some
tests use CR, CRLF and the Unicode line separators on purpose.

5,422 files, 8,297,553 bytes (LICENSE.md and SOURCE.md not counted): 5,212 tests (and their fixtures), `harness/` and `features.txt`.

What it is for: items 7.2 and 7.3 (the lexer and the parser) run the tests that parse or
fail to parse; the negative ones carry the early errors. The tests of the rest of
`test/language/` (positive ones in `expressions/` and `statements/`), `test/built-ins/`
and `test/annexB/` are not vendored: they join with the items that record their
results (phase-7.md 7.7 to 7.11). The Intl, Temporal, Atomics and SharedArrayBuffer
directories never will, by 7.0(b).

`xtask/src/testdata/test262.rs` converts it into `tests/generated/test262.rs`, one row per
test with its frontmatter (`flags`, `features`, `includes`, `negative`) and whether it is an
expected failure, with the reason: a feature excluded by 7.0(b), or newer than the edition
(263 tests). The table also holds a SHA-256 over every vendored file, so an edit to a
harness file or a fixture makes it stale. To update, copy the subset from a newer commit,
change the commit above, and run `cargo xtask testdata`.

This is an official suite (the language committee's own), so it is rule 7's evidence
for the lexer and the parser.
Loading
Loading