Command line tests and minor touch ups

This commit is contained in:
Nikola Matic
2022-09-12 11:13:49 +02:00
parent ddf0d784ac
commit 314a1cc92f
15 changed files with 88 additions and 47 deletions
+1
View File
@@ -1540,6 +1540,7 @@ string CompilerStack::createMetadata(Contract const& _contract, bool _forIR) con
details["yulDetails"] = Json::objectValue;
details["yulDetails"]["stackAllocation"] = m_optimiserSettings.optimizeStackAllocation;
details["yulDetails"]["optimizerSteps"] = m_optimiserSettings.yulOptimiserSteps;
details["yulDetails"]["optimizerCleanupSteps"] = m_optimiserSettings.yulOptimiserCleanupSteps;
}
meta["settings"]["optimizer"]["details"] = std::move(details);
+3 -4
View File
@@ -148,10 +148,9 @@ struct OptimiserSettings
/// them just by setting this to an empty string. Set @a runYulOptimiser to false if you want
/// no optimisations.
std::string yulOptimiserSteps = DefaultYulOptimiserSteps;
/// Sequence of clean up optimisation steps after the above (default or user supplied) set of
/// optimisation steps is completed. Note that if the string is left empty, there will still
/// be hard-coded optimisation steps that will run regardless. Set @a runYulOptimiser to false
/// if you want no optimisations.
/// Sequence of clean-up optimisation steps after yulOptimiserSteps is run. Note that if the string
/// is left empty, there will still be hard-coded optimisation steps that will run regardless.
/// Set @a runYulOptimiser to false if you want no optimisations.
std::string yulOptimiserCleanupSteps = DefaultYulOptimiserCleanupSteps;
/// This specifies an estimate on how often each opcode in this assembly will be executed,
/// i.e. use a small value to optimise for size and a large value to optimise for runtime gas usage.
+1 -1
View File
@@ -490,7 +490,7 @@ std::optional<Json::Value> checkOptimizerDetailSteps(Json::Value const& _details
);
}
std::string const fullSequence = _details[_name].asString();
string const fullSequence = _details[_name].asString();
auto const delimiterPos = fullSequence.find(":");
_optimiserSetting = fullSequence.substr(0, delimiterPos);