Skip to content

[cpyrt] Cache anonymous-enum constant values in CPPDataMember - #94

Merged
aaronj0 merged 1 commit into
compiler-research:mainfrom
aaronj0:cache-anon-enum-values
Sep 8, 2026
Merged

[cpyrt] Cache anonymous-enum constant values in CPPDataMember#94
aaronj0 merged 1 commit into
compiler-research:mainfrom
aaronj0:cache-anon-enum-values

Conversation

@aaronj0

@aaronj0 aaronj0 commented Sep 8, 2026

Copy link
Copy Markdown
Collaborator

dm_get computed the value of an anonymous-enum constant but did not cache it. kIsEnumPrep is cleared on the first access and kIsEnumType was never set, so later accesses skipped the enum branch and read the instance memory at the member's offset instead. Cache the value in fDescription and set kIsEnumType, as the named-enum path does. From the ROOT migration.

dm_get computed the value of an anonymous-enum constant but did not
cache it. kIsEnumPrep is cleared on the first access and kIsEnumType was
never set, so later accesses skipped the enum branch and read the
instance memory at the member's offset instead. Cache the value in
fDescription and set kIsEnumType, as the named-enum path does.
@aaronj0
aaronj0 requested a review from guitargeek September 8, 2026 06:53

@guitargeek guitargeek left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM!

@aaronj0
aaronj0 merged commit 9d162d5 into compiler-research:main Sep 8, 2026
26 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.

2 participants