Skip to content

refactor: reuse generic SmolStrIds in enum extract_variants#9100

Merged
orizi merged 1 commit intostarkware-libs:mainfrom
MoNyAvA:refactor
Dec 15, 2025
Merged

refactor: reuse generic SmolStrIds in enum extract_variants#9100
orizi merged 1 commit intostarkware-libs:mainfrom
MoNyAvA:refactor

Conversation

@MoNyAvA
Copy link
Contributor

@MoNyAvA MoNyAvA commented Dec 15, 2025

Precompute the list of generic parameter identifiers once in PluginTypeInfo::new for enums and pass it to extract_variants, instead of rebuilding a Vec for each variant. This matches the pattern already used for structs in extract_members, removes redundant allocations and avoids repeated interning work while keeping the behavior of is_dependent_type unchanged.

@reviewable-StarkWare
Copy link

This change is Reviewable

Copy link
Collaborator

@orizi orizi left a comment

Choose a reason for hiding this comment

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

:lgtm:

@orizi reviewed 1 of 1 files at r1, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @MoNyAvA)


a discussion (no related file):
@TomerStarkware for 2nd eye.

Copy link
Collaborator

@TomerStarkware TomerStarkware left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @MoNyAvA)

@orizi orizi enabled auto-merge December 15, 2025 15:15
@orizi orizi added this pull request to the merge queue Dec 15, 2025
Merged via the queue into starkware-libs:main with commit ce54d47 Dec 15, 2025
54 checks passed
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.

4 participants