Use side-effects of user defined functions in evm code transform.

This commit is contained in:
chriseth
2022-11-14 21:26:36 +01:00
parent 4100a59cca
commit 5ba8c109f4
19 changed files with 182 additions and 122 deletions
@@ -0,0 +1,22 @@
{
let b := f(1, 2)
function f(a, r) -> t { revert(0, 0) }
b := f(3, 4)
}
// ====
// stackOptimization: true
// ----
// /* "":17:18 */
// 0x02
// /* "":14:15 */
// 0x01
// /* "":12:19 */
// tag_1
// jump // in
// /* "":21:59 */
// tag_1:
// /* "":55:56 */
// 0x00
// /* "":45:57 */
// dup1
// revert