Skip to content

Conversation

@ml86
Copy link
Contributor

@ml86 ml86 commented Dec 8, 2025

So far the python frontend emitted tmp variables in the context of call
site lowering if the <x> in a <x>.y() call was anything other than
an identifier/name. Now we also avoid emitting tmp variables if <x> is
a member access chain. E.g. x.y.z(). This leads to less clutter and
better alias handling.

So far the python frontend emitted tmp variables in the context of call
site lowering if the `<x>` in a `<x>.y()` call was anything other than
an identifier/name. Now we also avoid emitting tmp variables if `<x>` is
a member access chain. E.g. `x.y.z()`. This leads to less clutter and
better alias handling.
@ml86 ml86 requested review from bbrehm and maltek December 8, 2025 17:47
Copy link
Contributor

@maltek maltek left a comment

Choose a reason for hiding this comment

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

Maybe rename mayHaveSideEffects to assumeNoSideEffects or so? In principle, python does support computed getters/setters that can have side effects. To be clear, I'm not saying we should revisit our long-standing assumption that such getters/setters actually behave like a simple field access. Just that we should spell this assumption out more clearly here.

@ml86
Copy link
Contributor Author

ml86 commented Dec 9, 2025

Fair point, i will rename it in a follow up PR to keep this here small.

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.

3 participants