From 914dbb9af4b8a0e2abcbca7f341fcc0b01836859 Mon Sep 17 00:00:00 2001 From: rodiazet Date: Wed, 11 Dec 2024 12:45:24 +0100 Subject: [PATCH] eof: Update `yulSyntaxTests` tests for EOF --- test/libyul/yulSyntaxTests/builtin_function_literal.yul | 2 ++ test/libyul/yulSyntaxTests/datacopy_shadowing.yul | 2 ++ test/libyul/yulSyntaxTests/dataoffset_shadowing.yul | 2 ++ test/libyul/yulSyntaxTests/datasize_shadowing.yul | 2 ++ test/libyul/yulSyntaxTests/hex_switch_case.yul | 2 ++ test/libyul/yulSyntaxTests/hex_switch_case_long.yul | 2 ++ test/libyul/yulSyntaxTests/invalid/pc_disallowed.yul | 2 ++ test/libyul/yulSyntaxTests/loadimmutable.yul | 1 + test/libyul/yulSyntaxTests/loadimmutable_bad_literal.yul | 1 + test/libyul/yulSyntaxTests/loadimmutable_shadowing.yul | 1 + test/libyul/yulSyntaxTests/metadata_access.yul | 2 ++ test/libyul/yulSyntaxTests/metadata_access_2.yul | 2 ++ test/libyul/yulSyntaxTests/metadata_access_subobject.yul | 2 ++ test/libyul/yulSyntaxTests/objects/data.yul | 2 ++ test/libyul/yulSyntaxTests/objects/data_access.yul | 2 ++ test/libyul/yulSyntaxTests/objects/datacopy.yul | 2 ++ test/libyul/yulSyntaxTests/objects/dataoffset_nonliteral.yul | 2 ++ test/libyul/yulSyntaxTests/objects/dataoffset_nonstring.yul | 2 ++ test/libyul/yulSyntaxTests/objects/dataoffset_notfound.yul | 2 ++ test/libyul/yulSyntaxTests/objects/datasize_nonliteral.yul | 2 ++ test/libyul/yulSyntaxTests/objects/datasize_nonstring.yul | 2 ++ test/libyul/yulSyntaxTests/objects/datasize_notfound.yul | 2 ++ test/libyul/yulSyntaxTests/objects/subobject_access.yul | 2 ++ test/libyul/yulSyntaxTests/opcode_for_function_args_1.yul | 2 ++ test/libyul/yulSyntaxTests/opcode_for_function_args_2.yul | 2 ++ test/libyul/yulSyntaxTests/opcode_for_functions.yul | 2 ++ ...sing_builtin_with_literal_argument_into_literal_argument.yul | 1 + test/libyul/yulSyntaxTests/selfdestruct.yul | 2 ++ test/libyul/yulSyntaxTests/setimmutable.yul | 1 + test/libyul/yulSyntaxTests/setimmutable_bad_literal.yul | 1 + test/libyul/yulSyntaxTests/setimmutable_shadowing.yul | 1 + test/libyul/yulSyntaxTests/string_literal_switch_case.yul | 2 ++ .../libyul/yulSyntaxTests/string_literal_too_long_immutable.yul | 1 + 33 files changed, 58 insertions(+) diff --git a/test/libyul/yulSyntaxTests/builtin_function_literal.yul b/test/libyul/yulSyntaxTests/builtin_function_literal.yul index 22f7216146a6..c975648ae2df 100644 --- a/test/libyul/yulSyntaxTests/builtin_function_literal.yul +++ b/test/libyul/yulSyntaxTests/builtin_function_literal.yul @@ -1,6 +1,8 @@ { datasize(x,1) } +// ==== +// bytecodeFormat: legacy // ---- // TypeError 7000: (4-12): Function "datasize" expects 1 arguments but got 2. // TypeError 9114: (4-12): Function expects direct literals as arguments. diff --git a/test/libyul/yulSyntaxTests/datacopy_shadowing.yul b/test/libyul/yulSyntaxTests/datacopy_shadowing.yul index 3f14f47226a9..7466af6c3863 100644 --- a/test/libyul/yulSyntaxTests/datacopy_shadowing.yul +++ b/test/libyul/yulSyntaxTests/datacopy_shadowing.yul @@ -1,5 +1,7 @@ { function datacopy(a, b, c) {} } +// ==== +// bytecodeFormat: legacy // ---- // ParserError 5568: (15-23): Cannot use builtin function name "datacopy" as identifier name. diff --git a/test/libyul/yulSyntaxTests/dataoffset_shadowing.yul b/test/libyul/yulSyntaxTests/dataoffset_shadowing.yul index fb32fb61c17a..db02e90e4881 100644 --- a/test/libyul/yulSyntaxTests/dataoffset_shadowing.yul +++ b/test/libyul/yulSyntaxTests/dataoffset_shadowing.yul @@ -1,5 +1,7 @@ { function dataoffset(a) -> b {} } +// ==== +// bytecodeFormat: legacy // ---- // ParserError 5568: (15-25): Cannot use builtin function name "dataoffset" as identifier name. diff --git a/test/libyul/yulSyntaxTests/datasize_shadowing.yul b/test/libyul/yulSyntaxTests/datasize_shadowing.yul index 379401754cac..79e500949e8b 100644 --- a/test/libyul/yulSyntaxTests/datasize_shadowing.yul +++ b/test/libyul/yulSyntaxTests/datasize_shadowing.yul @@ -1,5 +1,7 @@ { function datasize(a) -> b {} } +// ==== +// bytecodeFormat: legacy // ---- // ParserError 5568: (15-23): Cannot use builtin function name "datasize" as identifier name. diff --git a/test/libyul/yulSyntaxTests/hex_switch_case.yul b/test/libyul/yulSyntaxTests/hex_switch_case.yul index e0d00539a4a8..f0d8f51fc89b 100644 --- a/test/libyul/yulSyntaxTests/hex_switch_case.yul +++ b/test/libyul/yulSyntaxTests/hex_switch_case.yul @@ -3,4 +3,6 @@ case hex"00" {} case hex"1122" {} } +// ==== +// bytecodeFormat: legacy // ---- diff --git a/test/libyul/yulSyntaxTests/hex_switch_case_long.yul b/test/libyul/yulSyntaxTests/hex_switch_case_long.yul index abdbc6ec15f6..854230aa9781 100644 --- a/test/libyul/yulSyntaxTests/hex_switch_case_long.yul +++ b/test/libyul/yulSyntaxTests/hex_switch_case_long.yul @@ -3,5 +3,7 @@ case hex"00" {} case hex"112233445566778899001122334455667788990011223344556677889900112233445566778899001122334455667788990011223344556677889900" {} } +// ==== +// bytecodeFormat: legacy // ---- // TypeError 3069: (53-178): String literal too long (60 > 32) diff --git a/test/libyul/yulSyntaxTests/invalid/pc_disallowed.yul b/test/libyul/yulSyntaxTests/invalid/pc_disallowed.yul index d5b3847b1743..6a5587c972ae 100644 --- a/test/libyul/yulSyntaxTests/invalid/pc_disallowed.yul +++ b/test/libyul/yulSyntaxTests/invalid/pc_disallowed.yul @@ -1,5 +1,7 @@ { pop(pc()) } +// ==== +// bytecodeFormat: legacy // ---- // SyntaxError 2450: (10-12): PC instruction is a low-level EVM feature. Because of that PC is disallowed in strict assembly. diff --git a/test/libyul/yulSyntaxTests/loadimmutable.yul b/test/libyul/yulSyntaxTests/loadimmutable.yul index 6aea058b5d57..7c40a65034d5 100644 --- a/test/libyul/yulSyntaxTests/loadimmutable.yul +++ b/test/libyul/yulSyntaxTests/loadimmutable.yul @@ -3,4 +3,5 @@ } // ==== // dialect: evm +// bytecodeFormat: legacy // ---- diff --git a/test/libyul/yulSyntaxTests/loadimmutable_bad_literal.yul b/test/libyul/yulSyntaxTests/loadimmutable_bad_literal.yul index 2aadd2f208f0..ea1d7186f29f 100644 --- a/test/libyul/yulSyntaxTests/loadimmutable_bad_literal.yul +++ b/test/libyul/yulSyntaxTests/loadimmutable_bad_literal.yul @@ -5,6 +5,7 @@ } // ==== // dialect: evm +// bytecodeFormat: legacy // ---- // TypeError 5859: (24-25): Function expects string literal. // TypeError 5859: (50-54): Function expects string literal. diff --git a/test/libyul/yulSyntaxTests/loadimmutable_shadowing.yul b/test/libyul/yulSyntaxTests/loadimmutable_shadowing.yul index 8711d0b17757..8156bd4fba49 100644 --- a/test/libyul/yulSyntaxTests/loadimmutable_shadowing.yul +++ b/test/libyul/yulSyntaxTests/loadimmutable_shadowing.yul @@ -3,5 +3,6 @@ } // ==== // dialect: evm +// bytecodeFormat: legacy // ---- // ParserError 5568: (15-28): Cannot use builtin function name "loadimmutable" as identifier name. diff --git a/test/libyul/yulSyntaxTests/metadata_access.yul b/test/libyul/yulSyntaxTests/metadata_access.yul index 63aeb4760296..52bf786cda73 100644 --- a/test/libyul/yulSyntaxTests/metadata_access.yul +++ b/test/libyul/yulSyntaxTests/metadata_access.yul @@ -21,6 +21,8 @@ object "A" { data ".metadata" "Hello, World!" data ".other" "Hello, World2!" } +// ==== +// bytecodeFormat: legacy // ---- // TypeError 3517: (41-49): Unknown data object ".other". // TypeError 3517: (69-77): Unknown data object ".other". diff --git a/test/libyul/yulSyntaxTests/metadata_access_2.yul b/test/libyul/yulSyntaxTests/metadata_access_2.yul index a4b013e854ff..204409d3e97f 100644 --- a/test/libyul/yulSyntaxTests/metadata_access_2.yul +++ b/test/libyul/yulSyntaxTests/metadata_access_2.yul @@ -9,5 +9,7 @@ object "A" { data "1" "XYZ" data ".mightbereservedinthefuture" "TRS" } +// ==== +// bytecodeFormat: legacy // ---- // TypeError 3517: (90-119): Unknown data object ".mightbereservedinthefuture". diff --git a/test/libyul/yulSyntaxTests/metadata_access_subobject.yul b/test/libyul/yulSyntaxTests/metadata_access_subobject.yul index 216b56ac649c..c52ab9e1a66c 100644 --- a/test/libyul/yulSyntaxTests/metadata_access_subobject.yul +++ b/test/libyul/yulSyntaxTests/metadata_access_subobject.yul @@ -8,5 +8,7 @@ object "A" { data "x" "ABC" } } +// ==== +// bytecodeFormat: legacy // ---- // TypeError 3517: (41-54): Unknown data object ".metadata.x". diff --git a/test/libyul/yulSyntaxTests/objects/data.yul b/test/libyul/yulSyntaxTests/objects/data.yul index 47d7b59c7f0a..744a88c64578 100644 --- a/test/libyul/yulSyntaxTests/objects/data.yul +++ b/test/libyul/yulSyntaxTests/objects/data.yul @@ -6,4 +6,6 @@ object "A" { data "2" hex"0011" data "3" "hello world this is longer than 32 bytes and should still work" } +// ==== +// bytecodeFormat: legacy // ---- diff --git a/test/libyul/yulSyntaxTests/objects/data_access.yul b/test/libyul/yulSyntaxTests/objects/data_access.yul index e9455fafab33..681cb5028056 100644 --- a/test/libyul/yulSyntaxTests/objects/data_access.yul +++ b/test/libyul/yulSyntaxTests/objects/data_access.yul @@ -6,4 +6,6 @@ object "A" { data "B" hex"00" } +// ==== +// bytecodeFormat: legacy // ---- diff --git a/test/libyul/yulSyntaxTests/objects/datacopy.yul b/test/libyul/yulSyntaxTests/objects/datacopy.yul index 6e36025fcbd1..1afb88e2739b 100644 --- a/test/libyul/yulSyntaxTests/objects/datacopy.yul +++ b/test/libyul/yulSyntaxTests/objects/datacopy.yul @@ -6,4 +6,6 @@ let s := "" datacopy(x, "11", s) } +// ==== +// bytecodeFormat: legacy // ---- diff --git a/test/libyul/yulSyntaxTests/objects/dataoffset_nonliteral.yul b/test/libyul/yulSyntaxTests/objects/dataoffset_nonliteral.yul index d53e26281eae..ba80b462efd0 100644 --- a/test/libyul/yulSyntaxTests/objects/dataoffset_nonliteral.yul +++ b/test/libyul/yulSyntaxTests/objects/dataoffset_nonliteral.yul @@ -6,5 +6,7 @@ object "A" { data "B" hex"00" } +// ==== +// bytecodeFormat: legacy // ---- // TypeError 9114: (47-57): Function expects direct literals as arguments. diff --git a/test/libyul/yulSyntaxTests/objects/dataoffset_nonstring.yul b/test/libyul/yulSyntaxTests/objects/dataoffset_nonstring.yul index 93a981d924e0..1ac18c19c5bb 100644 --- a/test/libyul/yulSyntaxTests/objects/dataoffset_nonstring.yul +++ b/test/libyul/yulSyntaxTests/objects/dataoffset_nonstring.yul @@ -3,5 +3,7 @@ object "A" { pop(dataoffset(0)) } } +// ==== +// bytecodeFormat: legacy // ---- // TypeError 5859: (41-42): Function expects string literal. diff --git a/test/libyul/yulSyntaxTests/objects/dataoffset_notfound.yul b/test/libyul/yulSyntaxTests/objects/dataoffset_notfound.yul index 14df40201418..3ee03d66e63d 100644 --- a/test/libyul/yulSyntaxTests/objects/dataoffset_notfound.yul +++ b/test/libyul/yulSyntaxTests/objects/dataoffset_notfound.yul @@ -4,5 +4,7 @@ object "A" { } data "B" "" } +// ==== +// bytecodeFormat: legacy // ---- // TypeError 3517: (41-44): Unknown data object "C". diff --git a/test/libyul/yulSyntaxTests/objects/datasize_nonliteral.yul b/test/libyul/yulSyntaxTests/objects/datasize_nonliteral.yul index 837408b9a00b..a5179f3e45e2 100644 --- a/test/libyul/yulSyntaxTests/objects/datasize_nonliteral.yul +++ b/test/libyul/yulSyntaxTests/objects/datasize_nonliteral.yul @@ -6,5 +6,7 @@ object "A" { data "B" hex"00" } +// ==== +// bytecodeFormat: legacy // ---- // TypeError 9114: (47-55): Function expects direct literals as arguments. diff --git a/test/libyul/yulSyntaxTests/objects/datasize_nonstring.yul b/test/libyul/yulSyntaxTests/objects/datasize_nonstring.yul index 19042a2df738..c8697d06b3dc 100644 --- a/test/libyul/yulSyntaxTests/objects/datasize_nonstring.yul +++ b/test/libyul/yulSyntaxTests/objects/datasize_nonstring.yul @@ -3,5 +3,7 @@ object "A" { pop(datasize(0)) } } +// ==== +// bytecodeFormat: legacy // ---- // TypeError 5859: (39-40): Function expects string literal. diff --git a/test/libyul/yulSyntaxTests/objects/datasize_notfound.yul b/test/libyul/yulSyntaxTests/objects/datasize_notfound.yul index 48a2c268e205..4fe607a0b8da 100644 --- a/test/libyul/yulSyntaxTests/objects/datasize_notfound.yul +++ b/test/libyul/yulSyntaxTests/objects/datasize_notfound.yul @@ -4,5 +4,7 @@ object "A" { } data "B" "" } +// ==== +// bytecodeFormat: legacy // ---- // TypeError 3517: (39-42): Unknown data object "C". diff --git a/test/libyul/yulSyntaxTests/objects/subobject_access.yul b/test/libyul/yulSyntaxTests/objects/subobject_access.yul index 59426a0aa631..11fd37d9c6f0 100644 --- a/test/libyul/yulSyntaxTests/objects/subobject_access.yul +++ b/test/libyul/yulSyntaxTests/objects/subobject_access.yul @@ -8,4 +8,6 @@ object "A" { code {} } } +// ==== +// bytecodeFormat: legacy // ---- diff --git a/test/libyul/yulSyntaxTests/opcode_for_function_args_1.yul b/test/libyul/yulSyntaxTests/opcode_for_function_args_1.yul index 00c357bb44aa..2bf6e2c057c5 100644 --- a/test/libyul/yulSyntaxTests/opcode_for_function_args_1.yul +++ b/test/libyul/yulSyntaxTests/opcode_for_function_args_1.yul @@ -1,5 +1,7 @@ { function f(gas) {} } +// ==== +// bytecodeFormat: legacy // ---- // ParserError 5568: (14-17): Cannot use builtin function name "gas" as identifier name. diff --git a/test/libyul/yulSyntaxTests/opcode_for_function_args_2.yul b/test/libyul/yulSyntaxTests/opcode_for_function_args_2.yul index 989cfce9e007..3e896e0390f0 100644 --- a/test/libyul/yulSyntaxTests/opcode_for_function_args_2.yul +++ b/test/libyul/yulSyntaxTests/opcode_for_function_args_2.yul @@ -1,5 +1,7 @@ { function f() -> gas {} } +// ==== +// bytecodeFormat: legacy // ---- // ParserError 5568: (19-22): Cannot use builtin function name "gas" as identifier name. diff --git a/test/libyul/yulSyntaxTests/opcode_for_functions.yul b/test/libyul/yulSyntaxTests/opcode_for_functions.yul index 0efc7cbccedd..bd16aa090c77 100644 --- a/test/libyul/yulSyntaxTests/opcode_for_functions.yul +++ b/test/libyul/yulSyntaxTests/opcode_for_functions.yul @@ -1,5 +1,7 @@ { function gas() {} } +// ==== +// bytecodeFormat: legacy // ---- // ParserError 5568: (12-15): Cannot use builtin function name "gas" as identifier name. diff --git a/test/libyul/yulSyntaxTests/passing_builtin_with_literal_argument_into_literal_argument.yul b/test/libyul/yulSyntaxTests/passing_builtin_with_literal_argument_into_literal_argument.yul index 433d36683dfe..d1e6d50e9e80 100644 --- a/test/libyul/yulSyntaxTests/passing_builtin_with_literal_argument_into_literal_argument.yul +++ b/test/libyul/yulSyntaxTests/passing_builtin_with_literal_argument_into_literal_argument.yul @@ -3,5 +3,6 @@ } // ==== // dialect: evm +// bytecodeFormat: legacy // ---- // TypeError 9114: (6-18): Function expects direct literals as arguments. diff --git a/test/libyul/yulSyntaxTests/selfdestruct.yul b/test/libyul/yulSyntaxTests/selfdestruct.yul index faecf92c3805..181e9806ddaa 100644 --- a/test/libyul/yulSyntaxTests/selfdestruct.yul +++ b/test/libyul/yulSyntaxTests/selfdestruct.yul @@ -1,5 +1,7 @@ { selfdestruct(0x02) } +// ==== +// bytecodeFormat: legacy // ---- // Warning 1699: (3-15): "selfdestruct" has been deprecated. Note that, starting from the Cancun hard fork, the underlying opcode no longer deletes the code and data associated with an account and only transfers its Ether to the beneficiary, unless executed in the same transaction in which the contract was created (see EIP-6780). Any use in newly deployed contracts is strongly discouraged even if the new behavior is taken into account. Future changes to the EVM might further reduce the functionality of the opcode. diff --git a/test/libyul/yulSyntaxTests/setimmutable.yul b/test/libyul/yulSyntaxTests/setimmutable.yul index e1d6a74919c9..88e38b1338a4 100644 --- a/test/libyul/yulSyntaxTests/setimmutable.yul +++ b/test/libyul/yulSyntaxTests/setimmutable.yul @@ -3,4 +3,5 @@ } // ==== // dialect: evm +// bytecodeFormat: legacy // ---- diff --git a/test/libyul/yulSyntaxTests/setimmutable_bad_literal.yul b/test/libyul/yulSyntaxTests/setimmutable_bad_literal.yul index 9e4bc8032c78..175ab15aa59e 100644 --- a/test/libyul/yulSyntaxTests/setimmutable_bad_literal.yul +++ b/test/libyul/yulSyntaxTests/setimmutable_bad_literal.yul @@ -5,6 +5,7 @@ } // ==== // dialect: evm +// bytecodeFormat: legacy // ---- // TypeError 5859: (22-23): Function expects string literal. // TypeError 5859: (89-93): Function expects string literal. diff --git a/test/libyul/yulSyntaxTests/setimmutable_shadowing.yul b/test/libyul/yulSyntaxTests/setimmutable_shadowing.yul index b76a5de9b729..fbcfeb15ff98 100644 --- a/test/libyul/yulSyntaxTests/setimmutable_shadowing.yul +++ b/test/libyul/yulSyntaxTests/setimmutable_shadowing.yul @@ -3,5 +3,6 @@ } // ==== // dialect: evm +// bytecodeFormat: legacy // ---- // ParserError 5568: (15-27): Cannot use builtin function name "setimmutable" as identifier name. diff --git a/test/libyul/yulSyntaxTests/string_literal_switch_case.yul b/test/libyul/yulSyntaxTests/string_literal_switch_case.yul index 6f0d72229947..58e8302c025e 100644 --- a/test/libyul/yulSyntaxTests/string_literal_switch_case.yul +++ b/test/libyul/yulSyntaxTests/string_literal_switch_case.yul @@ -3,4 +3,6 @@ case "1" {} case "2" {} } +// ==== +// bytecodeFormat: legacy // ---- diff --git a/test/libyul/yulSyntaxTests/string_literal_too_long_immutable.yul b/test/libyul/yulSyntaxTests/string_literal_too_long_immutable.yul index 98707451e600..d81f69a082ee 100644 --- a/test/libyul/yulSyntaxTests/string_literal_too_long_immutable.yul +++ b/test/libyul/yulSyntaxTests/string_literal_too_long_immutable.yul @@ -7,4 +7,5 @@ } // ==== // dialect: evm +// bytecodeFormat: legacy // ----