aboutsummaryrefslogtreecommitdiffstats
path: root/libyul/optimiser
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2018-10-25 18:44:28 +0800
committerGitHub <noreply@github.com>2018-10-25 18:44:28 +0800
commitf714b0dd7c0b48ea2b93855e1cda9d1101b3f35c (patch)
treec207622e955dba0a4a9839dc42bbba7d9b86a329 /libyul/optimiser
parent4076875927b279342dacf690f86bfc16af03dd67 (diff)
parenta9a414bd0f6ba89bfd719ea6b6c8501861e0ece6 (diff)
downloaddexon-solidity-f714b0dd7c0b48ea2b93855e1cda9d1101b3f35c.tar.gz
dexon-solidity-f714b0dd7c0b48ea2b93855e1cda9d1101b3f35c.tar.zst
dexon-solidity-f714b0dd7c0b48ea2b93855e1cda9d1101b3f35c.zip
Merge pull request #5242 from ethereum/someChecks
Some well-formedness checks for the Yul AST.
Diffstat (limited to 'libyul/optimiser')
-rw-r--r--libyul/optimiser/SimplificationRules.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/libyul/optimiser/SimplificationRules.cpp b/libyul/optimiser/SimplificationRules.cpp
index 4d0468c7..aca943b0 100644
--- a/libyul/optimiser/SimplificationRules.cpp
+++ b/libyul/optimiser/SimplificationRules.cpp
@@ -209,6 +209,7 @@ u256 Pattern::d() const
{
Literal const& literal = boost::get<Literal>(matchGroupValue());
assertThrow(literal.kind == assembly::LiteralKind::Number, OptimizerException, "");
+ assertThrow(isValidDecimal(literal.value) || isValidHex(literal.value), OptimizerException, "");
return u256(literal.value);
}