Repository navigation
[TS] Preserve evaluated constructor values in dynamic new expressions - #399
Merged
Merged
Conversation
Contributor
CaelmBleidd
marked this pull request as ready for review
October 3, 2026 06:43
CaelmBleidd
force-pushed
the
caelmbleidd/ts-398-dynamic-new-ir
branch
from
October 3, 2026 20:55
b5e10a1 to
f0da474
Compare
CaelmBleidd
changed the base branch from
caelmbleidd/ts-390-instanceof-rhs
to
caelmbleidd/ts-396-class-values
October 3, 2026 20:56
CaelmBleidd
changed the base branch from
caelmbleidd/ts-396-class-values
to
neo
October 3, 2026 20:58
CaelmBleidd
force-pushed
the
caelmbleidd/ts-398-dynamic-new-ir
branch
from
October 3, 2026 21:01
f0da474 to
33cd1fc
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #398
Change
NewExprin the TS DTO, Kotlin DTO/model, JSON conversion, operand traversal, and validator. The existing static type remains a result type hint.newby evaluating and, when needed, snapshotting the constructor before arguments. Emit allocation after argument evaluation and preserve the selected value separately from a union result type.Arrayallocation path specific to the actual standard-library identifier, so a dynamic constructor returning an array is retained as a dynamicNewExpr.ArrayRefcontract cannot represent arbitrary constructor property reads. Receiver and key effects are evaluated once in source order, without emitting an invalidArrayRef. Computed access in constructor arguments remains supported.Dependency
Stacked on JacoDB #395 (
caelmbleidd/ts-390-instanceof-rhs, headb9851a0b202fbfa10a9bf0f4145ba49670b2745c), which is stacked on #397. Review this PR against #395.Verification
npm run typecheck— passed.npm test— 238 passed../gradlew :jacodb-ets:test --tests org.jacodb.ets.test.EtsTsFrontendTest --no-daemon— 21 passed.b5e10a1a0c5d279492c373caf907f6387fff998f. Independent pinnedmy-reviewcore and hygiene passes found no actionable defects on that head.For the local Kotlin run, the worktree's
.gitfile required temporarily removing the Gradle git-hook stanza fromsettings.gradle.kts; it was restored before commit. The commit hook had the same worktree limitation and was bypassed after the checks above.Scope
Runtime allocation and dispatch are implemented separately in UnitTestBot/usvm#466. Mutable qualified class-property constructors and computed constructor access remain explicitly unsupported by this frontend.