Skip to content

Commit 50f5548

Browse files
authored
fix: #741 path + #742 tty + partial #740 class-expr (v0.5.896 + v0.5.897) (#749)
* fix: #741 path gaps + #742 tty exports/isTTY + partial #740 class-expr (v0.5.901) and toNamespacedPath added; new HIR variants + runtime helpers; 5-line issue repro matches Node, parity diff drops from 15 to 2 lines. bound-method closure so typeof reports "function"; process.std*.isTTY returns undefined (not boolean false) when not a TTY, per Node spec; parity test now matches Node byte-for-byte. instead of an empty-arg New, so `const C = class {...}; new C(args)` constructs with the supplied args. Standalone Effect repro moves from "TypeError" to running through with undefined fields. Full fix needs runtime constructor dispatch for class refs read from object fields. * fix(codegen): #740 follow-up — object-literal class-field aliases (v0.5.902) Builds on v0.5.901's class-expr→ClassRef change. Two new shapes now resolve a class-ref read out of an object-literal field back to the underlying class: const O = { Inner: class extends Base {…} }; new O.Inner(args) // direct const C = O.Inner; new C(args) // through an intermediate let Both share a new per-function side table FnCtx.local_class_field_aliases populated when Stmt::Let sees `init = New { __AnonShape, args }` and walks the class's field order against args — any Expr::ClassRef arg becomes a (local_id, field_name) → class_name entry. The map is also propagated through `let O2 = O`. Effect DoD still blocked on runtime parent-constructor dispatch. * chore: fix CI — cargo fmt + regen API docs - cargo fmt collapsed a 2-line `let layout = …Layout::from_size_align(...)` in object.rs:7385 (lint job) - regen docs/api/perry.d.ts and docs/src/api/reference.md for the new path.matchesGlob / path.toNamespacedPath entries added in v0.5.901 (api-docs-drift job)
1 parent e0f780d commit 50f5548

26 files changed

Lines changed: 546 additions & 108 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Large diffs are not rendered by default.

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.900
11+
**Current Version:** 0.5.902
1212

1313

1414
## TypeScript Parity Status

0 commit comments

Comments
 (0)