mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Replaced solAssert in Jumpdest optimization
This is the only use of solAssert in libevmasm, and the only dependency on libsolidity. There is no justification for why the illegal state is checked here.
This commit is contained in:
parent
3c8771c760
commit
83f326525e
@ -21,8 +21,6 @@
|
||||
|
||||
#include "JumpdestRemover.h"
|
||||
|
||||
#include <libsolidity/interface/Exceptions.h>
|
||||
|
||||
#include <libevmasm/AssemblyItem.h>
|
||||
|
||||
using namespace std;
|
||||
@ -45,7 +43,7 @@ bool JumpdestRemover::optimise(set<size_t> const& _tagsReferencedFromOutside)
|
||||
if (_item.type() != Tag)
|
||||
return false;
|
||||
auto asmIdAndTag = _item.splitForeignPushTag();
|
||||
solAssert(asmIdAndTag.first == size_t(-1), "Sub-assembly tag used as label.");
|
||||
assertThrow(asmIdAndTag.first == size_t(-1), OptimizerException, "Sub-assembly tag used as label.");
|
||||
size_t tag = asmIdAndTag.second;
|
||||
return !references.count(tag);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user