Skip to content

perry

v0.5.177 Feature

This release adds 3 notable features for engineering teams evaluating rollout.

Published 1mo Build & Package
✓ No known CVEs patched
Read the diff → Tool health → What is this tool? →

✓ No known CVEs patched in this version

Topics

android compile harmonyos ios llvm macos
+5 more
native smc typescript watchos windows

Summary

AI summary

Phase 1/3/4 object‑layout inference and type system fixes land, plus seven filed issue resolutions.

Full changelog

Highlights

The long-hanging object-layout + type-inference arc lands (Phases 1/3/4/4.1 against the Static Hermes side-by-side), along with the first gap-tests bump in months (17 → 23 of 28), a benchmark refresh that finally beats Node on json_roundtrip (was Perry's one outstanding loss), and fixes for seven filed issues.

Fixes

  • #142Math.tan / asin / acos / atan / atan2 were silent identity functions. Codegen now calls the existing runtime symbols. (ce550d91, via PR #148.)
  • #144 — TypeScript decorators were parsed into HIR but silently dropped at codegen. Compiler now hard-errors with a message naming the decoration point.
  • #146perry/thread primitives (parallelMap / parallelFilter / spawn) compiled clean and silently returned undefined. Wired up + added a compile-time mutable-outer-capture check with a broadened bypass-closure for named-function callbacks.
  • #150Object.getOwnPropertyDescriptor returned undefined on Phase 3 anon-shape literals. Scalar-replacement escape check now conservatively escapes all candidates on un-enumerated HIR variants.
  • #158Map / Set treated -0 and +0 as distinct keys. Added SameValueZero normalization.
  • #20console.trace() now emits a real native backtrace to stderr (needs PERRY_DEBUG_SYMBOLS=1 for symbolicated frames).
  • Phase 3 follow-up — Error.cause AST extraction now handles new Error(msg, { cause }) shorthand and ({ cause: e }) paren-wrap (were silently losing .cause).

Features

  • Phase 1 — structural shape inference for closed object literals in infer_type_from_expr.
  • Phase 3 — anonymous class synthesis (__AnonShape_N) for closed literals so property access hits the direct-GEP fast path. Backed by a synthesized constructor so per-literal values survive shape dedup.
  • Phase 4 / 4.1 — body-based return-type inference for free functions, class methods, getters, and arrow expressions; method-call return-type inference via a class_method_return_types registry consulted at callsites.
  • Added an extract_options_fields helper for builtin constructors (Response / Request / Headers / Error) that handles both Expr::Object and Phase 3's Expr::New { __AnonShape_N } shapes.

Benchmarks

Reshot on current main. Perry wins every workload in the main suite vs Node.js and Bun (16 of 16 including json_roundtrip — 314 ms vs Node 377 ms, was 1.58× slower at v0.5.166). Polyglot: leads on 5 of 8 cells vs Rust / C++ / Go / Swift / Java; ties fibonacci with C++; trails by 1-2 ms on three stack-struct-friendly rows. README.md tables + benchmarks/baseline.json updated.

Infrastructure

  • CLAUDE.md "Recent Changes" tightened to 1-2 line summaries.
  • 40-test HIR integration suite added at crates/perry-hir/tests/shape_inference.rs covering Phase 1/3/4/4.1 inference.
  • Four new follow-up issues filed (#154 await using, #155 console.time, #156 queueMicrotask/performance.now, #157 typed-array constructors, plus the existing #29 for lone-surrogate string handling) covering the remaining 5 failing gap tests.

Gap tests

22 / 28 → 23 / 28 passing vs node --experimental-strip-types. Remaining known-failing: async_advanced, console_methods, global_apis, string_methods, typed_arrays. All tracked in GitHub issues.

Weekly OSS security release digest.

The CVE patches and breaking changes that affected production tools this week. One email, every Sunday.

No spam, unsubscribe anytime.

Share this release

Track perry

Get notified when new releases ship.

Sign up free

About perry

A native TypeScript compiler written in Rust. Compiles TypeScript directly to executables using SWC and LLVM.

All releases →

Beta — feedback welcome: [email protected]