Merge pull request #9630 from ethereum/tests-SideEffects

Tests for refactor-SideEffects
This commit is contained in:
Leonardo 2020-08-17 10:56:52 +02:00 committed by GitHub
commit e6b2075af3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 48 additions and 0 deletions

View File

@ -0,0 +1,14 @@
{
function a() { mstore8(0, 32) }
function f() { a() }
function g() { sstore(0, 1) } // does not affect memory
function h() { pop(mload(0)) }
function i() { pop(msize()) }
}
// ----
// : movable, sideEffectFree, sideEffectFreeIfNoMSize
// a: invalidatesMemory
// f: invalidatesMemory
// g: invalidatesStorage
// h: sideEffectFreeIfNoMSize
// i: sideEffectFree, sideEffectFreeIfNoMSize

View File

@ -0,0 +1,12 @@
{
function a() { pop(gas()) }
function f() { a() }
function g() { stop() }
function h() { invalid() }
}
// ----
// : movable, sideEffectFree, sideEffectFreeIfNoMSize
// a: sideEffectFree, sideEffectFreeIfNoMSize
// f: sideEffectFree, sideEffectFreeIfNoMSize
// g:
// h:

View File

@ -0,0 +1,10 @@
{
function a() { pop(call(100, 0x010, 10, 0x00, 32, 0x0100, 32))}
function f() { a() }
function g() { sstore(0, 1) }
}
// ----
// : movable, sideEffectFree, sideEffectFreeIfNoMSize
// a: invalidatesStorage, invalidatesMemory
// f: invalidatesStorage, invalidatesMemory
// g: invalidatesStorage

View File

@ -0,0 +1,12 @@
{
function a() { sstore(0, 1) }
function f() { a() }
function g() { pop(callcode(100, 0x010, 10, 0x00, 32, 0x0100, 32))}
function h() { pop(sload(0))}
}
// ----
// : movable, sideEffectFree, sideEffectFreeIfNoMSize
// a: invalidatesStorage
// f: invalidatesStorage
// g: invalidatesStorage, invalidatesMemory
// h: sideEffectFree, sideEffectFreeIfNoMSize