mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Command line tests and minor touch ups
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user