From 83f326525e20fe18ae69849b1f5604ef3e88954e Mon Sep 17 00:00:00 2001 From: Isaac van Bakel Date: Sat, 25 Nov 2017 21:51:27 +0000 Subject: 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. --- libevmasm/JumpdestRemover.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libevmasm/JumpdestRemover.cpp b/libevmasm/JumpdestRemover.cpp index b6016798..60493a99 100644 --- a/libevmasm/JumpdestRemover.cpp +++ b/libevmasm/JumpdestRemover.cpp @@ -21,8 +21,6 @@ #include "JumpdestRemover.h" -#include - #include using namespace std; @@ -45,7 +43,7 @@ bool JumpdestRemover::optimise(set 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); } -- cgit v1.2.3