mirror of
https://github.com/compiler-explorer/compiler-explorer.git
synced 2025-12-27 10:33:59 -05:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user