Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
## v0.5.1178 — perf(codegen): outline per-new-site inline allocator (smaller IR + faster)

`new ClassName(...)` previously emitted the full object-allocation prologue
inline at every call site. That bloated the IR (and the resulting binary) and
slowed codegen/compile. The allocation now calls the outlined runtime helper
`js_object_alloc_class_inline_keys`, so each new-site shrinks to a single call.
Complementary to #5304 (which outlined the constructor *call*); this outlines
the *allocation*. The two touch different regions of `lower_call/new.rs`.

Two supporting changes:

- **Runtime (#4717):** folded the field-slot zero-fill into
`js_object_alloc_class_inline_keys`. The allocation moved out of per-site
codegen, where callers used to zero-fill `max(field_count, 8)` slots by hand;
doing it inside the helper keeps every caller — including the outlined `new C()`
path — correct by construction. Without it, a field read-before-write or a GC
scan of the still-constructing instance could observe stale recycled arena
bytes.
- Split the `FieldInitMode` enum + `apply_field_initializers_recursive` walker
out of `lower_call/new.rs` into a sibling `field_init.rs` (pure move) to keep
the file under the 2,000-LOC CI size gate.

## v0.5.1177 — fix(codegen): injective function-symbol names (distinct names that sanitize alike)

Two distinct module-level functions could mangle to the same LLVM symbol, so
Expand Down
2 changes: 1 addition & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co

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.

**Current Version:** 0.5.1177
**Current Version:** 0.5.1178

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Revert release-version metadata from this non-release PR.

This bump should not be included here unless this PR is the actual release shipment. Please revert CLAUDE.md Line 11 and Cargo.toml Line 218 in this PR to avoid version-collision churn in active review branches.

Suggested revert
diff --git a/CLAUDE.md b/CLAUDE.md
-**Current Version:** 0.5.1178
+**Current Version:** 0.5.1177

diff --git a/Cargo.toml b/Cargo.toml
-version = "0.5.1178"
+version = "0.5.1177"

As per coding guidelines, “Only bump [workspace.package].version in Cargo.toml and **Current Version:** in CLAUDE.md when shipping a release.”
Based on learnings, “External contributor PRs should NOT modify [workspace.package].version in Cargo.toml or **Current Version:** in CLAUDE.md; maintainer does this at merge time.”

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
**Current Version:** 0.5.1178
**Current Version:** 0.5.1177
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@CLAUDE.md` at line 11, Revert the version bump in this PR as it should only
be included during actual release shipments. Change the **Current Version:**
value in CLAUDE.md back to its previous version number (before 0.5.1178), and
similarly revert the [workspace.package].version field in Cargo.toml back to its
original value prior to this PR's changes. Version updates should only be made
by maintainers at merge time, not by contributors in feature PRs.

Sources: Coding guidelines, Learnings



## TypeScript Parity Status
Expand Down
Loading
Loading