Skip to content

[TS] Lower object literal methods and preserve shared mutable captures - #454

Draft
CaelmBleidd wants to merge 2 commits into
neofrom
caelmbleidd/ts-object-methods-and-captures
Draft

CaelmBleidd wants to merge 2 commits into
neofrom
caelmbleidd/ts-object-methods-and-captures

Conversation

@CaelmBleidd

@CaelmBleidd CaelmBleidd commented Dec 2, 2026 •

Copy link
Copy Markdown
Member

Lower object literal methods as fresh own data properties with callable EtsIR values. Preserve computed keys, definition order, dynamic receivers, and lexical strictness. Keep mutable block-local bindings and simple parameters shared by closures and their declaring function. Allocate uninitialized lexical cells and preserve deferred self-captures. Emit an unsupported boundary when lexical initialization can immediately read the binding in its temporal dead zone. Unsupported method bodies such as those requiring super, new.target, an arguments object, or generator execution are represented as execution boundaries.

The frontend typecheck, bundle and all 820 frontend tests passed. The initial extraction passed the production Kotlin JSON roundtrip for an object method and the ETS main license check. The test interpreter snapshots declared environment slots, so it can detect leaked capture-by-value semantics.

@github-actions

github-actions Bot commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

Test Results

  252 files  ±0    252 suites  ±0   15m 53s ⏱️ -7s
  911 tests ±0    899 ✅ ±0  12 💤 ±0  0 ❌ ±0 
2 197 runs  ±0  2 145 ✅ ±0  52 💤 ±0  0 ❌ ±0 

Results for commit a797c89. ± Comparison against base commit c5ecfe0.

♻️ This comment has been updated with latest results.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant