Skip to content

Conversation

@fabianschuiki
Copy link
Contributor

Remove the Pure trait from om.object. With the op marked pure, the CSE pass will combine instances of the same class into a single instance. This is problematic, since users may expect distinct instances of the same class to be preserved as two separate instances instead of being deduplicated.

Instead, add the MemAlloc trait to the result of the ObjectOp. This causes the op to no longer CSE, but it allows unused objects to be erased.

Remove the `Pure` trait from `om.object`. With the op marked pure, the
CSE pass will combine instances of the same class into a single
instance. This is problematic, since users may expect distinct instances
of the same class to be preserved as two separate instances instead of
being deduplicated.

Instead, add the `MemAlloc` trait to the result of the `ObjectOp`. This
causes the op to no longer CSE, but it allows unused objects to be
erased.
@fabianschuiki fabianschuiki added bug Something isn't working OM Object Model labels Dec 4, 2025
Copy link
Contributor

@mikeurbach mikeurbach left a comment

Choose a reason for hiding this comment

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

Thanks for sussing this out and fixing it!

Copy link
Contributor

@dtzSiFive dtzSiFive left a comment

Choose a reason for hiding this comment

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

LGTM!

@fabianschuiki fabianschuiki merged commit b5d2ae5 into main Dec 4, 2025
7 checks passed
@fabianschuiki fabianschuiki deleted the fschuiki/object-identity branch December 4, 2025 20:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working OM Object Model

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants