Merge remote-tracking branch 'origin/develop' into breaking

This commit is contained in:
chriseth
2022-03-16 15:41:37 +01:00
542 changed files with 6696 additions and 2399 deletions
@@ -1,11 +1,4 @@
Optimized IR:
/*=====================================================*
* WARNING *
* Solidity to Yul compilation is still EXPERIMENTAL *
* It can result in LOSS OF FUNDS or worse *
* !USE AT YOUR OWN RISK! *
*=====================================================*/
/// @use-src 0:"constant_optimizer_yul/input.sol"
object "C_12" {
code {
@@ -27,7 +20,6 @@ object "C_12" {
code {
{
/// @src 0:61:418 "contract C {..."
mstore(64, memoryguard(0x80))
if callvalue() { revert(0, 0) }
/// @src 0:279:410 "assembly {..."
sstore(0, 0x1000000000000000000000000000000000000000000000)
@@ -54,13 +54,6 @@ sub_0: assembly {
}
IR:
/*=====================================================*
* WARNING *
* Solidity to Yul compilation is still EXPERIMENTAL *
* It can result in LOSS OF FUNDS or worse *
* !USE AT YOUR OWN RISK! *
*=====================================================*/
/// @use-src 0:"debug_info_in_yul_and_evm_asm_print_all/input.sol"
object "C_6" {
@@ -176,13 +169,6 @@ object "C_6" {
Optimized IR:
/*=====================================================*
* WARNING *
* Solidity to Yul compilation is still EXPERIMENTAL *
* It can result in LOSS OF FUNDS or worse *
* !USE AT YOUR OWN RISK! *
*=====================================================*/
/// @use-src 0:"debug_info_in_yul_and_evm_asm_print_all/input.sol"
object "C_6" {
code {
@@ -201,16 +187,14 @@ object "C_6" {
code {
{
/// @src 0:60:101 "contract C {..."
let _1 := memoryguard(0x80)
mstore(64, _1)
if iszero(lt(calldatasize(), 4))
{
let _2 := 0
if eq(0x26121ff0, shr(224, calldataload(_2)))
let _1 := 0
if eq(0x26121ff0, shr(224, calldataload(_1)))
{
if callvalue() { revert(_2, _2) }
if slt(add(calldatasize(), not(3)), _2) { revert(_2, _2) }
return(_1, _2)
if callvalue() { revert(_1, _1) }
if slt(add(calldatasize(), not(3)), _1) { revert(_1, _1) }
return(memoryguard(0x80), _1)
}
}
revert(0, 0)
@@ -54,13 +54,6 @@ sub_0: assembly {
}
IR:
/*=====================================================*
* WARNING *
* Solidity to Yul compilation is still EXPERIMENTAL *
* It can result in LOSS OF FUNDS or worse *
* !USE AT YOUR OWN RISK! *
*=====================================================*/
/// @use-src 0:"debug_info_in_yul_and_evm_asm_print_location_only/input.sol"
object "C_6" {
@@ -175,13 +168,6 @@ object "C_6" {
Optimized IR:
/*=====================================================*
* WARNING *
* Solidity to Yul compilation is still EXPERIMENTAL *
* It can result in LOSS OF FUNDS or worse *
* !USE AT YOUR OWN RISK! *
*=====================================================*/
/// @use-src 0:"debug_info_in_yul_and_evm_asm_print_location_only/input.sol"
object "C_6" {
code {
@@ -200,16 +186,14 @@ object "C_6" {
code {
{
/// @src 0:60:101
let _1 := memoryguard(0x80)
mstore(64, _1)
if iszero(lt(calldatasize(), 4))
{
let _2 := 0
if eq(0x26121ff0, shr(224, calldataload(_2)))
let _1 := 0
if eq(0x26121ff0, shr(224, calldataload(_1)))
{
if callvalue() { revert(_2, _2) }
if slt(add(calldatasize(), not(3)), _2) { revert(_2, _2) }
return(_1, _2)
if callvalue() { revert(_1, _1) }
if slt(add(calldatasize(), not(3)), _1) { revert(_1, _1) }
return(memoryguard(0x80), _1)
}
}
revert(0, 0)
@@ -51,13 +51,6 @@ sub_0: assembly {
}
IR:
/*=====================================================*
* WARNING *
* Solidity to Yul compilation is still EXPERIMENTAL *
* It can result in LOSS OF FUNDS or worse *
* !USE AT YOUR OWN RISK! *
*=====================================================*/
/// @use-src 0:"debug_info_in_yul_and_evm_asm_print_none/input.sol"
object "C_6" {
@@ -166,13 +159,6 @@ object "C_6" {
Optimized IR:
/*=====================================================*
* WARNING *
* Solidity to Yul compilation is still EXPERIMENTAL *
* It can result in LOSS OF FUNDS or worse *
* !USE AT YOUR OWN RISK! *
*=====================================================*/
/// @use-src 0:"debug_info_in_yul_and_evm_asm_print_none/input.sol"
object "C_6" {
code {
@@ -189,16 +175,14 @@ object "C_6" {
object "C_6_deployed" {
code {
{
let _1 := memoryguard(0x80)
mstore(64, _1)
if iszero(lt(calldatasize(), 4))
{
let _2 := 0
if eq(0x26121ff0, shr(224, calldataload(_2)))
let _1 := 0
if eq(0x26121ff0, shr(224, calldataload(_1)))
{
if callvalue() { revert(_2, _2) }
if slt(add(calldatasize(), not(3)), _2) { revert(_2, _2) }
return(_1, _2)
if callvalue() { revert(_1, _1) }
if slt(add(calldatasize(), not(3)), _1) { revert(_1, _1) }
return(memoryguard(0x80), _1)
}
}
revert(0, 0)
@@ -1,11 +1,4 @@
IR:
/*=====================================================*
* WARNING *
* Solidity to Yul compilation is still EXPERIMENTAL *
* It can result in LOSS OF FUNDS or worse *
* !USE AT YOUR OWN RISK! *
*=====================================================*/
/// @use-src 0:"debug_info_in_yul_snippet_escaping/input.sol"
object "C_2" {
@@ -70,13 +63,6 @@ object "C_2" {
Optimized IR:
/*=====================================================*
* WARNING *
* Solidity to Yul compilation is still EXPERIMENTAL *
* It can result in LOSS OF FUNDS or worse *
* !USE AT YOUR OWN RISK! *
*=====================================================*/
/// @use-src 0:"debug_info_in_yul_snippet_escaping/input.sol"
object "C_2" {
code {
@@ -95,7 +81,6 @@ object "C_2" {
code {
{
/// @src 0:265:278 "contract C {}"
mstore(64, memoryguard(0x80))
revert(0, 0)
}
}
@@ -104,13 +89,6 @@ object "C_2" {
}
IR:
/*=====================================================*
* WARNING *
* Solidity to Yul compilation is still EXPERIMENTAL *
* It can result in LOSS OF FUNDS or worse *
* !USE AT YOUR OWN RISK! *
*=====================================================*/
/// @use-src 0:"debug_info_in_yul_snippet_escaping/input.sol"
object "D_27" {
@@ -368,12 +346,6 @@ object "D_27" {
/// @src 0:279:599 "contract D /** @src 0:96:165 \"contract D {...\" *\/ {..."
}
/*=====================================================*
* WARNING *
* Solidity to Yul compilation is still EXPERIMENTAL *
* It can result in LOSS OF FUNDS or worse *
* !USE AT YOUR OWN RISK! *
*=====================================================*/
/// @use-src 0:"debug_info_in_yul_snippet_escaping/input.sol"
object "C_2" {
@@ -443,13 +415,6 @@ object "D_27" {
Optimized IR:
/*=====================================================*
* WARNING *
* Solidity to Yul compilation is still EXPERIMENTAL *
* It can result in LOSS OF FUNDS or worse *
* !USE AT YOUR OWN RISK! *
*=====================================================*/
/// @use-src 0:"debug_info_in_yul_snippet_escaping/input.sol"
object "D_27" {
code {
@@ -559,7 +524,6 @@ object "D_27" {
code {
{
/// @src 0:265:278 "contract C {}"
mstore(64, memoryguard(0x80))
revert(0, 0)
}
}
@@ -46,8 +46,6 @@ sub_0: assembly {
/* "dup_opt_peephole/input.sol":150:162 sstore(0, x) */
sstore
/* "dup_opt_peephole/input.sol":107:166 {... */
pop
/* "dup_opt_peephole/input.sol":60:171 contract C {... */
stop
auxdata: <AUXDATA REMOVED>
-1
View File
@@ -1 +0,0 @@
Warning: Yul is still experimental. Please use the output with care.
-1
View File
@@ -1 +0,0 @@
Warning: Yul is still experimental. Please use the output with care.
@@ -1 +0,0 @@
Warning: Yul is still experimental. Please use the output with care.
@@ -1 +0,0 @@
Warning: Yul is still experimental. Please use the output with care.
@@ -1 +0,0 @@
Warning: Yul is still experimental. Please use the output with care.
@@ -1,11 +1,4 @@
IR:
/*=====================================================*
* WARNING *
* Solidity to Yul compilation is still EXPERIMENTAL *
* It can result in LOSS OF FUNDS or worse *
* !USE AT YOUR OWN RISK! *
*=====================================================*/
/// @use-src 0:"exp_base_literal/input.sol"
object "C_81" {
@@ -1 +1 @@
--experimental-via-ir --optimize --combined-json function-debug,function-debug-runtime --pretty-json
--via-ir --optimize --combined-json function-debug,function-debug-runtime --pretty-json
@@ -13,7 +13,7 @@
},
"calldata_array_index_access_uint256_dyn_calldata":
{
"entryPoint": 152,
"entryPoint": 145,
"parameterSlots": 2,
"returnSlots": 1
}
@@ -1,11 +1,4 @@
Optimized IR:
/*=====================================================*
* WARNING *
* Solidity to Yul compilation is still EXPERIMENTAL *
* It can result in LOSS OF FUNDS or worse *
* !USE AT YOUR OWN RISK! *
*=====================================================*/
/// @use-src 0:"ir_compiler_inheritance_nosubobjects/input.sol"
object "C_7" {
code {
@@ -24,7 +17,6 @@ object "C_7" {
code {
{
/// @src 0:82:117 "contract C {..."
mstore(64, memoryguard(0x80))
revert(0, 0)
}
}
@@ -33,13 +25,6 @@ object "C_7" {
}
Optimized IR:
/*=====================================================*
* WARNING *
* Solidity to Yul compilation is still EXPERIMENTAL *
* It can result in LOSS OF FUNDS or worse *
* !USE AT YOUR OWN RISK! *
*=====================================================*/
/// @use-src 0:"ir_compiler_inheritance_nosubobjects/input.sol"
object "D_10" {
code {
@@ -58,7 +43,6 @@ object "D_10" {
code {
{
/// @src 0:118:137 "contract D is C {..."
mstore(64, memoryguard(0x80))
revert(0, 0)
}
}
@@ -1,11 +1,4 @@
Optimized IR:
/*=====================================================*
* WARNING *
* Solidity to Yul compilation is still EXPERIMENTAL *
* It can result in LOSS OF FUNDS or worse *
* !USE AT YOUR OWN RISK! *
*=====================================================*/
/// @use-src 0:"ir_compiler_subobjects/input.sol"
object "C_3" {
code {
@@ -24,7 +17,6 @@ object "C_3" {
code {
{
/// @src 0:82:95 "contract C {}"
mstore(64, memoryguard(0x80))
revert(0, 0)
}
}
@@ -33,13 +25,6 @@ object "C_3" {
}
Optimized IR:
/*=====================================================*
* WARNING *
* Solidity to Yul compilation is still EXPERIMENTAL *
* It can result in LOSS OF FUNDS or worse *
* !USE AT YOUR OWN RISK! *
*=====================================================*/
/// @use-src 0:"ir_compiler_subobjects/input.sol"
object "D_16" {
code {
@@ -110,7 +95,6 @@ object "D_16" {
code {
{
/// @src 0:82:95 "contract C {}"
mstore(64, memoryguard(0x80))
revert(0, 0)
}
}
@@ -1,21 +1,10 @@
Optimized IR:
/*=====================================================*
* WARNING *
* Solidity to Yul compilation is still EXPERIMENTAL *
* It can result in LOSS OF FUNDS or worse *
* !USE AT YOUR OWN RISK! *
*=====================================================*/
/// @use-src 0:"ir_with_assembly_no_memoryguard_creation/input.sol"
object "D_12" {
code {
{
/// @src 0:82:175 "contract D {..."
mstore(64, 128)
if callvalue() { revert(0, 0) }
/// @src 0:115:139 "assembly { mstore(0,0) }"
mstore(0, 0)
/// @src 0:82:175 "contract D {..."
let _1 := datasize("D_12_deployed")
codecopy(128, dataoffset("D_12_deployed"), _1)
return(128, _1)
@@ -26,16 +15,14 @@ object "D_12" {
code {
{
/// @src 0:82:175 "contract D {..."
let _1 := memoryguard(0x80)
mstore(64, _1)
if iszero(lt(calldatasize(), 4))
{
let _2 := 0
if eq(0x26121ff0, shr(224, calldataload(_2)))
let _1 := 0
if eq(0x26121ff0, shr(224, calldataload(_1)))
{
if callvalue() { revert(_2, _2) }
if slt(add(calldatasize(), not(3)), _2) { revert(_2, _2) }
return(_1, _2)
if callvalue() { revert(_1, _1) }
if slt(add(calldatasize(), not(3)), _1) { revert(_1, _1) }
return(memoryguard(0x80), _1)
}
}
revert(0, 0)
@@ -1,11 +1,4 @@
Optimized IR:
/*=====================================================*
* WARNING *
* Solidity to Yul compilation is still EXPERIMENTAL *
* It can result in LOSS OF FUNDS or worse *
* !USE AT YOUR OWN RISK! *
*=====================================================*/
/// @use-src 0:"ir_with_assembly_no_memoryguard_runtime/input.sol"
object "D_8" {
code {
@@ -24,7 +17,6 @@ object "D_8" {
code {
{
/// @src 0:82:166 "contract D {..."
mstore(64, 128)
if iszero(lt(calldatasize(), 4))
{
let _1 := 0
@@ -32,8 +24,6 @@ object "D_8" {
{
if callvalue() { revert(_1, _1) }
if slt(add(calldatasize(), not(3)), _1) { revert(_1, _1) }
/// @src 0:134:158 "assembly { mstore(0,0) }"
mstore(/** @src 0:82:166 "contract D {..." */ _1, _1)
return(128, _1)
}
}
@@ -1,17 +1,9 @@
Optimized IR:
/*=====================================================*
* WARNING *
* Solidity to Yul compilation is still EXPERIMENTAL *
* It can result in LOSS OF FUNDS or worse *
* !USE AT YOUR OWN RISK! *
*=====================================================*/
/// @use-src 0:"keccak_optimization_deploy_code/input.sol"
object "C_12" {
code {
{
/// @src 0:62:463 "contract C {..."
mstore(64, 128)
if callvalue() { revert(0, 0) }
/// @src 0:103:275 "assembly {..."
mstore(0, 100)
@@ -27,10 +19,8 @@ object "C_12" {
code {
{
/// @src 0:62:463 "contract C {..."
mstore(64, 128)
if callvalue() { revert(0, 0) }
/// @src 0:317:454 "assembly {..."
mstore(0, 100)
sstore(0, 17385872270140913825666367956517731270094621555228275961425792378517567244498)
/// @src 0:62:463 "contract C {..."
stop()
@@ -1,11 +1,4 @@
Optimized IR:
/*=====================================================*
* WARNING *
* Solidity to Yul compilation is still EXPERIMENTAL *
* It can result in LOSS OF FUNDS or worse *
* !USE AT YOUR OWN RISK! *
*=====================================================*/
/// @use-src 0:"keccak_optimization_low_runs/input.sol"
object "C_7" {
code {
@@ -24,7 +17,6 @@ object "C_7" {
code {
{
/// @src 0:62:285 "contract C {..."
mstore(64, 128)
if callvalue() { revert(0, 0) }
/// @src 0:109:277 "assembly {..."
mstore(0, 100)
@@ -1 +1 @@
{"contracts":{"A":{"a":{"evm":{"bytecode":{"linkReferences":{},"object":"<BYTECODE REMOVED>"}}}}},"errors":[{"component":"general","formattedMessage":"Yul is still experimental. Please use the output with care.","message":"Yul is still experimental. Please use the output with care.","severity":"warning","type":"Warning"}]}
{"contracts":{"A":{"a":{"evm":{"bytecode":{"linkReferences":{},"object":"<BYTECODE REMOVED>"}}}}},}
@@ -1 +1 @@
{"contracts":{"A":{"a":{"evm":{"bytecode":{"linkReferences":{},"object":"<BYTECODE REMOVED>"}}}}},"errors":[{"component":"general","formattedMessage":"Yul is still experimental. Please use the output with care.","message":"Yul is still experimental. Please use the output with care.","severity":"warning","type":"Warning"}]}
{"contracts":{"A":{"a":{"evm":{"bytecode":{"linkReferences":{},"object":"<BYTECODE REMOVED>"}}}}},}
@@ -1 +1 @@
{"contracts":{"A":{"a":{"evm":{"bytecode":{"linkReferences":{"contract/test.sol":{"L2":[{"length":20,"start":22}]}},"object":"<BYTECODE REMOVED>__$fb58009a6b1ecea3b9d99bedd645df4ec3$__<BYTECODE REMOVED>"}}}}},"errors":[{"component":"general","formattedMessage":"Yul is still experimental. Please use the output with care.","message":"Yul is still experimental. Please use the output with care.","severity":"warning","type":"Warning"}]}
{"contracts":{"A":{"a":{"evm":{"bytecode":{"linkReferences":{"contract/test.sol":{"L2":[{"length":20,"start":22}]}},"object":"<BYTECODE REMOVED>__$fb58009a6b1ecea3b9d99bedd645df4ec3$__<BYTECODE REMOVED>"}}}}},}
@@ -1 +0,0 @@
Warning: Yul is still experimental. Please use the output with care.
@@ -1 +0,0 @@
Warning: Yul is still experimental. Please use the output with care.
@@ -1 +0,0 @@
Warning: Yul is still experimental. Please use the output with care.
@@ -1 +0,0 @@
Warning: Yul is still experimental. Please use the output with care.
@@ -1 +0,0 @@
Warning: Yul is still experimental. Please use the output with care.
@@ -1 +0,0 @@
Warning: Yul is still experimental. Please use the output with care.
@@ -1 +0,0 @@
Warning: Yul is still experimental. Please use the output with care.
@@ -1 +0,0 @@
Warning: Yul is still experimental. Please use the output with care.
-7
View File
@@ -1,11 +1,4 @@
Optimized IR:
/*=====================================================*
* WARNING *
* Solidity to Yul compilation is still EXPERIMENTAL *
* It can result in LOSS OF FUNDS or worse *
* !USE AT YOUR OWN RISK! *
*=====================================================*/
/// @use-src 0:"name_simplifier/input.sol"
object "C_59" {
code {
-1
View File
@@ -1 +0,0 @@
Warning: Yul is still experimental. Please use the output with care.
@@ -1,11 +1,4 @@
Optimized IR:
/*=====================================================*
* WARNING *
* Solidity to Yul compilation is still EXPERIMENTAL *
* It can result in LOSS OF FUNDS or worse *
* !USE AT YOUR OWN RISK! *
*=====================================================*/
/// @use-src 0:"optimizer_array_sload/input.sol"
object "Arraysum_34" {
code {
+2 -3
View File
@@ -58,10 +58,9 @@ tag_6:
/* "optimizer_user_yul/input.sol":384:392 sload(5) */
dup1
/* "optimizer_user_yul/input.sol":376:509 for { } sload(5) { } {... */
tag_8
iszero
tag_6
jumpi
jump(tag_6)
tag_8:
/* "optimizer_user_yul/input.sol":380:383 { } */
pop
/* "optimizer_user_yul/input.sol":340:513 {... */
-7
View File
@@ -1,11 +1,4 @@
IR:
/*=====================================================*
* WARNING *
* Solidity to Yul compilation is still EXPERIMENTAL *
* It can result in LOSS OF FUNDS or worse *
* !USE AT YOUR OWN RISK! *
*=====================================================*/
/// @use-src 0:"revert_strings/input.sol"
object "C_15" {
@@ -1,8 +1,5 @@
{"contracts":{"C":{"C":{"evm":{"assembly":" /* \"C\":79:428 contract C... */
0xa0
dup1
0x40
mstore
jumpi(tag_6, callvalue)
0x1f
bytecodeSize
@@ -61,15 +58,10 @@
assignImmutable(\"0xe4b1702d9298fee62dfeccc57d322a463ad55ca201256d01f62b45b2e1c21c10\")
return
tag_6:
pop
0x00
dup1
revert
tag_4:
pop
pop
pop
pop
mstore(0x00, shl(0xe0, 0x4e487b71))
mstore(0x04, 0x41)
revert(0x00, 0x24)
@@ -118,15 +110,12 @@ sub_0: assembly {
tag_2
jump\t// in
tag_9:
swap1
pop
jumpi(tag_19, callvalue)
dup1
add(calldatasize, not(0x03))
slt
tag_19
jumpi
pop
0x20
/* \"C\":290:298 immutVar */
immutable(\"0xe4b1702d9298fee62dfeccc57d322a463ad55ca201256d01f62b45b2e1c21c10\")
@@ -224,21 +213,16 @@ sub_0: assembly {
jumpi
/* \"C\":79:428 contract C... */
tag_37:
/* \"C\":392:411 stateVar + this.f() */
pop
pop
tag_38
/* \"C\":392:422 stateVar + this.f() + immutVar */
tag_39
/* \"C\":392:411 stateVar + this.f() */
swap2
/* \"C\":79:428 contract C... */
tag_40
/* \"C\":392:411 stateVar + this.f() */
swap4
dup6
dup8
tag_5
jump\t// in
tag_38:
tag_40:
/* \"C\":414:422 immutVar */
immutable(\"0xe4b1702d9298fee62dfeccc57d322a463ad55ca201256d01f62b45b2e1c21c10\")
/* \"C\":392:422 stateVar + this.f() + immutVar */
@@ -259,7 +243,7 @@ sub_0: assembly {
add
swap1
jump
tag_40:
tag_38:
sub
swap1
return
@@ -303,10 +287,10 @@ sub_0: assembly {
/* \"C\":79:428 contract C... */
swap4
/* \"C\":392:411 stateVar + this.f() */
tag_38
tag_40
/* \"C\":79:428 contract C... */
swap4
tag_40
tag_38
swap7
0x40
mstore
@@ -328,12 +312,7 @@ sub_0: assembly {
mstore
mstore(0x04, 0x41)
0x24
swap5
pop
swap3
pop
pop
pop
swap1
revert
/* \"C\":403:411 this.f() */
tag_41:
@@ -343,10 +322,6 @@ sub_0: assembly {
jump(tag_42)
tag_34:
/* \"C\":79:428 contract C... */
swap3
pop
pop
pop
mload(0x40)
swap1
returndatasize
@@ -422,25 +397,16 @@ sub_0: assembly {
swap2
sub
slt
tag_53
tag_8
jumpi
mload
swap1
jump\t// out
tag_53:
pop
pop
0x00
dup1
revert
auxdata: <AUXDATA REMOVED>
}
"}}},"D":{"D":{"evm":{"assembly":" /* \"D\":91:166 contract D is C(3)... */
0xa0
dup1
0x40
mstore
jumpi(tag_6, callvalue)
0x1f
bytecodeSize
@@ -498,15 +464,10 @@ tag_8:
assignImmutable(\"0xe4b1702d9298fee62dfeccc57d322a463ad55ca201256d01f62b45b2e1c21c10\")
return
tag_6:
pop
0x00
dup1
revert
tag_4:
pop
pop
pop
pop
mstore(0x00, shl(0xe0, 0x4e487b71))
mstore(0x04, 0x41)
revert(0x00, 0x24)
@@ -514,13 +475,8 @@ tag_4:
tag_1:
/* \"C\":147:149 42 */
mstore(0x80, 0x2a)
/* \"D\":107:108 3 */
0x03
/* \"C\":203:219 stateVar = _init */
0x00
/* \"D\":91:166 contract D is C(3)... */
sstore
sub(shl(0xff, 0x01), 0x04)
/* \"D\":91:166 contract D is C(3)... */
dup2
sgt
0x01
@@ -531,27 +487,15 @@ tag_1:
0x03
/* \"D\":91:166 contract D is C(3)... */
add
/* \"C\":203:219 stateVar = _init */
0x00
/* \"D\":91:166 contract D is C(3)... */
sstore
/* \"D\":113:164 constructor(int _init2)... */
jump\t// out
/* \"D\":91:166 contract D is C(3)... */
tag_9:
pop
pop
shl(0xe0, 0x4e487b71)
/* \"C\":203:219 stateVar = _init */
0x00
/* \"D\":91:166 contract D is C(3)... */
mstore
mstore(0x00, shl(0xe0, 0x4e487b71))
mstore(0x04, 0x11)
0x24
/* \"C\":203:219 stateVar = _init */
0x00
/* \"D\":91:166 contract D is C(3)... */
revert
revert(0x00, 0x24)
stop
sub_0: assembly {
@@ -597,15 +541,12 @@ sub_0: assembly {
tag_2
jump\t// in
tag_9:
swap1
pop
jumpi(tag_19, callvalue)
dup1
add(calldatasize, not(0x03))
slt
tag_19
jumpi
pop
0x20
/* \"C\":290:298 immutVar */
immutable(\"0xe4b1702d9298fee62dfeccc57d322a463ad55ca201256d01f62b45b2e1c21c10\")
@@ -703,21 +644,16 @@ sub_0: assembly {
jumpi
/* \"D\":91:166 contract D is C(3)... */
tag_37:
/* \"C\":392:411 stateVar + this.f() */
pop
pop
tag_38
/* \"C\":392:422 stateVar + this.f() + immutVar */
tag_39
/* \"C\":392:411 stateVar + this.f() */
swap2
/* \"D\":91:166 contract D is C(3)... */
tag_40
/* \"C\":392:411 stateVar + this.f() */
swap4
dup6
dup8
tag_5
jump\t// in
tag_38:
tag_40:
/* \"C\":414:422 immutVar */
immutable(\"0xe4b1702d9298fee62dfeccc57d322a463ad55ca201256d01f62b45b2e1c21c10\")
/* \"C\":392:422 stateVar + this.f() + immutVar */
@@ -738,7 +674,7 @@ sub_0: assembly {
add
swap1
jump
tag_40:
tag_38:
sub
swap1
return
@@ -782,10 +718,10 @@ sub_0: assembly {
/* \"D\":91:166 contract D is C(3)... */
swap4
/* \"C\":392:411 stateVar + this.f() */
tag_38
tag_40
/* \"D\":91:166 contract D is C(3)... */
swap4
tag_40
tag_38
swap7
0x40
mstore
@@ -807,12 +743,7 @@ sub_0: assembly {
mstore
mstore(0x04, 0x41)
0x24
swap5
pop
swap3
pop
pop
pop
swap1
revert
/* \"C\":403:411 this.f() */
tag_41:
@@ -822,10 +753,6 @@ sub_0: assembly {
jump(tag_42)
tag_34:
/* \"D\":91:166 contract D is C(3)... */
swap3
pop
pop
pop
mload(0x40)
swap1
returndatasize
@@ -901,17 +828,11 @@ sub_0: assembly {
swap2
sub
slt
tag_53
tag_8
jumpi
mload
swap1
jump\t// out
tag_53:
pop
pop
0x00
dup1
revert
auxdata: <AUXDATA REMOVED>
}
@@ -60,14 +60,7 @@ sub_0: assembly {
}
"
},
"ir": "/*=====================================================*
* WARNING *
* Solidity to Yul compilation is still EXPERIMENTAL *
* It can result in LOSS OF FUNDS or worse *
* !USE AT YOUR OWN RISK! *
*=====================================================*/
"ir": "
/// @use-src 0:\"C\"
object \"C_6\" {
code {
@@ -181,14 +174,7 @@ object \"C_6\" {
}
",
"irOptimized": "/*=====================================================*
* WARNING *
* Solidity to Yul compilation is still EXPERIMENTAL *
* It can result in LOSS OF FUNDS or worse *
* !USE AT YOUR OWN RISK! *
*=====================================================*/
/// @use-src 0:\"C\"
"irOptimized": "/// @use-src 0:\"C\"
object \"C_6\" {
code {
{
@@ -206,16 +192,14 @@ object \"C_6\" {
code {
{
/// @src 0:60:101 \"contract C {...\"
let _1 := memoryguard(0x80)
mstore(64, _1)
if iszero(lt(calldatasize(), 4))
{
let _2 := 0
if eq(0x26121ff0, shr(224, calldataload(_2)))
let _1 := 0
if eq(0x26121ff0, shr(224, calldataload(_1)))
{
if callvalue() { revert(_2, _2) }
if slt(add(calldatasize(), not(3)), _2) { revert(_2, _2) }
return(_1, _2)
if callvalue() { revert(_1, _1) }
if slt(add(calldatasize(), not(3)), _1) { revert(_1, _1) }
return(memoryguard(0x80), _1)
}
}
revert(0, 0)
@@ -60,14 +60,7 @@ sub_0: assembly {
}
"
},
"ir": "/*=====================================================*
* WARNING *
* Solidity to Yul compilation is still EXPERIMENTAL *
* It can result in LOSS OF FUNDS or worse *
* !USE AT YOUR OWN RISK! *
*=====================================================*/
"ir": "
/// @use-src 0:\"C\"
object \"C_6\" {
code {
@@ -180,14 +173,7 @@ object \"C_6\" {
}
",
"irOptimized": "/*=====================================================*
* WARNING *
* Solidity to Yul compilation is still EXPERIMENTAL *
* It can result in LOSS OF FUNDS or worse *
* !USE AT YOUR OWN RISK! *
*=====================================================*/
/// @use-src 0:\"C\"
"irOptimized": "/// @use-src 0:\"C\"
object \"C_6\" {
code {
{
@@ -205,16 +191,14 @@ object \"C_6\" {
code {
{
/// @src 0:60:101
let _1 := memoryguard(0x80)
mstore(64, _1)
if iszero(lt(calldatasize(), 4))
{
let _2 := 0
if eq(0x26121ff0, shr(224, calldataload(_2)))
let _1 := 0
if eq(0x26121ff0, shr(224, calldataload(_1)))
{
if callvalue() { revert(_2, _2) }
if slt(add(calldatasize(), not(3)), _2) { revert(_2, _2) }
return(_1, _2)
if callvalue() { revert(_1, _1) }
if slt(add(calldatasize(), not(3)), _1) { revert(_1, _1) }
return(memoryguard(0x80), _1)
}
}
revert(0, 0)
@@ -57,14 +57,7 @@ sub_0: assembly {
}
"
},
"ir": "/*=====================================================*
* WARNING *
* Solidity to Yul compilation is still EXPERIMENTAL *
* It can result in LOSS OF FUNDS or worse *
* !USE AT YOUR OWN RISK! *
*=====================================================*/
"ir": "
/// @use-src 0:\"C\"
object \"C_6\" {
code {
@@ -171,14 +164,7 @@ object \"C_6\" {
}
",
"irOptimized": "/*=====================================================*
* WARNING *
* Solidity to Yul compilation is still EXPERIMENTAL *
* It can result in LOSS OF FUNDS or worse *
* !USE AT YOUR OWN RISK! *
*=====================================================*/
/// @use-src 0:\"C\"
"irOptimized": "/// @use-src 0:\"C\"
object \"C_6\" {
code {
{
@@ -194,16 +180,14 @@ object \"C_6\" {
object \"C_6_deployed\" {
code {
{
let _1 := memoryguard(0x80)
mstore(64, _1)
if iszero(lt(calldatasize(), 4))
{
let _2 := 0
if eq(0x26121ff0, shr(224, calldataload(_2)))
let _1 := 0
if eq(0x26121ff0, shr(224, calldataload(_1)))
{
if callvalue() { revert(_2, _2) }
if slt(add(calldatasize(), not(3)), _2) { revert(_2, _2) }
return(_1, _2)
if callvalue() { revert(_1, _1) }
if slt(add(calldatasize(), not(3)), _1) { revert(_1, _1) }
return(memoryguard(0x80), _1)
}
}
revert(0, 0)
@@ -1,11 +1,4 @@
{"contracts":{"C":{"C":{"ir":"/*=====================================================*
* WARNING *
* Solidity to Yul compilation is still EXPERIMENTAL *
* It can result in LOSS OF FUNDS or worse *
* !USE AT YOUR OWN RISK! *
*=====================================================*/
{"contracts":{"C":{"C":{"ir":"
/// @use-src 0:\"C\"
object \"C_54\" {
code {
@@ -609,20 +602,12 @@ object \"C_54\" {
}
","irOptimized":"/*=====================================================*
* WARNING *
* Solidity to Yul compilation is still EXPERIMENTAL *
* It can result in LOSS OF FUNDS or worse *
* !USE AT YOUR OWN RISK! *
*=====================================================*/
/// @use-src 0:\"C\"
","irOptimized":"/// @use-src 0:\"C\"
object \"C_54\" {
code {
{
/// @src 0:79:435 \"contract C...\"
let _1 := memoryguard(0xa0)
mstore(64, _1)
if callvalue() { revert(0, 0) }
let programSize := datasize(\"C_54\")
let argSize := sub(codesize(), programSize)
@@ -777,14 +762,7 @@ object \"C_54\" {
data \".metadata\" hex\"<BYTECODE REMOVED>\"
}
}
"}},"D":{"D":{"ir":"/*=====================================================*
* WARNING *
* Solidity to Yul compilation is still EXPERIMENTAL *
* It can result in LOSS OF FUNDS or worse *
* !USE AT YOUR OWN RISK! *
*=====================================================*/
"}},"D":{"D":{"ir":"
/// @use-src 0:\"C\", 1:\"D\"
object \"D_72\" {
code {
@@ -1456,20 +1434,12 @@ object \"D_72\" {
}
","irOptimized":"/*=====================================================*
* WARNING *
* Solidity to Yul compilation is still EXPERIMENTAL *
* It can result in LOSS OF FUNDS or worse *
* !USE AT YOUR OWN RISK! *
*=====================================================*/
/// @use-src 0:\"C\", 1:\"D\"
","irOptimized":"/// @use-src 0:\"C\", 1:\"D\"
object \"D_72\" {
code {
{
/// @src 1:91:166 \"contract D is C(3)...\"
let _1 := memoryguard(0xa0)
mstore(64, _1)
if callvalue() { revert(0, 0) }
let programSize := datasize(\"D_72\")
let argSize := sub(codesize(), programSize)
@@ -1500,15 +1470,13 @@ object \"D_72\" {
/// @src 0:154:156 \"42\"
mstore(128, 0x2a)
/// @src 1:91:166 \"contract D is C(3)...\"
sstore(/** @src 0:210:226 \"stateVar = _init\" */ 0x00, /** @src 1:107:108 \"3\" */ 0x03)
/// @src 1:91:166 \"contract D is C(3)...\"
if and(1, sgt(var_init2, sub(shl(255, 1), 4)))
{
mstore(/** @src 0:210:226 \"stateVar = _init\" */ 0x00, /** @src 1:91:166 \"contract D is C(3)...\" */ shl(224, 0x4e487b71))
mstore(0, shl(224, 0x4e487b71))
mstore(4, 0x11)
revert(/** @src 0:210:226 \"stateVar = _init\" */ 0x00, /** @src 1:91:166 \"contract D is C(3)...\" */ 0x24)
revert(0, 0x24)
}
sstore(/** @src 0:210:226 \"stateVar = _init\" */ 0x00, /** @src 1:91:166 \"contract D is C(3)...\" */ add(/** @src 1:107:108 \"3\" */ 0x03, /** @src 1:91:166 \"contract D is C(3)...\" */ var_init2))
sstore(/** @src -1:-1:-1 */ 0, /** @src 1:91:166 \"contract D is C(3)...\" */ add(/** @src 1:107:108 \"3\" */ 0x03, /** @src 1:91:166 \"contract D is C(3)...\" */ var_init2))
}
}
/// @use-src 0:\"C\", 1:\"D\"
@@ -1,11 +1,4 @@
{"contracts":{"A":{"C":{"irOptimized":"/*=====================================================*
* WARNING *
* Solidity to Yul compilation is still EXPERIMENTAL *
* It can result in LOSS OF FUNDS or worse *
* !USE AT YOUR OWN RISK! *
*=====================================================*/
/// @use-src 0:\"A\"
{"contracts":{"A":{"C":{"irOptimized":"/// @use-src 0:\"A\"
object \"C_7\" {
code {
/// @src 0:79:121 \"contract C { function f() public pure {} }\"
@@ -1,11 +1,4 @@
{"contracts":{"A":{"C":{"ir":"/*=====================================================*
* WARNING *
* Solidity to Yul compilation is still EXPERIMENTAL *
* It can result in LOSS OF FUNDS or worse *
* !USE AT YOUR OWN RISK! *
*=====================================================*/
{"contracts":{"A":{"C":{"ir":"
/// @use-src 0:\"A\"
object \"C_7\" {
code {
@@ -1,11 +1,4 @@
{"contracts":{"A":{"C":{"evm":{"bytecode":{"generatedSources":[],"object":"<BYTECODE REMOVED>"},"deployedBytecode":{"object":"<BYTECODE REMOVED>"}},"ir":"/*=====================================================*
* WARNING *
* Solidity to Yul compilation is still EXPERIMENTAL *
* It can result in LOSS OF FUNDS or worse *
* !USE AT YOUR OWN RISK! *
*=====================================================*/
{"contracts":{"A":{"C":{"evm":{"bytecode":{"generatedSources":[],"object":"<BYTECODE REMOVED>"},"deployedBytecode":{"object":"<BYTECODE REMOVED>"}},"ir":"
/// @use-src 0:\"A\"
object \"C_3\" {
code {
@@ -67,14 +60,7 @@ object \"C_3\" {
}
"},"D":{"evm":{"bytecode":{"generatedSources":[],"object":"<BYTECODE REMOVED>"},"deployedBytecode":{"object":"<BYTECODE REMOVED>"}},"ir":"/*=====================================================*
* WARNING *
* Solidity to Yul compilation is still EXPERIMENTAL *
* It can result in LOSS OF FUNDS or worse *
* !USE AT YOUR OWN RISK! *
*=====================================================*/
"},"D":{"evm":{"bytecode":{"generatedSources":[],"object":"<BYTECODE REMOVED>"},"deployedBytecode":{"object":"<BYTECODE REMOVED>"}},"ir":"
/// @use-src 0:\"A\"
object \"D_16\" {
code {
@@ -207,12 +193,6 @@ object \"D_16\" {
/// @src 0:93:146 \"contract D { function f() public { C c = new C(); } }\"
}
/*=====================================================*
* WARNING *
* Solidity to Yul compilation is still EXPERIMENTAL *
* It can result in LOSS OF FUNDS or worse *
* !USE AT YOUR OWN RISK! *
*=====================================================*/
/// @use-src 0:\"A\"
object \"C_3\" {
+1 -1
View File
@@ -26,4 +26,4 @@
sstore(add(x, 0), 0)
}
}
"}}},"errors":[{"component":"general","formattedMessage":"Yul is still experimental. Please use the output with care.","message":"Yul is still experimental. Please use the output with care.","severity":"warning","type":"Warning"}]}
"}}},}
@@ -23,14 +23,4 @@ tag_3:
}
}
},
"errors":
[
{
"component": "general",
"formattedMessage": "Yul is still experimental. Please use the output with care.",
"message": "Yul is still experimental. Please use the output with care.",
"severity": "warning",
"type": "Warning"
}
]
}
}
@@ -23,14 +23,4 @@ tag_3:
}
}
},
"errors":
[
{
"component": "general",
"formattedMessage": "Yul is still experimental. Please use the output with care.",
"message": "Yul is still experimental. Please use the output with care.",
"severity": "warning",
"type": "Warning"
}
]
}
}
@@ -21,14 +21,4 @@ tag_3:
}
}
},
"errors":
[
{
"component": "general",
"formattedMessage": "Yul is still experimental. Please use the output with care.",
"message": "Yul is still experimental. Please use the output with care.",
"severity": "warning",
"type": "Warning"
}
]
}
}
@@ -1 +1 @@
{"errors":[{"component":"general","formattedMessage":"Yul is still experimental. Please use the output with care.","message":"Yul is still experimental. Please use the output with care.","severity":"warning","type":"Warning"}]}
{}
@@ -39,14 +39,4 @@
}
}
},
"errors":
[
{
"component": "general",
"formattedMessage": "Yul is still experimental. Please use the output with care.",
"message": "Yul is still experimental. Please use the output with care.",
"severity": "warning",
"type": "Warning"
}
]
}
}
@@ -1 +1 @@
{"errors":[{"component":"general","formattedMessage":"Yul is still experimental. Please use the output with care.","message":"Yul is still experimental. Please use the output with care.","severity":"warning","type":"Warning"}]}
{}
@@ -28,4 +28,4 @@ data_4e03657aea45a94fc7d47ba826c8d667c0d1e6e33a64a036ec44f58fa12d6c45 616263
}
data \"DataName\" hex\"616263\"
}
"}}},"errors":[{"component":"general","formattedMessage":"Yul is still experimental. Please use the output with care.","message":"Yul is still experimental. Please use the output with care.","severity":"warning","type":"Warning"}]}
"}}},}
@@ -43,4 +43,4 @@ sub_0: assembly {
code { revert(0, 0) }
}
}
"}}},"errors":[{"component":"general","formattedMessage":"Yul is still experimental. Please use the output with care.","message":"Yul is still experimental. Please use the output with care.","severity":"warning","type":"Warning"}]}
"}}},}
@@ -21,4 +21,4 @@
}
}
}
"}}},"errors":[{"component":"general","formattedMessage":"Yul is still experimental. Please use the output with care.","message":"Yul is still experimental. Please use the output with care.","severity":"warning","type":"Warning"}]}
"}}},}
@@ -16,4 +16,4 @@
","irOptimized":"object \"object\" {
code { { sstore(mload(0), 0) } }
}
"}}},"errors":[{"component":"general","formattedMessage":"Yul is still experimental. Please use the output with care.","message":"Yul is still experimental. Please use the output with care.","severity":"warning","type":"Warning"}]}
"}}},}
@@ -12,4 +12,4 @@
sstore
/* \"A\":0:72 */
stop
"}}}},"errors":[{"component":"general","formattedMessage":"Yul is still experimental. Please use the output with care.","message":"Yul is still experimental. Please use the output with care.","severity":"warning","type":"Warning"}]}
"}}}},}
@@ -15,4 +15,4 @@
/* \"A\":0:72 */
pop
pop
"}}}},"errors":[{"component":"general","formattedMessage":"Yul is still experimental. Please use the output with care.","message":"Yul is still experimental. Please use the output with care.","severity":"warning","type":"Warning"}]}
"}}}},}
@@ -1 +0,0 @@
Warning: Yul is still experimental. Please use the output with care.
@@ -1 +0,0 @@
Warning: Yul is still experimental. Please use the output with care.
@@ -1 +0,0 @@
Warning: Yul is still experimental. Please use the output with care.
-1
View File
@@ -1,4 +1,3 @@
Warning: Yul is still experimental. Please use the output with care.
Error: Function "jump" not found.
--> strict_asm_jump/input.yul:1:3:
|
-1
View File
@@ -1,4 +1,3 @@
Warning: Yul is still experimental. Please use the output with care.
Error: Expected keyword "object".
--> strict_asm_only_cr/input.yul:1:2:
|
@@ -1 +0,0 @@
Warning: Yul is still experimental. Please use the output with care.
@@ -1 +0,0 @@
Warning: Yul is still experimental. Please use the output with care.
@@ -1 +0,0 @@
Warning: Yul is still experimental. Please use the output with care.
@@ -1 +0,0 @@
Warning: Yul is still experimental. Please use the output with care.
@@ -1 +0,0 @@
Warning: Yul is still experimental. Please use the output with care.
@@ -1 +0,0 @@
Warning: Yul is still experimental. Please use the output with care.
@@ -1,11 +1,4 @@
IR:
/*=====================================================*
* WARNING *
* Solidity to Yul compilation is still EXPERIMENTAL *
* It can result in LOSS OF FUNDS or worse *
* !USE AT YOUR OWN RISK! *
*=====================================================*/
/// @use-src 0:"viair_abicoder_v1/input.sol"
object "test_11" {
@@ -0,0 +1 @@
--experimental-via-ir --optimize --asm
@@ -0,0 +1,20 @@
// SPDX-License-Identifier: GPL-3.0
pragma solidity >0.0.0;
contract C {
constructor(uint x) {
// In earlier versions of the compiler, the resulting assembly pushed the constant
// 0xFFFFFFFFFFFFFFFF42 directly in the subassembly of D, while it was optimized to
// ``sub(shl(0x48, 0x01), 0xbe)`` when C was compiled in isolation.
// Now the assembly is expected to contain two instances of ``sub(shl(0x48, 0x01), 0xbe)``,
// one in the creation code of ``C`` directly, one in a subassembly of ``D``.
// The constant 0xFFFFFFFFFFFFFFFF42 should not occur in the assembly output at all.
if (x == 0xFFFFFFFFFFFFFFFF42)
revert();
}
}
contract D {
function f() public pure returns (bytes memory) {
return type(C).creationCode;
}
}
@@ -0,0 +1,354 @@
======= viair_subobject_optimization/input.sol:C =======
EVM assembly:
/* "viair_subobject_optimization/input.sol":61:668 contract C {... */
0x80
jumpi(tag_6, callvalue)
0x1f
bytecodeSize
codesize
dup2
swap1
sub
swap2
dup3
add
not(0x1f)
and
dup4
add
swap2
sub(shl(0x40, 0x01), 0x01)
dup4
gt
dup5
dup5
lt
or
tag_4
jumpi
dup1
dup5
swap3
0x20
swap5
0x40
mstore
dup4
codecopy
dup2
add
sub
slt
tag_6
jumpi
tag_8
swap1
mload
tag_1
jump // in
tag_8:
mload(0x40)
dataSize(sub_0)
swap1
dup2
dataOffset(sub_0)
dup3
codecopy
return
tag_6:
0x00
dup1
revert
tag_4:
mstore(0x00, shl(0xe0, 0x4e487b71))
mstore(0x04, 0x41)
revert(0x00, 0x24)
/* "viair_subobject_optimization/input.sol":76:666 constructor(uint x) {... */
tag_1:
sub(shl(0x48, 0x01), 0xbe)
/* "viair_subobject_optimization/input.sol":620:645 x == 0xFFFFFFFFFFFFFFFF42 */
eq
/* "viair_subobject_optimization/input.sol":616:661 if (x == 0xFFFFFFFFFFFFFFFF42)... */
tag_6
jumpi
/* "viair_subobject_optimization/input.sol":76:666 constructor(uint x) {... */
jump // out
stop
sub_0: assembly {
/* "viair_subobject_optimization/input.sol":61:668 contract C {... */
0x00
dup1
revert
auxdata: <AUXDATA REMOVED>
}
======= viair_subobject_optimization/input.sol:D =======
EVM assembly:
/* "viair_subobject_optimization/input.sol":669:772 contract D {... */
0x80
dup1
0x40
mstore
jumpi(tag_1, callvalue)
dataSize(sub_0)
swap1
dup2
dataOffset(sub_0)
dup3
codecopy
return
tag_1:
0x00
dup1
revert
stop
sub_0: assembly {
/* "viair_subobject_optimization/input.sol":669:772 contract D {... */
0x80
jumpi(tag_2, iszero(lt(calldatasize, 0x04)))
0x00
dup1
revert
tag_2:
0x00
swap1
dup2
calldataload
0xe0
shr
0x26121ff0
eq
tag_4
jumpi
pop
0x00
dup1
revert
tag_4:
jumpi(tag_8, callvalue)
dup2
add(calldatasize, not(0x03))
slt
tag_8
jumpi
/* "viair_subobject_optimization/input.sol":745:765 type(C).creationCode */
dataSize(sub_0)
/* "viair_subobject_optimization/input.sol":669:772 contract D {... */
0x3f
dup2
add
not(0x1f)
and
dup3
add
0xffffffffffffffff
dup2
gt
dup4
dup3
lt
or
tag_10
jumpi
tag_12
swap4
pop
0x40
mstore
/* "viair_subobject_optimization/input.sol":745:765 type(C).creationCode */
dup1
dup3
mstore
dataOffset(sub_0)
0x20
dup4
add
codecopy
/* "viair_subobject_optimization/input.sol":669:772 contract D {... */
mload(0x40)
swap2
dup3
swap2
dup3
tag_1
jump // in
tag_12:
sub
swap1
return
tag_10:
shl(0xe0, 0x4e487b71)
dup5
mstore
mstore(0x04, 0x41)
0x24
dup5
revert
tag_8:
pop
dup1
revert
tag_1:
swap2
swap1
swap2
0x20
dup1
dup3
mstore
dup4
mload
swap1
dup2
dup2
dup5
add
mstore
0x00
swap5
tag_13:
dup3
dup7
lt
tag_14
jumpi
pop
pop
dup1
0x40
swap4
swap5
gt
tag_16
jumpi
tag_17:
0x1f
add
not(0x1f)
and
add
add
swap1
jump // out
tag_16:
0x00
dup4
dup3
dup5
add
add
mstore
jump(tag_17)
tag_14:
dup6
dup2
add
dup3
add
mload
dup5
dup8
add
0x40
add
mstore
swap5
dup2
add
swap5
jump(tag_13)
stop
sub_0: assembly {
/* "viair_subobject_optimization/input.sol":61:668 contract C {... */
0x80
jumpi(tag_6, callvalue)
0x1f
bytecodeSize
codesize
dup2
swap1
sub
swap2
dup3
add
not(0x1f)
and
dup4
add
swap2
sub(shl(0x40, 0x01), 0x01)
dup4
gt
dup5
dup5
lt
or
tag_4
jumpi
dup1
dup5
swap3
0x20
swap5
0x40
mstore
dup4
codecopy
dup2
add
sub
slt
tag_6
jumpi
tag_8
swap1
mload
tag_1
jump // in
tag_8:
mload(0x40)
dataSize(sub_0)
swap1
dup2
dataOffset(sub_0)
dup3
codecopy
return
tag_6:
0x00
dup1
revert
tag_4:
mstore(0x00, shl(0xe0, 0x4e487b71))
mstore(0x04, 0x41)
revert(0x00, 0x24)
/* "viair_subobject_optimization/input.sol":76:666 constructor(uint x) {... */
tag_1:
sub(shl(0x48, 0x01), 0xbe)
/* "viair_subobject_optimization/input.sol":620:645 x == 0xFFFFFFFFFFFFFFFF42 */
eq
/* "viair_subobject_optimization/input.sol":616:661 if (x == 0xFFFFFFFFFFFFFFFF42)... */
tag_6
jumpi
/* "viair_subobject_optimization/input.sol":76:666 constructor(uint x) {... */
jump // out
stop
sub_0: assembly {
/* "viair_subobject_optimization/input.sol":61:668 contract C {... */
0x00
dup1
revert
auxdata: <AUXDATA REMOVED>
}
}
auxdata: <AUXDATA REMOVED>
}
+1 -1
View File
@@ -1 +1 @@
--ir-optimized --experimental-via-ir --optimize --bin --bin-runtime
--ir-optimized --via-ir --optimize --bin --bin-runtime
-16
View File
@@ -5,13 +5,6 @@ Binary:
Binary of the runtime part:
<BYTECODE REMOVED>
Optimized IR:
/*=====================================================*
* WARNING *
* Solidity to Yul compilation is still EXPERIMENTAL *
* It can result in LOSS OF FUNDS or worse *
* !USE AT YOUR OWN RISK! *
*=====================================================*/
/// @use-src 0:"viair_subobjects/input.sol"
object "C_3" {
code {
@@ -30,7 +23,6 @@ object "C_3" {
code {
{
/// @src 0:82:95 "contract C {}"
mstore(64, memoryguard(0x80))
revert(0, 0)
}
}
@@ -45,13 +37,6 @@ Binary:
Binary of the runtime part:
<BYTECODE REMOVED>
Optimized IR:
/*=====================================================*
* WARNING *
* Solidity to Yul compilation is still EXPERIMENTAL *
* It can result in LOSS OF FUNDS or worse *
* !USE AT YOUR OWN RISK! *
*=====================================================*/
/// @use-src 0:"viair_subobjects/input.sol"
object "D_16" {
code {
@@ -122,7 +107,6 @@ object "D_16" {
code {
{
/// @src 0:82:95 "contract C {}"
mstore(64, memoryguard(0x80))
revert(0, 0)
}
}
@@ -1 +0,0 @@
Warning: Yul is still experimental. Please use the output with care.
@@ -1 +0,0 @@
Warning: Yul is still experimental. Please use the output with care.
@@ -1 +0,0 @@
Warning: Yul is still experimental. Please use the output with care.
@@ -1 +0,0 @@
Warning: Yul is still experimental. Please use the output with care.
-1
View File
@@ -1 +0,0 @@
Warning: Yul is still experimental. Please use the output with care.
@@ -1,10 +1,10 @@
object "RunsTest1" {
code {
// Deploy the contract
datacopy(0, dataoffset("Runtime"), datasize("Runtime"))
return(0, datasize("Runtime"))
datacopy(0, dataoffset("Runtime_deployed"), datasize("Runtime_deployed"))
return(0, datasize("Runtime_deployed"))
}
object "Runtime" {
object "Runtime_deployed" {
code {
let funcSel := shl(224, 0xabc12345)
sstore(0, funcSel)
+11 -11
View File
@@ -5,12 +5,12 @@ Pretty printed source:
object "RunsTest1" {
code {
{
let _1 := datasize("Runtime")
datacopy(0, dataoffset("Runtime"), _1)
let _1 := datasize("Runtime_deployed")
datacopy(0, dataoffset("Runtime_deployed"), _1)
return(0, _1)
}
}
object "Runtime" {
object "Runtime_deployed" {
code {
{
sstore(0, 0xabc1234500000000000000000000000000000000000000000000000000000000)
@@ -24,28 +24,28 @@ Binary representation:
602580600c6000396000f3fe7fabc123450000000000000000000000000000000000000000000000000000000060005500
Text representation:
/* "yul_optimize_runs/input.yul":106:125 */
/* "yul_optimize_runs/input.yul":115:143 */
dataSize(sub_0)
/* "yul_optimize_runs/input.yul":83:104 */
/* "yul_optimize_runs/input.yul":83:113 */
dup1
dataOffset(sub_0)
/* "yul_optimize_runs/input.yul":80:81 */
0x00
/* "yul_optimize_runs/input.yul":71:126 */
/* "yul_optimize_runs/input.yul":71:144 */
codecopy
/* "yul_optimize_runs/input.yul":80:81 */
0x00
/* "yul_optimize_runs/input.yul":135:165 */
/* "yul_optimize_runs/input.yul":153:192 */
return
stop
sub_0: assembly {
/* "yul_optimize_runs/input.yul":237:257 */
/* "yul_optimize_runs/input.yul":273:293 */
0xabc1234500000000000000000000000000000000000000000000000000000000
/* "yul_optimize_runs/input.yul":277:278 */
/* "yul_optimize_runs/input.yul":313:314 */
0x00
/* "yul_optimize_runs/input.yul":270:288 */
/* "yul_optimize_runs/input.yul":306:324 */
sstore
/* "yul_optimize_runs/input.yul":208:298 */
/* "yul_optimize_runs/input.yul":244:334 */
stop
}
@@ -1,11 +1,4 @@
Optimized IR:
/*=====================================================*
* WARNING *
* Solidity to Yul compilation is still EXPERIMENTAL *
* It can result in LOSS OF FUNDS or worse *
* !USE AT YOUR OWN RISK! *
*=====================================================*/
/// @use-src 0:"yul_optimizer_steps/input.sol"
object "C_7" {
code {
@@ -1,11 +1,4 @@
Optimized IR:
/*=====================================================*
* WARNING *
* Solidity to Yul compilation is still EXPERIMENTAL *
* It can result in LOSS OF FUNDS or worse *
* !USE AT YOUR OWN RISK! *
*=====================================================*/
/// @use-src 0:"yul_optimizer_steps_nested_brackets/input.sol"
object "C_6" {
code {
@@ -1,11 +1,4 @@
{"contracts":{"A":{"C":{"ir":"/*=====================================================*
* WARNING *
* Solidity to Yul compilation is still EXPERIMENTAL *
* It can result in LOSS OF FUNDS or worse *
* !USE AT YOUR OWN RISK! *
*=====================================================*/
{"contracts":{"A":{"C":{"ir":"
/// @use-src 0:\"A\"
object \"C_11\" {
code {
@@ -1,11 +1,4 @@
{"contracts":{"A":{"C":{"ir":"/*=====================================================*
* WARNING *
* Solidity to Yul compilation is still EXPERIMENTAL *
* It can result in LOSS OF FUNDS or worse *
* !USE AT YOUR OWN RISK! *
*=====================================================*/
{"contracts":{"A":{"C":{"ir":"
/// @use-src 0:\"A\"
object \"C_11\" {
code {
@@ -1,11 +1,4 @@
{"contracts":{"A":{"C":{"ir":"/*=====================================================*
* WARNING *
* Solidity to Yul compilation is still EXPERIMENTAL *
* It can result in LOSS OF FUNDS or worse *
* !USE AT YOUR OWN RISK! *
*=====================================================*/
{"contracts":{"A":{"C":{"ir":"
/// @use-src 0:\"A\"
object \"C_11\" {
code {
@@ -1,11 +1,4 @@
{"contracts":{"A":{"C":{"ir":"/*=====================================================*
* WARNING *
* Solidity to Yul compilation is still EXPERIMENTAL *
* It can result in LOSS OF FUNDS or worse *
* !USE AT YOUR OWN RISK! *
*=====================================================*/
{"contracts":{"A":{"C":{"ir":"
/// @use-src 0:\"A\"
object \"C_11\" {
code {
@@ -1,11 +1,4 @@
{"contracts":{"A":{"C":{"ir":"/*=====================================================*
* WARNING *
* Solidity to Yul compilation is still EXPERIMENTAL *
* It can result in LOSS OF FUNDS or worse *
* !USE AT YOUR OWN RISK! *
*=====================================================*/
{"contracts":{"A":{"C":{"ir":"
/// @use-src 0:\"A\"
object \"C_11\" {
code {
@@ -1 +0,0 @@
Warning: Yul is still experimental. Please use the output with care.
-1
View File
@@ -1 +0,0 @@
Warning: Yul is still experimental. Please use the output with care.
-1
View File
@@ -1 +0,0 @@
Warning: Yul is still experimental. Please use the output with care.