Skip to content

Fix redshifting of OpSpecs which return a blue result and drop red args - #766

Merged
antocuni merged 9 commits into
mainfrom
blue-result-side-effects
Nov 11, 2026
Merged

antocuni merged 9 commits into
mainfrom
blue-result-side-effects

Conversation

@antocuni

@antocuni antocuni commented Nov 10, 2026 •

Copy link
Copy Markdown
Member

This is a follow up of #762: we need to take care of side effects even when the result is blue.
This happens in particular when we pass red-arguments-with-side-effects to a metafunc, and the resulting OpImpl drops them.

As a result, now let(tup) is finally blue 🎉.

On a side note: I think that #762 and this PR show the limits of the current AST-based doppler: the advantage is to make the life of the backends very easy, but the disadvantage is that we need the overall doppler logic start to be convoluted and a bit fragile.
I wonder whether we should lower to ANF before doppler, or possibly abandon AST interpretation and switch to a more classical bytecode interp.

@antocuni
antocuni merged commit 490fb5f into main Nov 11, 2026
7 checks passed
@antocuni
antocuni deleted the blue-result-side-effects branch November 11, 2026 20:22
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.

1 participant