Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## v0.5.1215 — boxing analysis descends into labeled blocks (#5871)

Five walkers in perry-codegen's `boxed_vars.rs` had no `Stmt::Labeled` arm (while `collect_write_ids_in_stmt` did), so a captured variable reassigned — or captured — inside a labeled block was never boxed: closures kept a creation-time snapshot and never observed later writes. Signature: a captured array read `.length === 0` through the closure while `JSON.stringify` in the same scope printed all four elements — previously seen only inside large minified webpack bundles, which emit labeled early-exit blocks (`e: { … break e; }`) pervasively (#5869). Adds the `Stmt::Labeled { body, .. }` recursion arm to `collect_self_recursive_closure_ids`, `collect_for_init_ids`, `collect_closure_refs_and_writes_in_stmt`, `collect_outer_writes_in_stmt`, and `collect_let_types_in_stmts`. The closure-created-INSIDE-the-label variant remains open on #5869 (perry-hir lowers it with `mutable_captures: []` under the `Labeled{DoWhile(false)}` wrapper); its regression test ships `#[ignore]`d in `crates/perry/tests/issue_5869_labeled_block_capture_boxing.rs`.

## v0.5.1214 — setPrototypeOf cycle walk must not advance past chain end (#5866)

Fixes the #5763 regression that broke `Object.setPrototypeOf(obj, proto)` for every acyclic prototype chain of ≥2 links ("Cannot convert undefined or null to object"): the OrdinarySetPrototypeOf Floyd walk advanced the hare past the chain end, and fed exotic `undefined` prototype reports back into the next advance. Every transpiled `__extends` (`setPrototypeOf(Derived, Base)` — a 3-link function proto chain) threw; comment-json's `__extends` + its `{ __proto__: [] }` feature test killed Next.js server boot. The hare now freezes at null (the tortoise completes the membership walk alone, so cycle detection is unchanged) and `undefined` ends the walk like null. e2e regression suite: `crates/perry/tests/issue_5763_setprototypeof_chain_end.rs` (chains of length 2/4, the `__extends` statics link, the feature-test evaluation, and a genuine-cycle negative), byte-for-byte vs `node --experimental-strip-types`.
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.1214
**Current Version:** 0.5.1215


## TypeScript Parity Status
Expand Down
Loading
Loading