Skip to content

Commit c3982e8

Browse files
committed
fix(ui-macos): re-apply msg_send! commas dropped from v0.5.844 (v0.5.845)
v0.5.844 was meant to land 6 msg_send! comma fixes but only the audio_playback.rs sites survived the commit. The app.rs (3 sites) and qrcode.rs (1 site) edits dropped. Re-applied: - crates/perry-ui-macos/src/app.rs:653 setFrame:display:animate: - crates/perry-ui-macos/src/app.rs:1583 same (animate: false) - crates/perry-ui-macos/src/app.rs:1602 same (animate: true) - crates/perry-ui-macos/src/widgets/qrcode.rs:95 setValue:forKey: cargo check -p perry-ui-macos clean. Pure macro-syntax catch-up.
1 parent 593a864 commit c3982e8

6 files changed

Lines changed: 76 additions & 74 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
Detailed changelog for Perry. See CLAUDE.md for concise summaries.
44

5+
## v0.5.845 — fix(ui-macos): re-apply msg_send! commas that v0.5.844's commit dropped. v0.5.844 was meant to add comma between keyword args in 6 `msg_send!` sites (`audio_playback.rs:{270,524}`, `app.rs:{653,1583,1602}`, `widgets/qrcode.rs:95`) but only the `audio_playback.rs` sites survived the commit — the `app.rs` (3) and `qrcode.rs` (1, line 95) edits never landed. Re-applied: `crates/perry-ui-macos/src/app.rs:653` (`setFrame: new_frame, display: true, animate: true`), `app.rs:1583` (same, `animate: false`), `app.rs:1602` (same, `animate: true`), and `crates/perry-ui-macos/src/widgets/qrcode.rs:95` (`setValue: utf8_data, forKey: &*key_msg`). qrcode.rs:100 was already correct from the previous round. Pure macro-syntax catch-up; no runtime semantic change. Pre-tag CI prep for the next release-checkpoint attempt.
6+
57
## v0.5.844 — fix(ci+ui-macos): 6 more msg_send! comma sites + add test_issue_654 to known_failures (v0.5.844). v0.5.842's Tests workflow turned 5 of 8 jobs green (compile-smoke ✓ post-memory-bump, plus the prior batch). 3 jobs regressed/remained: parity (NEW failure `test_issue_654_typed_array_dispatch` not in `test-parity/known_failures.json` — kept as known divergence pending #654 Linux follow-up), doc-tests (macos surfaced 6 MORE `msg_send!` comma-missing sites I missed in v0.5.841's first pass — `crates/perry-ui-macos/src/{audio_playback.rs:270/524,app.rs:653/1583/1602,widgets/qrcode.rs:95}`), doc-tests (ubuntu) — webkit dep should now be available, retesting. Local cargo check perry-ui-macos: clean. Pure CI plumbing + macro-syntax catch-up; no runtime semantic change.
68

79
## v0.5.843 — perf(transform): #691 skip `__async_throw` closure alloc when no awaiting try/catch — promise_all_chains 41.7→37.1 ms (−11%, 1.77×→1.69× bun). Phase 1 of the issue #691 (Bun-gap on `promise_all_chains.ts`) workstream. The v0.5.816–v0.5.833 arc had closed runtime/queue overhead; the remaining 1.77× gap was profile-attributed in the issue to the ~84% callback bucket. Re-profiling with `PERRY_MT_PROFILE=1` plus a 0/1/2/3-await sweep showed the gap is **not** per-state-transition cost — bun's first-await delta over us is +12 ms, additional awaits cost roughly the same on both runtimes. The dominant cost is **per-async-fn-invocation closure allocation** (150,849 closures for 50k `unitOfWork` calls = 3 per invocation, 99,900 with non-singleton captures). Each `was_plain_async` invocation was allocating two closures, one of which — `__async_throw` — is cold path (only invoked when an awaited promise rejects) but built unconditionally with `captures.clone() + mutable_captures.clone()` at the wrapper site. When `linearize_body` reports no awaiting try/catch (`catches.is_empty()`), the throw body collapses to a single `Stmt::Throw(__throw_val)` rethrow that references zero captures — pure dead weight to allocate. Change at `crates/perry-transform/src/generator.rs::build_async_step_driver_direct`: signature now takes `throw_closure_expr: Option<Expr>`. Caller passes `None` for the no-user-catch case, the driver emits `Stmt::Throw(value)` inline in the dispatch's is-error arm (caught by the existing outer try/catch which re-enters `__step(e, true)` and returns `Promise.reject` via the `is_error` short-circuit — semantics identical), and skips both the `let __async_throw = ...` outer stmt and the `throw_id` capture in `step_captures`. Verification: `PERRY_MT_PROFILE=1 /tmp/pac` shows closure allocs drop 150,849 → 100,899 (−49,950 = exactly 1 per `unitOfWork` invocation), `cap_singleton_miss` drops 99,900 → 49,950, callback bucket 37.5 → 32.1 ms (−14%). All 7 `test_microtask_inv_*.ts` probes pass (including `01_two_fn_interleave` which the rejected aggressive inline gate broke — this change preserves microtask ordering because the existing per-await `AsyncStepChain` boundaries are untouched). `test_issue_256_microtask_ordering.ts` passes. Gap tests 26/28 (same 2 pre-existing failures: `console_methods`, `regexp_advanced`). Full `cargo test --release --workspace` clean. The user-catch path (`catches` non-empty) is untouched — still routes through the lazy-but-allocated `__async_throw` closure that holds the inlined catch body. Phase 2 candidate (per #691 plan): stack-allocate the step closure's capture environment for async fns with proven-non-escaping captures. Not in this commit.

CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
88

99
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.
1010

11-
**Current Version:** 0.5.844
11+
**Current Version:** 0.5.845
1212

1313

1414
## TypeScript Parity Status

0 commit comments

Comments
 (0)