Add support for Yul intermediate view when compiling Solidity (#8219)

## What

Adds support for seeing Yul (Solidity IR) as intermediate output when
compiling Solidity.

This PR also enables that view for the Resolc compiler.

### Main Additions

- [x] Support viewing Yul in a supplementary view
- Solidity compilers can enable this by setting
`this.compiler.supportsYulView = true` in the compiler's constructor
- If custom processing of the Yul output or the Yul output filename is
needed, the compiler can override `processYulOutput()` or
`getYulOutputFilename()`
- [x] Enable the Yul view for Resolc
- [x] Implement a Yul backend option for filtering out debug info from
the output

### Notes

Source mappings are currently not handled for Yul -> Solidity.

## Overall Usage

### Steps

* Choose Solidity as the language
* Choose a Resolc compiler
* View intermediate results:
  * Yul
* (Hide/show debug info by toggling "Hide Debug Info" in the Yul view
filters)

## Screenshots

<img width="1502" height="903" alt="ce-yul-view"
src="https://github.com/user-attachments/assets/ccc897e2-cd8d-4c33-962c-522d60b63134"
/>
This commit is contained in:
LJ
2025-11-04 16:00:19 +01:00
committed by GitHub
parent 9b76c60701
commit 5a15d893d7
19 changed files with 424 additions and 1 deletions

View File

@@ -15,6 +15,7 @@ const PANE_DATA_MAP = {
core: {name: 'Core', selector: 'view-haskellCore'},
stg: {name: 'STG', selector: 'view-haskellStg'},
cmm: {name: 'Cmm', selector: 'view-haskellCmm'},
yul: {name: 'Yul', selector: 'view-yul'},
// TODO find a way to properly hack the state URL to test this pane like the rust
// ones seem to be able to do.
// clojure_macro: {name: 'Clojure Macro', selector: 'view-clojuremacroexp'},
@@ -68,6 +69,7 @@ describe('Individual pane testing', () => {
addPaneOpenTest(PANE_DATA_MAP.core);
addPaneOpenTest(PANE_DATA_MAP.stg);
addPaneOpenTest(PANE_DATA_MAP.cmm);
addPaneOpenTest(PANE_DATA_MAP.yul);
addPaneOpenTest(PANE_DATA_MAP.dump);
addPaneOpenTest(PANE_DATA_MAP.tree);
addPaneOpenTest(PANE_DATA_MAP.debug);