mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Run constant optimiser on fresh inputs in the fuzzer
This commit is contained in:
parent
9836f90e70
commit
06998bc8e1
@ -95,12 +95,14 @@ void FuzzerUtil::testConstantOptimizer(string const& _input, bool _quiet)
|
||||
for (bool isCreation: {false, true})
|
||||
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(
|
||||
isCreation,
|
||||
runs,
|
||||
EVMVersion{},
|
||||
assembly,
|
||||
const_cast<AssemblyItems &>(assembly.items())
|
||||
const_cast<AssemblyItems &>(tmp.items())
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user