mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #12760 from ethereum/viaIRNonExperimental
Mark viaIR code generation as non-experimental.
This commit is contained in:
@@ -339,7 +339,7 @@ function test_via_ir_equivalence()
|
||||
)
|
||||
asm_output_via_ir=$(
|
||||
echo "$solidity_code" |
|
||||
msg_on_error --no-stderr "$SOLC" - --experimental-via-ir --asm --debug-info location "${optimizer_flags[@]}" |
|
||||
msg_on_error --no-stderr "$SOLC" - --via-ir --asm --debug-info location "${optimizer_flags[@]}" |
|
||||
sed '/^======= <stdin>/d' |
|
||||
sed '/^EVM assembly:$/d'
|
||||
)
|
||||
@@ -355,7 +355,7 @@ function test_via_ir_equivalence()
|
||||
)
|
||||
bin_output_via_ir=$(
|
||||
echo "$solidity_code" |
|
||||
msg_on_error --no-stderr "$SOLC" - --experimental-via-ir --bin "${optimizer_flags[@]}" |
|
||||
msg_on_error --no-stderr "$SOLC" - --via-ir --bin "${optimizer_flags[@]}" |
|
||||
sed '/^======= <stdin>/d' |
|
||||
sed '/^Binary:$/d'
|
||||
)
|
||||
@@ -588,7 +588,7 @@ printTask "Testing assemble, yul, strict-assembly and optimize..."
|
||||
test_solc_assembly_output "{ let x := 0 }" "{ { } }" "--strict-assembly --optimize"
|
||||
)
|
||||
|
||||
printTask "Testing the eqivalence of --experimental-via-ir and a two-stage compilation..."
|
||||
printTask "Testing the eqivalence of --via-ir and a two-stage compilation..."
|
||||
(
|
||||
printTask " - Smoke test"
|
||||
test_via_ir_equivalence "contract C {}"
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
@@ -103,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" {
|
||||
@@ -367,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" {
|
||||
@@ -442,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 {
|
||||
|
||||
@@ -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:"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
|
||||
|
||||
@@ -1 +1 @@
|
||||
--experimental-via-ir --combined-json function-debug-runtime --pretty-json --json-indent 4
|
||||
--via-ir --combined-json function-debug-runtime --pretty-json --json-indent 4
|
||||
@@ -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 {
|
||||
@@ -32,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 {
|
||||
|
||||
@@ -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 {
|
||||
@@ -32,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 {
|
||||
|
||||
@@ -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_creation/input.sol"
|
||||
object "D_12" {
|
||||
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:"ir_with_assembly_no_memoryguard_runtime/input.sol"
|
||||
object "D_8" {
|
||||
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:"keccak_optimization_deploy_code/input.sol"
|
||||
object "C_12" {
|
||||
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:"keccak_optimization_low_runs/input.sol"
|
||||
object "C_7" {
|
||||
code {
|
||||
|
||||
@@ -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
@@ -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
@@ -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 @@
|
||||
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 +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 {
|
||||
|
||||
@@ -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" {
|
||||
|
||||
@@ -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 {
|
||||
{
|
||||
|
||||
+2
-16
@@ -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 {
|
||||
{
|
||||
|
||||
@@ -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 {
|
||||
{
|
||||
|
||||
@@ -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,14 +602,7 @@ 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 {
|
||||
{
|
||||
@@ -776,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 {
|
||||
@@ -1455,14 +1434,7 @@ 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 {
|
||||
{
|
||||
|
||||
@@ -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\" {
|
||||
|
||||
@@ -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,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,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" {
|
||||
|
||||
@@ -1 +1 @@
|
||||
--ir-optimized --experimental-via-ir --optimize --bin --bin-runtime
|
||||
--ir-optimized --via-ir --optimize --bin --bin-runtime
|
||||
@@ -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 {
|
||||
@@ -44,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 {
|
||||
|
||||
@@ -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 @@
|
||||
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 +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.
|
||||
@@ -373,13 +373,7 @@ BOOST_AUTO_TEST_CASE(metadata_viair)
|
||||
CompilerStack::MetadataFormat::WithReleaseVersionTag
|
||||
);
|
||||
|
||||
if (_viaIR)
|
||||
{
|
||||
BOOST_CHECK(parsedCBORMetadata.count("experimental") == 1);
|
||||
BOOST_CHECK(parsedCBORMetadata.at("experimental") == "true");
|
||||
}
|
||||
else
|
||||
BOOST_CHECK(parsedCBORMetadata.count("experimental") == 0);
|
||||
BOOST_CHECK(parsedCBORMetadata.count("experimental") == 0);
|
||||
};
|
||||
|
||||
check(sourceCode, true);
|
||||
|
||||
@@ -120,6 +120,7 @@ BOOST_AUTO_TEST_CASE(cli_mode_options)
|
||||
"--output-dir=/tmp/out",
|
||||
"--overwrite",
|
||||
"--evm-version=spuriousDragon",
|
||||
"--via-ir",
|
||||
"--experimental-via-ir",
|
||||
"--revert-strings=strip",
|
||||
"--debug-info=location",
|
||||
@@ -175,7 +176,7 @@ BOOST_AUTO_TEST_CASE(cli_mode_options)
|
||||
expectedOptions.output.dir = "/tmp/out";
|
||||
expectedOptions.output.overwriteFiles = true;
|
||||
expectedOptions.output.evmVersion = EVMVersion::spuriousDragon();
|
||||
expectedOptions.output.experimentalViaIR = true;
|
||||
expectedOptions.output.viaIR = true;
|
||||
expectedOptions.output.revertStrings = RevertStrings::Strip;
|
||||
expectedOptions.output.debugInfoSelection = DebugInfoSelection::fromString("location");
|
||||
expectedOptions.formatting.json = JsonFormat{JsonFormat::Pretty, 7};
|
||||
@@ -223,6 +224,13 @@ BOOST_AUTO_TEST_CASE(cli_mode_options)
|
||||
}
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(via_ir_options)
|
||||
{
|
||||
BOOST_TEST(!parseCommandLine({"solc", "contract.sol"}).output.viaIR);
|
||||
for (string viaIrOption: {"--via-ir", "--experimental-via-ir"})
|
||||
BOOST_TEST(parseCommandLine({"solc", viaIrOption, "contract.sol"}).output.viaIR);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(assembly_mode_options)
|
||||
{
|
||||
static vector<tuple<vector<string>, AssemblyStack::Machine, AssemblyStack::Language>> const allowedCombinations = {
|
||||
@@ -415,7 +423,8 @@ BOOST_AUTO_TEST_CASE(invalid_options_input_modes_combinations)
|
||||
map<string, vector<string>> invalidOptionInputModeCombinations = {
|
||||
// TODO: This should eventually contain all options.
|
||||
{"--error-recovery", {"--assemble", "--yul", "--strict-assembly", "--standard-json", "--link"}},
|
||||
{"--experimental-via-ir", {"--assemble", "--yul", "--strict-assembly", "--standard-json", "--link"}}
|
||||
{"--experimental-via-ir", {"--assemble", "--yul", "--strict-assembly", "--standard-json", "--link"}},
|
||||
{"--via-ir", {"--assemble", "--yul", "--strict-assembly", "--standard-json", "--link"}}
|
||||
};
|
||||
|
||||
for (auto const& [optionName, inputModes]: invalidOptionInputModeCombinations)
|
||||
|
||||
Reference in New Issue
Block a user