Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

chore(syntax-highlighter): Some cleanup for locals detection#64144

Merged
kritzcreek merged 4 commits into
mainfrom
christoph/locals-cleanup
Jul 30, 2024
Merged

chore(syntax-highlighter): Some cleanup for locals detection#64144
kritzcreek merged 4 commits into
mainfrom
christoph/locals-cleanup

Conversation

@kritzcreek

@kritzcreek kritzcreek commented Jul 30, 2024

Copy link
Copy Markdown
Contributor
  1. Use interned strings for scope kinds
    This lets us avoid a few String allocations and requires dealing with fewer lifetimes/borrows
  2. Unify tree walks to use Ancestors
    This means we now consistently apply the fuel limit (we were missing a few loops before)
  3. Use binary search over linear search to find preceding defs
    Silly me
  4. Removes hacks for skipping entries in the scope tree
    We now make sure to never insert references that ought to be skipped in the first place

I'd recommend reviewing commit by commit, the changes aren't really related. Just didn't want to spam PRs for this.

Test plan

Snapshots continue to pass. Verified fuel limit is enforced by creating loopy trees on purpose. Ran some hyperfines on spring-framework to make sure perf didn't regress.

Christoph Hegemann added 3 commits July 30, 2024 09:53
This lets us avoid a few String allocations and requires dealing with
fewer lifetimes/borrows
This means we now consistently apply the fuel limit (we were missing a
few loops before)
@cla-bot cla-bot Bot added the cla-signed label Jul 30, 2024
@github-actions github-actions Bot added team/graph Graph Team (previously Code Intel/Language Tools/Language Platform) team/product-platform labels Jul 30, 2024
We now make sure to never enter references that ought to be skipped
@kritzcreek kritzcreek marked this pull request as ready for review July 30, 2024 08:14
@kritzcreek kritzcreek merged commit 62b4718 into main Jul 30, 2024
@kritzcreek kritzcreek deleted the christoph/locals-cleanup branch July 30, 2024 10:02
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

cla-signed team/graph Graph Team (previously Code Intel/Language Tools/Language Platform) team/product-platform

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants