solidity icon indicating copy to clipboard operation
solidity copied to clipboard

Generating IR without dependencies included

Open cameel opened this issue 1 month ago • 0 comments

The first part of refactor for #15179.

Introduces ObjectSource object that can store partial IR output (without the sources of dependent contracts). Then makes IRGenerator output it. Finally CompilerStack puts it together into a complete IR source file.

Status

Works but still needs some tweaks.

It compiles and gives the same results as the original codegen, but I want to do some final changes to the structure and also fill in small things that I skipped on the first pass (constructors, docstrings, etc.). The remaining stuff is marked with TMP notes.

The next step will be passing ObjectSource directly to YulStack and making it handle incomplete Objects. This will make the compiler reuse optimized IR

cameel avatar Jun 26 '24 12:06 cameel