mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
CFG returns vector of blocks instead of assembly items.
This commit is contained in:
parent
3649c1fc60
commit
a0cc8abb2a
@ -131,8 +131,12 @@ public:
|
|||||||
// Running it four times should be enough for these tests.
|
// Running it four times should be enough for these tests.
|
||||||
for (unsigned i = 0; i < 4; ++i)
|
for (unsigned i = 0; i < 4; ++i)
|
||||||
{
|
{
|
||||||
eth::ControlFlowGraph cfg(output);
|
ControlFlowGraph cfg(output);
|
||||||
output = cfg.optimisedItems();
|
AssemblyItems optItems;
|
||||||
|
for (BasicBlock const& block: cfg.optimisedBlocks())
|
||||||
|
copy(output.begin() + block.begin, output.begin() + block.end,
|
||||||
|
back_inserter(optItems));
|
||||||
|
output = move(optItems);
|
||||||
}
|
}
|
||||||
BOOST_CHECK_EQUAL_COLLECTIONS(_expectation.begin(), _expectation.end(), output.begin(), output.end());
|
BOOST_CHECK_EQUAL_COLLECTIONS(_expectation.begin(), _expectation.end(), output.begin(), output.end());
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user