solidity
solidity copied to clipboard
Generating IR without dependencies included
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 Object
s. This will make the compiler reuse optimized IR