2018-06-04 11:54:32 +00:00
|
|
|
contract C {
|
|
|
|
struct S { uint x; }
|
|
|
|
S s;
|
|
|
|
function e() pure public {
|
2020-07-01 17:25:14 +00:00
|
|
|
assembly { mstore(keccak256(0, 20), mul(s.slot, 2)) }
|
2018-06-04 11:54:32 +00:00
|
|
|
}
|
|
|
|
function f() pure public {
|
|
|
|
uint x;
|
|
|
|
assembly { x := 7 }
|
|
|
|
}
|
|
|
|
function g() view public {
|
2019-09-10 11:35:55 +00:00
|
|
|
assembly { for {} 1 { pop(sload(0)) } { } pop(gas()) }
|
2018-06-04 11:54:32 +00:00
|
|
|
}
|
|
|
|
function h() view public {
|
|
|
|
assembly { function g() { pop(blockhash(20)) } }
|
|
|
|
}
|
2020-10-02 10:37:13 +00:00
|
|
|
function i() public {
|
2018-06-04 11:54:32 +00:00
|
|
|
assembly { pop(call(0, 1, 2, 3, 4, 5, 6)) }
|
|
|
|
}
|
2020-10-02 10:37:13 +00:00
|
|
|
function j() public {
|
2019-09-10 11:35:55 +00:00
|
|
|
assembly { pop(call(gas(), 1, 2, 3, 4, 5, 6)) }
|
2018-06-04 11:54:32 +00:00
|
|
|
}
|
2020-10-02 10:37:13 +00:00
|
|
|
function k() public view {
|
|
|
|
assembly { pop(balance(0)) }
|
|
|
|
}
|
|
|
|
function l() public view {
|
|
|
|
assembly { pop(extcodesize(0)) }
|
|
|
|
}
|
2018-06-04 11:54:32 +00:00
|
|
|
}
|
2021-03-12 23:02:36 +00:00
|
|
|
// ----
|