Skip to content

Releases: PerryTS/perry

v0.4.47

04 Apr 05:35

Choose a tag to compare

Bug Fixes

  • x86_64 module-local function dispatch: Function wrappers for .map(resolveType) callbacks used Linkage::Export even for non-exported functions. When two modules shared the same filename and function names (e.g., two contract.ts files both with resolveType), the linker resolved the wrong wrapper. Non-exported wrappers now use Linkage::Local.
  • obj[c.name] garbage on any-typed objects: is_string_index_expr_get no longer returns false for all PropertyGet on non-string objects — now defaults to string except for known class instances with numeric fields.
  • Union-typed obj[intKey] wrong dispatch: is_union added to is_known_array check so js_dynamic_array_get (which handles arrays at runtime) is used instead of string-key property lookup.
  • Cross-module await Promise<[T, T]> tuple indexing: Type::Tuple added to the Await expression-inference handler's inner_type match for correct is_array flag on resolved value.
  • Bug #8 regression reverted: Broad Tuple additions to is_typed_pointer/is_typed_array caused SIGBUS on complex module graphs; reverted to minimal one-line fix.

Features

  • Promise.race: Full implementation — js_promise_race runtime function iterates promise array, attaches resolve/reject handlers with first-wins semantics, handles already-settled promises and non-promise values.

Previous (v0.4.46)

  • String.replaceAll, String.matchAll, arr.shift()?.method() fix, Buffer.subarray/slice, SQLite params/pragma/transaction, .length on Call results, x86_64 overload dispatch fix

v0.4.45

03 Apr 12:25

Choose a tag to compare

Bug Fixes

  • WASM multi-module FuncRef resolution: FuncRef(id) is only unique within a module — per-module func_map snapshots prevent cross-module FuncId collisions that caused wrong function dispatch
  • WASM void function tracking: Functions returning void now push TAG_UNDEFINED after call for stack consistency
  • WASM optional parameter padding: Missing arguments padded with TAG_UNDEFINED for functions with optional params

Previous (v0.4.44)

  • obj[numericKey] on Record<number, T> — numeric keys converted to strings for property lookup
  • !('key' in obj) always returned false — in operator NaN-boxed boolean handling
  • trimStart()/trimEnd() dispatched to correct runtime functions
  • Cross-module default array parameter = [] SIGSEGV fix
  • IndexSet union-index NaN-boxing for closures on objects
  • .filter(Boolean) desugaring in all 4 HIR lowering paths
  • Null pointer guards in closure capture getters and Promise.all handlers
  • Cross-module await on Promise<[T, T]> tuple indexing

v0.4.41

02 Apr 16:13

Choose a tag to compare

Bug Fixes

  • tvOS stdlib build: Upgraded mongodb driver from 2.8 to 3.5, eliminating the socket2 0.4.x dependency that lacked tvOS support. All socket2 dependencies now use versions ≥0.5 which include tvOS platform support.

Features

  • perry publish now passes features from perry.toml [project] config through to the build manifest, enabling feature-gated builds on the server side

Tests

  • Module-level array reads with loop index inside functions — validates untyped arrays with many module vars, for-loop with continue, while-loop variants
  • Cross-module exported function with array lookups — tests the getLevelInfo pattern (module-level const arrays + exported function iterating with loop index)
  • Android label/i18n resource test files with localized string XML resources (en, de, es, fr)

v0.4.40

01 Apr 14:39

Choose a tag to compare

Bug Fixes

  • Windows Text over gradients: VStack/HStack now handle WM_CTLCOLORSTATIC locally with WS_CLIPCHILDREN — Text controls fill their own background with the ancestor color, fixing blank/invisible text over gradient backgrounds
  • Windows scroll forwarding: WM_MOUSEWHEEL messages are now forwarded to the window under the cursor, so embedded views and ScrollViews receive scroll events correctly
  • Windows layout Fill distribution: Uses local index tracking instead of permanently mutating widget fills_remaining flags — repeated layout passes with changing visibility no longer accumulate stale state
  • Windows Image DPI scaling: setSize now DPI-scales dimensions to match the layout engine's coordinate system, fixing images appearing at wrong sizes on high-DPI displays

v0.4.39

01 Apr 04:29

Choose a tag to compare

Bug Fixes

  • Android VStack height — Default height changed from MATCH_PARENT to WRAP_CONTENT (-2), matching iOS UIStackView behavior. Previously every VStack expanded to fill its parent, causing stacked VStacks to push siblings off screen. Use widgetMatchParentHeight() to opt-in to filling behavior (e.g., root appBody).

v0.4.38

01 Apr 03:08

Choose a tag to compare

Features

  • `perry setup tvos` — guided wizard for tvOS App Store Connect credentials and bundle ID. Reuses shared Apple credentials from iOS/macOS setup. Saves to `~/.perry/config.toml` (global) and `perry.toml` (project).
  • `perry publish tvos` — full tvOS publishing support with:
    • Bundle ID resolution from `[tvos]` config in perry.toml
    • Entry point defaults to `src/main_tvos.ts`
    • Deployment target, encryption exempt, and custom Info.plist entries
    • Build number auto-increment (like iOS)
    • Interactive target prompt now includes tvOS

Performance

  • Direct object field access — `PropertyGet`/`PropertySet` on variables assigned from object literals now use direct offset loads/stores (`24 + idx*8`) instead of `js_object_get_field_by_name` runtime hash lookup, when field ordering is known at compile time

v0.4.37

31 Mar 18:42

Choose a tag to compare

Bug Fixes

  • String NaN-boxing in function callsis_string locals (I64 raw pointers) passed to functions expecting F64 now use js_nanbox_string (STRING_TAG 0x7FFF) instead of inline_nanbox_pointer (POINTER_TAG 0x7FFD). Fixes textfieldGetString return values becoming undefined when used in encodeURIComponent, ||, or cross-module calls (GH-10, GH-11, GH-12)
  • JS interop string argsjs_call_function and js_native_call_method fallback paths now properly NaN-box string arguments with STRING_TAG instead of raw I64→F64 bitcast

Performance

  • Direct object field accessPropertyGet/PropertySet on variables assigned from object literals now use direct offset loads/stores (24 + idx*8) instead of js_object_get_field_by_name runtime lookup, when field ordering is known at compile time
  • Object field cache upgraded — 3-tuple entries (keys_ptr, key_hash, field_index) for collision safety, 1024 entries (up from 512)

v0.4.36

31 Mar 12:02

Choose a tag to compare

Performance

  • Object field lookup inline cachejs_object_get_field_by_name now uses FNV-1a hashing + 512-entry thread-local direct-mapped cache keyed on (keys_array_ptr, key_hash). Cache hits skip the linear key scan entirely.

Features

  • iOS/tvOS game loop reads NSPrincipalClass from Info.plist for custom UIApplication subclass (e.g., BloomApplication on tvOS which overrides sendEvent: for input)
  • tvOS Info.plist now includes UIApplicationSceneManifest with PerrySceneDelegate and NSPrincipalClass: BloomApplication
  • Tier 3 targets (tvOS/watchOS) automatically use cargo +nightly -Zbuild-std for compilation
  • iOS/tvOS linker adds -framework Metal -lobjc
  • ios-game-loop feature flag added to perry-runtime Cargo.toml

Bug Fixes

  • GTK4: ImageFile path resolution returned PathBuf but ImageKind::File expected String — added .to_string_lossy().to_string() conversion
  • Codegen: LocalInfo missing object_field_indices field in 3 constructors (closures.rs × 2, stmt.rs × 1) — caused build failure after struct field addition

v0.4.32

30 Mar 13:18

Choose a tag to compare

Bug Fixes

  • macOS: ImageFile setSize now resizes the underlying NSImage to match desired dimensions — previously only the view frame changed, leaving the intrinsic content size mismatched; also sets NSImageScaleProportionallyUpOrDown
  • macOS: ImageFile resolves relative paths via NSBundle.mainBundle.resourcePath first, then executable dir — fixes images not loading inside .app bundles
  • Android: APK now bundles assets/, logo/, resources/, images/ directories — ImageFile('assets/foo.png') works at runtime
  • Windows: Text widgets now transparent over gradient backgrounds — WM_CTLCOLORSTATIC returns NULL_BRUSH instead of ancestor's solid brush
  • Windows: Image bitmap transparency uses ancestor background color — reload_bitmap_scaled fills transparent areas with the nearest ancestor's bg color instead of white

v0.4.30

30 Mar 05:08

Choose a tag to compare

Bug Fixes

  • arr[i] in for-loop inside function returned arr[0] for every i — LICM (Loop-Invariant Code Motion) incorrectly hoisted loop-counter-indexed array reads as invariant when BCE (Bounds Check Elimination) didn't fire. Two root causes:
    1. BCE Pattern 4 didn't recognize module-level const limits (e.g., const MAX_COINS = 100) because is_integer=false despite having const_value set — added const_value check
    2. collect_assigned_ids only scanned the loop body, missing the update expression (i = i + 1) where the counter is assigned — LICM then treated arr[i] as invariant and hoisted it with i=0

Tests

  • Added tests/test_array_index_loop.ts regression test for array index access in for-loops inside functions with many module-level arrays