Add mini-interpreter to check representation.

This commit is contained in:
chriseth
2019-05-28 11:35:07 +02:00
parent 1c16124a09
commit cee1340113
3 changed files with 72 additions and 14 deletions
@@ -37,20 +37,6 @@ using namespace yul::test;
namespace
{
u256 exp256(u256 _base, u256 _exponent)
{
using boost::multiprecision::limb_type;
u256 result = 1;
while (_exponent)
{
if (boost::multiprecision::bit_test(_exponent, 0))
result *= _base;
_base *= _base;
_exponent >>= 1;
}
return result;
}
/// Reads 32 bytes from @a _data at position @a _offset bytes while
/// interpreting @a _data to be padded with an infinite number of zero
/// bytes beyond its end.