Merge pull request #6639 from ethereum/yul-require-assert

Yul generation of "require" and "assert"
This commit is contained in:
chriseth
2019-05-07 16:59:37 +02:00
committed by GitHub
7 changed files with 152 additions and 1 deletions
+4
View File
@@ -62,6 +62,10 @@ public:
/// Pads with zeros and might write more than exactly length.
std::string copyToMemoryFunction(bool _fromCalldata);
// @returns the name of a function that has the equivalent logic of an
// `assert` or `require` call.
std::string requireOrAssertFunction(bool _assert, Type const* _messageType = nullptr);
/// @returns the name of a function that takes a (cleaned) value of the given value type and
/// left-aligns it, usually for use in non-padded encoding.
std::string leftAlignFunction(Type const& _type);