Releases: PerryTS/perry
Releases · PerryTS/perry
v0.4.47
Bug Fixes
- x86_64 module-local function dispatch: Function wrappers for
.map(resolveType)callbacks usedLinkage::Exporteven for non-exported functions. When two modules shared the same filename and function names (e.g., twocontract.tsfiles both withresolveType), the linker resolved the wrong wrapper. Non-exported wrappers now useLinkage::Local. obj[c.name]garbage on any-typed objects:is_string_index_expr_getno longer returnsfalsefor 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_unionadded tois_known_arraycheck sojs_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::Tupleadded to the Await expression-inference handler's inner_type match for correctis_arrayflag on resolved value. - Bug #8 regression reverted: Broad
Tupleadditions tois_typed_pointer/is_typed_arraycaused SIGBUS on complex module graphs; reverted to minimal one-line fix.
Features
Promise.race: Full implementation —js_promise_raceruntime 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,.lengthon Call results, x86_64 overload dispatch fix
v0.4.45
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_UNDEFINEDafter call for stack consistency - WASM optional parameter padding: Missing arguments padded with
TAG_UNDEFINEDfor functions with optional params
Previous (v0.4.44)
obj[numericKey]onRecord<number, T>— numeric keys converted to strings for property lookup!('key' in obj)always returned false —inoperator NaN-boxed boolean handlingtrimStart()/trimEnd()dispatched to correct runtime functions- Cross-module default array parameter
= []SIGSEGV fix IndexSetunion-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
awaitonPromise<[T, T]>tuple indexing
v0.4.41
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 publishnow passesfeaturesfrom 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
getLevelInfopattern (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
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
Bug Fixes
- Android VStack height — Default height changed from
MATCH_PARENTtoWRAP_CONTENT(-2), matching iOSUIStackViewbehavior. Previously every VStack expanded to fill its parent, causing stacked VStacks to push siblings off screen. UsewidgetMatchParentHeight()to opt-in to filling behavior (e.g., rootappBody).
v0.4.38
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
Bug Fixes
- String NaN-boxing in function calls —
is_stringlocals (I64 raw pointers) passed to functions expecting F64 now usejs_nanbox_string(STRING_TAG0x7FFF) instead ofinline_nanbox_pointer(POINTER_TAG0x7FFD). FixestextfieldGetStringreturn values becomingundefinedwhen used inencodeURIComponent,||, or cross-module calls (GH-10, GH-11, GH-12) - JS interop string args —
js_call_functionandjs_native_call_methodfallback paths now properly NaN-box string arguments with STRING_TAG instead of raw I64→F64 bitcast
Performance
- Direct object field access —
PropertyGet/PropertySeton variables assigned from object literals now use direct offset loads/stores (24 + idx*8) instead ofjs_object_get_field_by_nameruntime 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
Performance
- Object field lookup inline cache —
js_object_get_field_by_namenow 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
NSPrincipalClassfrom Info.plist for customUIApplicationsubclass (e.g.,BloomApplicationon tvOS which overridessendEvent:for input) - tvOS Info.plist now includes
UIApplicationSceneManifestwithPerrySceneDelegateandNSPrincipalClass: BloomApplication - Tier 3 targets (tvOS/watchOS) automatically use
cargo +nightly -Zbuild-stdfor compilation - iOS/tvOS linker adds
-framework Metal -lobjc ios-game-loopfeature flag added to perry-runtime Cargo.toml
Bug Fixes
- GTK4:
ImageFilepath resolution returnedPathBufbutImageKind::FileexpectedString— added.to_string_lossy().to_string()conversion - Codegen:
LocalInfomissingobject_field_indicesfield in 3 constructors (closures.rs × 2, stmt.rs × 1) — caused build failure after struct field addition
v0.4.32
Bug Fixes
- macOS:
ImageFilesetSizenow resizes the underlying NSImage to match desired dimensions — previously only the view frame changed, leaving the intrinsic content size mismatched; also setsNSImageScaleProportionallyUpOrDown - macOS:
ImageFileresolves relative paths viaNSBundle.mainBundle.resourcePathfirst, then executable dir — fixes images not loading inside.appbundles - 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_CTLCOLORSTATICreturnsNULL_BRUSHinstead of ancestor's solid brush - Windows: Image bitmap transparency uses ancestor background color —
reload_bitmap_scaledfills transparent areas with the nearest ancestor's bg color instead of white
v0.4.30
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:
- BCE Pattern 4 didn't recognize module-level
constlimits (e.g.,const MAX_COINS = 100) becauseis_integer=falsedespite havingconst_valueset — addedconst_valuecheck collect_assigned_idsonly scanned the loop body, missing theupdateexpression (i = i + 1) where the counter is assigned — LICM then treatedarr[i]as invariant and hoisted it withi=0
- BCE Pattern 4 didn't recognize module-level
Tests
- Added
tests/test_array_index_loop.tsregression test for array index access in for-loops inside functions with many module-level arrays