Skip to content
Draft
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
13ccb16
Fix raw numeric lowering guards and verification
andrewtdiz Jun 17, 2026
e79353b
Harden raw numeric fallback lowering
andrewtdiz Jun 17, 2026
6f13552
Tighten compiler output stdout gates
andrewtdiz Jun 17, 2026
2bcfd62
Fix native ABI hot-loop runtime gates
andrewtdiz Jun 17, 2026
56ee9e8
Implement packed f64 loop versioning
andrewtdiz Jun 17, 2026
2e34c78
Tighten typed-array lowering proof gates
andrewtdiz Jun 17, 2026
9f48322
Fix type lowering runtime blockers
andrewtdiz Jun 18, 2026
f69116b
Resolve type lowering delivery blockers
andrewtdiz Jun 18, 2026
2305c4e
Complete representation-aware type lowering
andrewtdiz Jun 18, 2026
397e9a2
Checkpoint representation-aware type lowering progress
andrewtdiz Jun 19, 2026
8758c35
Add typed i32 method clones
andrewtdiz Jun 19, 2026
4d8df5a
Land type lowering material evidence gate (#5462)
andrewtdiz Jun 19, 2026
f0aa40a
Merge origin/main into codex/type-lowering-runtime-20260616
Jun 19, 2026
20dff12
fix(codegen,ci): drop redundant init-string write barrier; allowlist …
Jun 19, 2026
2e72495
Merge origin/main (WeakMap/WeakSet #5468, fetch #5463) into type-lowe…
Jun 19, 2026
7d0a265
lint: add GC_STORE_AUDIT(POINTER_FREE) markers to two type-lowering s…
Jun 19, 2026
aa3ba7f
Merge branch 'main' into codex/type-lowering-runtime-20260616
claude Jun 20, 2026
25792bd
fix(codegen+runtime): address CodeRabbit review on representation-awa…
claude Jun 20, 2026
24bfe00
revert: keep h1_buffer_alias_negative closureCapture reading owned[i]…
claude Jun 20, 2026
1e3d9bc
fix(codegen): drop the int→fp index conversion from the numeric-array…
claude Jun 20, 2026
9af541c
fix(codegen): constrain Math.abs(arr[i]) fabs fold to proven packed-f…
claude Jun 20, 2026
b5e89c0
fix(codegen): don't coerce await/yield results to f64 (representation…
claude Jun 20, 2026
44bbff2
fix(codegen): don't clobber the box pointer when pushing to a boxed+c…
claude Jun 20, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
84 changes: 84 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -517,6 +517,9 @@ jobs:
- name: Run harness unit tests
run: python3 -m unittest tests.test_compiler_output_regression

- name: Run native ABI evidence report unit tests
run: python3 -m unittest tests.test_native_abi_evidence_report

- name: Gate native-region proof compiler output
run: |
python3 scripts/compiler_output_regression.py suite \
Expand All @@ -525,8 +528,25 @@ jobs:
--benchmark-mode smoke \
--runs 1 \
--perf-counters off \
--gate \
--print-summary

- name: Gate native-ABI proof compiler output
run: |
python3 scripts/compiler_output_regression.py suite \
--suite native-abi-proof \
--perry target/debug/perry \
--benchmark-mode smoke \
--runs 1 \
--perf-counters off \
--gate \
--print-summary

- name: Gate typed feedback runtime evidence
env:
PERRY_BIN: ${{ github.workspace }}/target/debug/perry
run: python3 -m unittest tests.test_typed_feedback_runtime_evidence

- name: Gate positive vectorization compiler output
run: |
python3 scripts/compiler_output_regression.py capture \
Expand Down Expand Up @@ -582,6 +602,70 @@ jobs:
name: compiler-output-regression
path: target/compiler-output-regression/

# ---------------------------------------------------------------------------
# Native ABI evidence packet
#
# Full material-performance packet for the type-lowering gate. This is heavier
# than the per-PR compiler-output smoke because it runs the native-ABI proof
# packet with timing-quality samples, runtime checks, and release/LTO symbol
# freshness. Gate tag pushes and opt-in PR/manual runs; ordinary PRs rely on
# the lighter report/unit and compiler-output structural gates above.
# ---------------------------------------------------------------------------
native-abi-evidence-packet:
if: >-
github.event_name == 'push' ||
(github.event_name == 'workflow_dispatch' && inputs.run_extended_tests) ||
(github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'run-extended-tests'))
runs-on: ubuntu-latest
timeout-minutes: 90
env:
RUSTC_WRAPPER: sccache
SCCACHE_GHA_ENABLED: "false"
SCCACHE_DIR: ${{ github.workspace }}/.sccache
SCCACHE_CACHE_SIZE: "12G"
CARGO_INCREMENTAL: "0"
steps:
- uses: actions/checkout@v6

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable

- name: Install sccache
uses: mozilla-actions/sccache-action@v0.0.10

- name: Cache sccache objects
uses: actions/cache@v4
with:
path: ${{ github.workspace }}/.sccache
key: sccache-${{ runner.os }}-perry-native-abi-evidence-${{ github.run_id }}
restore-keys: |
sccache-${{ runner.os }}-perry-

- uses: Swatinem/rust-cache@v2
with:
shared-key: "${{ runner.os }}-perry"
save-if: ${{ github.ref == 'refs/heads/main' }}

- name: Install clang
run: |
sudo apt-get update
sudo apt-get install -y clang

- name: Gate native ABI evidence packet
env:
RUSTC_WRAPPER: ""
RUSTFLAGS: -Awarnings
run: |
PYTHON=python3 bash tests/test_native_abi_evidence_packet_smoke.sh \
target/native-abi-evidence-packet

- name: Upload native ABI evidence packet
if: always()
uses: actions/upload-artifact@v7
with:
name: native-abi-evidence-packet
path: target/native-abi-evidence-packet/

# ---------------------------------------------------------------------------
# Parity tests (Perry output vs Node.js)
# ---------------------------------------------------------------------------
Expand Down
29 changes: 29 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,32 @@
## v0.5.1198 — feat(codegen): representation-aware type lowering + native-ABI material evidence gate

Merges the representation-aware type-lowering track (`codex/type-lowering-runtime-20260616`)
into `main`. Builds on the earlier #5291 landing; the most recent integration was #5462 (the
material evidence gate). Merged via PR #5466.

**Type lowering.** Native representations (i32 / u32 / f64 / i128-BigInt / StringRef) with
runtime-guarded fast/fallback splits for scalar params, number-keyed `Map`/`Set`, typed string
and i32 methods, and packed numeric array loops (f64 + i32 loop versioning). The fast i32/u32
array paths are gated on the declared element type (`Int32[]` / `PerryU32`), so plain `number[]`
arrays always take the f64 path. Small-BigInt literals lower to native i128.

**Material evidence gate.** A differential A/B CI gate (typed vs `any`-typed control fixtures)
that recomputes speedups and instruction-counter reductions from real `-O3` IR plus GC-trace
counts, with anti-gaming guards (positive-control-baseline requirement, manifest-identity check,
trace-enabled requirement). Backed by 185 codegen regression tests, negative/invalidation tests,
and a 101-symbol release-sentinel `nm` check. Heavy packet runs on tag pushes / opt-in PR labels;
ordinary PRs run the lighter structural + unit gates.

**Merge notes.** `main` had carried an earlier version of this code (#5291) and evolved it
further, so this was a semantic merge across the shared codegen/runtime surface. Resolutions
preferred the feature branch where it strictly superseded, and folded in main-only changes
including the `Set.add` write-back SIGSEGV bugfix (Next.js turbopack `loadedChunks.add`), the
#5334 class-field-set barrier-elision / fallback-outlining, and the size-optimize feature gating.
One HEAD-only IR-shape regression test (`boxed_local_slot_uses_i64_js_value_bits_until_helper_edges`)
was updated to assert the box-bits ABI invariant (no raw `double` operand reaches a bits helper)
rather than one exact instruction sequence, since main's constant lowering now folds the
`undefined` slot default straight to i64 bits. Follow-ups tracked in #5464.

## v0.5.1197 — feat(runtime): #2656 — make WeakMap/WeakSet actually weak

WeakMap/WeakSet previously stored entries as plain `[key, value]` pair arrays that the
Expand Down
2 changes: 1 addition & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co

Perry is a native TypeScript compiler written in Rust that compiles TypeScript source code directly to native executables. It uses SWC for TypeScript parsing and LLVM for code generation.

**Current Version:** 0.5.1197
**Current Version:** 0.5.1198


## TypeScript Parity Status
Expand Down
Loading
Loading