| 1062 | } |
| 1063 | |
| 1064 | std::optional<Json> CompilerStack::yulIROptimizedAst(std::string const& _contractName) const |
| 1065 | { |
| 1066 | solAssert(m_stackState == CompilationSuccessful, "Compilation was not successful."); |
| 1067 | solUnimplementedAssert(!isExperimentalSolidity()); |
| 1068 | |
| 1069 | // NOTE: Intentionally not using LazyInit. The artifact can get very large and we don't want to |
| 1070 | // keep it around when compiling a large project containing many contracts. |
| 1071 | Contract const& currentContract = contract(_contractName); |
| 1072 | yulAssert(currentContract.contract); |
| 1073 | yulAssert(currentContract.yulIROptimized.has_value() == currentContract.contract->canBeDeployed()); |
| 1074 | if (!currentContract.yulIROptimized) |
| 1075 | return std::nullopt; |
| 1076 | return loadGeneratedIR(*currentContract.yulIROptimized).astJson(); |
| 1077 | } |
| 1078 | |
| 1079 | evmasm::LinkerObject const& CompilerStack::object(std::string const& _contractName) const |
| 1080 | { |
no test coverage detected