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.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Interceptors #67432
Interceptors #67432
Changes from 43 commits
fb564f3
416b438
d204f30
9702a2a
c29c2a9
0a633b9
380a36f
83572ce
8a27e7e
677f332
70a2fb4
af5c723
774d88c
66d3faf
d27f938
2e2d5a0
62c120e
7601766
10b9a41
8b694c1
189338e
708b53a
49a459e
38b6500
b7862a3
f960680
28bcf00
eae8165
c1dbf7d
a89bd88
63ab62e
0243430
35b04d0
b2de0a7
a5a0a7e
9d1c07b
f89f983
571e69b
336d29f
c16a87d
fd95aca
7b7c38d
a579247
3e16fad
2ca2c93
76e36da
692ba43
6359a1d
3206c7f
e655157
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was surprised that we keep
AttributeLocation
inInterceptsLocationAttributeData
in aConcurrentSet
. Should we instead keep only file-path, line and character number in that data type, as the key in a dictionary?I understand there is follow-up to test with a large number of interceptors, so this can be addressed then. #Closed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might work here to use something like:
Then, when we enter the lowering phase, we can report on duplicates by enumerating the values and checking: is this the Many case? if so, sort by location and report an error on all but the first.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What I had thought in the past was, if we allow intercepting based on source ranges, etc., that we might want something like a sorted list of Spans for each file that we can binary-search to look up an interceptor, a la the ValueSets used for patterns. However, it seems like something we shouldn't build if we don't need it.