Skip to content

Commit e7d6352

Browse files
author
Mohammad Rezaei
committed
test updates
1 parent 22426e3 commit e7d6352

3 files changed

Lines changed: 11 additions & 19 deletions

File tree

test/libevmasm/evmAssemblyTests/constant_optimizer_runs_0.asm

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -59,15 +59,15 @@ PUSH 0x2
5959
// not(0x752f)
6060
// not(0xffffffff)
6161
// not(shl(0x40, 0xffffffff))
62-
// 0x03ffffffff
63-
// sub(shl(0xfa, 0x01), 0x01)
64-
// sub(shl(0xed, 0x01), shl(0xad, 0x01))
65-
// sub(shl(0x7b, 0x01), shl(0x40, 0x01))
66-
// add(shl(0xf0, 0x01), shl(0xac, 0x03))
67-
// add(shl(0x60, 0x100000000001), shl(0x2c, 0x01))
68-
// not(sub(shl(0x80, 0x0200000001), shl(0x40, 0x01)))
69-
// not(add(shl(0x80, 0xffffffff), 0xffffffff))
70-
// add(shl(0xea, 0x01deaf), 0x01)
62+
// shr(0xde, not(0x00))
63+
// shr(0x06, not(0x00))
64+
// shl(0xad, shr(0xc0, not(0x00)))
65+
// shl(0x40, shr(0xc5, not(0x00)))
66+
// shl(0xac, or(0x03, shl(0x44, 0x01)))
67+
// shl(0x2c, or(0x01, shl(0x34, 0x100000000001)))
68+
// not(shl(0x40, or(shr(0xc0, not(0x00)), shl(0x61, 0x01))))
69+
// not(or(0xffffffff, shl(0x80, 0xffffffff)))
70+
// or(0x01, shl(0xea, 0x01deaf))
7171
// sub(shl(0x46, 0x01), 0x40)
7272
// sub(shl(0x40, 0x01), 0x20)
7373
// }

test/libevmasm/evmAssemblyTests/constant_optimizer_runs_200.asm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,14 @@ PUSH 0x2
5656
// not(0xffffffff)
5757
// not(0xffffffff0000000000000000)
5858
// 0x03ffffffff
59-
// sub(shl(0xfa, 0x01), 0x01)
59+
// shr(0x06, not(0x00))
6060
// shl(0xad, 0xffffffffffffffff)
6161
// 0x07ffffffffffffff0000000000000000
6262
// shl(0xac, 0x100000000000000003)
6363
// 0x100000000001000000000000100000000000
6464
// not(0x0200000000ffffffffffffffff0000000000000000)
6565
// not(0xffffffff000000000000000000000000ffffffff)
66-
// add(shl(0xea, 0x01deaf), 0x01)
66+
// or(0x01, shl(0xea, 0x01deaf))
6767
// 0x3fffffffffffffffc0
6868
// 0xffffffffffffffe0
6969
// }

test/libsolidity/SolidityOptimizer.cpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -420,14 +420,6 @@ BOOST_AUTO_TEST_CASE(computing_constants)
420420
++iter;
421421
}
422422
BOOST_CHECK_EQUAL(2, occurrences);
423-
424-
bytes constantWithZeros = toBigEndian(u256("0x77abc0000000000000000000000000000000000000000000000000000000001"));
425-
BOOST_CHECK(search(
426-
optimizedBytecode.cbegin(),
427-
optimizedBytecode.cend(),
428-
constantWithZeros.cbegin(),
429-
constantWithZeros.cend()
430-
) == optimizedBytecode.cend());
431423
}
432424

433425

0 commit comments

Comments
 (0)