Support metadata via IR.

This commit is contained in:
chriseth
2021-06-21 18:20:31 +02:00
parent ff3eca4ccc
commit 0df8a38e55
55 changed files with 211 additions and 29 deletions
+5 -3
View File
@@ -1351,7 +1351,11 @@ void CompilerStack::generateIR(ContractDefinition const& _contract)
otherYulSources.emplace(pair.second.contract, pair.second.yulIR);
IRGenerator generator(m_evmVersion, m_revertStrings, m_optimiserSettings);
tie(compiledContract.yulIR, compiledContract.yulIROptimized) = generator.run(_contract, otherYulSources);
tie(compiledContract.yulIR, compiledContract.yulIROptimized) = generator.run(
_contract,
createCBORMetadata(compiledContract),
otherYulSources
);
}
void CompilerStack::generateEVMFromIR(ContractDefinition const& _contract)
@@ -1375,8 +1379,6 @@ void CompilerStack::generateEVMFromIR(ContractDefinition const& _contract)
//cout << yul::AsmPrinter{}(*stack.parserResult()->code) << endl;
// TODO: support passing metadata
string deployedName = IRNames::deployedObject(_contract);
solAssert(!deployedName.empty(), "");
tie(compiledContract.evmAssembly, compiledContract.evmRuntimeAssembly) = stack.assembleEVMWithDeployed(deployedName);