mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Update tests that would become ineffective with minimal optimizations applied
This commit is contained in:
parent
811b8e565b
commit
7ab730d410
@ -9,6 +9,7 @@ object "C_6_deployed" {
|
|||||||
|
|
||||||
/// @src 0:77:99 "function f() public {}"
|
/// @src 0:77:99 "function f() public {}"
|
||||||
function fun_f_5() {
|
function fun_f_5() {
|
||||||
|
sstore(0, 42)
|
||||||
}
|
}
|
||||||
/// @src 0:60:101 "contract C {..."
|
/// @src 0:60:101 "contract C {..."
|
||||||
}
|
}
|
||||||
|
@ -16,6 +16,7 @@ tag_2:
|
|||||||
/* \"input.sol\":77:99 */
|
/* \"input.sol\":77:99 */
|
||||||
jump(tag_3)
|
jump(tag_3)
|
||||||
tag_1:
|
tag_1:
|
||||||
|
sstore(0x00, 0x2a)
|
||||||
jump\t// out
|
jump\t// out
|
||||||
tag_3:
|
tag_3:
|
||||||
"
|
"
|
||||||
|
@ -9,6 +9,7 @@ object "C_6_deployed" {
|
|||||||
|
|
||||||
/// @src 0:77:99 "function f() public {}"
|
/// @src 0:77:99 "function f() public {}"
|
||||||
function fun_f_5() {
|
function fun_f_5() {
|
||||||
|
sstore(0, 42)
|
||||||
}
|
}
|
||||||
/// @src 0:60:101 "contract C {..."
|
/// @src 0:60:101 "contract C {..."
|
||||||
}
|
}
|
||||||
|
@ -16,6 +16,7 @@ tag_2:
|
|||||||
/* \"input.sol\":77:99 */
|
/* \"input.sol\":77:99 */
|
||||||
jump(tag_3)
|
jump(tag_3)
|
||||||
tag_1:
|
tag_1:
|
||||||
|
sstore(0x00, 0x2a)
|
||||||
jump\t// out
|
jump\t// out
|
||||||
tag_3:
|
tag_3:
|
||||||
"
|
"
|
||||||
|
@ -9,6 +9,7 @@ object "C_6_deployed" {
|
|||||||
|
|
||||||
/// @src 0:77:99 "function f() public {}"
|
/// @src 0:77:99 "function f() public {}"
|
||||||
function fun_f_5() {
|
function fun_f_5() {
|
||||||
|
sstore(0, 42)
|
||||||
}
|
}
|
||||||
/// @src 0:60:101 "contract C {..."
|
/// @src 0:60:101 "contract C {..."
|
||||||
}
|
}
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
tag_2:
|
tag_2:
|
||||||
jump(tag_3)
|
jump(tag_3)
|
||||||
tag_1:
|
tag_1:
|
||||||
|
sstore(0x00, 0x2a)
|
||||||
jump\t// out
|
jump\t// out
|
||||||
tag_3:
|
tag_3:
|
||||||
"
|
"
|
||||||
|
@ -9,6 +9,7 @@ object "C_6_deployed" {
|
|||||||
|
|
||||||
/// @src 0:77:99 "function f() public {}"
|
/// @src 0:77:99 "function f() public {}"
|
||||||
function fun_f_5() {
|
function fun_f_5() {
|
||||||
|
sstore(0, 42)
|
||||||
}
|
}
|
||||||
/// @src 0:60:101 "contract C {..."
|
/// @src 0:60:101 "contract C {..."
|
||||||
}
|
}
|
||||||
|
@ -9,6 +9,7 @@ object "C_6_deployed" {
|
|||||||
|
|
||||||
/// @src 0:77:99 "function f() public {}"
|
/// @src 0:77:99 "function f() public {}"
|
||||||
function fun_f_5() {
|
function fun_f_5() {
|
||||||
|
sstore(0, 42)
|
||||||
}
|
}
|
||||||
/// @src 0:60:101 "contract C {..."
|
/// @src 0:60:101 "contract C {..."
|
||||||
}
|
}
|
||||||
|
@ -10,13 +10,13 @@ object "C_6_deployed" {
|
|||||||
fun_f_5()
|
fun_f_5()
|
||||||
/// @src 0:77:99
|
/// @src 0:77:99
|
||||||
function fun_f_5()
|
function fun_f_5()
|
||||||
{ }
|
{ sstore(0, 42) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Binary representation:
|
Binary representation:
|
||||||
6080604052600a600e565b6010565b565b
|
6080604052600a600e565b6014565b602a5f55565b
|
||||||
|
|
||||||
Text representation:
|
Text representation:
|
||||||
/* "input.sol":60:101 */
|
/* "input.sol":60:101 */
|
||||||
@ -28,5 +28,6 @@ tag_2:
|
|||||||
/* "input.sol":77:99 */
|
/* "input.sol":77:99 */
|
||||||
jump(tag_3)
|
jump(tag_3)
|
||||||
tag_1:
|
tag_1:
|
||||||
|
sstore(0x00, 0x2a)
|
||||||
jump // out
|
jump // out
|
||||||
tag_3:
|
tag_3:
|
||||||
|
@ -9,6 +9,7 @@ object "C_6_deployed" {
|
|||||||
|
|
||||||
/// @src 0:77:99 "function f() public {}"
|
/// @src 0:77:99 "function f() public {}"
|
||||||
function fun_f_5() {
|
function fun_f_5() {
|
||||||
|
sstore(0, 42)
|
||||||
}
|
}
|
||||||
/// @src 0:60:101 "contract C {..."
|
/// @src 0:60:101 "contract C {..."
|
||||||
}
|
}
|
||||||
|
@ -10,13 +10,13 @@ object "C_6_deployed" {
|
|||||||
fun_f_5()
|
fun_f_5()
|
||||||
/// @src 0:77:99
|
/// @src 0:77:99
|
||||||
function fun_f_5()
|
function fun_f_5()
|
||||||
{ }
|
{ sstore(0, 42) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Binary representation:
|
Binary representation:
|
||||||
6080604052600a600e565b6010565b565b
|
6080604052600a600e565b6014565b602a5f55565b
|
||||||
|
|
||||||
Text representation:
|
Text representation:
|
||||||
/* "input.sol":60:101 */
|
/* "input.sol":60:101 */
|
||||||
@ -28,5 +28,6 @@ tag_2:
|
|||||||
/* "input.sol":77:99 */
|
/* "input.sol":77:99 */
|
||||||
jump(tag_3)
|
jump(tag_3)
|
||||||
tag_1:
|
tag_1:
|
||||||
|
sstore(0x00, 0x2a)
|
||||||
jump // out
|
jump // out
|
||||||
tag_3:
|
tag_3:
|
||||||
|
@ -9,6 +9,7 @@ object "C_6_deployed" {
|
|||||||
|
|
||||||
/// @src 0:77:99 "function f() public {}"
|
/// @src 0:77:99 "function f() public {}"
|
||||||
function fun_f_5() {
|
function fun_f_5() {
|
||||||
|
sstore(0, 42)
|
||||||
}
|
}
|
||||||
/// @src 0:60:101 "contract C {..."
|
/// @src 0:60:101 "contract C {..."
|
||||||
}
|
}
|
||||||
|
@ -8,13 +8,13 @@ object "C_6_deployed" {
|
|||||||
mstore(64, 128)
|
mstore(64, 128)
|
||||||
fun_f_5()
|
fun_f_5()
|
||||||
function fun_f_5()
|
function fun_f_5()
|
||||||
{ }
|
{ sstore(0, 42) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Binary representation:
|
Binary representation:
|
||||||
6080604052600a600e565b6010565b565b
|
6080604052600a600e565b6014565b602a5f55565b
|
||||||
|
|
||||||
Text representation:
|
Text representation:
|
||||||
mstore(0x40, 0x80)
|
mstore(0x40, 0x80)
|
||||||
@ -24,5 +24,6 @@ Text representation:
|
|||||||
tag_2:
|
tag_2:
|
||||||
jump(tag_3)
|
jump(tag_3)
|
||||||
tag_1:
|
tag_1:
|
||||||
|
sstore(0x00, 0x2a)
|
||||||
jump // out
|
jump // out
|
||||||
tag_3:
|
tag_3:
|
||||||
|
@ -9,6 +9,7 @@ object "C_6_deployed" {
|
|||||||
|
|
||||||
/// @src 0:77:99 "function f() public {}"
|
/// @src 0:77:99 "function f() public {}"
|
||||||
function fun_f_5() {
|
function fun_f_5() {
|
||||||
|
sstore(0, 42)
|
||||||
}
|
}
|
||||||
/// @src 0:60:101 "contract C {..."
|
/// @src 0:60:101 "contract C {..."
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,10 @@ object "Contract" {
|
|||||||
function f() {}
|
function f() {}
|
||||||
function g() {}
|
function g() {}
|
||||||
sstore(0, 1)
|
sstore(0, 1)
|
||||||
|
|
||||||
|
// NOTE: msize forces the compiler to completely disable the Yul optimizer.
|
||||||
|
// Otherwise the functions would get optimized out.
|
||||||
|
pop(msize())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -26,6 +30,10 @@ object "Contract" {
|
|||||||
// 0x00
|
// 0x00
|
||||||
// /* "source":73:85 */
|
// /* "source":73:85 */
|
||||||
// sstore
|
// sstore
|
||||||
// Bytecode: 6009565b5b565b5b565b60015f55
|
// /* "source":231:238 */
|
||||||
// Opcodes: PUSH1 0x9 JUMP JUMPDEST JUMPDEST JUMP JUMPDEST JUMPDEST JUMP JUMPDEST PUSH1 0x1 PUSH0 SSTORE
|
// msize
|
||||||
// SourceMappings: 33:15:0:-:0;;;;:::o;53:::-;;:::o;:::-;83:1;80;73:12
|
// /* "source":227:239 */
|
||||||
|
// pop
|
||||||
|
// Bytecode: 6009565b5b565b5b565b60015f555950
|
||||||
|
// Opcodes: PUSH1 0x9 JUMP JUMPDEST JUMPDEST JUMP JUMPDEST JUMPDEST JUMP JUMPDEST PUSH1 0x1 PUSH0 SSTORE MSIZE POP
|
||||||
|
// SourceMappings: 33:15:0:-:0;;;;:::o;53:::-;;:::o;:::-;83:1;80;73:12;231:7;227:12
|
||||||
|
@ -3,6 +3,10 @@ object "Contract" {
|
|||||||
function f() { g(1) }
|
function f() { g(1) }
|
||||||
function g(x) { if x { leave } g(add(x, 2)) }
|
function g(x) { if x { leave } g(add(x, 2)) }
|
||||||
g(1)
|
g(1)
|
||||||
|
|
||||||
|
// NOTE: msize forces the compiler to completely disable the Yul optimizer.
|
||||||
|
// Otherwise f() would get optimized out.
|
||||||
|
pop(msize())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -62,6 +66,10 @@ object "Contract" {
|
|||||||
// tag_2
|
// tag_2
|
||||||
// jump // in
|
// jump // in
|
||||||
// tag_9:
|
// tag_9:
|
||||||
// Bytecode: 6026565b600b6001600e565b5b565b8015601857506024565b602260028201600e565b505b565b602e6001600e565b
|
// /* "source":249:256 */
|
||||||
// Opcodes: PUSH1 0x26 JUMP JUMPDEST PUSH1 0xB PUSH1 0x1 PUSH1 0xE JUMP JUMPDEST JUMPDEST JUMP JUMPDEST DUP1 ISZERO PUSH1 0x18 JUMPI POP PUSH1 0x24 JUMP JUMPDEST PUSH1 0x22 PUSH1 0x2 DUP3 ADD PUSH1 0xE JUMP JUMPDEST POP JUMPDEST JUMP JUMPDEST PUSH1 0x2E PUSH1 0x1 PUSH1 0xE JUMP JUMPDEST
|
// msize
|
||||||
// SourceMappings: 33:21:0:-:0;;;48:4;50:1;48:4;:::i;:::-;33:21;:::o;59:45::-;78:1;75:14;;;82:5;;;75:14;90:12;99:1;96;92:9;90:12;:::i;:::-;59:45;;:::o;:::-;109:4;111:1;109:4;:::i;:::-
|
// /* "source":245:257 */
|
||||||
|
// pop
|
||||||
|
// Bytecode: 6026565b600b6001600e565b5b565b8015601857506024565b602260028201600e565b505b565b602e6001600e565b5950
|
||||||
|
// Opcodes: PUSH1 0x26 JUMP JUMPDEST PUSH1 0xB PUSH1 0x1 PUSH1 0xE JUMP JUMPDEST JUMPDEST JUMP JUMPDEST DUP1 ISZERO PUSH1 0x18 JUMPI POP PUSH1 0x24 JUMP JUMPDEST PUSH1 0x22 PUSH1 0x2 DUP3 ADD PUSH1 0xE JUMP JUMPDEST POP JUMPDEST JUMP JUMPDEST PUSH1 0x2E PUSH1 0x1 PUSH1 0xE JUMP JUMPDEST MSIZE POP
|
||||||
|
// SourceMappings: 33:21:0:-:0;;;48:4;50:1;48:4;:::i;:::-;33:21;:::o;59:45::-;78:1;75:14;;;82:5;;;75:14;90:12;99:1;96;92:9;90:12;:::i;:::-;59:45;;:::o;:::-;109:4;111:1;109:4;:::i;:::-;249:7;245:12
|
||||||
|
Loading…
Reference in New Issue
Block a user