Yul Backend: Get rid of heuristics for finding the matching runtime

This commit is contained in:
Mathias Baumann
2021-02-09 14:50:25 +01:00
parent d393624384
commit e4f1257c83
13 changed files with 51 additions and 21 deletions
+1 -1
View File
@@ -1302,7 +1302,7 @@ void CompilerStack::generateEVMFromIR(ContractDefinition const& _contract)
// TODO: use stack.assemble here!
yul::MachineAssemblyObject init;
yul::MachineAssemblyObject runtime;
std::tie(init, runtime) = stack.assembleAndGuessRuntime();
std::tie(init, runtime) = stack.assembleWithDeployed(IRNames::runtimeObject(_contract));
compiledContract.object = std::move(*init.bytecode);
compiledContract.runtimeObject = std::move(*runtime.bytecode);
// TODO: refactor assemblyItems, runtimeAssemblyItems, generatedSources,
+1 -1
View File
@@ -1273,7 +1273,7 @@ Json::Value StandardCompiler::compileYul(InputsAndSettings _inputsAndSettings)
MachineAssemblyObject object;
MachineAssemblyObject runtimeObject;
tie(object, runtimeObject) = stack.assembleAndGuessRuntime();
tie(object, runtimeObject) = stack.assembleWithDeployed();
if (object.bytecode)
object.bytecode->link(_inputsAndSettings.libraries);