Repository navigation
[TS] Construct project instances from runtime constructor values - #466
Merged
Merged
Conversation
This was referenced Oct 3, 2026
CaelmBleidd
force-pushed
the
caelmbleidd/ts-465-runtime-new
branch
from
October 3, 2026 03:54
787814f to
1e15cb5
Compare
CaelmBleidd
force-pushed
the
caelmbleidd/ts-457-runtime-instanceof
branch
from
October 3, 2026 05:28
9812a2b to
70847b1
Compare
CaelmBleidd
force-pushed
the
caelmbleidd/ts-465-runtime-new
branch
2 times, most recently
from
October 3, 2026 05:54
ac1876f to
e3392c8
Compare
CaelmBleidd
marked this pull request as ready for review
October 3, 2026 06:44
CaelmBleidd
force-pushed
the
caelmbleidd/ts-457-runtime-instanceof
branch
from
October 3, 2026 22:33
887e7ba to
bab7963
Compare
CaelmBleidd
force-pushed
the
caelmbleidd/ts-465-runtime-new
branch
from
October 3, 2026 22:33
e3392c8 to
acb1283
Compare
CaelmBleidd
force-pushed
the
caelmbleidd/ts-465-runtime-new
branch
from
October 12, 2026 11:13
acb1283 to
50a9fe5
Compare
CaelmBleidd
force-pushed
the
caelmbleidd/ts-457-runtime-instanceof
branch
from
October 12, 2026 11:13
bab7963 to
161b3fd
Compare
CaelmBleidd
force-pushed
the
caelmbleidd/ts-465-runtime-new
branch
2 times, most recently
from
October 12, 2026 13:33
2d23276 to
52e4ea0
Compare
Base automatically changed from
caelmbleidd/ts-457-runtime-instanceof
to
main
October 12, 2026 13:53
CaelmBleidd
force-pushed
the
caelmbleidd/ts-465-runtime-new
branch
from
October 12, 2026 13:57
52e4ea0 to
d2ee18a
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.
Dynamic
newconsumes the evaluated constructor value and allocates the exact selected project class before the existing constructor call. Conditional and returned constructors, local aliases, and binding changes during argument evaluation preserve the captured identity and execute the selected constructor exactly once.Closes #465. Based on
mainata9b9ddb77a12c19d8552219b6cdcb188b31746aa, which includes #464. Uses JacoDBbcad76ffd7. Current head:d2ee18ad938ca581046f50d83c7aee75addf8d46.Use the allocated runtime class to choose storage for ambiguous common-name fields, including computed property access through
any. Deduplicate inherited declarations before choosing a field. Preserve property presence, deletion and write tracking from #458.Keep mixed-kind wrappers intact when adding an undeclared own field: their address storage is not the payload's runtime kind. Propagate an aborted field-write step through named and computed writes so incompatible declared-field writes retain explicit unsupported outcomes instead of disappearing during an invalid step continuation. Source regressions cover numbers, booleans, strings, functions, class instances, arrays, null and undefined, along with aliases and incompatible alternatives.
Reuse the shared constructor validation instead of duplicating
resolveNonConstructorNew. The shared check distinguishesnew's [[Construct]] requirement frominstanceof'sSymbol.hasInstanceprotocol. An ordinary object with that symbol still throwsTypeErrorwhen used withnew. Other known non-constructable values, including modeled computed strings, produce catchable JavaScriptTypeErrorobjects.Unresolved constructor identities and SDK constructor execution remain explicitly unsupported. Writes that change a declared field's runtime sort remain unsupported, including incompatible union alternatives; #467 tracks broader support. The merged #464 loads Object, Function and Array declarations from the TypeScript library bundled in JacoDB. Instance inputs are treated as structural field maps; unsupported initial constructor fields are checked when read, leaving unrelated and overwritten fields analyzable.
Local validation:
f175f2d47ab17424287dd47fa43086c2d4098788: fullusvm-ts— 1,259 tests, 1,117 passed, 142 skipped, zero failures or errors; all 13usvm-ts-callstests passed.52e4ea0d39830cd0db8d3030058de0af81d2a694: all 59 focused tests passed, including 24 runtime-instanceof, 17 runtime-new, 4 SDK, 5 type-system and 9 model-dispatch tests.:usvm-ts:detektMain,:usvm-ts:detektTestandgit diff --checkpassed.The boxed primitive write and stopped-step regressions fail before their fixes and pass afterward. Ordinary supported behavior uses
discoverPropertiesand invariants; direct checks cover unsupported paths, exception details, completion and generated replay cases. Tests use the published JacoDB dependency without a composite-build override.The current head has the same Git tree (
6c3b65896741f888b9259b2ab97cce6fd2ffa248) as the validated52e4ea0d39830cd0db8d3030058de0af81d2a694. All nine child patches are unchanged after rebasing onto the squash merge of #464.