Repository navigation
[TS] Evaluate instanceof against runtime constructor values - #464
Merged
Merged
Conversation
This was referenced Oct 3, 2026
CaelmBleidd
force-pushed
the
caelmbleidd/ts-457-runtime-instanceof
branch
from
October 3, 2026 03:46
d6843cd to
9812a2b
Compare
CaelmBleidd
force-pushed
the
caelmbleidd/ts-422-string-value-equality
branch
from
October 3, 2026 05:21
7927e93 to
127ecb5
Compare
CaelmBleidd
force-pushed
the
caelmbleidd/ts-457-runtime-instanceof
branch
from
October 3, 2026 05:28
9812a2b to
70847b1
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-422-string-value-equality
branch
from
October 4, 2026 19:51
e5527a3 to
7217c2a
Compare
Base automatically changed from
caelmbleidd/ts-422-string-value-equality
to
main
October 5, 2026 12:37
CaelmBleidd
force-pushed
the
caelmbleidd/ts-457-runtime-instanceof
branch
from
October 12, 2026 11:13
bab7963 to
161b3fd
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.
The
instanceofinterpreter preserves evaluated constructor identity through locals, conditional expressions, returned values and assertions. It compares declared runtime ancestry and reports"function"fromtypeoffor represented constructor values.Related to #457. Based on
mainatc47c6b4a34f15ab234d3d07a7b59ae640c2df512, using JacoDBbcad76ffd7. Current head:f175f2d47ab17424287dd47fa43086c2d4098788.Load Object, Function and Array from the actual
lib.es5.d.tsbundled with that JacoDB version. Keep their original members and signatures and preserve SDK declarations supplied by the caller. Cache converted declaration DTOs and create fresh scene-owned classes for each machine. Function and Array keep their dedicated runtime representations and are excluded from ordinary class-instance witnesses. Declarations enable prototype membership; executing SDK APIs still needs interpreter support or a model. Model bodies remain behind their dispatcher and domain guards.Treat instance inputs as structural field maps. An unread constructor field, nested field, or generic argument no longer excludes the entire entrypoint. Check unsupported constructor-valued and unresolved generic initial fields when they are read; writes, deletions, and paths that do not use those initial values remain analyzable. Direct constructor-valued parameters and containers still require unsupported callable input witnesses.
Known non-callable right operands produce catchable JavaScript
TypeErrorobjects. Unknown constructor identities, prototype mutation and customSymbol.hasInstanceremain unsupported. Nominal ancestry is documented separately from structural field matching.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.All four new regressions fail on the previous implementation: structural inputs, overwriting a constructor field before reading, preserving paths that skip the field, and retaining actual SDK members. Ordinary source behavior uses
discoverPropertiesand invariants; direct checks cover unsupported paths and low-level contracts. Tests use the published JacoDB dependency without a composite-build override.