mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #5874 from ethereum/fuzzer-optim
Run constant optimiser on fresh inputs in the fuzzer
This commit is contained in:
commit
e6d102f2c7
@ -95,12 +95,14 @@ void FuzzerUtil::testConstantOptimizer(string const& _input, bool _quiet)
|
|||||||
for (bool isCreation: {false, true})
|
for (bool isCreation: {false, true})
|
||||||
for (unsigned runs: {1, 2, 3, 20, 40, 100, 200, 400, 1000})
|
for (unsigned runs: {1, 2, 3, 20, 40, 100, 200, 400, 1000})
|
||||||
{
|
{
|
||||||
|
// Make a copy here so that each time we start with the original state.
|
||||||
|
Assembly tmp = assembly;
|
||||||
ConstantOptimisationMethod::optimiseConstants(
|
ConstantOptimisationMethod::optimiseConstants(
|
||||||
isCreation,
|
isCreation,
|
||||||
runs,
|
runs,
|
||||||
EVMVersion{},
|
EVMVersion{},
|
||||||
assembly,
|
assembly,
|
||||||
const_cast<AssemblyItems &>(assembly.items())
|
const_cast<AssemblyItems &>(tmp.items())
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user