Commit 50f5548
authored
* 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
- crates
- perry-api-manifest/src
- perry-codegen-js/src
- perry-codegen-wasm/src
- perry-codegen/src
- perry-hir/src
- lower
- perry-runtime/src
- docs
- api
- src/api
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
0 commit comments