Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 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
3d88bc6
Merge remote-tracking branch 'origin/main' into codex/type-lowering-r…
Jun 20, 2026
ff0d697
fix(codegen): #5464 — degrade unreachable packed-U32 loop store to fu…
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
737226b
Merge remote-tracking branch 'origin/codex/type-lowering-runtime-2026…
Jul 2, 2026
42d2ca8
Merge remote-tracking branch 'origin/main' into codex/type-lowering-r…
Jul 2, 2026
7e0ea5d
test(codegen): #5464 — pin PerryU32[] store routing to the generic fu…
Jul 2, 2026
0b36ff5
fix(codegen): keep the dynamic index-set RHS on the js_value_bits evi…
Jul 2, 2026
6532513
test(harness): follow the PERRY_GC_TRACE diagnostics wiring to optimi…
Jul 2, 2026
c3c63e2
fix(codegen+runtime): CodeRabbit review on #5466 — spec-correct ToInt…
Jul 2, 2026
c99896a
chore(release): v0.5.1213 — version bump + changelog for #5466 repres…
Jul 2, 2026
8baefc5
Merge remote-tracking branch 'origin/main' into codex/type-lowering-r…
Jul 2, 2026
59f548c
fix(fixtures): restore the tracked native-memory-fixture package files
Jul 2, 2026
5baa01d
fix(codegen): split ToInt32 — exact modular wrap at user-semantic bit…
Jul 2, 2026
3deec46
fix(codegen): keep lower_expr_native's i32 materialization on the lea…
Jul 2, 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
35 changes: 35 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,38 @@
## v0.5.1213 — representation-aware type lowering + native-ABI material evidence gate (#5466)

Lands the type-lowering track on main (builds on #5291; integrates #5462's
material evidence gate, #5464's packed-loop follow-ups, and the CodeRabbit
review fixes).

- **Representation-aware type lowering**: i32/u32/f64/i128(BigInt)/StringRef
native reps with runtime-guarded fast/fallback splits for scalar params,
number-keyed Map/Set, typed string/i32 methods, typed function/closure/method
clones (f64/i32/i1/string families), and packed numeric array loops (f64 +
i32 loop versioning with side-exit slow clones). `lower_expr` now
speculatively tries the native-rep value path for every expression and
materializes through the evidence-recording boundary.
- **Native-ABI material evidence gate**: differential typed-vs-`any` CI gate
recomputing speedups/counter reductions from real `-O3` IR + GC traces with
anti-gaming guards; 185+ codegen proof-suite regression tests; release-symbol
sentinel check; `--explain-lowering` user-facing report.
- **ToInt32 correctness (pre-existing, surfaced by review)**: the guarded
`toint32` lowering now performs the spec's modular reduction instead of a
bare `fptosi`, so finite values ≥ 2^63 (`(1e20) | 0`, nested integer-local
multiplies) wrap to the correct int32 instead of LLVM-poison NaN; the
`toint32_fast` gate (`is_known_finite`) is now a conservative magnitude-bound
proof. New `test_gap_toint32_large_finite.ts`.
- **Review fixes**: closure-captured buffer locals can no longer receive
unchecked native-pointer proofs before an escape walk stamps the hazard map;
`invalidate_local_write_facts` drops reverse local-value alias chains;
runtime-key array stores register the `array_set_index_or_string` typed-
feedback contract matching the emitted helper; `typed_i1_functions` is
plumbed into `FnCtx` so the i1 typed-call branch gates like its siblings.
- Verified: the three pre-merge runtime regressions (Array.fromAsync,
dynamic-import namespace, fetch headers.forEach) match node byte-for-byte;
16-test gap differential clean (3 pre-existing mismatches attributed to main
via control binary); evidence suites, typed-feedback runtime evidence, and
capture workloads green.

## v0.5.1212 — fix(runtime): #5839 — PlainYearMonth/PlainMonthDay toLocaleString reject ISO calendar

Part of the #5839 Temporal test262 worklist (56 failing built-ins/Temporal + intl402/Temporal cases). Picked the `toLocaleString/calendar-mismatch.js` "even when instance has the ISO calendar" cluster as a coherent, self-contained fix.
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.1212
**Current Version:** 0.5.1213


## TypeScript Parity Status
Expand Down
Loading
Loading