github PerryTS/perry v0.5.509

latest releases: v0.5.1206, v0.5.1205, v0.5.1182...
one month ago

Highlights

  • #447 / #448 / #451 collapsed into a single 3-line ABI fix (v0.5.508): js_object_set_field was declared with a DOUBLE value arg but the runtime takes JSValue (u64). On AArch64 / x86_64 SysV / Win64 these use disjoint register classes — values landed in xmm0/d0 while the runtime read garbage from rdx/x2. With it fixed, async generators, *[Symbol.iterator](), for-await-of, await using, Promise.allSettled / .any / .withResolvers, queueMicrotask, Array.fromAsync, and JSON.stringify with toJSON all unblocked at once. Two independent investigation agents reached the same diagnosis simultaneously.
  • perry/tui v1 complete (#347 / #358): native readline with raw-mode + keypress + SIGWINCH, isatty + columns/rows, Taffy flexbox layout, Spinner / Input / List / Select / TextArea widgets, no-flicker proof.
  • HarmonyOS / --target harmonyos significantly improved: Mango welcome-screen now renders on OHOS; #395 / #399 / #400 / #408 / #410 / #413 closed.
  • Performance: image_convolution workload now beats Rust (377 ms vs 414 ms) after a chain of i32-shadow + static-trip-count unroll + channel-vector SIMD landings; json_pipeline_full matches Node and beats baseline by 30% after the GC bytes-trigger fix; closure-caching + Map/Set side-tables + GC perf rework cut ECS workload time substantially.

Fixes (recent)

  • #447 — Nested async-await hangs (closed via #448 ABI fix; v0.5.506 partial + v0.5.509 verified)
  • #448*[Symbol.iterator]() for-of OOM (v0.5.508)
  • #449new.target returned NaN inside class constructors (v0.5.505)
  • #450Object.defineProperty accessor this-binding broken (v0.5.507)
  • #451test_gap_json_advanced SIGSEGV (closed via #448; v0.5.508)
  • #453 — Doc cleanup: stale CLAUDE.md gap-sweep claim, missing workspace-test exclusions, stale honest_bench REPORT.md (v0.5.504)
  • #446obj.method PropertyGet returned undefined; js_class_method_bind + type-only-import class metadata flow (v0.5.503)
  • #444import.meta.url returned 0 / import.meta.main returned NaN (v0.5.502)
  • #422new net.Socket() constructor + deferred .connect(port, host) + net.connect factory alias (v0.5.501)
  • #429 — GTK4 appSetTimer callbacks scheduled mid-event-loop (v0.5.500)
  • #431 — Cross-module class-name collision emitted method bodies under wrong module prefix (v0.5.499)
  • #443 — NaN-boxed string in format_value for windows/android/gtk4 state binding (v0.5.498)
  • #442 — Windows inline Button background color (v0.5.497)
  • #435 — i32-shadow gate skips pure accumulators (v0.5.496)
  • #414 — mysql2 db.query(sql, [param]) parameter binding (v0.5.490)
  • #393js_box_set/get rejects invalid box pointers
  • #392 / #240 — Map/Set field mutations route through js_native_call_method for type-only-imported class params (v0.5.476)
  • #419perry check U006 false-positives for Node builtins (v0.5.503-line)
  • #432js_array_create runtime export declaration
  • #436image_convolution strict-i32-bounded gate + clamp inlining
  • #441 — honest_bench output-correctness gate
  • #416perry publish walk root always kept regardless of publish.exclude
  • #418 — README link fix
  • #423 / #426 — GTK4 gstreamer link fix on Linux + perry-hir stale export
  • #394 — Homebrew bottle ships libperry_ui_ios.a for iOS device target

Features

  • #358 perry/tui Phase 1–4.5: native engine, state + input + run loop, Taffy flexbox layout, full v1 widget set (Spacer, ProgressBar, Spinner, Input, List, Select, TextArea, …)
  • #347 readline / TTY: line-buffered readline.createInterface, process.stdin.setRawMode, keypress events, isatty, columns/rows, SIGWINCH
  • #408 codegen-arkts: tracks procedural widget mutations on locals
  • #427 i18n: translations for de / ja / ko / zh-CN

Performance

  • image_convolution perf chain: i32-shadow init path → static-trip-count for-loop unroll → channel-vector SIMD reduction → strict-i32-bounded clamp gate. Now 377 ms vs Rust's 414 ms (was ~470 ms pre-chain).
  • json_pipeline_full: GC bytes-trigger bump after gc-suppressed parse → 30% faster than baseline; matches Node, ~1.6× behind Rust/Bun.
  • ECS workload (@codehz/ecs simple demo): closure-caching by func_ptr + capture-bits, single-slot per-func cache, Map/Set side-tables to PtrHasher, MAP/SET/BUFFER registries to PtrHasher, GcHeader byte-load fast pre-filter, vtable IC for method dispatch, skip method-name string alloc.
  • GC: bytes-trigger threshold-based (not malloc-count), shadow-stack TLS coalesced, ValidPointerSet split arena+malloc + driftsort sort, sweep walk with fold-in age bump.
  • Inliner widening: This-receiver inlining, Let-init-Call inlining, closures, cross-module method inlining for symbol-stable methods, cross-module ExternFuncRef.
  • Object literal: shape-cache fast path with packed-keys global. Map/Set: direct-entries / direct-element fast path for for-of. Closure: fast-path for non-capturing + FuncRef wrappers.

Infrastructure

  • Honest-bench output correctness gate (#441)
  • ECS perf case study committed
  • cargo test workspace-exclude list now correct on macOS host (#453)
  • 6 previously skip-listed test_async* tests un-skipped after #447 close (v0.5.509)

Migration notes

No breaking API changes. The ABI fix in v0.5.508 is purely internal (codegen ↔ runtime calling convention); user code is unaffected.

121 commits since v0.5.465.

Don't miss a new perry release

NewReleases is sending notifications on new releases.