mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
New tests.
This commit is contained in:
parent
3996d0a343
commit
7f7c5ca171
@ -0,0 +1,38 @@
|
|||||||
|
{
|
||||||
|
function recursive() { recursive() }
|
||||||
|
function terminating() { stop() }
|
||||||
|
function maybeReverting() { if calldataload(0) { revert(0, 0) } }
|
||||||
|
|
||||||
|
let a := calldataload(7)
|
||||||
|
if a { recursive() }
|
||||||
|
|
||||||
|
a := calldataload(a)
|
||||||
|
if a { maybeReverting() }
|
||||||
|
|
||||||
|
a := calldataload(a)
|
||||||
|
if a { terminating() }
|
||||||
|
|
||||||
|
sstore(0, a)
|
||||||
|
}
|
||||||
|
// ----
|
||||||
|
// step: conditionalSimplifier
|
||||||
|
//
|
||||||
|
// {
|
||||||
|
// function recursive()
|
||||||
|
// { recursive() }
|
||||||
|
// function terminating()
|
||||||
|
// { stop() }
|
||||||
|
// function maybeReverting()
|
||||||
|
// {
|
||||||
|
// if calldataload(0) { revert(0, 0) }
|
||||||
|
// }
|
||||||
|
// let a := calldataload(7)
|
||||||
|
// if a { recursive() }
|
||||||
|
// a := 0
|
||||||
|
// a := calldataload(a)
|
||||||
|
// if a { maybeReverting() }
|
||||||
|
// a := calldataload(a)
|
||||||
|
// if a { terminating() }
|
||||||
|
// a := 0
|
||||||
|
// sstore(0, a)
|
||||||
|
// }
|
@ -0,0 +1,38 @@
|
|||||||
|
{
|
||||||
|
function recursive() { recursive() }
|
||||||
|
function terminating() { stop() }
|
||||||
|
function maybeReverting() { if calldataload(0) { revert(0, 0) } }
|
||||||
|
|
||||||
|
let a := calldataload(7)
|
||||||
|
if a { recursive() }
|
||||||
|
a := 0
|
||||||
|
|
||||||
|
a := calldataload(a)
|
||||||
|
if a { maybeReverting() }
|
||||||
|
|
||||||
|
a := calldataload(a)
|
||||||
|
if a { terminating() }
|
||||||
|
a := 0
|
||||||
|
|
||||||
|
sstore(0, a)
|
||||||
|
}
|
||||||
|
// ----
|
||||||
|
// step: conditionalUnsimplifier
|
||||||
|
//
|
||||||
|
// {
|
||||||
|
// function recursive()
|
||||||
|
// { recursive() }
|
||||||
|
// function terminating()
|
||||||
|
// { stop() }
|
||||||
|
// function maybeReverting()
|
||||||
|
// {
|
||||||
|
// if calldataload(0) { revert(0, 0) }
|
||||||
|
// }
|
||||||
|
// let a := calldataload(7)
|
||||||
|
// if a { recursive() }
|
||||||
|
// a := calldataload(a)
|
||||||
|
// if a { maybeReverting() }
|
||||||
|
// a := calldataload(a)
|
||||||
|
// if a { terminating() }
|
||||||
|
// sstore(0, a)
|
||||||
|
// }
|
Loading…
Reference in New Issue
Block a user