Repository navigation
Commit cdac4e3
Read lazy member tables through the regular accessors
Each shape check (isWeakType, getSingleSignature,
isStringIndexSignatureOnlyType, isFunctionObjectType, getPropertyOfTypeEx)
had a second, lazy version of its condition. Now the lazy table stores the
reference's full signatures and index infos, inherited through a helper
resolveObjectTypeMembers shares, and getSignaturesOfStructuredType and
getIndexInfosOfStructuredType answer from it. The checks read through those
accessors and getMemberOfStructuredType, hasPropertiesOfStructuredType and
everyPropertyOfStructuredType, so each condition is written once.
The separate shape summary goes away, as do the hooks in
getPropertyOfObjectType and isEmptyObjectType, which saved no memory, and
the code moves into checker.go.
This also removes a crash path: isWeakType read the table's shape, called
getIndexInfosOfStructuredType, and read the shape again, which would find
no table if that call had resolved the type in full.
Co-Authored-By: Claude Opus 5.5 <[email protected]>1 parent af2719b commit cdac4e3
3 files changed
Lines changed: 411 additions & 569 deletions
0 commit comments