Skip to content

ref(symcache): Improve conversion, turn location into proper tagged union - #1039

Open
Dav1dde wants to merge 1 commit into
masterfrom
dav1d/improve-conversions-tagged-unions
Open

ref(symcache): Improve conversion, turn location into proper tagged union#1039
Dav1dde wants to merge 1 commit into
masterfrom
dav1d/improve-conversions-tagged-unions

Conversation

@Dav1dde

@Dav1dde Dav1dde commented Aug 5, 2026

Copy link
Copy Markdown
Member

Improves conversions from debuginfo types to raw types in symcaches:

  • Conversions are now in a single place (convert.rs)
  • Locations now use a tagged union like types did before

There is also a breaking change in here, the removal of PartialEq and Eq from SymCache and SourceLocation. Comparing a sym cache is not cheap, it is implemented by comparing all individually stored types. It is equivalent to running a memcmp on the entire data region, which would be more efficient than comparing all individual types.

If this needs to come back, we should either assign a uuid for each symcache or really do a memcmp.

@Dav1dde
Dav1dde force-pushed the dav1d/improve-conversions-tagged-unions branch from 2fa3780 to c9378dd Compare August 5, 2026 12:31
@Dav1dde
Dav1dde marked this pull request as ready for review August 5, 2026 12:34
@Dav1dde
Dav1dde requested a review from a team as a code owner August 5, 2026 12:34
@Dav1dde
Dav1dde force-pushed the dav1d/improve-conversions-tagged-unions branch from c9378dd to 4527ba4 Compare August 5, 2026 12:37
Comment thread symbolic-symcache/src/v9/lookup.rs
Comment thread symbolic-symcache/src/writer.rs
Comment thread symbolic-symcache/src/lookup.rs

@tobias-wilfert tobias-wilfert left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pretty wild

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants