Commit Graph
469 Commits
Author SHA1 Message Date
Chris Tate a3552e9477 chore: clear remaining lint errors 2026-09-14 19:35:08 -05:00
Chris Tate 82a7d7591d refactor(compiler): split container lowering modules 2026-09-14 19:34:54 -05:00
Chris Tate 5a48403470 refactor(compiler): split expression lowering modules (#324) 2026-09-14 18:45:03 -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 TateandMateus Mamede Lage 16de852347 fix(compiler): lower dynamic any-local operators (#319)
Fixes #290

Co-authored-by: Mateus Mamede Lage <23098414+mmamedel@users.noreply.github.com>
2026-09-14 12:31:25 -05:00
Chris Tate 74dce238ab perf(runtime): scale URLSearchParams sorting (#318) 2026-09-14 11:53:42 -05:00
Chris Tateand2youg1 b74364ed01 fix(compiler): preserve leading BOM literals (#316)
Co-authored-by: 2youg1 <65069696+2youg1@users.noreply.github.com>
2026-09-14 10:29:16 -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 d7aed4b722 Unify TS 7 project module resolution (#308) 2026-09-13 21:53:45 -05:00
Chris Tate ce8419781e chore(release): prepare v0.1.1 (#307) 2026-09-13 20:09:18 -05:00
Chris Tate e640b4b2ff chore(release): prepare v0.0.37 (#298) 2026-09-13 00:21:54 -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 4b241f77d7 Replace quadratic array sorting with stable merge sort (#296)
* Fix Sandbox command transport and pinned native setup

Build the Linux LLVM helper and runtime pack before running both test lanes, and align native cache contracts with the current target policy. Full managed Sandbox gate passed.

* Replace quadratic array sorting with stable merge sort

Cover sort snapshots, consistent-comparator results, stable ties, and comparator complexity with Node differential fixtures. Document differences from V8 TimSort.
2026-09-12 16:05:16 -05:00
Chris Tate 8227a5ad9c Fix Sandbox command transport and pinned native setup (#295)
Build the Linux LLVM helper and runtime pack before running both test lanes, and align native cache contracts with the current target policy. Full managed Sandbox gate passed.
2026-09-12 15:59:01 -05:00
Chris Tate bf32f155fc test: record TS7 order parity baselines (#285) 2026-09-02 20:08:06 -05:00
Chris Tate 0bf47eb87e feat: support static ESM import metadata 2026-09-02 18:18:09 -05:00
Chris Tate c41f1a8be9 Expand LLVM native output targets (#280)
* Expand LLVM native output targets

- Add owned helper and runtime-pack contracts for macOS x64, Linux glibc/musl, Windows x64, and WASI.
- Generalize LLVM target selection, package validation, linker plans, and release/CI matrices.
- Document linker boundaries and add focused native-output and runtime-pack coverage.

* Pin Windows LLVM helper CI to VS 2022

The official LLVM archive needs the Visual Studio 2022 CMake generator, which is not guaranteed by windows-latest.

* Align bootstrap cache with LLVM runtime-pack builds

Use the same target-specific helper and linker identity before and after compiler loading so routed executable cache hits remain lightweight.

* Install Windows LLVM CI tools with Chocolatey

windows-2022 includes Visual Studio but not winget; use its available Chocolatey bootstrap for CMake and Ninja.

* Prevent Zig version probes from leaving runtime-pack objects

Run runtime-pack compiler version probes in a private temporary directory and remove the accidental tracked WASI a.o file.

* Use 7-Zip for Windows LLVM setup

Extract the official LLVM development archive with two-stage 7-Zip instead of Windows tar.exe, which timed out while materializing the toolchain tree.

* Define ssize_t for the MSVC runtime pack

Clang's MSVC target does not expose POSIX ssize_t through sys/types.h; define the pointer-sized runtime type without affecting MinGW.

* Build the Windows runtime pack with Zig

Use the MinGW-compatible Windows sysroot required by the runtime while retaining COFF helper output and installing Zig in the Windows native CI lane.

* Give macOS LLVM differential shard time to finish

Shard 1 passed its setup and focused contracts but was cancelled during its cold LLVM differential slice at the 20-minute job limit.
2026-09-01 13:41:34 -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 1cec922d95 Separate native linking from C compilation (#278)
* Separate native linking from C compilation

 - Split the helper-object runtime-pack path into explicit link planning and platform linking.
 - Reserve SCRIPTC_LINKER for object-only executable links while retaining a deprecated SCRIPTC_CC compatibility path.
 - Add no-legacy-C coverage and document the linker/SDK boundary.

* Preserve runtime pack link errors

* Fix linker cache invalidation and warnings

* Fix C executable cache routing

- Keep explicit C builds on compiler-backed cache identities.
- Cover linker-only environment changes across exact C repeats.
2026-08-31 20:29:59 -05:00
Chris Tateandmmamedel 9080986166 Add sparse UTF-16 indexing for large strings (#275)
* fix: index large unicode strings sparsely

Co-authored-by: mmamedel <23098414+mmamedel@users.noreply.github.com>

* fix: retain sparse anchors for long ascii prefixes

Co-authored-by: mmamedel <23098414+mmamedel@users.noreply.github.com>

* fix: skip sparse index for proven ASCII strings

Co-authored-by: mmamedel <23098414+mmamedel@users.noreply.github.com>

* fix: complete sparse UTF-16 string indexing

Co-authored-by: mmamedel <23098414+mmamedel@users.noreply.github.com>

* test: rebase static size contracts for sparse index

Co-authored-by: mmamedel <23098414+mmamedel@users.noreply.github.com>

* test: retain sparse checkpoints through ASCII prefix end

Co-authored-by: mmamedel <23098414+mmamedel@users.noreply.github.com>

* fix: retain sparse anchors across threshold append

Co-authored-by: mmamedel <23098414+mmamedel@users.noreply.github.com>

* fix: retain sparse indexes beyond cursor cache

Co-authored-by: mmamedel <23098414+mmamedel@users.noreply.github.com>

* fix: bound sparse string index residency

Co-authored-by: mmamedel <23098414+mmamedel@users.noreply.github.com>

* fix: isolate sparse string index residency

Co-authored-by: mmamedel <23098414+mmamedel@users.noreply.github.com>

* test: restore parseInt oracle outputs

* test: verify committed string oracle

- Regenerate the string case oracle with the active Node executable.\n- Compare the checked-in fixture byte-for-byte before native runtime checks.\n- Keep the Linux parseInt ULP allowance scoped to native output.

---------

Co-authored-by: mmamedel <23098414+mmamedel@users.noreply.github.com>
2026-08-31 17:12:52 -05:00
Chris Tate 19898f1d7b chore(release): v0.0.36 (#277) 2026-08-31 17:12:16 -05:00
Chris TateandFlora90001 55ee396738 Support reusePort for TCP and HTTP server listeners (#274)
* feat(net): support reusePort server listen options

Co-authored-by: Flora90001 <163703040+Flora90001@users.noreply.github.com>

* fix(net): match reusePort boolean semantics

Co-authored-by: Flora90001 <163703040+Flora90001@users.noreply.github.com>

* feat(net): support reusePort server listen options

Co-authored-by: Flora90001 <163703040+Flora90001@users.noreply.github.com>

* test(net): close listeners on successful conflict probe

Co-authored-by: Flora90001 <163703040+Flora90001@users.noreply.github.com>

---------

Co-authored-by: Flora90001 <163703040+Flora90001@users.noreply.github.com>
2026-08-31 15:26:20 -05:00
Chris Tateandeuxaristia 1730676951 fix(compiler): keep targetless Zig native builds coherent (#273)
Co-authored-by: euxaristia <25621994+euxaristia@users.noreply.github.com>
2026-08-31 10:47:41 -05:00
Chris Tateandmmamedel 837f6bc62b Tree-shake unreachable executable runtime sections (#271)
* feat: tree-shake executable runtime sections

Co-authored-by: mmamedel <23098414+mmamedel@users.noreply.github.com>

* test: run runtime tree-shaking checks in sandbox

Co-authored-by: mmamedel <23098414+mmamedel@users.noreply.github.com>

* fix(runtime): release lazy process caches

Co-authored-by: mmamedel <23098414+mmamedel@users.noreply.github.com>

* test: stabilize runtime tree-shaking size guard

Co-authored-by: mmamedel <23098414+mmamedel@users.noreply.github.com>

---------

Co-authored-by: mmamedel <23098414+mmamedel@users.noreply.github.com>
2026-08-31 09:01:19 -05:00
Chris Tateandmmamedel 2b6e6524a3 fix(library): reject callback re-entry (#270)
Co-authored-by: mmamedel <23098414+mmamedel@users.noreply.github.com>
2026-08-30 19:30:31 -05:00
Chris Tateandmonteslu 4d9e2a2397 fix ffi call initializers (#268)
Co-authored-by: monteslu <423800+monteslu@users.noreply.github.com>
2026-08-30 19:23:04 -05:00
Chris Tateandmmamedel 0b1738d51e optimize string self-concatenation ownership (#267)
Co-authored-by: mmamedel <23098414+mmamedel@users.noreply.github.com>
2026-08-30 17:53:30 -05:00
Chris Tateandmmamedel 5b7a5bd82b fix(compiler): reshape inline record assertions (#266)
Co-authored-by: mmamedel <23098414+mmamedel@users.noreply.github.com>
2026-08-30 17:05:44 -05:00
Chris Tate 64b2a285d5 feat(runtime): ship precompiled macOS artifacts (#248)
* feat(runtime): ship precompiled macOS artifacts

- Add a versioned macOS arm64 runtime pack with deterministic feature selection and artifact verification.
- Link LLVM helper objects against release-built runtime and vendor inputs without compiling user-machine C.
- Wire package publishing, cache validation, documentation, and full-gate coverage for the new path.

* fix(runtime): harden precompiled artifact handling

* fix(runtime): make precompiled artifacts reproducible

* fix(runtime): reject opaque linkers from executable cache

* fix(runtime): normalize precompiled archive metadata

* fix(runtime): harden precompiled artifact caching

* fix(runtime): close executable cache link race

* fix(runtime): stage verified pack artifacts

* fix(runtime): bracket helper cache inputs

* fix(runtime): preserve executable link identity

* fix(runtime): trace selected linker dependencies
2026-08-28 09:29:21 -05:00
Chris Tate 73efea6ab3 feat(cli): expose native object link info (#247)
* feat(cli): expose native object link info

- add versioned, cache-independent native link metadata for program objects

- document the experimental runtime ABI and provide C-driver and Apple linker examples

- verify ABI mismatch, FFI parity, packed installs, and external linking in CI

* fix(example): validate native runtime pack identity
2026-08-27 13:47:09 -05:00
Chris Tate 401338f437 feat(compiler): add native LLVM object emission (#242)
* feat(compiler): add native LLVM object emission

- ship the pinned macOS arm64 LLVM helper and platform package
- add assembly/object CLI outputs, caching, diagnostics, and runtime ABI checks
- validate helper artifacts through CI, packaging, docs, and differential coverage

* fix(compiler): harden native LLVM emission

* fix(compiler): harden LLVM helper packaging

* fix(compiler): stabilize LLVM helper package size

* fix(compiler): harden native helper validation

* fix(compiler): harden LLVM helper verification

* fix(compiler): harden native object emission
2026-08-27 10:30:40 -05:00
Chris Tate 77fad3c4cc feat(cli): add source-level output kinds (#241)
* feat(cli): add source-level output kinds

- add typed IR, C, and LLVM primary artifacts without native toolchain discovery
- centralize output paths, compatibility validation, and stale artifact cleanup
- document and test the new CLI contract

* fix(cli): harden source output contracts

* fix(cli): harden source output compatibility
2026-08-26 15:26:24 -05:00
Chris Tate 73ee01d7ef refactor(llvm): split expression emission by family (#235)
* refactor(llvm): split expression emission by family

- Extract expression and support emission into focused LLVM modules.
- Partition library calls behind prefix-dispatched domain modules.
- Consolidate keyed-record reads behind one shared implementation.

* fix(llvm): preserve validation call routing
2026-08-24 07:28:38 -05:00
Chris Tate 22195f769d refactor(c): split expression emission by family (#233)
- Extract expression cases into focused literal, control, container, call, dynamic, and async emitters.
- Partition standard-library calls into prefix-dispatched domain families.
- Keep emitExpr as a thin exhaustive dispatcher with emission behavior unchanged.
2026-08-23 21:04:12 -05:00
Chris Tate 469efdd7f0 refactor: clarify compiler module boundaries (#232)
* refactor: clarify compiler module boundaries

- Rename backend, frontend, IR, and cache modules for explicit ownership.
- Split native cache/vendor and frontend shared concerns into focused modules.
- Expand compiler context names and refresh imports, tests, and documentation.

* fix: preserve renamed compiler interfaces
2026-08-23 20:16:13 -05:00
Chris Tate 844716b163 refactor: consolidate compiler helpers (#231)
- Share frontend package, CJS, lowering, and snapshot helpers.
- Consolidate vendor builds, manifest loops, and generic parameter shaping.
- Reuse LLVM truthiness and reference-counting skeletons.
2026-08-23 19:16:35 -05:00
Chris Tate b8e4d6e20e refactor: share compiler builder helpers (#230)
- Consolidate package exports resolution behind explicit condition sets.
- Share counted-loop construction across frontend IR and LLVM emission.
- Move backend-neutral IR analyses into the shared IR layer.
2026-08-23 18:07:36 -05:00
Chris Tate c6210788a7 refactor: share early cache primitives (#228)
- Extract common cache hashing, paths, payload I/O, and feature validation.
- Preserve library and executable stamp schemas and on-disk identities.
2026-08-23 17:02:51 -05:00
Chris Tate 2412b05289 refactor: share async generator scaffolding (#227)
- Extract per-backend argument-pack and trampoline prologue helpers.

- Preserve async promise and generator completion, drop, cache, and spawn epilogues.
2026-08-23 16:14:15 -05:00
Chris Tate c9f532f532 refactor: merge Set and Map intrinsic emission (#226)
- Route Map and Set operations through shared map-like emitters in both backends.
- Keep collection-specific get, set, add, iteration value, and array conversion lowering.
2026-08-23 15:34:36 -05:00
Chris Tate 14239698da refactor: centralize runtime fence deferral (#212)
- Add a shared deferToRuntimeFence helper for diagnostics, messages, and trap IR.
- Preserve statement, closure, function ABI, probe, and SC9001 behavior.
- Replace eight duplicated lowering paths with compact helper calls.
2026-08-23 13:54:40 -05:00
Chris Tate 1b26642633 refactor: share IR construction helpers (#211)
- Add typed builders for variable references and primitive literals.
- Replace duplicated lowering-local constructors with the shared API.
2026-08-23 13:09:32 -05:00
Chris Tate 876061ab71 refactor(compiler): centralize pointer kind sets (#210)
- Export canonical handle and pointer kind sets from the IR.
- Replace repeated C and LLVM dispatch ladders with membership checks.
- Preserve exhaustiveness and cover the scalar handle exception.
2026-08-23 09:18:07 -05:00
Chris Tate de81740174 Consolidate runtime RC symbol dispatch (#209)
- Define one exhaustive IR runtime RC stem table shared by refcount detection and both backends.
- Derive C and LLVM retain/release symbols while preserving shape-specific and ABI exceptions.
- Add focused coverage for runtime, object, record, and LLVM declaration paths.
2026-08-23 00:46:47 -05:00
Chris Tate f5f04a5f49 Improve compiler lint and error classification (#208)
* Warn on non-null assertions

- Surface non-null assertions during linting without making them blocking.

- Preserve existing assertion sites for opportunistic cleanup.

* Classify internal compiler errors

- Export InternalCompilerError and migrate compiler invariant throws without changing messages.

- Rename the native cache test to match cc.ts and update test scheduling references.

- Document test placement by unit, package integration, and cross-package scope.

* Fix internal compiler error classification
2026-08-23 00:02:28 -05:00
Chris Tate 97668de086 refactor(cc): narrow cache identity guards (#207)
- Bind cache roots and identities into typed cache capabilities.
- Thread narrowed identities through archive and executable cache keys.
- Remove the fragile cacheIdentity non-null assertions.
2026-08-22 20:27:46 -05:00
Chris Tate 27729aa24d fix(compiler): reset module caches between compiles (#206)
- Scope resolver, ccache, release identity, and fence taxonomy memoization to public compile invocations
- Add in-process reuse regressions for project realms, PATH changes, and library metadata
2026-08-22 19:19:35 -05:00