Commit Graph
109 Commits
Author SHA1 Message Date
Chris Tate 9bff53676e feat: statically lower remaining Math functions (#397)
- Lower tan, asin, acos, atan, cbrt, and sign in C and LLVM.
- Add Node differential coverage and refresh surface and profile fixtures.
2026-09-23 22:21:48 -05:00
Chris Tate 7482bc773b feat(math): add static support for analytic functions (#395)
- Lower ten Math methods through C and LLVM, including variadic hypot.
- Match JavaScript numeric edge cases and add differential coverage.
2026-09-23 19:12:54 -05:00
Chris Tate c8b42772a8 fix(http): enforce HTTP/1.1 Host requirement (#388)
* fix(http): enforce HTTP/1.1 Host requirement

- Enforce Node's default Host behavior while preserving opt-out and HTTP/1.0 handling.

- Match the 400 wire response and add C/LLVM differential coverage.

* feat(http): add static HTTP trailer and streaming support

- Parse incoming chunk trailers and expose distinct/raw trailer reads.
- Frame outgoing trailers and add streaming controls with differential coverage.

* fix(http): harden request trailer parsing

- Safely discard trailers after early responses while preserving parser validation.
- Bound aggregate head and trailer parsing by bytes and field count.
- Add regressions for early response trailers and overflow rejection.
2026-09-23 10:21:53 -05:00
Chris Tate 1b2b39f565 Support scoped computed EventEmitter names (#389)
* Support scoped computed EventEmitter names

* Record order baselines for computed event fixtures
2026-09-23 00:38:45 -05:00
Chris Tate e334ae444e feat(child_process): support inline execFile callback options (#387)
* feat(child_process): lower UTF-8 execFile callback options

* test(ts7): record execFile callback options fixture order
2026-09-23 00:13:44 -05:00
Chris Tate 9ff5ed1680 feat(child_process): support static fork IPC (#386)
* feat(child_process): support static fork IPC

* fix(child_process): fix fork discovery and send callbacks
2026-09-22 23:24:07 -05:00
Chris Tate 15fb993111 feat(compiler): expand static Date, process, and URL support (#379)
* feat(compiler): lower Date.parse through native parser

* feat(compiler): support exit status writes and URL getters

* chore(compat): regenerate static support after upstream changes

* test: update URL fence hint snapshot

* test: record new corpus entries for TS7 parity

* test: record upstream lstat parity entry
2026-09-22 20:13:14 -05:00
Chris TateandHagege Ruben c9cad7a0ba fix(child_process): support shell text capture (#377)
- add cross-platform shell spawning and close lifecycle support
- decode encoded child output across native read boundaries
- cover the supported surface with differential compatibility evidence

Fixes #370

Co-authored-by: Hagege Ruben <20857346+HagegeR@users.noreply.github.com>
2026-09-22 18:03:52 -05:00
Chris Tate f2c81630ef Add static loose equality (#364) 2026-09-20 20:46:52 -05:00
Chris Tate 69977b9fd0 Add static literal dynamic imports (#363) 2026-09-20 15:59:34 -05:00
Chris Tate 4e175f4d72 Add static node:module parity (#361) 2026-09-20 14:44:19 -05:00
Chris Tate d6657921f5 Add static zlib callback codecs (#356) 2026-09-20 09:10:07 -05:00
Chris Tate e82dc998c4 Add static one-shot zlib codecs (#355) 2026-09-20 01:21:41 -05:00
Chris Tate c33a18d421 Add static fs function values (#354)
* Add static fs function values

* Fence option-sensitive fs function values
2026-09-19 23:11:24 -05:00
Chris Tate 5ae6705e38 Add static builtin function values (#353) 2026-09-19 21:49:21 -05:00
Chris Tate bf6dfb882b Add static Node path function values (#352)
* Add static Node path function values

* Preserve JavaScript builtin alias fences
2026-09-19 12:24:40 -05:00
Chris Tate 37f9438084 Add static fixed-tuple call spreads (#351) 2026-09-19 00:00:26 -05:00
Chris Tate a11fd6c881 Add static callable specialization (#350) 2026-09-18 22:50:45 -05:00
Chris Tate 1600935411 Add static-native BigInt support (#346)
* feat: add static BigInt support

* fix: prevent BigInt width overflow on WASI

* fix: harden BigInt formatting sizes

* test: record BigInt WASI parity baseline
2026-09-18 00:21:12 -05:00
Chris Tateandeuxaristia 5e4b4df1b9 feat(child_process): support writable child stdin (#341)
* feat(child_process): support writable child stdin

- Add nonblocking child stdin writers with lifecycle events and platform-aware backpressure.
- Lower writable streams through the C and LLVM backends while fencing unsupported overloads.
- Add differential, type, diagnostics, and compatibility coverage.

Fixes #311

Co-authored-by: euxaristia <25621994+euxaristia@users.noreply.github.com>

* Reject non-literal spawn options

- Emit a named lowering diagnostic instead of silently dropping variable options.
- Cover two- and three-argument spawn overloads with diagnostic regressions.

Fixes #311

Co-authored-by: euxaristia <25621994+euxaristia@users.noreply.github.com>

---------

Co-authored-by: euxaristia <25621994+euxaristia@users.noreply.github.com>
2026-09-17 07:48:29 -05:00
Chris Tate fcacc4d4b0 feat: add static CommonJS module graph (#332) 2026-09-15 21:17:31 -05:00
Chris Tate 280fe1a8da feat: preserve class and child handles through unknown (#331)
* feat: preserve class and child handles through unknown

* fix: hide private fields from unknown views
2026-09-15 19:30:22 -05:00
Chris Tate 5a782a6150 feat: add static async iteration parity (#328) 2026-09-15 00:03:07 -05:00
Chris Tate 2ac8743dbb feat(compiler): add Node module resolution introspection (#322) 2026-09-14 18:15:44 -05:00
Chris TateandPaolo Anzani 2bfc37b138 fix(compiler): support branded primitive types (#320)
Co-authored-by: Paolo Anzani <201222836+paoloanzn@users.noreply.github.com>
2026-09-14 13:46:36 -05:00
Chris Tate 073c840564 Enforce TypeScript 7 and Node type-link parity (#315)
* Enforce TypeScript 7 and Node type-link parity

* fix(compiler): normalize Windows resolver paths

* fix(compiler): canonicalize Windows realpaths
2026-09-14 09:19:08 -05:00
Chris Tate a8a5204574 Implement typed async generators (#310) 2026-09-14 00:38:06 -05:00
Chris Tate 9fb0620f06 Implement explicit resource management (#309) 2026-09-13 23:34:17 -05:00
Chris Tate 94fd361b54 Implement sparse native arrays and missing-value parity (#297)
Represent ordinary JavaScript arrays with hole, value, and explicit-undefined states; add sparse side storage and carry missing values through the frontend, native backends, runtime, and Node-facing consumers.
2026-09-12 22:39:07 -05:00
Chris Tate 0bf47eb87e feat: support static ESM import metadata 2026-09-02 18:18:09 -05:00
Chris Tateandyowainwright 1071b87d77 Lower Math.PI and Math.E statically (#279)
Co-authored-by: yowainwright <1074042+yowainwright@users.noreply.github.com>
2026-09-01 00:47:23 -05:00
Chris Tate 6310dfb960 Reuse reachability lowering output (#178)
* Reuse reachability lowering output

- Retain reachable IR and assemble the emitted module without lowering bodies a second time
- Preserve reached-only artifact filtering, coverage remainder behavior, and add lowering phase timing

* Preserve record order in retained lowering

* Preserve record order in retained helpers

* Preserve generic lowering record order

* Recheck retained generic rest order

* Record retained lowering parity fixtures

* Preserve retained lowering failure parity
2026-08-20 14:01:39 -05:00
Jimmy Miller b98b7c4a49 fix(compiler): guard zero-arg dynamic filter calls 2026-08-17 10:34:43 -04:00
Jimmy Miller 625a8ee6c0 fix(compiler): fence dynamic filter void predicates 2026-08-14 10:27:39 -04:00
Jimmy Miller 76dde4bf87 test(compiler): refresh filter void snapshot 2026-08-14 10:27:38 -04:00
Jimmy Miller 6f4592295f test(compiler): cover island filter void predicate 2026-08-14 10:27:38 -04:00
Jimmy Miller 4fe24e91d4 fix(compiler): clarify void filter predicate fence 2026-08-14 10:27:38 -04:00
Jimmy Miller 0bd90765cf feat(compiler): accept truthy (non-bool) filter predicates
`.filter(fn)` required the callback to return exactly bool. JS applies
ToBoolean to whatever the predicate answers, so `xs.filter((s) => s)` — the
idiomatic drop-the-falsy — was refused for no semantic reason.

The filter loop now wraps the call in the same toBool an `if` statement would
apply. A bool answer is unchanged and emits identical IR. A union answer
routes through its interned per-arm truthy helper, requested at the call site
where a real node exists for the diagnostic. A unit-only answer is constantly
falsy, and the call still runs for its effects.

The kinds with no native ToBoolean keep the fence: void has no value at all,
and dyn/jsval/caught truthiness needs the embedded engine.

Verified against Node: filtering strings, numbers, and a
`(string | undefined)[]` all print identically in both.

Diagnostics 100, filter corpus 9 across both
backends.
2026-08-14 10:27:38 -04:00
Jimmy Miller 990c7ce048 fix(compiler): preserve runtime-optional soundness 2026-08-13 15:47:45 -04:00
Chris Tate 4d96d2de28 feat(fs): support three-argument writeFile (#112)
* feat(fs): support three-argument writeFile

- Lower static UTF-8 encoding and mode options for fs/promises.writeFile.

- Add mode-aware runtime and backend support with promise rejection behavior.

- Cover supported options and failures in the differential corpus.

* fix fs write option evaluation and mode validation

* fix fs prototype-backed write options

* fix: preserve ignored write option semantics
2026-08-10 10:19:51 -05:00
Chris Tate b94c88e31c feat: support static non-UTF-8 TextDecoder labels (#111)
* feat: support static non-UTF-8 TextDecoder labels

- Recognize static WHATWG labels and aliases during builtin lowering.
- Add feature-gated portable decoders generated against the pinned Node runtime.
- Cover legacy encodings, malformed input, and unsupported dynamic labels.

* fix: match Node legacy decoder recovery

* fix TextDecoder edge-case parity

* fix(runtime): match Node malformed text decoding

* fix TextDecoder recovery edge cases
2026-08-09 23:15:51 -05:00
Chris Tate a9b6dba424 feat(string): support static split limits (#109)
* feat(string): support static split limits

- Lower split limits for string and literal RegExp separators across C and LLVM.
- Match JavaScript ToUint32 limit semantics in the runtime.
- Add differential coverage and refresh diagnostics and surface metadata.

* fix(string): default undefined split limits
2026-08-09 18:09:00 -05:00
Chris Tate f1066d7825 Support variable Buffer.toString encodings (#108)
* Support variable Buffer.toString encodings

- Lower runtime-valued BufferEncoding arguments through checked C and LLVM paths.
- Normalize aliases and casing while preserving Node unknown-encoding errors.
- Add differential coverage and remove the obsolete diagnostic fence.

* fix(buffer): preserve unknown encoding messages

* fix(buffer): preserve optional encoding defaults

* fix(runtime): handle empty Buffer decoding ranges
2026-08-09 17:23:13 -05:00
Chris Tateandsensei-woo e5c875bd97 Support Date instance lowering (#101)
* Support Date instance lowering

- Lower read-only Date values and constructors through the C and LLVM backends.

- Add portable calendar helpers, differential coverage, and documented surface contracts.

- Fence unsupported mutation, identity, locale, and component-constructor forms.

Co-authored-by: sensei-woo <sensei-woo@users.noreply.github.com>

* Fix Date exception and timezone semantics

* fix: harden Date lowering edge cases

* fix Date lowering edge cases

* Fix Date union fences and offset clipping

---------

Co-authored-by: sensei-woo <sensei-woo@users.noreply.github.com>
2026-08-08 23:17:58 -05:00
Chris Tate 782d3b8451 fix(compiler): support implicit top-level await modules (#94)
* fix(compiler): support implicit top-level await modules

- Match Node 24 syntax detection by treating top-level await as an ES module marker.

- Add differential corpus coverage for TypeScript files without explicit imports or exports.

* fix Node ESM classification for top-level await

* fix ESM require diagnostics and classification caching

* fix require binding and package type precedence

* fix: align top-level await module detection with Node
2026-08-08 11:35:01 -05:00
Chris Tate 52459a86d4 feat(compiler): lower stored text codec calls (#85)
* feat(compiler): lower stored text codec calls

- Lower same-scope const TextEncoder and TextDecoder call receivers without runtime instances.
- Preserve fences for escaping, captured, and imported codec values with actionable diagnostics.
- Add differential, diagnostic, and preflight baseline coverage for the supported idiom.

* fix(compiler): fence deferred text codec calls

* fix text codec switch-clause TDZ handling
2026-08-02 21:24:33 -05:00
Chris Tate 334febe43d fix(fetch): address remaining review findings 2026-07-30 22:48:36 -05:00
Chris Tate 8790cefbab fix(fetch): address review feedback 2026-07-30 11:35:00 -05:00
Chris Tate dafd7ac647 fix: close static fetch parity gaps 2026-07-30 11:35:00 -05:00
Chris Tate f11e51256c feat: make fetch static-compatible
- Add native RequestInit, AbortSignal, and streaming request and response body support.
- Lower the static fetch surface through both C and LLVM without the embedded engine.
- Add differential, Node-typing, sanitizer, and regression coverage.
2026-07-30 11:34:59 -05:00