mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Optimizer: generate code starting with empty state
This commit is contained in:
parent
3e13e59ff9
commit
ba42c6e447
@ -9,6 +9,7 @@ Features:
|
|||||||
* Support shifting constant numbers.
|
* Support shifting constant numbers.
|
||||||
|
|
||||||
Bugfixes:
|
Bugfixes:
|
||||||
|
* Optimizer: fix related to stale knowledge about SHA3 operations
|
||||||
* Disallow unknown options in ``solc``.
|
* Disallow unknown options in ``solc``.
|
||||||
* Proper type checking for bound functions.
|
* Proper type checking for bound functions.
|
||||||
* Code Generator: expect zero stack increase after `super` as an expression.
|
* Code Generator: expect zero stack increase after `super` as an expression.
|
||||||
|
@ -327,8 +327,10 @@ Assembly& Assembly::optimise(bool _enable, bool _isCreation, size_t _runs)
|
|||||||
AssemblyItems optimisedItems;
|
AssemblyItems optimisedItems;
|
||||||
for (BasicBlock const& block: cfg.optimisedBlocks())
|
for (BasicBlock const& block: cfg.optimisedBlocks())
|
||||||
{
|
{
|
||||||
assertThrow(!!block.startState, OptimizerException, "");
|
// We used to start with the block's initial state but it caused
|
||||||
CommonSubexpressionEliminator eliminator(*block.startState);
|
// too many inconsistencies.
|
||||||
|
KnownState emptyState;
|
||||||
|
CommonSubexpressionEliminator eliminator(emptyState);
|
||||||
auto iter = m_items.begin() + block.begin;
|
auto iter = m_items.begin() + block.begin;
|
||||||
auto const end = m_items.begin() + block.end;
|
auto const end = m_items.begin() + block.end;
|
||||||
while (iter < end)
|
while (iter < end)
|
||||||
|
Loading…
Reference in New Issue
Block a user