Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: tailwindlabs/tailwindcss
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: tailwindlabs/tailwindcss
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: feat/walk-data-structure
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 2 commits
  • 2 files changed
  • 2 contributors

Commits on Oct 15, 2025

  1. change underlying data structure

    This improves memory usage and performance. The idea is exactly the same
    though. But instead of using `push()` and `pop()` we just build up 2
    objects where we can track the number and parent individually based on
    the `depth`.
    
    This means that we only allocate 2 objects (which we change over time)
    we then simply use `parents[depth]` and `offsets[depth]` to get the
    necessary data out.
    
    Additionally, we're only storing the index/offset and the parent now.
    Since the incoming ast is `T[]`, it means that we don't really have a
    parent. For this we can create a fake parent (which is never passed to
    `enter(…)`, `exit(…)` or used by `path()`)
    RobinMalfait committed Oct 15, 2025
    Configuration menu
    Copy the full SHA
    1ceea2f View commit details
    Browse the repository at this point in the history
  2. mutate node outside of the walk

    Co-authored-by: Jordan Pittman <jordan@cryptica.me>
    RobinMalfait and thecrypticace committed Oct 15, 2025
    Configuration menu
    Copy the full SHA
    f7382fe View commit details
    Browse the repository at this point in the history
Loading