Repository navigation
typescript: a bare decorator application is a call site - #1719
Merged
Merged
Conversation
swapnilpaliwal-sd
requested review from
JaredHLZhang,
Whua689 and
suyashpaliwal26
as code owners
September 28, 2026 21:53
`@guarded` is invoked by the runtime exactly as `@timed()` is, and the compiler resolves both, but only the factory form had a ts_call_site: the bare form was absent from the IR, so a codebase that decorates most public methods lost most of its compiler sites. The parser now emits one DECORATOR_CALL per bare application (identifier, member, element access, parenthesised), positioned at the name, which is also its own callee. The engine treats that name as the callee expression, stands arity down (the runtime passes two or three arguments), and does not type the application's result onto the name. Controls: the factory form stays one site, and the same name outside a decorator is a reference, not a call. Case 32 now scores 5/5 against the compiler with no known-missing line. Closes #233 Co-authored-by: axiomcode-bot[bot] <334110751+axiomcode-bot[bot]@users.noreply.github.com>
swapnilpaliwal-sd
force-pushed
the
loop/ty-is233
branch
from
September 28, 2026 23:00
3c9bc0e to
ebefddd
Compare
This was referenced Sep 28, 2026
Merged
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.
A bare decorator (
@guarded,@Guards.disposed,@(guarded)) now produces aDECORATOR_CALLcall site at its name, the same way@timed()already did. Before this, it had no call site, so the IR had no record of the application at all.alias = guardedgets no call site.known-missingis removed.Checked: case 32 oracle 2→5 compiler sites, 5/5 agree. On a real TS app that uses DI parameter decorators: call sites 38174→38260, edges 47384→47470, all +86 are
known_edgeDECORATOR_CALL, every other tier is unchanged, index time 207s→198s. Parser checks 49/49. Full TS engine suite (run-tests.sh --oracle): 85 passed, 0 failed.Closes #233