Skip to content

SSA: Handle non-admissible stack shuffler results#16590

Closed
LeviofCrypto wants to merge 2 commits intoargotorg:developfrom
LeviofCrypto:ssa-handle-shuffler-status
Closed

SSA: Handle non-admissible stack shuffler results#16590
LeviofCrypto wants to merge 2 commits intoargotorg:developfrom
LeviofCrypto:ssa-handle-shuffler-status

Conversation

@LeviofCrypto
Copy link
Copy Markdown

This changes the SSA stack shuffler call sites to stop asserting that every shuffle is admissible. Instead, the code routes non-admissible results through requireAdmissibleShuffle(), which turns StackTooDeep into StackTooDeepError and unexpected statuses into InternalCompilerError with context about the source and target stacks.

The helper is used in SSA code generation, stack layout generation, and target-size evaluation so failures are surfaced consistently from the actual consumer sites. The change also adds unit coverage for the new error mapping and wires the test into soltest.

@github-actions
Copy link
Copy Markdown

Thank you for your contribution to the Solidity compiler! A team member will follow up shortly.

If you haven't read our contributing guidelines and our review checklist before, please do it now, this makes the reviewing process and accepting your contribution smoother.

If you have any questions or need our help, feel free to post them in the PR or talk to us directly on the #solidity-dev channel on Matrix.

@clonker
Copy link
Copy Markdown
Member

clonker commented Apr 13, 2026

Hi, thank you very much for your efforts, it is appreciated! However currently the SSA-CFG backend is in flux and especially the parts you are touching here are precisely the ones that are bound to change once stack-to-deep handling is implemented. The very changes you are making here would have to be undone at least to some degree. Therefore, I am closing this.

@clonker clonker closed this Apr 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants