mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #11550 from ethereum/runs-constant
Constant for default --runs
This commit is contained in:
@@ -243,7 +243,7 @@ void CompilerStack::setLibraries(std::map<std::string, util::h160> const& _libra
|
||||
m_libraries = _libraries;
|
||||
}
|
||||
|
||||
void CompilerStack::setOptimiserSettings(bool _optimize, unsigned _runs)
|
||||
void CompilerStack::setOptimiserSettings(bool _optimize, size_t _runs)
|
||||
{
|
||||
OptimiserSettings settings = _optimize ? OptimiserSettings::standard() : OptimiserSettings::minimal();
|
||||
settings.expectedExecutionsPerDeployment = _runs;
|
||||
|
||||
@@ -146,7 +146,7 @@ public:
|
||||
|
||||
/// Changes the optimiser settings.
|
||||
/// Must be set before parsing.
|
||||
void setOptimiserSettings(bool _optimize, unsigned _runs = 200);
|
||||
void setOptimiserSettings(bool _optimize, size_t _runs = OptimiserSettings{}.expectedExecutionsPerDeployment);
|
||||
|
||||
/// Changes the optimiser settings.
|
||||
/// Must be set before parsing.
|
||||
|
||||
@@ -85,7 +85,6 @@ struct OptimiserSettings
|
||||
s.runConstantOptimiser = true;
|
||||
s.runYulOptimiser = true;
|
||||
s.optimizeStackAllocation = true;
|
||||
s.expectedExecutionsPerDeployment = 200;
|
||||
return s;
|
||||
}
|
||||
/// Full optimisations. Currently an alias for standard optimisations.
|
||||
|
||||
Reference in New Issue
Block a user