From c5673278a772b8fb0e087d69edf700f5316f4562 Mon Sep 17 00:00:00 2001 From: Alexander Arlt Date: Wed, 22 Feb 2023 10:32:29 -0500 Subject: [PATCH] Remove EWASM backend. --- Changelog.md | 1 + cmake/templates/ewasm_polyfill.in | 13 - docs/contributing.rst | 11 +- docs/using-the-compiler.rst | 13 +- docs/yul.rst | 3 +- libsolidity/interface/CompilerStack.cpp | 57 +- libsolidity/interface/CompilerStack.h | 16 - libsolidity/interface/StandardCompiler.cpp | 31 +- libyul/CMakeLists.txt | 30 - libyul/YulStack.cpp | 38 +- libyul/YulStack.h | 13 +- libyul/backends/wasm/BinaryTransform.cpp | 722 ------------------ libyul/backends/wasm/BinaryTransform.h | 124 --- libyul/backends/wasm/EVMToEwasmTranslator.cpp | 159 ---- libyul/backends/wasm/EVMToEwasmTranslator.h | 55 -- libyul/backends/wasm/TextTransform.cpp | 246 ------ libyul/backends/wasm/TextTransform.h | 71 -- libyul/backends/wasm/WasmAST.h | 117 --- libyul/backends/wasm/WasmCodeTransform.cpp | 449 ----------- libyul/backends/wasm/WasmCodeTransform.h | 115 --- libyul/backends/wasm/WasmDialect.cpp | 284 ------- libyul/backends/wasm/WasmDialect.h | 71 -- libyul/backends/wasm/WasmObjectCompiler.cpp | 60 -- libyul/backends/wasm/WasmObjectCompiler.h | 53 -- libyul/backends/wasm/WordSizeTransform.cpp | 433 ----------- libyul/backends/wasm/WordSizeTransform.h | 108 --- libyul/backends/wasm/polyfill/Arithmetic.yul | 396 ---------- libyul/backends/wasm/polyfill/Bitwise.yul | 222 ------ libyul/backends/wasm/polyfill/Comparison.yul | 168 ---- libyul/backends/wasm/polyfill/Conversion.yul | 79 -- libyul/backends/wasm/polyfill/Interface.yul | 413 ---------- libyul/backends/wasm/polyfill/Keccak.yul | 24 - libyul/backends/wasm/polyfill/Logical.yul | 31 - libyul/backends/wasm/polyfill/Memory.yul | 109 --- libyul/optimiser/Suite.cpp | 8 - solc/CommandLineInterface.cpp | 50 +- solc/CommandLineInterface.h | 1 - solc/CommandLineParser.cpp | 41 +- solc/CommandLineParser.h | 4 - test/CMakeLists.txt | 2 - test/Common.cpp | 24 +- test/Common.h | 8 - test/EVMHost.cpp | 16 +- test/EVMHost.h | 9 +- test/ExecutionFramework.cpp | 5 - test/ExecutionFramework.h | 1 - test/InteractiveTests.h | 2 - test/TestCase.h | 1 - test/cmdlineTests.sh | 2 - test/cmdlineTests/evm_to_wasm/args | 1 - test/cmdlineTests/evm_to_wasm/input.yul | 3 - test/cmdlineTests/evm_to_wasm/output | 96 --- test/cmdlineTests/evm_to_wasm_break/args | 1 - test/cmdlineTests/evm_to_wasm_break/input.yul | 8 - test/cmdlineTests/evm_to_wasm_break/output | 583 -------------- .../args | 1 - .../input.yul | 4 - .../output | 2 - .../args | 1 - .../input.yul | 4 - .../output | 34 - .../args | 1 - .../input.yul | 4 - .../output | 54 -- .../evm_to_wasm_unsupported_translation/args | 1 - .../evm_to_wasm_unsupported_translation/err | 1 - .../evm_to_wasm_unsupported_translation/exit | 1 - .../input.yul | 3 - .../output | 1 - .../linker_mode_output_selection_invalid/args | 2 +- .../linker_mode_output_selection_invalid/err | 2 +- .../output_selection_ewasm_ir_only/args | 1 - .../output_selection_ewasm_ir_only/err | 1 - .../output_selection_ewasm_ir_only/exit | 1 - .../output_selection_ewasm_ir_only/input.sol | 4 - .../args | 2 +- .../standard_cli_output_selection_invalid/err | 2 +- .../standard_ewasm_requested/input.json | 22 - .../standard_ewasm_requested/output.json | 176 ----- .../input.json | 22 - .../output.json | 23 - .../strict_asm_options_in_non_asm_mode/args | 2 +- .../args | 1 - .../input.yul | 4 - .../output | 2 - .../args | 1 - .../input.yul | 4 - .../output | 2 - .../strict_asm_output_selection_invalid/args | 2 +- .../args | 1 - .../input.yul | 17 - .../output | 73 -- .../args | 1 - .../input.yul | 8 - .../output | 27 - .../yul_to_wasm_source_location_crash/args | 1 - .../input.yul | 4 - .../yul_to_wasm_source_location_crash/output | 34 - .../libsolidity/ASTJSON/abstract_contract.sol | 1 - test/libsolidity/ASTJSON/address_payable.sol | 1 - test/libsolidity/ASTJSON/assembly/call.sol | 1 - .../ASTJSON/assembly/empty_block.sol | 1 - .../libsolidity/ASTJSON/assembly/function.sol | 1 - test/libsolidity/ASTJSON/assembly/leave.sol | 1 - test/libsolidity/ASTJSON/assembly/loop.sol | 1 - .../ASTJSON/assembly/nested_functions.sol | 1 - .../ASTJSON/assembly/slot_offset.sol | 1 - .../ASTJSON/assembly/stringlit.sol | 1 - test/libsolidity/ASTJSON/assembly/switch.sol | 1 - .../ASTJSON/assembly/switch_default.sol | 1 - .../ASTJSON/assembly/var_access.sol | 1 - test/libsolidity/ASTJSON/constructor.sol | 1 - test/libsolidity/ASTJSON/documentation.sol | 1 - .../ASTJSON/documentation_local_variable.sol | 1 - .../ASTJSON/documentation_on_statements.sol | 1 - .../ASTJSON/documentation_triple.sol | 1 - ...event_with_variables_of_internal_types.sol | 1 - .../ASTJSON/fail_after_parsing.sol | 1 - test/libsolidity/ASTJSON/fallback.sol | 1 - .../ASTJSON/fallback_and_receive_ether.sol | 1 - test/libsolidity/ASTJSON/fallback_payable.sol | 1 - test/libsolidity/ASTJSON/mappings.sol | 1 - test/libsolidity/ASTJSON/mutability.sol | 1 - .../ASTJSON/not_existing_import.sol | 1 - test/libsolidity/ASTJSON/override.sol | 1 - test/libsolidity/ASTJSON/receive_ether.sol | 1 - .../ASTJSON/two_base_functions.sol | 1 - test/libsolidity/ASTJSON/used_errors.sol | 1 - .../ASTJSON/userDefinedValueType.sol | 1 - .../ASTJSON/user_defined_operator.sol | 1 - test/libsolidity/ASTJSON/yul_hex_literal.sol | 1 - test/libsolidity/SemanticTest.cpp | 95 +-- test/libsolidity/SemanticTest.h | 7 +- test/libsolidity/SolidityEndToEndTest.cpp | 81 -- .../SolidityExecutionFramework.cpp | 68 +- test/libsolidity/SolidityExecutionFramework.h | 1 - .../errorRecoveryTests/contract_recovery.sol | 1 - .../errorRecoveryTests/error_to_eos.sol | 1 - test/libsolidity/lsp/rename/function.sol | 1 - .../lsp/rename/import_directive.sol | 1 - test/libsolidity/lsp/rename/variable.sol | 1 - test/libsolidity/lsp/semanticTokens/enums.sol | 1 - .../lsp/semanticTokens/functions.sol | 1 - .../abiEncoderV1/abi_decode_dynamic_array.sol | 1 - .../abiEncoderV1/abi_decode_static_array.sol | 1 - .../abi_decode_static_array_v2.sol | 1 - .../abiEncoderV1/abi_decode_trivial.sol | 1 - .../abiEncoderV1/abi_decode_v2.sol | 1 - .../abiEncoderV1/abi_decode_v2_calldata.sol | 1 - .../abiEncoderV1/abi_decode_v2_storage.sol | 1 - .../semanticTests/abiEncoderV1/abi_encode.sol | 3 - .../abiEncoderV1/abi_encode_call.sol | 1 - .../abiEncoderV1/abi_encode_decode_simple.sol | 3 - .../abiEncoderV1/abi_encode_empty_string.sol | 1 - .../abiEncoderV1/abi_encode_rational.sol | 3 - .../calldata_arrays_too_large.sol | 2 - .../abiEncoderV1/decode_slice.sol | 3 - .../abiEncoderV1/dynamic_memory_copy.sol | 1 - ...emory_dynamic_array_and_calldata_bytes.sol | 1 - .../abi_encode_empty_string_v2.sol | 3 - .../abiEncoderV2/abi_encode_rational_v2.sol | 3 - .../abiEncoderV2/abi_encode_v2.sol | 1 - .../abiEncoderV2/bool_out_of_bounds.sol | 2 - ...data_array_dynamic_static_short_decode.sol | 2 - .../calldata_dynamic_array_to_memory.sol | 1 - .../calldata_overlapped_dynamic_arrays.sol | 1 - ...ldata_overlapped_nested_dynamic_arrays.sol | 1 - .../calldata_struct_array_reencode.sol | 1 - ...dimensional_dynamic_array_index_access.sol | 1 - .../abiEncoderV2/calldata_with_garbage.sol | 1 - .../abiEncoderV2/cleanup/cleanup.sol | 2 - .../semanticTests/abiEncoderV2/enums.sol | 2 - ...emory_dynamic_array_and_calldata_bytes.sol | 1 - ...ynamic_array_and_calldata_static_array.sol | 1 - .../abiEncoderV2/struct/struct_short.sol | 2 - .../abiEncoderV2/struct/struct_simple.sol | 2 - .../abiEncoderV2/struct/struct_validation.sol | 2 - ...validation_function_type_inside_struct.sol | 2 - .../abiencodedecode/abi_decode_calldata.sol | 1 - .../abiencodedecode/abi_decode_simple.sol | 1 - .../abi_decode_simple_storage.sol | 1 - .../abiencodedecode/abi_encode_call.sol | 1 - .../abi_encode_call_declaration.sol | 1 - .../abi_encode_call_memory.sol | 1 - .../abi_encode_with_selector.sol | 2 - .../abi_encode_with_selectorv2.sol | 2 - .../offset_overflow_in_array_decoding.sol | 2 - .../offset_overflow_in_array_decoding_2.sol | 2 - .../offset_overflow_in_array_decoding_3.sol | 2 - .../accessor_for_const_state_variable.sol | 2 - .../accessor/accessor_for_state_variable.sol | 3 - .../arithmetics/addmod_mulmod.sol | 3 - .../arithmetics/addmod_mulmod_zero.sol | 3 - .../arithmetics/block_inside_unchecked.sol | 2 - .../checked_called_by_unchecked.sol | 2 - .../checked_modifier_called_by_unchecked.sol | 2 - .../arithmetics/divisiod_by_zero.sol | 2 - .../arithmetics/exp_associativity.sol | 1 - .../semanticTests/arithmetics/signed_mod.sol | 3 - .../unchecked_called_by_checked.sol | 2 - .../arithmetics/unchecked_div_by_zero.sol | 2 - .../semanticTests/array/calldata_array.sol | 2 - ...ta_array_as_argument_internal_function.sol | 2 - .../array/calldata_array_dynamic_invalid.sol | 2 - .../array/calldata_array_of_struct.sol | 3 - .../array/calldata_slice_access.sol | 2 - .../bytes_concat_empty_argument_list.sol | 2 - .../concat/bytes_concat_empty_strings.sol | 2 - .../array/constant_var_as_array_length.sol | 1 - .../copying/array_copy_different_packing.sol | 1 - .../array/copying/array_copy_nested_array.sol | 1 - .../copying/array_copy_storage_abi_signed.sol | 1 - ..._storage_storage_different_base_nested.sol | 2 - ...y_copy_storage_storage_dynamic_dynamic.sol | 1 - ...ay_copy_storage_storage_static_dynamic.sol | 1 - ...ray_copy_storage_storage_static_simple.sol | 2 - ...ray_copy_storage_storage_static_static.sol | 3 - .../copying/array_copy_target_leftover.sol | 2 - .../copying/array_copy_target_leftover2.sol | 2 - .../copying/array_copy_target_simple.sol | 3 - .../copying/array_copy_target_simple_2.sol | 3 - .../copying/array_elements_to_mapping.sol | 1 - .../array_nested_storage_to_memory.sol | 1 - .../array_storage_multi_items_per_slot.sol | 2 - .../array/copying/array_to_mapping.sol | 1 - .../array/copying/bytes_memory_to_storage.sol | 2 - .../array/copying/bytes_storage_to_memory.sol | 2 - .../calldata_array_of_struct_to_memory.sol | 1 - .../calldata_array_static_to_memory.sol | 2 - .../copying/calldata_array_to_mapping.sol | 1 - .../copying/calldata_bytes_to_storage.sol | 2 - .../calldata_dynamic_array_to_memory.sol | 1 - .../copy_function_internal_storage_array.sol | 1 - ...opy_internal_function_array_to_storage.sol | 3 - .../copying/copying_bytes_multiassign.sol | 2 - .../dirty_memory_bytes_to_storage_copy_ir.sol | 1 - ...d_array_of_structs_calldata_to_storage.sol | 2 - ...ted_array_of_structs_memory_to_storage.sol | 2 - ...ested_array_element_calldata_to_memory.sol | 1 - ...sted_array_element_calldata_to_storage.sol | 1 - .../nested_array_element_memory_to_memory.sol | 1 - ...nested_array_element_memory_to_storage.sol | 1 - ...nested_array_element_storage_to_memory.sol | 1 - ...ested_array_element_storage_to_storage.sol | 1 - ...ed_array_of_structs_calldata_to_memory.sol | 1 - ...d_array_of_structs_calldata_to_storage.sol | 2 - ...sted_array_of_structs_memory_to_memory.sol | 1 - ...ted_array_of_structs_memory_to_storage.sol | 2 - ...ed_array_of_structs_storage_to_storage.sol | 1 - ...th_nested_array_from_storage_to_memory.sol | 1 - ...amic_array_element_calldata_to_storage.sol | 1 - .../array/copying/storage_memory_packed.sol | 2 - .../create_dynamic_array_with_zero_length.sol | 2 - .../array/create_memory_array_too_large.sol | 2 - .../array/create_multiple_dynamic_arrays.sol | 2 - .../array/delete/delete_bytes_array.sol | 1 - .../array/delete/delete_memory_array.sol | 1 - .../delete/delete_on_array_of_structs.sol | 1 - .../array/delete/delete_storage_array.sol | 1 - .../array/dynamic_arrays_in_storage.sol | 1 - .../dynamic_out_of_bounds_array_access.sol | 1 - .../array/external_array_args.sol | 2 - .../array/fixed_array_cleanup.sol | 2 - .../array/fixed_arrays_as_return_type.sol | 1 - .../array/fixed_arrays_in_storage.sol | 2 - .../array/fixed_bytes_length_access.sol | 2 - .../fixed_out_of_bounds_array_access.sol | 3 - .../array/function_array_cross_calls.sol | 1 - .../array/function_memory_array.sol | 2 - .../array/indexAccess/index_access.sol | 2 - .../inline_array_index_access_ints.sol | 3 - .../inline_array_index_access_strings.sol | 3 - .../memory_arrays_index_access_write.sol | 2 - .../array/inline_array_return.sol | 3 - .../array/inline_array_singleton.sol | 2 - ...rray_storage_to_memory_conversion_ints.sol | 3 - ...y_storage_to_memory_conversion_strings.sol | 3 - .../inline_array_strings_from_document.sol | 3 - .../semanticTests/array/memory.sol | 1 - .../array/pop/array_pop_empty_exception.sol | 2 - .../array/pop/array_pop_isolated.sol | 2 - .../array/pop/byte_array_pop.sol | 2 - .../array/pop/byte_array_pop_copy_long.sol | 1 - .../pop/byte_array_pop_empty_exception.sol | 2 - .../array/pop/byte_array_pop_isolated.sol | 2 - .../array/pop/byte_array_pop_masking_long.sol | 1 - .../pop/byte_array_pop_storage_empty.sol | 2 - .../array/push/array_push_packed_array.sol | 1 - .../array/push/byte_array_push.sol | 2 - .../array/short_fixed_array_cleanup.sol | 2 - .../slices/array_calldata_assignment.sol | 2 - .../semanticTests/array/storage_array_ref.sol | 1 - .../array/string_allocation_bug.sol | 2 - .../semanticTests/array/strings_in_struct.sol | 2 - .../asmForLoop/for_loop_break.sol | 2 - .../asmForLoop/for_loop_continue.sol | 2 - .../asmForLoop/for_loop_nested.sol | 2 - ...signment_to_const_var_involving_keccak.sol | 2 - .../builtinFunctions/blockhash.sol | 2 - .../blockhash_shadow_resolution.sol | 2 - .../builtinFunctions/function_types_sig.sol | 2 - .../builtinFunctions/keccak256_empty.sol | 3 - .../builtinFunctions/keccak256_with_bytes.sol | 1 - .../builtinFunctions/msg_sig.sol | 2 - .../msg_sig_after_internal_call_is_same.sol | 2 - .../builtinFunctions/ripemd160_empty.sol | 1 - .../semanticTests/c99_scoping_activation.sol | 2 - .../calldata_array_index_range_access.sol | 2 - .../calldata_array_three_dimensional.sol | 2 - .../calldata/calldata_attached_to_bytes.sol | 1 - ...ata_attached_to_dynamic_array_or_slice.sol | 1 - .../calldata_attached_to_static_array.sol | 1 - .../calldata/calldata_struct_cleaning.sol | 2 - .../copy_from_calldata_removes_bytes_data.sol | 1 - .../cleanup/bool_conversion_v2.sol | 2 - .../cleanup_address_types_shortening.sol | 3 - .../cleanup/cleanup_address_types_v2.sol | 2 - ...anup_bytes_types_shortening_newCodeGen.sol | 1 - .../cleanup/cleanup_bytes_types_v2.sol | 2 - .../cleanup/cleanup_in_compound_assign.sol | 2 - .../semanticTests/cleanup/exp_cleanup.sol | 3 - .../cleanup/exp_cleanup_direct.sol | 3 - .../cleanup/exp_cleanup_nonzero_base.sol | 3 - .../cleanup/exp_cleanup_smaller_base.sol | 2 - .../negative_fractional_mod.sol | 2 - .../constantEvaluator/rounding.sol | 2 - .../asm_address_constant_regression.sol | 3 - .../constants/asm_constant_file_level.sol | 2 - .../constants/constant_string.sol | 3 - .../constant_string_at_file_level.sol | 3 - .../constants/constant_variables.sol | 3 - .../constants_at_file_level_referencing.sol | 3 - .../constants/consteval_array_length.sol | 1 - .../constants/function_unreferenced.sol | 2 - .../same_constants_different_files.sol | 3 - .../simple_constant_variables_test.sol | 3 - .../base_constructor_arguments.sol | 1 - .../constructor_arguments_internal.sol | 1 - .../constructor_static_array_argument.sol | 1 - ...vm_exceptions_in_constructor_call_fail.sol | 1 - ...unction_usage_in_constructor_arguments.sol | 1 - .../functions_called_by_constructor.sol | 3 - ...called_by_constructor_through_dispatch.sol | 3 - ...r_init_inheritence_without_constructor.sol | 2 - .../constructor/payable_constructor.sol | 3 - .../store_function_in_constructor.sol | 3 - .../store_function_in_constructor_packed.sol | 3 - ...nternal_unused_function_in_constructor.sol | 3 - ...unused_library_function_in_constructor.sol | 1 - .../constructor_inheritance_init_order.sol | 1 - .../constructor_inheritance_init_order_2.sol | 2 - .../subassembly_deduplication.sol | 1 - .../semanticTests/dirty_calldata_bytes.sol | 2 - .../semanticTests/empty_contract.sol | 1 - .../semanticTests/empty_for_loop.sol | 2 - .../enums/constructing_enums_from_ints.sol | 3 - .../enums/enum_explicit_overflow.sol | 2 - .../enum_explicit_overflow_homestead.sol | 1 - .../semanticTests/enums/enum_referencing.sol | 2 - .../semanticTests/enums/minmax.sol | 1 - ...ract_enums_with_explicit_contract_name.sol | 3 - .../semanticTests/enums/using_enums.sol | 3 - .../enums/using_inherited_enum.sol | 2 - .../using_inherited_enum_excplicitly.sol | 2 - .../semanticTests/errors/named_error_args.sol | 2 - .../named_parameters_shadowing_types.sol | 2 - .../semanticTests/errors/panic_via_import.sol | 2 - .../semanticTests/errors/simple.sol | 2 - .../semanticTests/errors/using_structs.sol | 2 - .../errors/via_contract_type.sol | 2 - .../semanticTests/errors/via_import.sol | 2 - .../semanticTests/errors/weird_name.sol | 2 - .../exponentiation/literal_base.sol | 2 - .../exponentiation/signed_base.sol | 2 - .../exponentiation/small_exp.sol | 2 - .../expressions/bit_operators.sol | 2 - .../expressions/bytes_comparison.sol | 2 - ...conditional_expression_different_types.sol | 2 - .../conditional_expression_false_literal.sol | 2 - .../conditional_expression_functions.sol | 2 - .../conditional_expression_multiple.sol | 2 - ...onditional_expression_storage_memory_1.sol | 2 - .../conditional_expression_true_literal.sol | 2 - .../conditional_expression_tuples.sol | 2 - ...ditional_expression_with_return_values.sol | 2 - .../expressions/exp_operator_const.sol | 2 - .../expressions/exp_operator_const_signed.sol | 2 - .../expressions/exp_zero_literal.sol | 2 - .../expressions/inc_dec_operators.sol | 2 - .../uncalled_address_transfer_send.sol | 2 - .../fallback/call_forward_bytes.sol | 1 - .../semanticTests/fallback/falback_return.sol | 2 - .../fallback/fallback_or_receive.sol | 2 - .../semanticTests/fallback/inherited.sol | 2 - .../fallback/short_data_calls_fallback.sol | 2 - .../semanticTests/freeFunctions/easy.sol | 2 - .../free_namesake_contract_function.sol | 2 - .../semanticTests/freeFunctions/import.sol | 2 - .../semanticTests/freeFunctions/overloads.sol | 2 - .../semanticTests/freeFunctions/recursion.sol | 2 - .../array_multiple_local_vars.sol | 2 - ..._attached_library_function_on_function.sol | 2 - ...d_library_function_on_storage_variable.sol | 2 - ...ll_attached_library_function_on_string.sol | 2 - .../call_function_returning_function.sol | 3 - ...function_returning_nothing_via_pointer.sol | 3 - .../call_internal_function_via_expression.sol | 2 - .../calling_nonexisting_contract_throws.sol | 3 - .../functionCall/calling_other_functions.sol | 2 - .../calling_uninitialized_function.sol | 2 - ...lling_uninitialized_function_in_detail.sol | 3 - ...g_uninitialized_function_through_array.sol | 2 - .../conditional_with_arguments.sol | 2 - .../functionCall/disordered_named_args.sol | 2 - .../functionCall/external_call.sol | 1 - .../external_call_at_construction_time.sol | 1 - .../external_call_dynamic_returndata.sol | 1 - .../external_call_to_nonexisting.sol | 1 - ...ernal_call_to_nonexisting_debugstrings.sol | 1 - .../functionCall/external_call_value.sol | 1 - .../functionCall/external_function.sol | 3 - .../functionCall/external_public_override.sol | 3 - .../file_level_call_via_module.sol | 2 - .../functionCall/gas_and_value_basic.sol | 1 - .../gas_and_value_brace_syntax.sol | 1 - .../inheritance/base_base_overload.sol | 2 - .../inheritance/base_overload.sol | 2 - .../functionCall/inheritance/call_base.sol | 2 - .../inheritance/call_base_base.sol | 2 - .../inheritance/call_base_base_explicit.sol | 2 - .../inheritance/call_base_explicit.sol | 2 - .../inheritance/call_unimplemented_base.sol | 2 - ...kip_unimplemented_in_abstract_contract.sol | 2 - .../super_skip_unimplemented_in_interface.sol | 2 - .../functionCall/member_accessors.sol | 1 - .../functionCall/multiple_functions.sol | 1 - .../functionCall/multiple_return_values.sol | 2 - .../semanticTests/functionCall/named_args.sol | 2 - .../functionCall/named_args_overload.sol | 2 - .../functionCall/send_zero_ether.sol | 3 - .../functionCall/transaction_status.sol | 2 - .../semanticTests/functionCall/value_test.sol | 2 - .../function_selector_via_contract_name.sol | 2 - .../functionTypes/address_member.sol | 2 - .../functionTypes/function_delete_stack.sol | 3 - .../functionTypes/function_delete_storage.sol | 3 - .../function_type_library_internal.sol | 1 - .../functionTypes/mapping_of_functions.sol | 1 - .../pass_function_types_externally.sol | 1 - .../pass_function_types_internally.sol | 2 - ...e_function_in_construction_and_runtime.sol | 2 - ...onstruction_and_runtime_equality_check.sol | 3 - .../functionTypes/selector_1.sol | 1 - .../functionTypes/selector_2.sol | 1 - .../functionTypes/store_function.sol | 1 - .../struct_with_external_function.sol | 1 - .../functionTypes/struct_with_functions.sol | 3 - ...ialized_internal_storage_function_call.sol | 3 - .../semanticTests/getters/bytes.sol | 2 - .../getters/string_and_bytes.sol | 2 - .../semanticTests/getters/value_types.sol | 2 - .../inheritance/access_base_storage.sol | 3 - .../address_overload_resolution.sol | 1 - ...base_access_to_function_type_variables.sol | 3 - .../derived_overload_base_function_direct.sol | 3 - ...erived_overload_base_function_indirect.sol | 3 - .../inheritance/explicit_base_class.sol | 2 - .../inherited_constant_state_var.sol | 3 - .../inheritance/inherited_function.sol | 2 - ...d_function_calldata_calldata_interface.sol | 1 - ...ted_function_calldata_memory_interface.sol | 1 - .../inherited_function_from_a_library.sol | 1 - .../inherited_function_through_dispatch.sol | 2 - .../inheritance/member_notation_ctor.sol | 1 - ...rloaded_function_call_resolve_to_first.sol | 3 - ...loaded_function_call_resolve_to_second.sol | 3 - .../overloaded_function_call_with_if_else.sol | 3 - .../inheritance/super_in_constructor.sol | 2 - .../super_in_constructor_assignment.sol | 2 - .../inheritance/super_overload.sol | 3 - .../inheritance/value_for_constructor.sol | 1 - .../inlineAssembly/calldata_array_read.sol | 2 - .../inlineAssembly/calldata_length_read.sol | 2 - .../inlineAssembly/calldata_offset_read.sol | 2 - .../calldata_offset_read_write.sol | 3 - .../inlineAssembly/constant_access.sol | 2 - .../constant_access_referencing.sol | 2 - .../inlineAssembly/difficulty.sol | 1 - ...inline_assembly_embedded_function_call.sol | 3 - .../inlineAssembly/inline_assembly_for.sol | 3 - .../inlineAssembly/inline_assembly_for2.sol | 3 - .../inline_assembly_function_call.sol | 3 - .../inline_assembly_function_call2.sol | 3 - ...line_assembly_function_call_assignment.sol | 3 - .../inlineAssembly/inline_assembly_if.sol | 3 - .../inline_assembly_in_modifiers.sol | 3 - .../inline_assembly_memory_access.sol | 3 - .../inline_assembly_read_and_write_stack.sol | 3 - .../inline_assembly_recursion.sol | 3 - .../inline_assembly_storage_access.sol | 2 - ...ssembly_storage_access_inside_function.sol | 2 - ...line_assembly_storage_access_local_var.sol | 2 - ...ne_assembly_storage_access_via_pointer.sol | 3 - .../inlineAssembly/inline_assembly_switch.sol | 3 - .../inline_assembly_write_to_stack.sol | 3 - .../inlineAssembly/inlineasm_empty_let.sol | 3 - .../inlineAssembly/keccak256_assembly.sol | 1 - .../semanticTests/inlineAssembly/leave.sol | 2 - .../inlineAssembly/prevrandao.sol | 1 - .../shadowing_local_function_opcode.sol | 2 - .../slot_access_via_mapping_pointer.sol | 1 - .../inlineAssembly/truefalse.sol | 2 - .../semanticTests/integer/basic.sol | 2 - .../libsolidity/semanticTests/integer/int.sol | 2 - .../integer/many_local_variables.sol | 2 - .../integer/small_signed_types.sol | 2 - .../semanticTests/integer/uint.sol | 2 - .../semanticTests/interfaceID/homer.sol | 3 - .../interfaceID/homer_interfaceId.sol | 3 - .../interfaceID/interfaceId_events.sol | 3 - .../semanticTests/interfaceID/interfaces.sol | 3 - .../semanticTests/interfaceID/lisa.sol | 1 - .../interfaceID/lisa_interfaceId.sol | 1 - .../interface_inheritance_conversions.sol | 1 - .../semanticTests/isoltestFormatting.sol | 2 - ...nternal_call_attached_with_parentheses.sol | 1 - ...ernal_call_unattached_with_parentheses.sol | 1 - .../libraries/internal_library_function.sol | 1 - ..._library_function_attached_to_contract.sol | 1 - ...ion_attached_to_external_function_type.sol | 1 - ...library_function_attached_to_interface.sol | 1 - ...ion_attached_to_internal_function_type.sol | 1 - ..._internal_function_type_named_selector.sol | 1 - ...al_library_function_attached_to_struct.sol | 1 - ...ernal_library_function_calling_private.sol | 1 - ...ernal_library_function_return_var_size.sol | 1 - .../libraries/internal_types_in_library.sol | 2 - .../libraries/library_call_in_homestead.sol | 1 - .../library_enum_as_an_expression.sol | 1 - .../libraries/library_references_preserve.sol | 1 - .../libraries/library_stray_values.sol | 2 - .../library_struct_as_an_expression.sol | 1 - .../mapping_arguments_in_library.sol | 2 - .../libraries/mapping_returns_in_library.sol | 2 - .../mapping_returns_in_library_named.sol | 2 - .../payable_function_calls_library.sol | 2 - .../libraries/using_for_by_name.sol | 2 - .../libraries/using_for_overload.sol | 2 - .../using_library_mappings_public.sol | 2 - .../using_library_mappings_return.sol | 2 - .../libraries/using_library_structs.sol | 2 - .../semanticTests/literals/denominations.sol | 2 - .../semanticTests/literals/escape.sol | 2 - .../semanticTests/literals/ether.sol | 2 - .../semanticTests/literals/gwei.sol | 2 - ...x_string_with_non_printable_characters.sol | 2 - .../literals/hex_string_with_underscore.sol | 2 - .../literals/scientific_notation.sol | 3 - .../semanticTests/literals/wei.sol | 2 - .../memoryManagement/assembly_access.sol | 2 - .../memoryManagement/struct_allocation.sol | 2 - .../metaTypes/name_other_contract.sol | 2 - .../access_through_contract_name.sol | 2 - .../modifiers/access_through_module_name.sol | 2 - .../modifiers/break_in_modifier.sol | 2 - .../modifiers/continue_in_modifier.sol | 3 - .../modifiers/function_modifier.sol | 3 - ..._calling_functions_in_creation_context.sol | 3 - .../modifiers/function_modifier_empty.sol | 3 - .../function_modifier_for_constructor.sol | 2 - .../modifiers/function_modifier_library.sol | 1 - .../function_modifier_library_inheritance.sol | 1 - .../function_modifier_local_variables.sol | 3 - .../function_modifier_loop_viair.sol | 1 - ...nction_modifier_multi_invocation_viair.sol | 1 - .../function_modifier_multiple_times.sol | 3 - ...ion_modifier_multiple_times_local_vars.sol | 3 - .../function_modifier_overriding.sol | 3 - .../modifiers/function_return_parameter.sol | 2 - .../function_return_parameter_complex.sol | 2 - .../modifiers/modifer_recursive.sol | 3 - .../modifiers/modifier_in_constructor_ice.sol | 2 - .../modifiers/modifier_init_return.sol | 3 - .../modifiers_in_construction_context.sol | 2 - .../return_does_not_skip_modifier.sol | 3 - .../modifiers/return_in_modifier.sol | 3 - .../stacked_return_with_modifiers.sol | 2 - .../multiSource/circular_import.sol | 2 - .../multiSource/circular_import_2.sol | 2 - .../multiSource/circular_reimport.sol | 2 - .../multiSource/circular_reimport_2.sol | 2 - .../free_different_interger_types.sol | 2 - ...free_function_resolution_base_contract.sol | 2 - ...e_function_resolution_override_virtual.sol | 2 - ...tion_resolution_override_virtual_super.sol | 2 - ...resolution_override_virtual_transitive.sol | 2 - .../free_function_transitive_import.sol | 3 - .../semanticTests/multiSource/import.sol | 2 - .../imported_free_function_via_alias.sol | 2 - ...ed_free_function_via_alias_direct_call.sol | 2 - .../reimport_imported_function.sol | 2 - .../operators/compound_assign.sol | 2 - .../shifts/shift_bytes_cleanup_viaYul.sol | 1 - .../operators/shifts/shift_cleanup.sol | 3 - .../shifts/shift_cleanup_garbled.sol | 3 - .../operators/shifts/shift_constant_left.sol | 2 - .../shifts/shift_constant_left_assignment.sol | 3 - .../operators/shifts/shift_constant_right.sol | 2 - .../shift_constant_right_assignment.sol | 3 - .../operators/shifts/shift_left.sol | 3 - .../shifts/shift_left_assignment.sol | 3 - .../shift_left_assignment_different_type.sol | 3 - .../shifts/shift_left_larger_type.sol | 2 - .../operators/shifts/shift_left_uint32.sol | 3 - .../operators/shifts/shift_left_uint8.sol | 3 - .../shifts/shift_negative_constant_left.sol | 2 - .../shifts/shift_negative_constant_right.sol | 2 - .../operators/shifts/shift_overflow.sol | 3 - .../operators/shifts/shift_right.sol | 3 - .../shifts/shift_right_assignment.sol | 3 - .../shifts/shift_right_garbled_signed_v2.sol | 2 - .../shifts/shift_right_garbled_v2.sol | 2 - .../shifts/shift_right_negative_literal.sol | 3 - .../shifts/shift_right_negative_lvalue.sol | 3 - ...shift_right_negative_lvalue_assignment.sol | 3 - .../shift_right_negative_lvalue_int16.sol | 3 - .../shift_right_negative_lvalue_int32.sol | 3 - .../shift_right_negative_lvalue_int8.sol | 3 - ...ht_negative_lvalue_signextend_int16_v2.sol | 2 - ...ht_negative_lvalue_signextend_int32_v2.sol | 2 - ...ght_negative_lvalue_signextend_int8_v2.sol | 2 - .../operators/shifts/shift_right_uint32.sol | 3 - .../operators/shifts/shift_right_uint8.sol | 3 - .../shift_underflow_negative_rvalue.sol | 3 - .../userDefined/unchecked_operators.sol | 1 - .../semanticTests/optimizer/shift_bytes.sol | 2 - ...o_nonpayable_circumvention_by_modifier.sol | 2 - .../receive/empty_calldata_calls_receive.sol | 2 - .../semanticTests/receive/ether_and_data.sol | 2 - .../semanticTests/receive/inherited.sol | 2 - .../semanticTests/reverts/assert_require.sol | 3 - .../semanticTests/reverts/error_struct.sol | 2 - .../reverts/invalid_enum_as_external_arg.sol | 1 - .../reverts/invalid_enum_as_external_ret.sol | 2 - .../reverts/invalid_enum_compared.sol | 1 - .../reverts/invalid_enum_stored.sol | 1 - .../reverts/invalid_instruction.sol | 3 - .../semanticTests/reverts/revert.sol | 3 - .../reverts/revert_return_area.sol | 1 - .../semanticTests/reverts/simple_throw.sol | 3 - .../libsolidity/semanticTests/smoke/basic.sol | 2 - .../semanticTests/smoke/failure.sol | 1 - .../semanticTests/smoke/fallback.sol | 2 - .../semanticTests/smoke/multiline.sol | 1 - .../smoke/multiline_comments.sol | 2 - .../semanticTests/smoke/structs.sol | 2 - .../abi_encode_with_signature_from_string.sol | 2 - .../abi_functions_member_access.sol | 2 - .../semanticTests/state/block_coinbase.sol | 2 - .../semanticTests/state/block_difficulty.sol | 1 - .../state/block_difficulty_post_paris.sol | 1 - .../semanticTests/state/block_gaslimit.sol | 2 - .../semanticTests/state/block_number.sol | 2 - .../semanticTests/state/block_prevrandao.sol | 1 - .../state/block_prevrandao_pre_paris.sol | 1 - .../semanticTests/state/block_timestamp.sol | 2 - .../semanticTests/state/gasleft.sol | 2 - .../semanticTests/state/msg_sender.sol | 2 - .../semanticTests/state/msg_sig.sol | 2 - .../semanticTests/state/msg_value.sol | 2 - .../semanticTests/state/tx_gasprice.sol | 2 - .../semanticTests/state/tx_origin.sol | 2 - .../state/uncalled_blockhash.sol | 2 - .../state_var_initialization.sol | 2 - .../state_variables_init_order.sol | 2 - .../state_variables_init_order_2.sol | 2 - .../statements/do_while_loop_continue.sol | 2 - .../storage/packed_functions.sol | 1 - .../storage/packed_storage_overflow.sol | 2 - .../storage/packed_storage_signed.sol | 3 - .../storage/packed_storage_structs_bytes.sol | 3 - .../storage/packed_storage_structs_enum.sol | 3 - .../storage/packed_storage_structs_uint.sol | 3 - .../semanticTests/storage/simple_accessor.sol | 2 - .../storage/state_smoke_test.sol | 2 - .../string_concat_empty_argument_list.sol | 2 - .../concat/string_concat_empty_strings.sol | 2 - .../semanticTests/strings/empty_string.sol | 2 - .../semanticTests/strings/return_string.sol | 2 - .../semanticTests/strings/string_escapes.sol | 2 - .../semanticTests/strings/unicode_escapes.sol | 2 - .../semanticTests/strings/unicode_string.sol | 2 - .../structs/array_of_recursive_struct.sol | 2 - .../structs/calldata/calldata_struct.sol | 3 - .../calldata/calldata_struct_and_ints.sol | 1 - .../calldata_struct_array_member_dynamic.sol | 2 - .../calldata/calldata_struct_to_memory.sol | 3 - .../calldata/calldata_struct_to_storage.sol | 3 - .../calldata_struct_with_array_to_memory.sol | 1 - .../calldata_struct_with_bytes_to_memory.sol | 1 - .../structs/calldata/calldata_structs.sol | 3 - .../structs/calldata/dynamic_nested.sol | 2 - .../structs/calldata/dynamically_encoded.sol | 2 - .../structs/copy_from_mapping.sol | 1 - ...h_nested_array_from_calldata_to_memory.sol | 1 - ..._nested_array_from_calldata_to_storage.sol | 1 - ...ith_nested_array_from_memory_to_memory.sol | 1 - ...h_nested_array_from_storage_to_storage.sol | 1 - .../copy_substructures_from_mapping.sol | 1 - .../structs/copy_substructures_to_mapping.sol | 1 - .../semanticTests/structs/copy_to_mapping.sol | 1 - .../semanticTests/structs/global.sol | 2 - .../structs/lone_struct_array_type.sol | 3 - .../memory_struct_named_constructor.sol | 3 - .../memory_structs_as_function_args.sol | 3 - .../structs/memory_structs_nested.sol | 3 - .../structs/memory_structs_nested_load.sol | 2 - .../structs/memory_structs_read_write.sol | 3 - .../structs/multislot_struct_allocation.sol | 3 - .../structs/nested_struct_allocation.sol | 2 - .../structs/recursive_structs.sol | 3 - .../structs/simple_struct_allocation.sol | 2 - .../struct_assign_reference_to_struct.sol | 3 - .../semanticTests/structs/struct_copy.sol | 1 - .../structs/struct_copy_via_local.sol | 3 - .../structs/struct_delete_member.sol | 3 - .../structs/struct_delete_storage.sol | 2 - .../structs/struct_delete_storage_small.sol | 1 - .../struct_delete_struct_in_mapping.sol | 1 - .../structs/struct_memory_to_storage.sol | 3 - .../struct_memory_to_storage_function_ptr.sol | 3 - .../structs/struct_named_constructor.sol | 3 - .../structs/struct_referencing.sol | 2 - .../structs/struct_storage_to_memory.sol | 3 - .../struct_storage_to_memory_function_ptr.sol | 3 - .../structs/using_for_function_on_struct.sol | 2 - .../types/assign_calldata_value_type.sol | 2 - ...ixed_bytes_to_fixed_bytes_greater_size.sol | 2 - ...t_fixed_bytes_to_fixed_bytes_same_size.sol | 2 - ...ixed_bytes_to_fixed_bytes_smaller_size.sol | 2 - ...nvert_fixed_bytes_to_uint_greater_size.sol | 2 - ...vert_fixed_bytes_to_uint_same_min_size.sol | 2 - .../convert_fixed_bytes_to_uint_same_type.sol | 2 - ...nvert_fixed_bytes_to_uint_smaller_size.sol | 2 - ...nvert_uint_to_fixed_bytes_greater_size.sol | 2 - ...vert_uint_to_fixed_bytes_same_min_size.sol | 2 - .../convert_uint_to_fixed_bytes_same_size.sol | 2 - ...nvert_uint_to_fixed_bytes_smaller_size.sol | 2 - .../types/external_function_to_address.sol | 2 - .../mapping/copy_from_mapping_to_mapping.sol | 1 - ...copy_struct_to_array_stored_in_mapping.sol | 1 - .../user_defined_types_mapping_storage.sol | 1 - .../semanticTests/types/nested_tuples.sol | 2 - .../types/packing_signed_types.sol | 2 - .../types/packing_unpacking_types.sol | 2 - .../semanticTests/types/strings.sol | 3 - .../types/tuple_assign_multi_slot_grow.sol | 2 - .../types/type_conversion_cleanup.sol | 2 - .../semanticTests/underscore/as_function.sol | 2 - .../invalidInConstructor.sol | 2 - .../invalidStoredInConstructor.sol | 2 - .../uninitializedFunctionPointer/store2.sol | 2 - .../storeInConstructor.sol | 2 - ...ized_internal_storage_function_via_yul.sol | 1 - .../userDefinedValueType/cleanup.sol | 1 - .../cleanup_abicoderv1.sol | 1 - .../userDefinedValueType/conversion.sol | 1 - .../conversion_abicoderv1.sol | 1 - .../storage_layout_struct.sol | 1 - ...cost_abstraction_comparison_elementary.sol | 1 - ...ost_abstraction_comparison_userdefined.sol | 1 - .../using/free_function_multi.sol | 1 - .../using/free_functions_individual.sol | 2 - .../using/using_global_for_global.sol | 1 - .../semanticTests/variables/delete_local.sol | 2 - .../semanticTests/variables/delete_locals.sol | 2 - .../variables/public_state_overridding.sol | 2 - ...ublic_state_overridding_dynamic_struct.sol | 4 - ..._overridding_mapping_to_dynamic_struct.sol | 2 - .../semanticTests/various/address_code.sol | 2 - ...ment_to_const_var_involving_expression.sol | 3 - .../semanticTests/various/balance.sol | 3 - .../various/byte_optimization_bug.sol | 3 - .../various/code_access_create.sol | 1 - .../various/code_access_runtime.sol | 1 - .../semanticTests/various/code_length.sol | 2 - .../various/code_length_contract_member.sol | 2 - .../various/codebalance_assembly.sol | 1 - .../semanticTests/various/codehash.sol | 1 - .../various/codehash_assembly.sol | 1 - .../various/contract_binary_dependencies.sol | 3 - .../crazy_elementary_typenames_on_stack.sol | 3 - .../various/cross_contract_types.sol | 3 - .../semanticTests/various/decayed_tuple.sol | 2 - .../various/destructuring_assignment.sol | 1 - .../various/empty_name_return_parameter.sol | 3 - .../various/external_types_in_calls.sol | 1 - .../various/flipping_sign_tests.sol | 3 - .../various/gasleft_decrease.sol | 3 - .../various/gasleft_shadow_resolution.sol | 3 - .../various/inline_member_init.sol | 2 - .../inline_member_init_inheritence.sol | 2 - .../inline_tuple_with_rational_numbers.sol | 3 - .../various/iszero_bnot_correct.sol | 3 - .../various/literal_empty_string.sol | 1 - .../various/memory_overwrite.sol | 3 - .../semanticTests/various/multi_modifiers.sol | 2 - .../various/multi_variable_declaration.sol | 2 - .../various/nested_calldata_struct.sol | 3 - .../nested_calldata_struct_to_memory.sol | 1 - .../various/positive_integers_to_signed.sol | 2 - .../semanticTests/various/senders_balance.sol | 1 - .../single_copy_with_multiple_inheritance.sol | 3 - .../skip_dynamic_types_for_structs.sol | 1 - .../state_variable_local_variable_mixture.sol | 2 - .../state_variable_under_contract_name.sol | 2 - .../semanticTests/various/string_tuples.sol | 2 - .../semanticTests/various/super.sol | 3 - .../semanticTests/various/super_alone.sol | 3 - .../various/super_parentheses.sol | 3 - .../various/swap_in_storage_overwrite.sol | 3 - .../various/test_underscore_in_hex.sol | 2 - .../typed_multi_variable_declaration.sol | 3 - .../semanticTests/various/value_complex.sol | 1 - .../semanticTests/various/value_insane.sol | 1 - .../various/write_storage_external.sol | 1 - .../semanticTests/viaYul/assert.sol | 2 - .../viaYul/assert_and_require.sol | 2 - .../assign_tuple_from_function_call.sol | 2 - .../viaYul/cleanup/checked_arithmetic.sol | 1 - .../viaYul/cleanup/comparison.sol | 2 - .../semanticTests/viaYul/comparison.sol | 2 - .../viaYul/comparison_functions.sol | 2 - .../conditional/conditional_multiple.sol | 2 - .../conditional_true_false_literal.sol | 2 - .../viaYul/conditional/conditional_tuple.sol | 2 - .../conditional_with_assignment.sol | 2 - .../conditional_with_variables.sol | 2 - .../conversion/explicit_cast_assignment.sol | 2 - .../explicit_cast_function_call.sol | 2 - .../explicit_cast_local_assignment.sol | 2 - .../conversion/implicit_cast_assignment.sol | 2 - .../implicit_cast_function_call.sol | 2 - .../implicit_cast_local_assignment.sol | 2 - .../define_tuple_from_function_call.sol | 2 - .../semanticTests/viaYul/delete.sol | 2 - .../viaYul/detect_add_overflow.sol | 2 - .../viaYul/detect_add_overflow_signed.sol | 2 - .../viaYul/detect_div_overflow.sol | 2 - .../semanticTests/viaYul/detect_mod_zero.sol | 2 - .../viaYul/detect_mod_zero_signed.sol | 2 - .../viaYul/detect_mul_overflow.sol | 2 - .../viaYul/detect_mul_overflow_signed.sol | 2 - .../viaYul/detect_sub_overflow.sol | 2 - .../viaYul/detect_sub_overflow_signed.sol | 2 - .../viaYul/dirty_memory_dynamic_array.sol | 1 - .../viaYul/dirty_memory_int32.sol | 1 - .../viaYul/dirty_memory_static_array.sol | 1 - .../viaYul/dirty_memory_struct.sol | 1 - .../viaYul/dirty_memory_uint32.sol | 1 - test/libsolidity/semanticTests/viaYul/exp.sol | 2 - .../semanticTests/viaYul/exp_literals.sol | 1 - .../viaYul/exp_literals_success.sol | 2 - .../semanticTests/viaYul/exp_neg.sol | 2 - .../semanticTests/viaYul/exp_neg_overflow.sol | 2 - .../semanticTests/viaYul/exp_overflow.sol | 2 - .../semanticTests/viaYul/exp_various.sol | 2 - .../semanticTests/viaYul/function_address.sol | 2 - .../viaYul/function_entry_checks.sol | 2 - .../viaYul/function_pointers.sol | 2 - .../viaYul/function_selector.sol | 2 - test/libsolidity/semanticTests/viaYul/if.sol | 2 - .../viaYul/local_address_assignment.sol | 2 - .../semanticTests/viaYul/local_assignment.sol | 2 - .../viaYul/local_bool_assignment.sol | 2 - .../viaYul/local_tuple_assignment.sol | 2 - .../viaYul/local_variable_without_init.sol | 2 - .../semanticTests/viaYul/loops/break.sol | 2 - .../semanticTests/viaYul/loops/continue.sol | 2 - .../semanticTests/viaYul/loops/return.sol | 2 - .../semanticTests/viaYul/loops/simple.sol | 2 - .../viaYul/memory_struct_allow.sol | 2 - .../semanticTests/viaYul/msg_sender.sol | 2 - .../semanticTests/viaYul/require.sol | 1 - .../semanticTests/viaYul/return.sol | 2 - .../viaYul/return_and_convert.sol | 2 - .../viaYul/return_storage_pointers.sol | 2 - .../semanticTests/viaYul/short_circuit.sol | 2 - .../viaYul/simple_assignment.sol | 2 - .../viaYul/simple_inline_asm.sol | 2 - .../semanticTests/viaYul/smoke_test.sol | 1 - .../viaYul/storage/dirty_storage_bytes.sol | 2 - .../storage/dirty_storage_static_array.sol | 2 - .../viaYul/storage/packed_storage.sol | 2 - .../viaYul/storage/simple_storage.sol | 2 - .../semanticTests/viaYul/string_format.sol | 2 - .../semanticTests/viaYul/string_literals.sol | 2 - .../viaYul/tuple_evaluation_order.sol | 2 - .../semanticTests/viaYul/unary_fixedbytes.sol | 2 - .../semanticTests/viaYul/unary_operations.sol | 1 - .../viaYul/various_inline_asm.sol | 2 - .../viaYul/virtual_functions.sol | 2 - .../internal_virtual_function_calls.sol | 3 - ...irtual_function_calls_through_dispatch.sol | 3 - .../virtual_function_calls.sol | 3 - ...unction_usage_in_constructor_arguments.sol | 1 - .../array_members/push_overflow_2_safe.sol | 1 - .../array_members/push_struct_member_1.sol | 1 - .../array_members/push_struct_member_2.sol | 1 - .../smtCheckerTests/complex/MerkleProof.sol | 1 - .../function_selector/homer.sol | 2 - .../functions/functions_identity_1.sol | 1 - .../functions/functions_identity_1_fail.sol | 1 - .../functions/functions_identity_2.sol | 1 - .../functions/functions_identity_2_fail.sol | 1 - .../functions/functions_identity_as_tuple.sol | 1 - .../functions_identity_as_tuple_fail.sol | 1 - .../functions/functions_recursive.sol | 1 - .../functions/functions_storage_var_1.sol | 1 - .../functions_storage_var_1_fail.sol | 1 - .../functions/functions_storage_var_2.sol | 1 - .../functions_storage_var_2_fail.sol | 1 - .../functions/library_after_contract.sol | 1 - ...nment_contract_member_variable_array_2.sol | 1 - .../special/msg_value_inheritance_3.sol | 1 - .../smtCheckerTests/special/range_check.sol | 1 - .../try_catch/try_inside_if.sol | 1 - .../types/static_array_implicit_push_3.sol | 1 - .../types/static_array_implicit_push_4.sol | 1 - .../unchecked_double_with_modifier.sol | 2 - test/libyul/Common.cpp | 6 - test/libyul/EwasmTranslationTest.cpp | 127 --- test/libyul/EwasmTranslationTest.h | 54 -- test/libyul/ObjectCompilerTest.cpp | 42 +- test/libyul/ObjectCompilerTest.h | 1 - test/libyul/YulOptimizerTestCommon.cpp | 7 - test/libyul/ewasmTranslationTests/address.yul | 9 - .../ewasmTranslationTests/arithmetic_add.yul | 35 - .../arithmetic_addmod.yul | 25 - .../ewasmTranslationTests/arithmetic_div.yul | 34 - .../ewasmTranslationTests/arithmetic_exp.yul | 40 - .../ewasmTranslationTests/arithmetic_mod.yul | 29 - .../ewasmTranslationTests/arithmetic_mul.yul | 36 - .../arithmetic_mulmod.yul | 27 - .../ewasmTranslationTests/arithmetic_sdiv.yul | 33 - .../ewasmTranslationTests/arithmetic_smod.yul | 33 - .../ewasmTranslationTests/arithmetic_sub.yul | 36 - test/libyul/ewasmTranslationTests/balance.yul | 12 - .../ewasmTranslationTests/bitwise_and.yul | 24 - .../ewasmTranslationTests/bitwise_not.yul | 25 - .../ewasmTranslationTests/bitwise_or.yul | 26 - .../ewasmTranslationTests/bitwise_xor.yul | 27 - .../ewasmTranslationTests/blockhash.yul | 9 - .../ewasmTranslationTests/calldatacopy.yul | 8 - .../ewasmTranslationTests/calldataload.yul | 7 - .../ewasmTranslationTests/calldatasize.yul | 7 - test/libyul/ewasmTranslationTests/caller.yul | 9 - .../ewasmTranslationTests/callvalue.yul | 9 - test/libyul/ewasmTranslationTests/chainid.yul | 10 - .../libyul/ewasmTranslationTests/codecopy.yul | 11 - .../libyul/ewasmTranslationTests/codesize.yul | 9 - .../libyul/ewasmTranslationTests/coinbase.yul | 9 - .../ewasmTranslationTests/comparison_eq.yul | 28 - .../ewasmTranslationTests/comparison_gt.yul | 36 - .../ewasmTranslationTests/comparison_lt.yul | 36 - .../ewasmTranslationTests/comparison_sgt.yul | 54 -- .../ewasmTranslationTests/comparison_slt.yul | 55 -- .../libyul/ewasmTranslationTests/datacopy.yul | 20 - .../ewasmTranslationTests/dataoffset.yul | 16 - .../libyul/ewasmTranslationTests/datasize.yul | 16 - .../ewasmTranslationTests/difficulty.yul | 11 - .../ewasmTranslationTests/extcodecopy.yul | 11 - .../ewasmTranslationTests/extcodehash.yul | 11 - .../ewasmTranslationTests/extcodesize.yul | 9 - test/libyul/ewasmTranslationTests/gas.yul | 9 - .../libyul/ewasmTranslationTests/gaslimit.yul | 9 - .../libyul/ewasmTranslationTests/gasprice.yul | 9 - test/libyul/ewasmTranslationTests/invalid.yul | 14 - test/libyul/ewasmTranslationTests/iszero.yul | 14 - .../ewasmTranslationTests/keccak256.yul | 9 - test/libyul/ewasmTranslationTests/log0.yul | 8 - test/libyul/ewasmTranslationTests/log1.yul | 8 - test/libyul/ewasmTranslationTests/log2.yul | 8 - test/libyul/ewasmTranslationTests/log3.yul | 8 - test/libyul/ewasmTranslationTests/log4.yul | 8 - .../ewasmTranslationTests/loop_break.yul | 13 - .../ewasmTranslationTests/loop_continue.yul | 22 - .../ewasmTranslationTests/memoryguard.yul | 12 - test/libyul/ewasmTranslationTests/msize.yul | 12 - test/libyul/ewasmTranslationTests/mstore8.yul | 15 - .../ewasmTranslationTests/mstore_mload.yul | 14 - test/libyul/ewasmTranslationTests/number.yul | 9 - test/libyul/ewasmTranslationTests/origin.yul | 9 - test/libyul/ewasmTranslationTests/return.yul | 11 - .../ewasmTranslationTests/returndatacopy.yul | 10 - .../ewasmTranslationTests/returndatasize.yul | 9 - test/libyul/ewasmTranslationTests/revert.yul | 13 - .../ewasmTranslationTests/selfbalance.yul | 10 - .../ewasmTranslationTests/selfdestruct.yul | 10 - test/libyul/ewasmTranslationTests/shifts.yul | 23 - .../ewasmTranslationTests/signextend.yul | 16 - .../ewasmTranslationTests/simple_mstore.yul | 8 - .../ewasmTranslationTests/simple_sload.yul | 16 - .../ewasmTranslationTests/simple_sstore.yul | 12 - test/libyul/ewasmTranslationTests/smoke.yul | 5 - .../ewasmTranslationTests/smoke_call.yul | 10 - .../ewasmTranslationTests/smoke_callcode.yul | 10 - .../ewasmTranslationTests/smoke_create.yul | 11 - .../ewasmTranslationTests/smoke_create2.yul | 13 - .../smoke_delegatecall.yul | 10 - .../smoke_staticcall.yul | 12 - .../ewasmTranslationTests/timestamp.yul | 9 - .../objectCompiler/wasm/no_main_function.yul | 22 - test/libyul/objectCompiler/wasm/simple.yul | 23 - test/libyul/objectCompiler/wasm/subObject.yul | 22 - .../objectCompiler/wasm/subObjectAccess.yul | 79 -- .../add_correct_type_wasm.yul | 19 - .../expressionSplitter/typed.yul | 43 -- .../wordSizeTransform/constant_assignment.yul | 18 - .../wordSizeTransform/function_call.yul | 43 -- .../functional_instruction.yul | 17 - .../wordSizeTransform/if.yul | 49 -- .../wordSizeTransform/or_bool_renamed.yul | 25 - .../wordSizeTransform/switch_1.yul | 71 -- .../wordSizeTransform/switch_2.yul | 77 -- .../wordSizeTransform/switch_3.yul | 89 --- .../wordSizeTransform/switch_4.yul | 97 --- .../wordSizeTransform/switch_5.yul | 29 - .../for_loop_condition_fail_ewasm.yul | 8 - .../yulSyntaxTests/linkersymbol_ewasm.yul | 7 - .../yulSyntaxTests/type_check_cases.yul | 8 - .../yulSyntaxTests/type_check_cases_fail.yul | 10 - .../type_check_if_condition.yul | 7 - .../type_check_if_condition_fail.yul | 8 - test/solc/CommandLineParser.cpp | 21 +- test/soltest.cpp | 4 - test/tools/CMakeLists.txt | 1 - test/tools/isoltest.cpp | 1 - test/tools/yulInterpreter/CMakeLists.txt | 2 - .../EwasmBuiltinInterpreter.cpp | 617 --------------- .../yulInterpreter/EwasmBuiltinInterpreter.h | 138 ---- test/tools/yulInterpreter/Interpreter.cpp | 9 - 1042 files changed, 97 insertions(+), 10946 deletions(-) delete mode 100644 cmake/templates/ewasm_polyfill.in delete mode 100644 libyul/backends/wasm/BinaryTransform.cpp delete mode 100644 libyul/backends/wasm/BinaryTransform.h delete mode 100644 libyul/backends/wasm/EVMToEwasmTranslator.cpp delete mode 100644 libyul/backends/wasm/EVMToEwasmTranslator.h delete mode 100644 libyul/backends/wasm/TextTransform.cpp delete mode 100644 libyul/backends/wasm/TextTransform.h delete mode 100644 libyul/backends/wasm/WasmAST.h delete mode 100644 libyul/backends/wasm/WasmCodeTransform.cpp delete mode 100644 libyul/backends/wasm/WasmCodeTransform.h delete mode 100644 libyul/backends/wasm/WasmDialect.cpp delete mode 100644 libyul/backends/wasm/WasmDialect.h delete mode 100644 libyul/backends/wasm/WasmObjectCompiler.cpp delete mode 100644 libyul/backends/wasm/WasmObjectCompiler.h delete mode 100644 libyul/backends/wasm/WordSizeTransform.cpp delete mode 100644 libyul/backends/wasm/WordSizeTransform.h delete mode 100644 libyul/backends/wasm/polyfill/Arithmetic.yul delete mode 100644 libyul/backends/wasm/polyfill/Bitwise.yul delete mode 100644 libyul/backends/wasm/polyfill/Comparison.yul delete mode 100644 libyul/backends/wasm/polyfill/Conversion.yul delete mode 100644 libyul/backends/wasm/polyfill/Interface.yul delete mode 100644 libyul/backends/wasm/polyfill/Keccak.yul delete mode 100644 libyul/backends/wasm/polyfill/Logical.yul delete mode 100644 libyul/backends/wasm/polyfill/Memory.yul delete mode 100644 test/cmdlineTests/evm_to_wasm/args delete mode 100644 test/cmdlineTests/evm_to_wasm/input.yul delete mode 100644 test/cmdlineTests/evm_to_wasm/output delete mode 100644 test/cmdlineTests/evm_to_wasm_break/args delete mode 100644 test/cmdlineTests/evm_to_wasm_break/input.yul delete mode 100644 test/cmdlineTests/evm_to_wasm_break/output delete mode 100644 test/cmdlineTests/evm_to_wasm_output_selection_asm_only/args delete mode 100644 test/cmdlineTests/evm_to_wasm_output_selection_asm_only/input.yul delete mode 100644 test/cmdlineTests/evm_to_wasm_output_selection_asm_only/output delete mode 100644 test/cmdlineTests/evm_to_wasm_output_selection_ewasm_ir_only/args delete mode 100644 test/cmdlineTests/evm_to_wasm_output_selection_ewasm_ir_only/input.yul delete mode 100644 test/cmdlineTests/evm_to_wasm_output_selection_ewasm_ir_only/output delete mode 100644 test/cmdlineTests/evm_to_wasm_output_selection_ewasm_only/args delete mode 100644 test/cmdlineTests/evm_to_wasm_output_selection_ewasm_only/input.yul delete mode 100644 test/cmdlineTests/evm_to_wasm_output_selection_ewasm_only/output delete mode 100644 test/cmdlineTests/evm_to_wasm_unsupported_translation/args delete mode 100644 test/cmdlineTests/evm_to_wasm_unsupported_translation/err delete mode 100644 test/cmdlineTests/evm_to_wasm_unsupported_translation/exit delete mode 100644 test/cmdlineTests/evm_to_wasm_unsupported_translation/input.yul delete mode 100644 test/cmdlineTests/evm_to_wasm_unsupported_translation/output delete mode 100644 test/cmdlineTests/output_selection_ewasm_ir_only/args delete mode 100644 test/cmdlineTests/output_selection_ewasm_ir_only/err delete mode 100644 test/cmdlineTests/output_selection_ewasm_ir_only/exit delete mode 100644 test/cmdlineTests/output_selection_ewasm_ir_only/input.sol delete mode 100644 test/cmdlineTests/standard_ewasm_requested/input.json delete mode 100644 test/cmdlineTests/standard_ewasm_requested/output.json delete mode 100644 test/cmdlineTests/standard_ewasm_requested_abstract/input.json delete mode 100644 test/cmdlineTests/standard_ewasm_requested_abstract/output.json delete mode 100644 test/cmdlineTests/strict_asm_output_selection_ewasm_ir_only/args delete mode 100644 test/cmdlineTests/strict_asm_output_selection_ewasm_ir_only/input.yul delete mode 100644 test/cmdlineTests/strict_asm_output_selection_ewasm_ir_only/output delete mode 100644 test/cmdlineTests/strict_asm_output_selection_ewasm_only/args delete mode 100644 test/cmdlineTests/strict_asm_output_selection_ewasm_only/input.yul delete mode 100644 test/cmdlineTests/strict_asm_output_selection_ewasm_only/output delete mode 100644 test/cmdlineTests/wasm_to_wasm_function_returning_multiple_values/args delete mode 100644 test/cmdlineTests/wasm_to_wasm_function_returning_multiple_values/input.yul delete mode 100644 test/cmdlineTests/wasm_to_wasm_function_returning_multiple_values/output delete mode 100644 test/cmdlineTests/wasm_to_wasm_memory_instructions_alignment/args delete mode 100644 test/cmdlineTests/wasm_to_wasm_memory_instructions_alignment/input.yul delete mode 100644 test/cmdlineTests/wasm_to_wasm_memory_instructions_alignment/output delete mode 100644 test/cmdlineTests/yul_to_wasm_source_location_crash/args delete mode 100644 test/cmdlineTests/yul_to_wasm_source_location_crash/input.yul delete mode 100644 test/cmdlineTests/yul_to_wasm_source_location_crash/output delete mode 100644 test/libyul/EwasmTranslationTest.cpp delete mode 100644 test/libyul/EwasmTranslationTest.h delete mode 100644 test/libyul/ewasmTranslationTests/address.yul delete mode 100644 test/libyul/ewasmTranslationTests/arithmetic_add.yul delete mode 100644 test/libyul/ewasmTranslationTests/arithmetic_addmod.yul delete mode 100644 test/libyul/ewasmTranslationTests/arithmetic_div.yul delete mode 100644 test/libyul/ewasmTranslationTests/arithmetic_exp.yul delete mode 100644 test/libyul/ewasmTranslationTests/arithmetic_mod.yul delete mode 100644 test/libyul/ewasmTranslationTests/arithmetic_mul.yul delete mode 100644 test/libyul/ewasmTranslationTests/arithmetic_mulmod.yul delete mode 100644 test/libyul/ewasmTranslationTests/arithmetic_sdiv.yul delete mode 100644 test/libyul/ewasmTranslationTests/arithmetic_smod.yul delete mode 100644 test/libyul/ewasmTranslationTests/arithmetic_sub.yul delete mode 100644 test/libyul/ewasmTranslationTests/balance.yul delete mode 100644 test/libyul/ewasmTranslationTests/bitwise_and.yul delete mode 100644 test/libyul/ewasmTranslationTests/bitwise_not.yul delete mode 100644 test/libyul/ewasmTranslationTests/bitwise_or.yul delete mode 100644 test/libyul/ewasmTranslationTests/bitwise_xor.yul delete mode 100644 test/libyul/ewasmTranslationTests/blockhash.yul delete mode 100644 test/libyul/ewasmTranslationTests/calldatacopy.yul delete mode 100644 test/libyul/ewasmTranslationTests/calldataload.yul delete mode 100644 test/libyul/ewasmTranslationTests/calldatasize.yul delete mode 100644 test/libyul/ewasmTranslationTests/caller.yul delete mode 100644 test/libyul/ewasmTranslationTests/callvalue.yul delete mode 100644 test/libyul/ewasmTranslationTests/chainid.yul delete mode 100644 test/libyul/ewasmTranslationTests/codecopy.yul delete mode 100644 test/libyul/ewasmTranslationTests/codesize.yul delete mode 100644 test/libyul/ewasmTranslationTests/coinbase.yul delete mode 100644 test/libyul/ewasmTranslationTests/comparison_eq.yul delete mode 100644 test/libyul/ewasmTranslationTests/comparison_gt.yul delete mode 100644 test/libyul/ewasmTranslationTests/comparison_lt.yul delete mode 100644 test/libyul/ewasmTranslationTests/comparison_sgt.yul delete mode 100644 test/libyul/ewasmTranslationTests/comparison_slt.yul delete mode 100644 test/libyul/ewasmTranslationTests/datacopy.yul delete mode 100644 test/libyul/ewasmTranslationTests/dataoffset.yul delete mode 100644 test/libyul/ewasmTranslationTests/datasize.yul delete mode 100644 test/libyul/ewasmTranslationTests/difficulty.yul delete mode 100644 test/libyul/ewasmTranslationTests/extcodecopy.yul delete mode 100644 test/libyul/ewasmTranslationTests/extcodehash.yul delete mode 100644 test/libyul/ewasmTranslationTests/extcodesize.yul delete mode 100644 test/libyul/ewasmTranslationTests/gas.yul delete mode 100644 test/libyul/ewasmTranslationTests/gaslimit.yul delete mode 100644 test/libyul/ewasmTranslationTests/gasprice.yul delete mode 100644 test/libyul/ewasmTranslationTests/invalid.yul delete mode 100644 test/libyul/ewasmTranslationTests/iszero.yul delete mode 100644 test/libyul/ewasmTranslationTests/keccak256.yul delete mode 100644 test/libyul/ewasmTranslationTests/log0.yul delete mode 100644 test/libyul/ewasmTranslationTests/log1.yul delete mode 100644 test/libyul/ewasmTranslationTests/log2.yul delete mode 100644 test/libyul/ewasmTranslationTests/log3.yul delete mode 100644 test/libyul/ewasmTranslationTests/log4.yul delete mode 100644 test/libyul/ewasmTranslationTests/loop_break.yul delete mode 100644 test/libyul/ewasmTranslationTests/loop_continue.yul delete mode 100644 test/libyul/ewasmTranslationTests/memoryguard.yul delete mode 100644 test/libyul/ewasmTranslationTests/msize.yul delete mode 100644 test/libyul/ewasmTranslationTests/mstore8.yul delete mode 100644 test/libyul/ewasmTranslationTests/mstore_mload.yul delete mode 100644 test/libyul/ewasmTranslationTests/number.yul delete mode 100644 test/libyul/ewasmTranslationTests/origin.yul delete mode 100644 test/libyul/ewasmTranslationTests/return.yul delete mode 100644 test/libyul/ewasmTranslationTests/returndatacopy.yul delete mode 100644 test/libyul/ewasmTranslationTests/returndatasize.yul delete mode 100644 test/libyul/ewasmTranslationTests/revert.yul delete mode 100644 test/libyul/ewasmTranslationTests/selfbalance.yul delete mode 100644 test/libyul/ewasmTranslationTests/selfdestruct.yul delete mode 100644 test/libyul/ewasmTranslationTests/shifts.yul delete mode 100644 test/libyul/ewasmTranslationTests/signextend.yul delete mode 100644 test/libyul/ewasmTranslationTests/simple_mstore.yul delete mode 100644 test/libyul/ewasmTranslationTests/simple_sload.yul delete mode 100644 test/libyul/ewasmTranslationTests/simple_sstore.yul delete mode 100644 test/libyul/ewasmTranslationTests/smoke.yul delete mode 100644 test/libyul/ewasmTranslationTests/smoke_call.yul delete mode 100644 test/libyul/ewasmTranslationTests/smoke_callcode.yul delete mode 100644 test/libyul/ewasmTranslationTests/smoke_create.yul delete mode 100644 test/libyul/ewasmTranslationTests/smoke_create2.yul delete mode 100644 test/libyul/ewasmTranslationTests/smoke_delegatecall.yul delete mode 100644 test/libyul/ewasmTranslationTests/smoke_staticcall.yul delete mode 100644 test/libyul/ewasmTranslationTests/timestamp.yul delete mode 100644 test/libyul/objectCompiler/wasm/no_main_function.yul delete mode 100644 test/libyul/objectCompiler/wasm/simple.yul delete mode 100644 test/libyul/objectCompiler/wasm/subObject.yul delete mode 100644 test/libyul/objectCompiler/wasm/subObjectAccess.yul delete mode 100644 test/libyul/yulOptimizerTests/conditionalSimplifier/add_correct_type_wasm.yul delete mode 100644 test/libyul/yulOptimizerTests/expressionSplitter/typed.yul delete mode 100644 test/libyul/yulOptimizerTests/wordSizeTransform/constant_assignment.yul delete mode 100644 test/libyul/yulOptimizerTests/wordSizeTransform/function_call.yul delete mode 100644 test/libyul/yulOptimizerTests/wordSizeTransform/functional_instruction.yul delete mode 100644 test/libyul/yulOptimizerTests/wordSizeTransform/if.yul delete mode 100644 test/libyul/yulOptimizerTests/wordSizeTransform/or_bool_renamed.yul delete mode 100644 test/libyul/yulOptimizerTests/wordSizeTransform/switch_1.yul delete mode 100644 test/libyul/yulOptimizerTests/wordSizeTransform/switch_2.yul delete mode 100644 test/libyul/yulOptimizerTests/wordSizeTransform/switch_3.yul delete mode 100644 test/libyul/yulOptimizerTests/wordSizeTransform/switch_4.yul delete mode 100644 test/libyul/yulOptimizerTests/wordSizeTransform/switch_5.yul delete mode 100644 test/libyul/yulSyntaxTests/for_loop_condition_fail_ewasm.yul delete mode 100644 test/libyul/yulSyntaxTests/linkersymbol_ewasm.yul delete mode 100644 test/libyul/yulSyntaxTests/type_check_cases.yul delete mode 100644 test/libyul/yulSyntaxTests/type_check_cases_fail.yul delete mode 100644 test/libyul/yulSyntaxTests/type_check_if_condition.yul delete mode 100644 test/libyul/yulSyntaxTests/type_check_if_condition_fail.yul delete mode 100644 test/tools/yulInterpreter/EwasmBuiltinInterpreter.cpp delete mode 100644 test/tools/yulInterpreter/EwasmBuiltinInterpreter.h diff --git a/Changelog.md b/Changelog.md index 164d998c29f7..c0f773908f69 100644 --- a/Changelog.md +++ b/Changelog.md @@ -4,6 +4,7 @@ Language Features: Compiler Features: + * EWasm: Remove EWasm backend. Bugfixes: diff --git a/cmake/templates/ewasm_polyfill.in b/cmake/templates/ewasm_polyfill.in deleted file mode 100644 index 8ac364280d76..000000000000 --- a/cmake/templates/ewasm_polyfill.in +++ /dev/null @@ -1,13 +0,0 @@ -// The generation of this file is defined in libyul/CMakeLists.txt. -// This file was generated by using the content of libyul/backends/wasm/polyfill/@EWASM_POLYFILL_NAME@.yul. - -#pragma once - -namespace solidity::yul::wasm::polyfill -{ - -static char const @EWASM_POLYFILL_NAME@[] = { - @EWASM_POLYFILL_CONTENT@, 0 -}; - -} // namespace solidity::yul::wasm::polyfill diff --git a/docs/contributing.rst b/docs/contributing.rst index d74612417b57..52a99ec4f542 100644 --- a/docs/contributing.rst +++ b/docs/contributing.rst @@ -93,8 +93,7 @@ Prerequisites For running all compiler tests you may want to optionally install a few dependencies (`evmone `_, -`libz3 `_, and -`libhera `_). +`libz3 `_). On macOS systems, some of the testing scripts expect GNU coreutils to be installed. This can be easiest accomplished using Homebrew: ``brew install coreutils``. @@ -129,13 +128,7 @@ for the ``evmone`` shared object can be specified via the ``ETH_EVMONE`` environ If you do not have it installed, you can skip these tests by passing the ``--no-semantic-tests`` flag to ``scripts/soltest.sh``. -Running Ewasm tests is disabled by default and can be explicitly enabled -via ``./scripts/soltest.sh --ewasm`` and requires `hera `_ -to be found by ``soltest``. -The mechanism for locating the ``hera`` library is the same as for ``evmone``, except that the -variable for specifying an explicit location is called ``ETH_HERA``. - -The ``evmone`` and ``hera`` libraries should both end with the file name +The ``evmone`` library should both end with the file name extension ``.so`` on Linux, ``.dll`` on Windows systems and ``.dylib`` on macOS. For running SMT tests, the ``libz3`` library must be installed and locatable diff --git a/docs/using-the-compiler.rst b/docs/using-the-compiler.rst index fa1a4ec32291..57f0fab6cfb2 100644 --- a/docs/using-the-compiler.rst +++ b/docs/using-the-compiler.rst @@ -404,10 +404,8 @@ Input Description // evm.deployedBytecode.immutableReferences - Map from AST ids to bytecode ranges that reference immutables // evm.methodIdentifiers - The list of function hashes // evm.gasEstimates - Function gas estimates - // ewasm.wast - Ewasm in WebAssembly S-expressions format - // ewasm.wasm - Ewasm in WebAssembly binary format // - // Note that using a using `evm`, `evm.bytecode`, `ewasm`, etc. will select every + // Note that using a using `evm`, `evm.bytecode`, etc. will select every // target part of that output. Additionally, `*` can be used as a wildcard to request everything. // "outputSelection": { @@ -501,7 +499,7 @@ Output Description // Mandatory: Error type, such as "TypeError", "InternalCompilerError", "Exception", etc. // See below for complete list of types. "type": "TypeError", - // Mandatory: Component where the error originated, such as "general", "ewasm", etc. + // Mandatory: Component where the error originated, such as "general" etc. "component": "general", // Mandatory ("error", "warning" or "info", but please note that this may be extended in the future) "severity": "error", @@ -617,13 +615,6 @@ Output Description "heavyLifting()": "infinite" } } - }, - // Ewasm related outputs - "ewasm": { - // S-expressions format - "wast": "", - // Binary format (hex string) - "wasm": "" } } } diff --git a/docs/yul.rst b/docs/yul.rst index 2cea0260b947..8a500c6145dc 100644 --- a/docs/yul.rst +++ b/docs/yul.rst @@ -1194,8 +1194,7 @@ An example Yul Object is shown below: // executing code is the constructor code) size := datasize("Contract1_deployed") offset := allocate(size) - // This will turn into a memory->memory copy for Ewasm and - // a codecopy for EVM + // This will turn into a codecopy for EVM datacopy(offset, dataoffset("Contract1_deployed"), size) return(offset, size) } diff --git a/libsolidity/interface/CompilerStack.cpp b/libsolidity/interface/CompilerStack.cpp index fa1e8ab3ea94..b18834a971f1 100644 --- a/libsolidity/interface/CompilerStack.cpp +++ b/libsolidity/interface/CompilerStack.cpp @@ -315,7 +315,6 @@ void CompilerStack::reset(bool _keepSettings) m_evmVersion = langutil::EVMVersion(); m_modelCheckerSettings = ModelCheckerSettings{}; m_generateIR = false; - m_generateEwasm = false; m_revertStrings = RevertStrings::Default; m_optimiserSettings = OptimiserSettings::minimal(); m_metadataLiteralSources = false; @@ -681,7 +680,7 @@ bool CompilerStack::compile(State _stopAfter) { try { - if (m_viaIR || m_generateIR || m_generateEwasm) + if (m_viaIR || m_generateIR) generateIR(*contract); if (m_generateEvmBytecode) { @@ -690,8 +689,6 @@ bool CompilerStack::compile(State _stopAfter) else compileContract(*contract, otherCompilers); } - if (m_generateEwasm) - generateEwasm(*contract); } catch (Error const& _error) { @@ -892,22 +889,6 @@ string const& CompilerStack::yulIROptimized(string const& _contractName) const return contract(_contractName).yulIROptimized; } -string const& CompilerStack::ewasm(string const& _contractName) const -{ - if (m_stackState != CompilationSuccessful) - solThrow(CompilerError, "Compilation was not successful."); - - return contract(_contractName).ewasm; -} - -evmasm::LinkerObject const& CompilerStack::ewasmObject(string const& _contractName) const -{ - if (m_stackState != CompilationSuccessful) - solThrow(CompilerError, "Compilation was not successful."); - - return contract(_contractName).ewasmObject; -} - evmasm::LinkerObject const& CompilerStack::object(string const& _contractName) const { if (m_stackState != CompilationSuccessful) @@ -1479,42 +1460,6 @@ void CompilerStack::generateEVMFromIR(ContractDefinition const& _contract) assembleYul(_contract, compiledContract.evmAssembly, compiledContract.evmRuntimeAssembly); } -void CompilerStack::generateEwasm(ContractDefinition const& _contract) -{ - solAssert(m_stackState >= AnalysisPerformed, ""); - if (m_hasError) - solThrow(CompilerError, "Called generateEwasm with errors."); - - if (!_contract.canBeDeployed()) - return; - - Contract& compiledContract = m_contracts.at(_contract.fullyQualifiedName()); - solAssert(!compiledContract.yulIROptimized.empty(), ""); - if (!compiledContract.ewasm.empty()) - return; - - // Re-parse the Yul IR in EVM dialect - yul::YulStack stack( - m_evmVersion, - m_eofVersion, - yul::YulStack::Language::StrictAssembly, - m_optimiserSettings, - m_debugInfoSelection - ); - stack.parseAndAnalyze("", compiledContract.yulIROptimized); - - stack.optimize(); - stack.translate(yul::YulStack::Language::Ewasm); - stack.optimize(); - - //cout << yul::AsmPrinter{}(*stack.parserResult()->code) << endl; - - // Turn into Ewasm text representation. - auto result = stack.assemble(yul::YulStack::Machine::Ewasm); - compiledContract.ewasm = std::move(result.assembly); - compiledContract.ewasmObject = std::move(*result.bytecode); -} - CompilerStack::Contract const& CompilerStack::contract(string const& _contractName) const { solAssert(m_stackState >= AnalysisPerformed, ""); diff --git a/libsolidity/interface/CompilerStack.h b/libsolidity/interface/CompilerStack.h index 36e462330b0e..ae11e233bd18 100644 --- a/libsolidity/interface/CompilerStack.h +++ b/libsolidity/interface/CompilerStack.h @@ -203,9 +203,6 @@ class CompilerStack: public langutil::CharStreamProvider /// Enable generation of Yul IR code. void enableIRGeneration(bool _enable = true) { m_generateIR = _enable; } - /// Enable experimental generation of Ewasm code. If enabled, IR is also generated. - void enableEwasmGeneration(bool _enable = true) { m_generateEwasm = _enable; } - /// @arg _metadataLiteralSources When true, store sources as literals in the contract metadata. /// Must be set before parsing. void useMetadataLiteralSources(bool _metadataLiteralSources); @@ -282,12 +279,6 @@ class CompilerStack: public langutil::CharStreamProvider /// @returns the optimized IR representation of a contract. std::string const& yulIROptimized(std::string const& _contractName) const; - /// @returns the Ewasm text representation of a contract. - std::string const& ewasm(std::string const& _contractName) const; - - /// @returns the Ewasm representation of a contract. - evmasm::LinkerObject const& ewasmObject(std::string const& _contractName) const; - /// @returns the assembled object for a contract. evmasm::LinkerObject const& object(std::string const& _contractName) const; @@ -389,8 +380,6 @@ class CompilerStack: public langutil::CharStreamProvider evmasm::LinkerObject runtimeObject; ///< Runtime object. std::string yulIR; ///< Yul IR code. std::string yulIROptimized; ///< Optimized Yul IR code. - std::string ewasm; ///< Experimental Ewasm text representation - evmasm::LinkerObject ewasmObject; ///< Experimental Ewasm code util::LazyInit metadata; ///< The metadata json that will be hashed into the chain. util::LazyInit abi; util::LazyInit storageLayout; @@ -448,10 +437,6 @@ class CompilerStack: public langutil::CharStreamProvider /// Depends on output generated by generateIR. void generateEVMFromIR(ContractDefinition const& _contract); - /// Generate Ewasm representation for a single contract. - /// Depends on output generated by generateIR. - void generateEwasm(ContractDefinition const& _contract); - /// Links all the known library addresses in the available objects. Any unknown /// library will still be kept as an unlinked placeholder in the objects. void link(); @@ -510,7 +495,6 @@ class CompilerStack: public langutil::CharStreamProvider std::map> m_requestedContractNames; bool m_generateEvmBytecode = true; bool m_generateIR = false; - bool m_generateEwasm = false; std::map m_libraries; ImportRemapper m_importRemapper; std::map m_sources; diff --git a/libsolidity/interface/StandardCompiler.cpp b/libsolidity/interface/StandardCompiler.cpp index dbcbe798aaed..28a564a4c927 100644 --- a/libsolidity/interface/StandardCompiler.cpp +++ b/libsolidity/interface/StandardCompiler.cpp @@ -179,7 +179,7 @@ bool hashMatchesContent(string const& _hash, string const& _content) bool isArtifactRequested(Json::Value const& _outputSelection, string const& _artifact, bool _wildcardMatchesExperimental) { - static set experimental{"ir", "irOptimized", "wast", "ewasm", "ewasm.wast"}; + static set experimental{"ir", "irOptimized"}; for (auto const& selectedArtifactJson: _outputSelection) { string const& selectedArtifact = selectedArtifactJson.asString(); @@ -190,7 +190,7 @@ bool isArtifactRequested(Json::Value const& _outputSelection, string const& _art return true; else if (selectedArtifact == "*") { - // "ir", "irOptimized", "wast" and "ewasm.wast" can only be matched by "*" if activated. + // "ir", "irOptimized" can only be matched by "*" if activated. if (experimental.count(_artifact) == 0 || _wildcardMatchesExperimental) return true; } @@ -264,7 +264,6 @@ bool isBinaryRequested(Json::Value const& _outputSelection) static vector const outputsThatRequireBinaries = vector{ "*", "ir", "irOptimized", - "wast", "wasm", "ewasm.wast", "ewasm.wasm", "evm.gasEstimates", "evm.legacyAssembly", "evm.assembly" } + evmObjectComponents("bytecode") + evmObjectComponents("deployedBytecode"); @@ -295,29 +294,10 @@ bool isEvmBytecodeRequested(Json::Value const& _outputSelection) return false; } -/// @returns true if any Ewasm code was requested. Note that as an exception, '*' does not -/// yet match "ewasm.wast" or "ewasm" -bool isEwasmRequested(Json::Value const& _outputSelection) -{ - if (!_outputSelection.isObject()) - return false; - - for (auto const& fileRequests: _outputSelection) - for (auto const& requests: fileRequests) - for (auto const& request: requests) - if (request == "ewasm" || request == "ewasm.wast") - return true; - - return false; -} - /// @returns true if any Yul IR was requested. Note that as an exception, '*' does not /// yet match "ir" or "irOptimized" bool isIRRequested(Json::Value const& _outputSelection) { - if (isEwasmRequested(_outputSelection)) - return true; - if (!_outputSelection.isObject()) return false; @@ -1175,7 +1155,6 @@ Json::Value StandardCompiler::compileSolidity(StandardCompiler::InputsAndSetting compilerStack.enableEvmBytecodeGeneration(isEvmBytecodeRequested(_inputsAndSettings.outputSelection)); compilerStack.enableIRGeneration(isIRRequested(_inputsAndSettings.outputSelection)); - compilerStack.enableEwasmGeneration(isEwasmRequested(_inputsAndSettings.outputSelection)); Json::Value errors = std::move(_inputsAndSettings.errors); @@ -1374,12 +1353,6 @@ Json::Value StandardCompiler::compileSolidity(StandardCompiler::InputsAndSetting if (compilationSuccess && isArtifactRequested(_inputsAndSettings.outputSelection, file, name, "irOptimized", wildcardMatchesExperimental)) contractData["irOptimized"] = compilerStack.yulIROptimized(contractName); - // Ewasm - if (compilationSuccess && isArtifactRequested(_inputsAndSettings.outputSelection, file, name, "ewasm.wast", wildcardMatchesExperimental)) - contractData["ewasm"]["wast"] = compilerStack.ewasm(contractName); - if (compilationSuccess && isArtifactRequested(_inputsAndSettings.outputSelection, file, name, "ewasm.wasm", wildcardMatchesExperimental)) - contractData["ewasm"]["wasm"] = compilerStack.ewasmObject(contractName).toHex(); - // EVM Json::Value evmData(Json::objectValue); if (compilationSuccess && isArtifactRequested(_inputsAndSettings.outputSelection, file, name, "evm.assembly", wildcardMatchesExperimental)) diff --git a/libyul/CMakeLists.txt b/libyul/CMakeLists.txt index cc7033a0b833..2cf02f8383f7 100644 --- a/libyul/CMakeLists.txt +++ b/libyul/CMakeLists.txt @@ -1,19 +1,3 @@ -# This will re-generate the polyfill headers, if any file within libyul/backends/wasm/polyfill/ was modified. -set_directory_properties(PROPERTY CMAKE_CONFIGURE_DEPENDS ${CMAKE_SOURCE_DIR}/libyul/backends/wasm/polyfill/) - -set(POLYFILLS Arithmetic Bitwise Comparison Conversion Interface Keccak Logical Memory) -set(GENERATED_POLYFILL_HEADERS) -foreach(polyfill IN LISTS POLYFILLS) - set(POLYFILL_FILE ${CMAKE_SOURCE_DIR}/libyul/backends/wasm/polyfill/${polyfill}.yul) - file(READ ${POLYFILL_FILE} EWASM_POLYFILL_CONTENT HEX) - string(REGEX MATCHALL ".." EWASM_POLYFILL_CONTENT "${EWASM_POLYFILL_CONTENT}") - string(REGEX REPLACE ";" ",\n\t0x" EWASM_POLYFILL_CONTENT "${EWASM_POLYFILL_CONTENT}") - set(EWASM_POLYFILL_CONTENT "0x${EWASM_POLYFILL_CONTENT}") - set(EWASM_POLYFILL_NAME ${polyfill}) - configure_file("${CMAKE_SOURCE_DIR}/cmake/templates/ewasm_polyfill.in" ${CMAKE_BINARY_DIR}/include/ewasmPolyfills/${polyfill}.h @ONLY) - list(APPEND GENERATED_POLYFILL_HEADERS ${CMAKE_BINARY_DIR}/include/ewasmPolyfills/${polyfill}.h) -endforeach() - add_library(yul ${GENERATED_POLYFILL_HEADERS} @@ -80,20 +64,6 @@ add_library(yul backends/evm/StackLayoutGenerator.h backends/evm/VariableReferenceCounter.h backends/evm/VariableReferenceCounter.cpp - backends/wasm/EVMToEwasmTranslator.cpp - backends/wasm/EVMToEwasmTranslator.h - backends/wasm/BinaryTransform.cpp - backends/wasm/BinaryTransform.h - backends/wasm/TextTransform.cpp - backends/wasm/TextTransform.h - backends/wasm/WasmCodeTransform.cpp - backends/wasm/WasmCodeTransform.h - backends/wasm/WasmDialect.cpp - backends/wasm/WasmDialect.h - backends/wasm/WasmObjectCompiler.cpp - backends/wasm/WasmObjectCompiler.h - backends/wasm/WordSizeTransform.cpp - backends/wasm/WordSizeTransform.h optimiser/ASTCopier.cpp optimiser/ASTCopier.h optimiser/ASTWalker.cpp diff --git a/libyul/YulStack.cpp b/libyul/YulStack.cpp index f258de6a84c7..9ac90c3959f6 100644 --- a/libyul/YulStack.cpp +++ b/libyul/YulStack.cpp @@ -16,8 +16,7 @@ */ // SPDX-License-Identifier: GPL-3.0 /** - * Full assembly stack that can support EVM-assembly and Yul as input and EVM, EVM1.5 and - * Ewasm as output. + * Full assembly stack that can support EVM-assembly and Yul as input and EVM, EVM1.5 */ @@ -30,9 +29,6 @@ #include #include #include -#include -#include -#include #include #include @@ -57,8 +53,6 @@ Dialect const& languageToDialect(YulStack::Language _language, EVMVersion _versi return EVMDialect::strictAssemblyForEVMObjects(_version); case YulStack::Language::Yul: return EVMDialectTyped::instance(_version); - case YulStack::Language::Ewasm: - return WasmDialect::instance(); } yulAssert(false, ""); return Dialect::yulDeprecated(); @@ -102,24 +96,6 @@ void YulStack::optimize() yulAssert(analyzeParsed(), "Invalid source code after optimization."); } -void YulStack::translate(YulStack::Language _targetLanguage) -{ - if (m_language == _targetLanguage) - return; - - yulAssert( - m_language == Language::StrictAssembly && _targetLanguage == Language::Ewasm, - "Invalid language combination" - ); - - *m_parserResult = EVMToEwasmTranslator( - languageToDialect(m_language, m_evmVersion), - *this - ).run(*parserResult()); - - m_language = _targetLanguage; -} - bool YulStack::analyzeParsed() { yulAssert(m_parserResult, ""); @@ -205,18 +181,6 @@ MachineAssemblyObject YulStack::assemble(Machine _machine) const { case Machine::EVM: return assembleWithDeployed().first; - case Machine::Ewasm: - { - yulAssert(m_language == Language::Ewasm, ""); - Dialect const& dialect = languageToDialect(m_language, EVMVersion{}); - - MachineAssemblyObject object; - auto result = WasmObjectCompiler::compile(*m_parserResult, dialect); - object.assembly = std::move(result.first); - object.bytecode = make_shared(); - object.bytecode->bytecode = std::move(result.second); - return object; - } } // unreachable return MachineAssemblyObject(); diff --git a/libyul/YulStack.h b/libyul/YulStack.h index 5c57b56fa58d..bd38cd6024f8 100644 --- a/libyul/YulStack.h +++ b/libyul/YulStack.h @@ -16,8 +16,7 @@ */ // SPDX-License-Identifier: GPL-3.0 /** - * Full assembly stack that can support EVM-assembly and Yul as input and EVM, EVM1.5 and - * Ewasm as output. + * Full assembly stack that can support EVM-assembly and Yul as input and EVM. */ #pragma once @@ -60,14 +59,13 @@ struct MachineAssemblyObject }; /* - * Full assembly stack that can support EVM-assembly and Yul as input and EVM, EVM1.5 and - * Ewasm as output. + * Full assembly stack that can support EVM-assembly and Yul as input and EVM as output. */ class YulStack: public langutil::CharStreamProvider { public: - enum class Language { Yul, Assembly, StrictAssembly, Ewasm }; - enum class Machine { EVM, Ewasm }; + enum class Language { Yul, Assembly, StrictAssembly }; + enum class Machine { EVM }; YulStack(): YulStack( @@ -105,9 +103,6 @@ class YulStack: public langutil::CharStreamProvider /// If the settings (see constructor) disabled the optimizer, nothing is done here. void optimize(); - /// Translate the source to a different language / dialect. - void translate(Language _targetLanguage); - /// Run the assembly step (should only be called after parseAndAnalyze). MachineAssemblyObject assemble(Machine _machine) const; diff --git a/libyul/backends/wasm/BinaryTransform.cpp b/libyul/backends/wasm/BinaryTransform.cpp deleted file mode 100644 index 03f385d805ca..000000000000 --- a/libyul/backends/wasm/BinaryTransform.cpp +++ /dev/null @@ -1,722 +0,0 @@ -/* - This file is part of solidity. - - solidity is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - solidity is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with solidity. If not, see . -*/ -// SPDX-License-Identifier: GPL-3.0 -/** - * Component that transforms internal Wasm representation to binary. - */ - -#include - -#include -#include -#include -#include - -#include -#include - -using namespace std; -using namespace solidity; -using namespace solidity::yul; -using namespace solidity::yul::wasm; -using namespace solidity::util; - -namespace -{ - -bytes toBytes(uint8_t _b) -{ - return bytes(1, _b); -} - -enum class LimitsKind: uint8_t -{ - Min = 0x00, - MinMax = 0x01, -}; - -enum class Mutability: uint8_t -{ - Const = 0x00, - Var = 0x01, -}; - -enum class Section: uint8_t -{ - CUSTOM = 0x00, - TYPE = 0x01, - IMPORT = 0x02, - FUNCTION = 0x03, - MEMORY = 0x05, - GLOBAL = 0x06, - EXPORT = 0x07, - CODE = 0x0a -}; - -bytes toBytes(Section _s) -{ - return toBytes(uint8_t(_s)); -} - -enum class ValueType: uint8_t -{ - Void = 0x40, - Function = 0x60, - I64 = 0x7e, - I32 = 0x7f -}; - -bytes toBytes(ValueType _vt) -{ - return toBytes(uint8_t(_vt)); -} - -ValueType toValueType(wasm::Type _type) -{ - if (_type == wasm::Type::i32) - return ValueType::I32; - else if (_type == wasm::Type::i64) - return ValueType::I64; - else - yulAssert(false, "Invalid wasm variable type"); -} - -enum class Export: uint8_t -{ - Function = 0x0, - Memory = 0x2 -}; - -bytes toBytes(Export _export) -{ - return toBytes(uint8_t(_export)); -} - -// NOTE: This is a subset of WebAssembly opcodes. -// Those available as a builtin are listed further down. -enum class Opcode: uint8_t -{ - Block = 0x02, - Loop = 0x03, - If = 0x04, - Else = 0x05, - End = 0x0b, - Br = 0x0c, - BrIf = 0x0d, - BrTable = 0x0e, // Not used yet. - Return = 0x0f, - Call = 0x10, - CallIndirect = 0x11, // Not used yet. - LocalGet = 0x20, - LocalSet = 0x21, - LocalTee = 0x22, // Not used yet. - GlobalGet = 0x23, - GlobalSet = 0x24, - I32Const = 0x41, - I64Const = 0x42, -}; - -bytes toBytes(Opcode _o) -{ - return toBytes(uint8_t(_o)); -} - -Opcode constOpcodeFor(ValueType _type) -{ - if (_type == ValueType::I32) - return Opcode::I32Const; - else if (_type == ValueType::I64) - return Opcode::I64Const; - else - yulAssert(false, "Values of this type cannot be used with const opcode"); -} - -static map const builtins = { - {"unreachable", 0x00}, - {"nop", 0x01}, - {"i32.drop", 0x1a}, - {"i64.drop", 0x1a}, - {"i32.select", 0x1b}, - {"i64.select", 0x1b}, - {"i32.load", 0x28}, - {"i64.load", 0x29}, - {"i32.load8_s", 0x2c}, - {"i32.load8_u", 0x2d}, - {"i32.load16_s", 0x2e}, - {"i32.load16_u", 0x2f}, - {"i64.load8_s", 0x30}, - {"i64.load8_u", 0x31}, - {"i64.load16_s", 0x32}, - {"i64.load16_u", 0x33}, - {"i64.load32_s", 0x34}, - {"i64.load32_u", 0x35}, - {"i32.store", 0x36}, - {"i64.store", 0x37}, - {"i32.store8", 0x3a}, - {"i32.store16", 0x3b}, - {"i64.store8", 0x3c}, - {"i64.store16", 0x3d}, - {"i64.store32", 0x3e}, - {"memory.size", 0x3f}, - {"memory.grow", 0x40}, - {"i32.eqz", 0x45}, - {"i32.eq", 0x46}, - {"i32.ne", 0x47}, - {"i32.lt_s", 0x48}, - {"i32.lt_u", 0x49}, - {"i32.gt_s", 0x4a}, - {"i32.gt_u", 0x4b}, - {"i32.le_s", 0x4c}, - {"i32.le_u", 0x4d}, - {"i32.ge_s", 0x4e}, - {"i32.ge_u", 0x4f}, - {"i64.eqz", 0x50}, - {"i64.eq", 0x51}, - {"i64.ne", 0x52}, - {"i64.lt_s", 0x53}, - {"i64.lt_u", 0x54}, - {"i64.gt_s", 0x55}, - {"i64.gt_u", 0x56}, - {"i64.le_s", 0x57}, - {"i64.le_u", 0x58}, - {"i64.ge_s", 0x59}, - {"i64.ge_u", 0x5a}, - {"i32.clz", 0x67}, - {"i32.ctz", 0x68}, - {"i32.popcnt", 0x69}, - {"i32.add", 0x6a}, - {"i32.sub", 0x6b}, - {"i32.mul", 0x6c}, - {"i32.div_s", 0x6d}, - {"i32.div_u", 0x6e}, - {"i32.rem_s", 0x6f}, - {"i32.rem_u", 0x70}, - {"i32.and", 0x71}, - {"i32.or", 0x72}, - {"i32.xor", 0x73}, - {"i32.shl", 0x74}, - {"i32.shr_s", 0x75}, - {"i32.shr_u", 0x76}, - {"i32.rotl", 0x77}, - {"i32.rotr", 0x78}, - {"i64.clz", 0x79}, - {"i64.ctz", 0x7a}, - {"i64.popcnt", 0x7b}, - {"i64.add", 0x7c}, - {"i64.sub", 0x7d}, - {"i64.mul", 0x7e}, - {"i64.div_s", 0x7f}, - {"i64.div_u", 0x80}, - {"i64.rem_s", 0x81}, - {"i64.rem_u", 0x82}, - {"i64.and", 0x83}, - {"i64.or", 0x84}, - {"i64.xor", 0x85}, - {"i64.shl", 0x86}, - {"i64.shr_s", 0x87}, - {"i64.shr_u", 0x88}, - {"i64.rotl", 0x89}, - {"i64.rotr", 0x8a}, - {"i32.wrap_i64", 0xa7}, - {"i64.extend_i32_s", 0xac}, - {"i64.extend_i32_u", 0xad}, -}; - -bytes prefixSize(bytes _data) -{ - size_t size = _data.size(); - return lebEncode(size) + std::move(_data); -} - -bytes makeSection(Section _section, bytes _data) -{ - return toBytes(_section) + prefixSize(std::move(_data)); -} - -/// This is a kind of run-length-encoding of local types. -vector> groupLocalVariables(vector _localVariables) -{ - vector> localEntries; - - size_t entrySize = 0; - ValueType entryType = ValueType::I32; // Any type would work here - for (VariableDeclaration const& localVariable: _localVariables) - { - ValueType variableType = toValueType(localVariable.type); - - if (variableType != entryType) - { - if (entrySize > 0) - localEntries.emplace_back(entrySize, entryType); - - entryType = variableType; - entrySize = 0; - } - - ++entrySize; - } - if (entrySize > 0) - localEntries.emplace_back(entrySize, entryType); - - return localEntries; -} - -} - -bytes BinaryTransform::run(Module const& _module) -{ - map> const types = typeToFunctionMap(_module.imports, _module.functions); - - map const globalIDs = enumerateGlobals(_module); - map const functionIDs = enumerateFunctions(_module); - map const functionTypes = enumerateFunctionTypes(types); - - yulAssert(globalIDs.size() == _module.globals.size(), ""); - yulAssert(functionIDs.size() == _module.imports.size() + _module.functions.size(), ""); - yulAssert(functionTypes.size() == functionIDs.size(), ""); - yulAssert(functionTypes.size() >= types.size(), ""); - - bytes ret{0, 'a', 's', 'm'}; - // version - ret += bytes{1, 0, 0, 0}; - ret += typeSection(types); - ret += importSection(_module.imports, functionTypes); - ret += functionSection(_module.functions, functionTypes); - ret += memorySection(); - ret += globalSection(_module.globals); - ret += exportSection(functionIDs); - - map> subModulePosAndSize; - for (auto const& [name, module]: _module.subModules) - { - // TODO should we prefix and / or shorten the name? - bytes data = BinaryTransform::run(module); - size_t const length = data.size(); - ret += customSection(name, std::move(data)); - // Skip all the previous sections and the size field of this current custom section. - size_t const offset = ret.size() - length; - subModulePosAndSize[name] = {offset, length}; - } - for (auto const& [name, data]: _module.customSections) - { - size_t const length = data.size(); - ret += customSection(name, data); - // Skip all the previous sections and the size field of this current custom section. - size_t const offset = ret.size() - length; - subModulePosAndSize[name] = {offset, length}; - } - - BinaryTransform bt( - std::move(globalIDs), - std::move(functionIDs), - std::move(functionTypes), - std::move(subModulePosAndSize) - ); - - ret += bt.codeSection(_module.functions); - return ret; -} - -bytes BinaryTransform::operator()(Literal const& _literal) -{ - return std::visit(GenericVisitor{ - [&](uint32_t _value) -> bytes { return toBytes(Opcode::I32Const) + lebEncodeSigned(static_cast(_value)); }, - [&](uint64_t _value) -> bytes { return toBytes(Opcode::I64Const) + lebEncodeSigned(static_cast(_value)); }, - }, _literal.value); -} - -bytes BinaryTransform::operator()(StringLiteral const&) -{ - // StringLiteral is a special AST element used for certain builtins. - // It is not mapped to actual WebAssembly, and should be processed in visit(BuiltinCall). - yulAssert(false, ""); -} - -bytes BinaryTransform::operator()(LocalVariable const& _variable) -{ - return toBytes(Opcode::LocalGet) + lebEncode(m_locals.at(_variable.name)); -} - -bytes BinaryTransform::operator()(GlobalVariable const& _variable) -{ - return toBytes(Opcode::GlobalGet) + lebEncode(m_globalIDs.at(_variable.name)); -} - -bytes BinaryTransform::operator()(BuiltinCall const& _call) -{ - // We need to avoid visiting the arguments of `dataoffset` and `datasize` because - // they are references to object names that should not end up in the code. - if (_call.functionName == "dataoffset") - { - string name = get(_call.arguments.at(0)).value; - // TODO: support the case where name refers to the current object - yulAssert(m_subModulePosAndSize.count(name), ""); - return toBytes(Opcode::I64Const) + lebEncodeSigned(static_cast(m_subModulePosAndSize.at(name).first)); - } - else if (_call.functionName == "datasize") - { - string name = get(_call.arguments.at(0)).value; - // TODO: support the case where name refers to the current object - yulAssert(m_subModulePosAndSize.count(name), ""); - return toBytes(Opcode::I64Const) + lebEncodeSigned(static_cast(m_subModulePosAndSize.at(name).second)); - } - - yulAssert(builtins.count(_call.functionName), "Builtin " + _call.functionName + " not found"); - // NOTE: the dialect ensures we have the right amount of arguments - bytes args = visit(_call.arguments); - bytes ret = std::move(args) + toBytes(builtins.at(_call.functionName)); - if ( - _call.functionName.find(".load") != string::npos || - _call.functionName.find(".store") != string::npos - ) - // Alignment hint and offset. Interpreters ignore the alignment. JITs/AOTs can take it - // into account to generate more efficient code but if the hint is invalid it could - // actually be more expensive. It's best to hint at 1-byte alignment if we don't plan - // to control the memory layout accordingly. - ret += bytes{{0, 0}}; // 2^0 == 1-byte alignment - - return ret; -} - -bytes BinaryTransform::operator()(FunctionCall const& _call) -{ - return visit(_call.arguments) + toBytes(Opcode::Call) + lebEncode(m_functionIDs.at(_call.functionName)); -} - -bytes BinaryTransform::operator()(LocalAssignment const& _assignment) -{ - return - std::visit(*this, *_assignment.value) + - toBytes(Opcode::LocalSet) + - lebEncode(m_locals.at(_assignment.variableName)); -} - -bytes BinaryTransform::operator()(GlobalAssignment const& _assignment) -{ - return - std::visit(*this, *_assignment.value) + - toBytes(Opcode::GlobalSet) + - lebEncode(m_globalIDs.at(_assignment.variableName)); -} - -bytes BinaryTransform::operator()(If const& _if) -{ - bytes result = - std::visit(*this, *_if.condition) + - toBytes(Opcode::If) + - toBytes(ValueType::Void); - - m_labels.emplace_back(); - - result += visit(_if.statements); - if (_if.elseStatements) - result += toBytes(Opcode::Else) + visit(*_if.elseStatements); - - m_labels.pop_back(); - - result += toBytes(Opcode::End); - return result; -} - -bytes BinaryTransform::operator()(Loop const& _loop) -{ - bytes result = toBytes(Opcode::Loop) + toBytes(ValueType::Void); - - m_labels.emplace_back(_loop.labelName); - result += visit(_loop.statements); - m_labels.pop_back(); - - result += toBytes(Opcode::End); - return result; -} - -bytes BinaryTransform::operator()(Branch const& _branch) -{ - return toBytes(Opcode::Br) + encodeLabelIdx(_branch.label.name); -} - -bytes BinaryTransform::operator()(BranchIf const& _branchIf) -{ - bytes result = std::visit(*this, *_branchIf.condition); - result += toBytes(Opcode::BrIf) + encodeLabelIdx(_branchIf.label.name); - return result; -} - -bytes BinaryTransform::operator()(Return const&) -{ - // Note that this does not work if the function returns a value. - return toBytes(Opcode::Return); -} - -bytes BinaryTransform::operator()(Block const& _block) -{ - m_labels.emplace_back(_block.labelName); - bytes result = - toBytes(Opcode::Block) + - toBytes(ValueType::Void) + - visit(_block.statements) + - toBytes(Opcode::End); - m_labels.pop_back(); - return result; -} - -bytes BinaryTransform::operator()(FunctionDefinition const& _function) -{ - bytes ret; - - vector> localEntries = groupLocalVariables(_function.locals); - ret += lebEncode(localEntries.size()); - for (pair const& entry: localEntries) - { - ret += lebEncode(entry.first); - ret += toBytes(entry.second); - } - - m_locals.clear(); - size_t varIdx = 0; - for (size_t i = 0; i < _function.parameters.size(); ++i) - m_locals[_function.parameters[i].name] = varIdx++; - for (size_t i = 0; i < _function.locals.size(); ++i) - m_locals[_function.locals[i].variableName] = varIdx++; - - yulAssert(m_labels.empty(), "Stray labels."); - - ret += visit(_function.body); - ret += toBytes(Opcode::End); - - yulAssert(m_labels.empty(), "Stray labels."); - - return prefixSize(std::move(ret)); -} - -BinaryTransform::Type BinaryTransform::typeOf(FunctionImport const& _import) -{ - return { - encodeTypes(_import.paramTypes), - encodeTypes(_import.returnType ? vector(1, *_import.returnType) : vector()) - }; -} - -BinaryTransform::Type BinaryTransform::typeOf(FunctionDefinition const& _funDef) -{ - return { - encodeTypes(_funDef.parameters), - encodeTypes(_funDef.returnType ? vector(1, *_funDef.returnType) : vector()) - }; -} - -uint8_t BinaryTransform::encodeType(wasm::Type _type) -{ - return uint8_t(toValueType(_type)); -} - -vector BinaryTransform::encodeTypes(vector const& _types) -{ - vector result; - for (wasm::Type t: _types) - result.emplace_back(encodeType(t)); - return result; -} - -vector BinaryTransform::encodeTypes(wasm::TypedNameList const& _typedNameList) -{ - vector result; - for (TypedName const& typedName: _typedNameList) - result.emplace_back(encodeType(typedName.type)); - return result; -} - -map> BinaryTransform::typeToFunctionMap( - vector const& _imports, - vector const& _functions -) -{ - map> types; - for (auto const& import: _imports) - types[typeOf(import)].emplace_back(import.internalName); - for (auto const& fun: _functions) - types[typeOf(fun)].emplace_back(fun.name); - - return types; -} - -map BinaryTransform::enumerateGlobals(Module const& _module) -{ - map globals; - for (size_t i = 0; i < _module.globals.size(); ++i) - globals[_module.globals[i].variableName] = i; - - return globals; -} - -map BinaryTransform::enumerateFunctions(Module const& _module) -{ - map functions; - size_t funID = 0; - for (FunctionImport const& fun: _module.imports) - functions[fun.internalName] = funID++; - for (FunctionDefinition const& fun: _module.functions) - functions[fun.name] = funID++; - - return functions; -} - -map BinaryTransform::enumerateFunctionTypes(map> const& _typeToFunctionMap) -{ - map functionTypes; - size_t typeID = 0; - for (vector const& funNames: _typeToFunctionMap | ranges::views::values) - { - for (string const& name: funNames) - functionTypes[name] = typeID; - ++typeID; - } - - return functionTypes; -} - -bytes BinaryTransform::typeSection(map> const& _typeToFunctionMap) -{ - bytes result; - size_t index = 0; - for (Type const& type: _typeToFunctionMap | ranges::views::keys) - { - result += toBytes(ValueType::Function); - result += lebEncode(type.first.size()) + type.first; - result += lebEncode(type.second.size()) + type.second; - - index++; - } - - return makeSection(Section::TYPE, lebEncode(index) + std::move(result)); -} - -bytes BinaryTransform::importSection( - vector const& _imports, - map const& _functionTypes -) -{ - bytes result = lebEncode(_imports.size()); - for (FunctionImport const& import: _imports) - { - uint8_t importKind = 0; // function - result += - encodeName(import.module) + - encodeName(import.externalName) + - toBytes(importKind) + - lebEncode(_functionTypes.at(import.internalName)); - } - return makeSection(Section::IMPORT, std::move(result)); -} - -bytes BinaryTransform::functionSection( - vector const& _functions, - map const& _functionTypes -) -{ - bytes result = lebEncode(_functions.size()); - for (auto const& fun: _functions) - result += lebEncode(_functionTypes.at(fun.name)); - return makeSection(Section::FUNCTION, std::move(result)); -} - -bytes BinaryTransform::memorySection() -{ - bytes result = lebEncode(1); - result.push_back(static_cast(LimitsKind::Min)); - result.push_back(1); // initial length - return makeSection(Section::MEMORY, std::move(result)); -} - -bytes BinaryTransform::globalSection(vector const& _globals) -{ - bytes result = lebEncode(_globals.size()); - for (wasm::GlobalVariableDeclaration const& global: _globals) - { - ValueType globalType = toValueType(global.type); - result += - toBytes(globalType) + - lebEncode(static_cast(Mutability::Var)) + - toBytes(constOpcodeFor(globalType)) + - lebEncodeSigned(0) + - toBytes(Opcode::End); - } - - return makeSection(Section::GLOBAL, std::move(result)); -} - -bytes BinaryTransform::exportSection(map const& _functionIDs) -{ - bool hasMain = _functionIDs.count("main"); - bytes result = lebEncode(hasMain ? 2 : 1); - result += encodeName("memory") + toBytes(Export::Memory) + lebEncode(0); - if (hasMain) - result += encodeName("main") + toBytes(Export::Function) + lebEncode(_functionIDs.at("main")); - return makeSection(Section::EXPORT, std::move(result)); -} - -bytes BinaryTransform::customSection(string const& _name, bytes _data) -{ - bytes result = encodeName(_name) + std::move(_data); - return makeSection(Section::CUSTOM, std::move(result)); -} - -bytes BinaryTransform::codeSection(vector const& _functions) -{ - bytes result = lebEncode(_functions.size()); - for (FunctionDefinition const& fun: _functions) - result += (*this)(fun); - return makeSection(Section::CODE, std::move(result)); -} - -bytes BinaryTransform::visit(vector const& _expressions) -{ - bytes result; - for (auto const& expr: _expressions) - result += std::visit(*this, expr); - return result; -} - -bytes BinaryTransform::visitReversed(vector const& _expressions) -{ - bytes result; - for (auto const& expr: _expressions | ranges::views::reverse) - result += std::visit(*this, expr); - return result; -} - -bytes BinaryTransform::encodeLabelIdx(string const& _label) const -{ - yulAssert(!_label.empty(), "Empty label."); - size_t depth = 0; - for (string const& label: m_labels | ranges::views::reverse) - if (label == _label) - return lebEncode(depth); - else - ++depth; - yulAssert(false, "Label not found."); -} - -bytes BinaryTransform::encodeName(string const& _name) -{ - // UTF-8 is allowed here by the Wasm spec, but since all names here should stem from - // Solidity or Yul identifiers or similar, non-ascii characters ending up here - // is a very bad sign. - for (char c: _name) - yulAssert(uint8_t(c) <= 0x7f, "Non-ascii character found."); - return lebEncode(_name.size()) + asBytes(_name); -} diff --git a/libyul/backends/wasm/BinaryTransform.h b/libyul/backends/wasm/BinaryTransform.h deleted file mode 100644 index d164c11bf694..000000000000 --- a/libyul/backends/wasm/BinaryTransform.h +++ /dev/null @@ -1,124 +0,0 @@ -/* - This file is part of solidity. - - solidity is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - solidity is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with solidity. If not, see . -*/ -// SPDX-License-Identifier: GPL-3.0 -/** - * Component that transforms internal Wasm representation to binary. - */ - -#pragma once - -#include - -#include - -#include -#include - -namespace solidity::yul::wasm -{ - -/** - * Web assembly to binary transform. - */ -class BinaryTransform -{ -public: - static bytes run(Module const& _module); - - bytes operator()(wasm::Literal const& _literal); - bytes operator()(wasm::StringLiteral const& _literal); - bytes operator()(wasm::LocalVariable const& _identifier); - bytes operator()(wasm::GlobalVariable const& _identifier); - bytes operator()(wasm::BuiltinCall const& _builinCall); - bytes operator()(wasm::FunctionCall const& _functionCall); - bytes operator()(wasm::LocalAssignment const& _assignment); - bytes operator()(wasm::GlobalAssignment const& _assignment); - bytes operator()(wasm::If const& _if); - bytes operator()(wasm::Loop const& _loop); - bytes operator()(wasm::Branch const& _branch); - bytes operator()(wasm::BranchIf const& _branchIf); - bytes operator()(wasm::Return const& _return); - bytes operator()(wasm::Block const& _block); - bytes operator()(wasm::FunctionDefinition const& _function); - -private: - BinaryTransform( - std::map _globalIDs, - std::map _functionIDs, - std::map _functionTypes, - std::map> _subModulePosAndSize - ): - m_globalIDs(std::move(_globalIDs)), - m_functionIDs(std::move(_functionIDs)), - m_functionTypes(std::move(_functionTypes)), - m_subModulePosAndSize(std::move(_subModulePosAndSize)) - {} - - using Type = std::pair, std::vector>; - static Type typeOf(wasm::FunctionImport const& _import); - static Type typeOf(wasm::FunctionDefinition const& _funDef); - - static uint8_t encodeType(wasm::Type _type); - static std::vector encodeTypes(std::vector const& _types); - static std::vector encodeTypes(wasm::TypedNameList const& _typedNameList); - - static std::map> typeToFunctionMap( - std::vector const& _imports, - std::vector const& _functions - ); - - static std::map enumerateGlobals(Module const& _module); - static std::map enumerateFunctions(Module const& _module); - static std::map enumerateFunctionTypes( - std::map> const& _typeToFunctionMap - ); - - static bytes typeSection(std::map> const& _typeToFunctionMap); - static bytes importSection( - std::vector const& _imports, - std::map const& _functionTypes - ); - static bytes functionSection( - std::vector const& _functions, - std::map const& _functionTypes - ); - static bytes memorySection(); - static bytes globalSection(std::vector const& _globals); - static bytes exportSection(std::map const& _functionIDs); - static bytes customSection(std::string const& _name, bytes _data); - bytes codeSection(std::vector const& _functions); - - bytes visit(std::vector const& _expressions); - bytes visitReversed(std::vector const& _expressions); - - bytes encodeLabelIdx(std::string const& _label) const; - - static bytes encodeName(std::string const& _name); - - std::map const m_globalIDs; - std::map const m_functionIDs; - std::map const m_functionTypes; - /// The map of submodules, where the pair refers to the [offset, length]. The offset is - /// an absolute offset within the resulting assembled bytecode. - std::map> const m_subModulePosAndSize; - - std::map m_locals; - std::vector m_labels; -}; - -} - diff --git a/libyul/backends/wasm/EVMToEwasmTranslator.cpp b/libyul/backends/wasm/EVMToEwasmTranslator.cpp deleted file mode 100644 index d36b1cda3995..000000000000 --- a/libyul/backends/wasm/EVMToEwasmTranslator.cpp +++ /dev/null @@ -1,159 +0,0 @@ -/* - This file is part of solidity. - - solidity is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - solidity is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with solidity. If not, see . -*/ -// SPDX-License-Identifier: GPL-3.0 -/** - * Translates Yul code from EVM dialect to Ewasm dialect. - */ - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include - -// The following headers are generated from the -// yul files placed in libyul/backends/wasm/polyfill. - -#include -#include -#include -#include -#include -#include -#include -#include - -using namespace std; -using namespace solidity; -using namespace solidity::yul; -using namespace solidity::util; -using namespace solidity::langutil; - -Object EVMToEwasmTranslator::run(Object const& _object) -{ - if (!m_polyfill) - parsePolyfill(); - - Block ast = std::get(Disambiguator(m_dialect, *_object.analysisInfo)(*_object.code)); - set reservedIdentifiers; - NameDispenser nameDispenser{m_dialect, ast, reservedIdentifiers}; - // expectedExecutionsPerDeployment is currently unused. - OptimiserStepContext context{ - m_dialect, - nameDispenser, - reservedIdentifiers, - frontend::OptimiserSettings::standard().expectedExecutionsPerDeployment - }; - - FunctionHoister::run(context, ast); - FunctionGrouper::run(context, ast); - MainFunction::run(context, ast); - ForLoopConditionIntoBody::run(context, ast); - ExpressionSplitter::run(context, ast); - WordSizeTransform::run(m_dialect, WasmDialect::instance(), ast, nameDispenser); - - NameDisplacer{nameDispenser, m_polyfillFunctions}(ast); - for (auto const& st: m_polyfill->statements) - ast.statements.emplace_back(ASTCopier{}.translate(st)); - - Object ret; - ret.name = _object.name; - ret.code = make_shared(std::move(ast)); - ret.debugData = _object.debugData; - ret.analysisInfo = make_shared(); - - ErrorList errors; - ErrorReporter errorReporter(errors); - AsmAnalyzer analyzer(*ret.analysisInfo, errorReporter, WasmDialect::instance(), {}, _object.qualifiedDataNames()); - if (!analyzer.analyze(*ret.code)) - { - string message = "Invalid code generated after EVM to wasm translation.\n"; - message += "Note that the source locations in the errors below will reference the original, not the translated code.\n"; - message += "Translated code:\n"; - message += "----------------------------------\n"; - message += ret.toString(&WasmDialect::instance()); - message += "----------------------------------\n"; - for (auto const& err: errors) - message += langutil::SourceReferenceFormatter::formatErrorInformation(*err, m_charStreamProvider); - yulAssert(false, message); - } - - for (auto const& subObjectNode: _object.subObjects) - if (Object const* subObject = dynamic_cast(subObjectNode.get())) - ret.subObjects.push_back(make_shared(run(*subObject))); - else - ret.subObjects.push_back(make_shared(dynamic_cast(*subObjectNode))); - ret.subIndexByName = _object.subIndexByName; - - return ret; -} - -void EVMToEwasmTranslator::parsePolyfill() -{ - ErrorList errors; - ErrorReporter errorReporter(errors); - CharStream charStream( - "{" + - string(solidity::yul::wasm::polyfill::Arithmetic) + - string(solidity::yul::wasm::polyfill::Bitwise) + - string(solidity::yul::wasm::polyfill::Comparison) + - string(solidity::yul::wasm::polyfill::Conversion) + - string(solidity::yul::wasm::polyfill::Interface) + - string(solidity::yul::wasm::polyfill::Keccak) + - string(solidity::yul::wasm::polyfill::Logical) + - string(solidity::yul::wasm::polyfill::Memory) + - "}", ""); - - // Passing an empty SourceLocation() here is a workaround to prevent a crash - // when compiling from yul->ewasm. We're stripping nativeLocation and - // originLocation from the AST (but we only really need to strip nativeLocation) - m_polyfill = Parser(errorReporter, WasmDialect::instance(), langutil::SourceLocation()).parse(charStream); - if (!errors.empty()) - { - string message; - for (auto const& err: errors) - message += langutil::SourceReferenceFormatter::formatErrorInformation( - *err, - SingletonCharStreamProvider(charStream) - ); - yulAssert(false, message); - } - - m_polyfillFunctions.clear(); - for (auto const& statement: m_polyfill->statements) - m_polyfillFunctions.insert(std::get(statement).name); -} diff --git a/libyul/backends/wasm/EVMToEwasmTranslator.h b/libyul/backends/wasm/EVMToEwasmTranslator.h deleted file mode 100644 index 7f95f8d138ea..000000000000 --- a/libyul/backends/wasm/EVMToEwasmTranslator.h +++ /dev/null @@ -1,55 +0,0 @@ -/* - This file is part of solidity. - - solidity is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - solidity is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with solidity. If not, see . -*/ -// SPDX-License-Identifier: GPL-3.0 -/** - * Translates Yul code from EVM dialect to Ewasm dialect. - */ - -#pragma once - -#include -#include -#include - -namespace solidity::langutil -{ -class CharStreamProvider; -} -namespace solidity::yul -{ -struct Object; - -class EVMToEwasmTranslator: public ASTModifier -{ -public: - EVMToEwasmTranslator(Dialect const& _evmDialect, langutil::CharStreamProvider const& _charStreamProvider): - m_dialect(_evmDialect), - m_charStreamProvider(_charStreamProvider) - {} - Object run(Object const& _object); - -private: - void parsePolyfill(); - - Dialect const& m_dialect; - langutil::CharStreamProvider const& m_charStreamProvider; - - std::shared_ptr m_polyfill; - std::set m_polyfillFunctions; -}; - -} diff --git a/libyul/backends/wasm/TextTransform.cpp b/libyul/backends/wasm/TextTransform.cpp deleted file mode 100644 index 62596ba6e81b..000000000000 --- a/libyul/backends/wasm/TextTransform.cpp +++ /dev/null @@ -1,246 +0,0 @@ -/* - This file is part of solidity. - - solidity is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - solidity is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with solidity. If not, see . -*/ -// SPDX-License-Identifier: GPL-3.0 -/** - * Component that transforms internal Wasm representation to text. - */ - -#include -#include - -#include - -#include -#include -#include -#include -#include - -#include -#include - -#include - -using namespace std; -using namespace solidity; -using namespace solidity::yul; -using namespace solidity::yul::wasm; -using namespace solidity::util; - -string TextTransform::run(wasm::Module const& _module) -{ - string ret = "(module\n"; - for (auto const& [name, module]: _module.subModules) - ret += - " ;; custom section for sub-module\n" - " ;; The Keccak-256 hash of the text representation of \"" + - name + - "\": " + - toHex(keccak256(run(module))) + - "\n" - " ;; (@custom \"" + - name + - "\" \"" + - util::toHex(BinaryTransform::run(module)) + - "\")\n"; - for (auto const& [name, data]: _module.customSections) - ret += - " ;; custom section for data\n" - " ;; (@custom \"" + - name + - "\" \"" + - util::toHex(data) + - "\")\n"; - for (wasm::FunctionImport const& imp: _module.imports) - { - ret += " (import \"" + imp.module + "\" \"" + imp.externalName + "\" (func $" + imp.internalName; - if (!imp.paramTypes.empty()) - ret += " (param" + joinHumanReadablePrefixed(imp.paramTypes | ranges::views::transform(encodeType), " ", " ") + ")"; - if (imp.returnType) - ret += " (result " + encodeType(*imp.returnType) + ")"; - ret += "))\n"; - } - - // allocate one 64k page of memory and make it available to the Ethereum client - ret += " (memory $memory (export \"memory\") 1)\n"; - for (auto const& f: _module.functions) - if (f.name == "main") - { - // export the main function - ret += " (export \"main\" (func $main))\n"; - break; - } - - for (auto const& g: _module.globals) - ret += " (global $" + g.variableName + " (mut " + encodeType(g.type) + ") (" + encodeType(g.type) + ".const 0))\n"; - ret += "\n"; - for (auto const& f: _module.functions) - ret += transform(f) + "\n"; - return std::move(ret) + ")\n"; -} - -string TextTransform::operator()(wasm::Literal const& _literal) -{ - return std::visit(GenericVisitor{ - [&](uint32_t _value) -> string { return "(i32.const " + to_string(_value) + ")"; }, - [&](uint64_t _value) -> string { return "(i64.const " + to_string(_value) + ")"; }, - }, _literal.value); -} - -string TextTransform::operator()(wasm::StringLiteral const& _literal) -{ - // StringLiteral is a special AST element used for certain builtins. - // The output of this will not be valid WebAssembly. - string quoted = boost::replace_all_copy(_literal.value, "\\", "\\\\"); - boost::replace_all(quoted, "\"", "\\\""); - return "\"" + quoted + "\""; -} - -string TextTransform::operator()(wasm::LocalVariable const& _identifier) -{ - return "(local.get $" + _identifier.name + ")"; -} - -string TextTransform::operator()(wasm::GlobalVariable const& _identifier) -{ - return "(global.get $" + _identifier.name + ")"; -} - -string TextTransform::operator()(wasm::BuiltinCall const& _builtinCall) -{ - string args = joinTransformed(_builtinCall.arguments); - string funcName = _builtinCall.functionName; - // These are prefixed in the dialect, but are actually overloaded instructions in WebAssembly. - if (funcName == "i32.drop" || funcName == "i64.drop") - funcName = "drop"; - else if (funcName == "i32.select" || funcName == "i64.select") - funcName = "select"; - return "(" + funcName + (args.empty() ? "" : " " + args) + ")"; -} - -string TextTransform::operator()(wasm::FunctionCall const& _functionCall) -{ - string args = joinTransformed(_functionCall.arguments); - return "(call $" + _functionCall.functionName + (args.empty() ? "" : " " + args) + ")"; -} - -string TextTransform::operator()(wasm::LocalAssignment const& _assignment) -{ - return "(local.set $" + _assignment.variableName + " " + visit(*_assignment.value) + ")\n"; -} - -string TextTransform::operator()(wasm::GlobalAssignment const& _assignment) -{ - return "(global.set $" + _assignment.variableName + " " + visit(*_assignment.value) + ")\n"; -} - -string TextTransform::operator()(wasm::If const& _if) -{ - string text = "(if " + visit(*_if.condition) + " (then\n" + indented(joinTransformed(_if.statements, '\n')) + ")"; - if (_if.elseStatements) - text += "(else\n" + indented(joinTransformed(*_if.elseStatements, '\n')) + ")"; - return std::move(text) + ")\n"; -} - -string TextTransform::operator()(wasm::Loop const& _loop) -{ - string label = _loop.labelName.empty() ? "" : " $" + _loop.labelName; - return "(loop" + std::move(label) + "\n" + indented(joinTransformed(_loop.statements, '\n')) + ")\n"; -} - -string TextTransform::operator()(wasm::Branch const& _branch) -{ - return "(br $" + _branch.label.name + ")\n"; -} - -string TextTransform::operator()(wasm::BranchIf const& _branchIf) -{ - return "(br_if $" + _branchIf.label.name + " " + visit(*_branchIf.condition) + ")\n"; -} - -string TextTransform::operator()(wasm::Return const&) -{ - return "(return)\n"; -} - -string TextTransform::operator()(wasm::Block const& _block) -{ - string label = _block.labelName.empty() ? "" : " $" + _block.labelName; - return "(block" + std::move(label) + "\n" + indented(joinTransformed(_block.statements, '\n')) + "\n)\n"; -} - -string TextTransform::indented(string const& _in) -{ - string replacement; - - if (!_in.empty()) - { - replacement.reserve(_in.size() + 4); - replacement += " "; - for (auto it = _in.begin(); it != _in.end(); ++it) - if (*it == '\n' && it + 1 != _in.end() && *(it + 1) != '\n') - replacement += "\n "; - else - replacement += *it; - } - return replacement; -} - -string TextTransform::transform(wasm::FunctionDefinition const& _function) -{ - string ret = "(func $" + _function.name + "\n"; - for (auto const& param: _function.parameters) - ret += " (param $" + param.name + " " + encodeType(param.type) + ")\n"; - if (_function.returnType.has_value()) - ret += " (result " + encodeType(_function.returnType.value()) + ")\n"; - for (auto const& local: _function.locals) - ret += " (local $" + local.variableName + " " + encodeType(local.type) + ")\n"; - ret += indented(joinTransformed(_function.body, '\n')); - if (ret.back() != '\n') - ret += '\n'; - ret += ")\n"; - return ret; -} - - -string TextTransform::visit(wasm::Expression const& _expression) -{ - return std::visit(*this, _expression); -} - -string TextTransform::joinTransformed(vector const& _expressions, char _separator) -{ - string ret; - for (auto const& e: _expressions) - { - string t = visit(e); - if (!t.empty() && !ret.empty() && ret.back() != '\n') - ret += _separator; - ret += std::move(t); - } - return ret; -} - -string TextTransform::encodeType(wasm::Type _type) -{ - if (_type == wasm::Type::i32) - return "i32"; - else if (_type == wasm::Type::i64) - return "i64"; - else - yulAssert(false, "Invalid wasm type"); -} diff --git a/libyul/backends/wasm/TextTransform.h b/libyul/backends/wasm/TextTransform.h deleted file mode 100644 index eb14da65d971..000000000000 --- a/libyul/backends/wasm/TextTransform.h +++ /dev/null @@ -1,71 +0,0 @@ -/* - This file is part of solidity. - - solidity is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - solidity is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with solidity. If not, see . -*/ -// SPDX-License-Identifier: GPL-3.0 -/** - * Component that transforms internal Wasm representation to text. - */ - -#pragma once - -#include - -#include - -namespace solidity::yul -{ -struct AsmAnalysisInfo; -} - -namespace solidity::yul::wasm -{ - -class TextTransform -{ -public: - std::string run(wasm::Module const& _module); - -public: - std::string operator()(wasm::Literal const& _literal); - std::string operator()(wasm::StringLiteral const& _literal); - std::string operator()(wasm::LocalVariable const& _identifier); - std::string operator()(wasm::GlobalVariable const& _identifier); - std::string operator()(wasm::BuiltinCall const& _builinCall); - std::string operator()(wasm::FunctionCall const& _functionCall); - std::string operator()(wasm::LocalAssignment const& _assignment); - std::string operator()(wasm::GlobalAssignment const& _assignment); - std::string operator()(wasm::If const& _if); - std::string operator()(wasm::Loop const& _loop); - std::string operator()(wasm::Branch const& _branch); - std::string operator()(wasm::BranchIf const& _branchIf); - std::string operator()(wasm::Return const& _return); - std::string operator()(wasm::Block const& _block); - -private: - std::string indented(std::string const& _in); - - std::string transform(wasm::FunctionDefinition const& _function); - - std::string visit(wasm::Expression const& _expression); - std::string joinTransformed( - std::vector const& _expressions, - char _separator = ' ' - ); - - static std::string encodeType(wasm::Type _type); -}; - -} diff --git a/libyul/backends/wasm/WasmAST.h b/libyul/backends/wasm/WasmAST.h deleted file mode 100644 index 67b642ec9b88..000000000000 --- a/libyul/backends/wasm/WasmAST.h +++ /dev/null @@ -1,117 +0,0 @@ -/* - This file is part of solidity. - - solidity is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - solidity is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with solidity. If not, see . -*/ -// SPDX-License-Identifier: GPL-3.0 -/** - * Simplified in-memory representation of a Wasm AST. - */ - -#pragma once - -#include - -#include -#include -#include -#include -#include -#include - -namespace solidity::yul::wasm -{ - -enum class Type -{ - i32, - i64, -}; - -struct TypedName { std::string name; Type type; }; -using TypedNameList = std::vector; - -struct Literal; -struct StringLiteral; -struct LocalVariable; -struct GlobalVariable; -struct FunctionCall; -struct BuiltinCall; -struct LocalAssignment; -struct GlobalAssignment; -struct Block; -struct If; -struct Loop; -struct Branch; -struct BranchIf; -struct Return; -using Expression = std::variant< - Literal, StringLiteral, LocalVariable, GlobalVariable, - FunctionCall, BuiltinCall, LocalAssignment, GlobalAssignment, - Block, If, Loop, Branch, BranchIf, Return ->; - -struct Literal { std::variant value; }; -// This is a special AST element used for certain builtins. It is not mapped to actual WebAssembly. -struct StringLiteral { std::string value; }; -struct LocalVariable { std::string name; }; -struct GlobalVariable { std::string name; }; -struct Label { std::string name; }; -struct FunctionCall { std::string functionName; std::vector arguments; }; -struct BuiltinCall { std::string functionName; std::vector arguments; }; -struct LocalAssignment { std::string variableName; std::unique_ptr value; }; -struct GlobalAssignment { std::string variableName; std::unique_ptr value; }; -struct Block { std::string labelName; std::vector statements; }; -struct If { - std::unique_ptr condition; - std::vector statements; - std::unique_ptr> elseStatements; -}; -struct Loop { std::string labelName; std::vector statements; }; -struct Branch { Label label; }; -struct Return {}; -struct BranchIf { Label label; std::unique_ptr condition; }; - -struct VariableDeclaration { std::string variableName; Type type; }; -struct GlobalVariableDeclaration { std::string variableName; Type type; }; -struct FunctionImport { - std::string module; - std::string externalName; - std::string internalName; - std::vector paramTypes; - std::optional returnType; -}; - -struct FunctionDefinition -{ - std::string name; - std::vector parameters; - std::optional returnType; - std::vector locals; - std::vector body; -}; - -/** - * Abstract representation of a wasm module. - */ -struct Module -{ - std::vector globals; - std::vector imports; - std::vector functions; - std::map subModules; - std::map customSections; -}; - -} diff --git a/libyul/backends/wasm/WasmCodeTransform.cpp b/libyul/backends/wasm/WasmCodeTransform.cpp deleted file mode 100644 index 2d895d3fe056..000000000000 --- a/libyul/backends/wasm/WasmCodeTransform.cpp +++ /dev/null @@ -1,449 +0,0 @@ -/* - This file is part of solidity. - - solidity is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - solidity is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with solidity. If not, see . -*/ -// SPDX-License-Identifier: GPL-3.0 -/** -* Common code generator for translating Yul / inline assembly to Wasm. -*/ - -#include - -#include - -#include -#include -#include -#include - -#include - -#include -#include - -using namespace std; -using namespace solidity; -using namespace solidity::yul; -using namespace solidity::util; - -wasm::Module WasmCodeTransform::run(Dialect const& _dialect, yul::Block const& _ast) -{ - wasm::Module module; - - TypeInfo typeInfo(_dialect, _ast); - WasmCodeTransform transform(_dialect, _ast, typeInfo); - - for (auto const& statement: _ast.statements) - { - yulAssert( - holds_alternative(statement), - "Expected only function definitions at the highest level." - ); - if (holds_alternative(statement)) - module.functions.emplace_back(transform.translateFunction(std::get(statement))); - } - - for (auto& imp: transform.m_functionsToImport) - module.imports.emplace_back(std::move(imp.second)); - module.globals = transform.m_globalVariables; - - return module; -} - -wasm::Expression WasmCodeTransform::generateMultiAssignment( - vector _variableNames, - unique_ptr _firstValue -) -{ - yulAssert(!_variableNames.empty(), ""); - wasm::LocalAssignment assignment{std::move(_variableNames.front()), std::move(_firstValue)}; - - if (_variableNames.size() == 1) - return { std::move(assignment) }; - - vector typesForGlobals; - for (size_t i = 1; i < _variableNames.size(); ++i) - typesForGlobals.push_back(translatedType(m_typeInfo.typeOfVariable(YulString(_variableNames[i])))); - vector allocatedIndices = allocateGlobals(typesForGlobals); - yulAssert(allocatedIndices.size() == _variableNames.size() - 1, ""); - - wasm::Block block; - block.statements.emplace_back(std::move(assignment)); - for (size_t i = 1; i < _variableNames.size(); ++i) - block.statements.emplace_back(wasm::LocalAssignment{ - std::move(_variableNames.at(i)), - make_unique(wasm::GlobalVariable{m_globalVariables.at(allocatedIndices[i - 1]).variableName}) - }); - return { std::move(block) }; -} - -wasm::Expression WasmCodeTransform::operator()(yul::VariableDeclaration const& _varDecl) -{ - vector variableNames; - for (auto const& var: _varDecl.variables) - { - variableNames.emplace_back(var.name.str()); - m_localVariables.emplace_back(wasm::VariableDeclaration{variableNames.back(), translatedType(var.type)}); - } - - if (_varDecl.value) - return generateMultiAssignment(std::move(variableNames), visit(*_varDecl.value)); - else - return wasm::BuiltinCall{"nop", {}}; -} - -wasm::Expression WasmCodeTransform::operator()(yul::Assignment const& _assignment) -{ - vector variableNames; - for (auto const& var: _assignment.variableNames) - variableNames.emplace_back(var.name.str()); - return generateMultiAssignment(std::move(variableNames), visit(*_assignment.value)); -} - -wasm::Expression WasmCodeTransform::operator()(yul::ExpressionStatement const& _statement) -{ - return visitReturnByValue(_statement.expression); -} - -void WasmCodeTransform::importBuiltinFunction(BuiltinFunction const* _builtin, string const& _module, string const& _externalName, string const& _internalName) -{ - yulAssert(_builtin, ""); - yulAssert(_builtin->returns.size() <= 1, ""); - // Imported function, use regular call, but mark for import. - YulString internalName(_internalName); - if (!m_functionsToImport.count(internalName)) - { - wasm::FunctionImport imp{ - _module, - _externalName, - _internalName, - {}, - _builtin->returns.empty() ? nullopt : make_optional(translatedType(_builtin->returns.front())) - }; - for (auto const& param: _builtin->parameters) - imp.paramTypes.emplace_back(translatedType(param)); - m_functionsToImport[internalName] = std::move(imp); - } -} - -wasm::Expression WasmCodeTransform::operator()(yul::FunctionCall const& _call) -{ - if (BuiltinFunction const* builtin = m_dialect.builtin(_call.functionName.name)) - { - if (_call.functionName.name.str().substr(0, 6) == "debug.") - importBuiltinFunction(builtin, "debug", builtin->name.str().substr(6), builtin->name.str()); - else if (_call.functionName.name.str().substr(0, 4) == "eth.") - importBuiltinFunction(builtin, "ethereum", builtin->name.str().substr(4), builtin->name.str()); - else - { - vector arguments; - for (size_t i = 0; i < _call.arguments.size(); i++) - if (builtin->literalArgument(i)) - { - yulAssert(builtin->literalArgument(i) == LiteralKind::String, ""); - arguments.emplace_back(wasm::StringLiteral{std::get(_call.arguments[i]).value.str()}); - } - else - arguments.emplace_back(visitReturnByValue(_call.arguments[i])); - - return wasm::BuiltinCall{_call.functionName.name.str(), std::move(arguments)}; - } - } - - // If this function returns multiple values, then the first one will - // be returned in the expression itself and the others in global variables. - // The values have to be used right away in an assignment or variable declaration, - // so it is handled there. - - return wasm::FunctionCall{_call.functionName.name.str(), visit(_call.arguments)}; -} - -wasm::Expression WasmCodeTransform::operator()(yul::Identifier const& _identifier) -{ - return wasm::LocalVariable{_identifier.name.str()}; -} - -wasm::Expression WasmCodeTransform::operator()(yul::Literal const& _literal) -{ - return makeLiteral(translatedType(_literal.type), valueOfLiteral(_literal)); -} - -wasm::Expression WasmCodeTransform::operator()(yul::If const& _if) -{ - yul::Type conditionType = m_typeInfo.typeOf(*_if.condition); - - wasm::Expression condition; - if (conditionType == "i32"_yulstring) - condition = visitReturnByValue(*_if.condition); - else if (conditionType == "i64"_yulstring) - { - vector args; - args.emplace_back(visitReturnByValue(*_if.condition)); - args.emplace_back(makeLiteral(translatedType("i64"_yulstring), 0)); - - // NOTE: `if` in wasm requires an i32 argument - condition = wasm::BuiltinCall{"i64.ne", std::move(args)}; - } - else - yulAssert(false, "Invalid condition type"); - - return wasm::If{make_unique(std::move(condition)), visit(_if.body.statements), {}}; -} - -wasm::Expression WasmCodeTransform::operator()(yul::Switch const& _switch) -{ - yul::Type expressionType = m_typeInfo.typeOf(*_switch.expression); - YulString eq_instruction = YulString(expressionType.str() + ".eq"); - yulAssert(WasmDialect::instance().builtin(eq_instruction), ""); - - wasm::Block block; - string condition = m_nameDispenser.newName("condition"_yulstring).str(); - m_localVariables.emplace_back(wasm::VariableDeclaration{condition, translatedType(expressionType)}); - block.statements.emplace_back(wasm::LocalAssignment{condition, visit(*_switch.expression)}); - - vector* currentBlock = &block.statements; - for (size_t i = 0; i < _switch.cases.size(); ++i) - { - Case const& c = _switch.cases.at(i); - if (c.value) - { - wasm::BuiltinCall comparison{eq_instruction.str(), make_vector( - wasm::LocalVariable{condition}, - visitReturnByValue(*c.value) - )}; - wasm::If ifStmnt{ - make_unique(std::move(comparison)), - visit(c.body.statements), - {} - }; - vector* nextBlock = nullptr; - if (i != _switch.cases.size() - 1) - { - ifStmnt.elseStatements = make_unique>(); - nextBlock = ifStmnt.elseStatements.get(); - } - currentBlock->emplace_back(std::move(ifStmnt)); - currentBlock = nextBlock; - } - else - { - yulAssert(i == _switch.cases.size() - 1, "Default case must be last."); - *currentBlock += visit(c.body.statements); - } - } - return { std::move(block) }; -} - -wasm::Expression WasmCodeTransform::operator()(yul::FunctionDefinition const&) -{ - yulAssert(false, "Should not have visited here."); - return {}; -} - -wasm::Expression WasmCodeTransform::operator()(yul::ForLoop const& _for) -{ - string breakLabel = newLabel(); - string continueLabel = newLabel(); - m_breakContinueLabelNames.push({breakLabel, continueLabel}); - - yul::Type conditionType = m_typeInfo.typeOf(*_for.condition); - YulString eqz_instruction = YulString(conditionType.str() + ".eqz"); - yulAssert(WasmDialect::instance().builtin(eqz_instruction), ""); - - std::vector statements = visit(_for.pre.statements); - - wasm::Loop loop; - loop.labelName = newLabel(); - loop.statements.emplace_back(wasm::BranchIf{wasm::Label{breakLabel}, make_unique( - wasm::BuiltinCall{eqz_instruction.str(), make_vector( - visitReturnByValue(*_for.condition) - )} - )}); - loop.statements.emplace_back(wasm::Block{continueLabel, visit(_for.body.statements)}); - loop.statements += visit(_for.post.statements); - loop.statements.emplace_back(wasm::Branch{wasm::Label{loop.labelName}}); - - statements += make_vector(std::move(loop)); - return wasm::Block{breakLabel, std::move(statements)}; -} - -wasm::Expression WasmCodeTransform::operator()(yul::Break const&) -{ - yulAssert(m_breakContinueLabelNames.size() > 0, ""); - return wasm::Branch{wasm::Label{m_breakContinueLabelNames.top().first}}; -} - -wasm::Expression WasmCodeTransform::operator()(yul::Continue const&) -{ - yulAssert(m_breakContinueLabelNames.size() > 0, ""); - return wasm::Branch{wasm::Label{m_breakContinueLabelNames.top().second}}; -} - -wasm::Expression WasmCodeTransform::operator()(yul::Leave const&) -{ - yulAssert(!m_functionBodyLabel.empty(), ""); - return wasm::Branch{wasm::Label{m_functionBodyLabel}}; -} - -wasm::Expression WasmCodeTransform::operator()(yul::Block const& _block) -{ - return wasm::Block{{}, visit(_block.statements)}; -} - -unique_ptr WasmCodeTransform::visit(yul::Expression const& _expression) -{ - return make_unique(std::visit(*this, _expression)); -} - -wasm::Expression WasmCodeTransform::visitReturnByValue(yul::Expression const& _expression) -{ - return std::visit(*this, _expression); -} - -vector WasmCodeTransform::visit(vector const& _expressions) -{ - vector ret; - for (auto const& e: _expressions) - ret.emplace_back(visitReturnByValue(e)); - return ret; -} - -wasm::Expression WasmCodeTransform::visit(yul::Statement const& _statement) -{ - return std::visit(*this, _statement); -} - -vector WasmCodeTransform::visit(vector const& _statements) -{ - vector ret; - for (auto const& s: _statements) - ret.emplace_back(visit(s)); - return ret; -} - -wasm::FunctionDefinition WasmCodeTransform::translateFunction(yul::FunctionDefinition const& _fun) -{ - wasm::FunctionDefinition fun; - fun.name = _fun.name.str(); - for (auto const& param: _fun.parameters) - fun.parameters.push_back({param.name.str(), translatedType(param.type)}); - for (auto const& retParam: _fun.returnVariables) - fun.locals.emplace_back(wasm::VariableDeclaration{retParam.name.str(), translatedType(retParam.type)}); - if (!_fun.returnVariables.empty()) - fun.returnType = translatedType(_fun.returnVariables[0].type); - - yulAssert(m_localVariables.empty(), ""); - yulAssert(m_functionBodyLabel.empty(), ""); - m_functionBodyLabel = newLabel(); - fun.body.emplace_back(wasm::Expression(wasm::Block{ - m_functionBodyLabel, - visit(_fun.body.statements) - })); - fun.locals += m_localVariables; - - m_localVariables.clear(); - m_functionBodyLabel = {}; - - if (!_fun.returnVariables.empty()) - { - // First return variable is returned directly, the others are stored - // in globals. - vector typesForGlobals; - for (size_t i = 1; i < _fun.returnVariables.size(); ++i) - typesForGlobals.push_back(translatedType(_fun.returnVariables[i].type)); - vector allocatedIndices = allocateGlobals(typesForGlobals); - yulAssert(allocatedIndices.size() == _fun.returnVariables.size() - 1, ""); - - for (size_t i = 1; i < _fun.returnVariables.size(); ++i) - fun.body.emplace_back(wasm::GlobalAssignment{ - m_globalVariables.at(allocatedIndices[i - 1]).variableName, - make_unique(wasm::LocalVariable{_fun.returnVariables.at(i).name.str()}) - }); - fun.body.emplace_back(wasm::LocalVariable{_fun.returnVariables.front().name.str()}); - } - return fun; -} - -string WasmCodeTransform::newLabel() -{ - return m_nameDispenser.newName("label_"_yulstring).str(); -} - -vector WasmCodeTransform::allocateGlobals(vector const& _typesForGlobals) -{ - map availableGlobals; - for (wasm::GlobalVariableDeclaration const& global: m_globalVariables) - ++availableGlobals[global.type]; - - map neededGlobals; - for (wasm::Type const& type: _typesForGlobals) - ++neededGlobals[type]; - - for (auto [type, neededGlobalCount]: neededGlobals) - while (availableGlobals[type] < neededGlobalCount) - { - m_globalVariables.emplace_back(wasm::GlobalVariableDeclaration{ - m_nameDispenser.newName("global_"_yulstring).str(), - type, - }); - - ++availableGlobals[type]; - } - - vector allocatedIndices; - map nextGlobal; - for (wasm::Type const& type: _typesForGlobals) - { - while (m_globalVariables[nextGlobal[type]].type != type) - ++nextGlobal[type]; - - allocatedIndices.push_back(nextGlobal[type]++); - } - - yulAssert(all_of( - allocatedIndices.begin(), - allocatedIndices.end(), - [this](size_t index){ return index < m_globalVariables.size(); } - ), ""); - yulAssert(allocatedIndices.size() == set(allocatedIndices.begin(), allocatedIndices.end()).size(), "Indices not unique"); - yulAssert(allocatedIndices.size() == _typesForGlobals.size(), ""); - return allocatedIndices; -} - -wasm::Type WasmCodeTransform::translatedType(yul::Type _yulType) -{ - if (_yulType == "i32"_yulstring) - return wasm::Type::i32; - else if (_yulType == "i64"_yulstring) - return wasm::Type::i64; - else - yulAssert(false, "This Yul type does not have a corresponding type in Wasm."); -} - -wasm::Literal WasmCodeTransform::makeLiteral(wasm::Type _type, u256 _value) -{ - if (_type == wasm::Type::i32) - { - yulAssert(_value <= numeric_limits::max(), "Literal too large: " + _value.str()); - return wasm::Literal{static_cast(_value)}; - } - else if (_type == wasm::Type::i64) - { - yulAssert(_value <= numeric_limits::max(), "Literal too large: " + _value.str()); - return wasm::Literal{static_cast(_value)}; - } - else - yulAssert(false, "Invalid Wasm literal type"); -} diff --git a/libyul/backends/wasm/WasmCodeTransform.h b/libyul/backends/wasm/WasmCodeTransform.h deleted file mode 100644 index 1026f17c60c5..000000000000 --- a/libyul/backends/wasm/WasmCodeTransform.h +++ /dev/null @@ -1,115 +0,0 @@ -/* - This file is part of solidity. - - solidity is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - solidity is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with solidity. If not, see . -*/ -// SPDX-License-Identifier: GPL-3.0 -/** - * Common code generator for translating Yul / inline assembly to Wasm. - */ - -#pragma once - -#include -#include -#include -#include -#include - -#include -#include - -#include -#include - -namespace solidity::yul -{ -struct AsmAnalysisInfo; - -class WasmCodeTransform -{ -public: - static wasm::Module run(Dialect const& _dialect, yul::Block const& _ast); - -public: - wasm::Expression operator()(yul::Literal const& _literal); - wasm::Expression operator()(yul::Identifier const& _identifier); - wasm::Expression operator()(yul::FunctionCall const&); - wasm::Expression operator()(yul::ExpressionStatement const& _statement); - wasm::Expression operator()(yul::Assignment const& _assignment); - wasm::Expression operator()(yul::VariableDeclaration const& _varDecl); - wasm::Expression operator()(yul::If const& _if); - wasm::Expression operator()(yul::Switch const& _switch); - wasm::Expression operator()(yul::FunctionDefinition const&); - wasm::Expression operator()(yul::ForLoop const&); - wasm::Expression operator()(yul::Break const&); - wasm::Expression operator()(yul::Continue const&); - wasm::Expression operator()(yul::Leave const&); - wasm::Expression operator()(yul::Block const& _block); - -private: - WasmCodeTransform( - Dialect const& _dialect, - Block const& _ast, - TypeInfo& _typeInfo - ): - m_dialect(_dialect), - m_nameDispenser(_dialect, _ast), - m_typeInfo(_typeInfo) - {} - - std::unique_ptr visit(yul::Expression const& _expression); - wasm::Expression visitReturnByValue(yul::Expression const& _expression); - std::vector visit(std::vector const& _expressions); - wasm::Expression visit(yul::Statement const& _statement); - std::vector visit(std::vector const& _statements); - - /// Returns an assignment or a block containing multiple assignments. - /// @param _variableNames the names of the variables to assign to - /// @param _firstValue the value to be assigned to the first variable. If there - /// is more than one variable, the values are taken from m_globalVariables. - wasm::Expression generateMultiAssignment( - std::vector _variableNames, - std::unique_ptr _firstValue - ); - - wasm::FunctionDefinition translateFunction(yul::FunctionDefinition const& _funDef); - - /// Imports an external function into the current module. - /// @param _builtin _builtin the builtin that will be imported into the current module. - /// @param _module _module the module name under which the external function can be found. - /// @param _externalName the name of the external function within the module _module. - /// @param _internalName the name of the internal function under that the external function is accessible. - void importBuiltinFunction(BuiltinFunction const* _builtin, std::string const& _module, std::string const& _externalName, std::string const& _internalName); - - std::string newLabel(); - /// Selects a subset of global variables matching specified sequence of variable types. - /// Defines more global variables of a given type if there's not enough. - std::vector allocateGlobals(std::vector const& _typesForGlobals); - - static wasm::Type translatedType(yul::Type _yulType); - static wasm::Literal makeLiteral(wasm::Type _type, u256 _value); - - Dialect const& m_dialect; - NameDispenser m_nameDispenser; - - std::vector m_localVariables; - std::vector m_globalVariables; - std::map m_functionsToImport; - std::string m_functionBodyLabel; - std::stack> m_breakContinueLabelNames; - TypeInfo& m_typeInfo; -}; - -} diff --git a/libyul/backends/wasm/WasmDialect.cpp b/libyul/backends/wasm/WasmDialect.cpp deleted file mode 100644 index b724ba69e63d..000000000000 --- a/libyul/backends/wasm/WasmDialect.cpp +++ /dev/null @@ -1,284 +0,0 @@ -/* - This file is part of solidity. - - solidity is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - solidity is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with solidity. If not, see . -*/ -// SPDX-License-Identifier: GPL-3.0 -/** - * Dialects for Wasm. - */ - -#include - -#include -#include - -using namespace std; -using namespace solidity::yul; - -WasmDialect::WasmDialect() -{ - YulString i64 = "i64"_yulstring; - YulString i32 = "i32"_yulstring; - defaultType = i64; - boolType = i32; - types = {i64, i32}; - - for (auto t: types) - for (auto const& name: { - "add", - "sub", - "mul", - // TODO: div_s - "div_u", - // TODO: rem_s - "rem_u", - "and", - "or", - "xor", - "shl", - // TODO: shr_s - "shr_u", - // TODO: rotl - // TODO: rotr - }) - addFunction(t.str() + "." + name, {t, t}, {t}); - - for (auto t: types) - for (auto const& name: { - "eq", - "ne", - // TODO: lt_s - "lt_u", - // TODO: gt_s - "gt_u", - // TODO: le_s - "le_u", - // TODO: ge_s - "ge_u" - }) - addFunction(t.str() + "." + name, {t, t}, {i32}); - - addFunction("i32.eqz", {i32}, {i32}); - addFunction("i64.eqz", {i64}, {i32}); - - for (auto t: types) - for (auto const& name: { - "clz", - "ctz", - "popcnt", - }) - addFunction(t.str() + "." + name, {t}, {t}); - - addFunction("i32.wrap_i64", {i64}, {i32}); - - addFunction("i64.extend_i32_u", {i32}, {i64}); - - addFunction("i32.store", {i32, i32}, {}, false); - m_functions["i32.store"_yulstring].sideEffects.storage = SideEffects::None; - m_functions["i32.store"_yulstring].sideEffects.otherState = SideEffects::None; - addFunction("i64.store", {i32, i64}, {}, false); - // TODO: add i32.store16, i64.store8, i64.store16, i64.store32 - m_functions["i64.store"_yulstring].sideEffects.storage = SideEffects::None; - m_functions["i64.store"_yulstring].sideEffects.otherState = SideEffects::None; - - addFunction("i32.store8", {i32, i32}, {}, false); - m_functions["i32.store8"_yulstring].sideEffects.storage = SideEffects::None; - m_functions["i32.store8"_yulstring].sideEffects.otherState = SideEffects::None; - - addFunction("i64.store8", {i32, i64}, {}, false); - m_functions["i64.store8"_yulstring].sideEffects.storage = SideEffects::None; - m_functions["i64.store8"_yulstring].sideEffects.otherState = SideEffects::None; - - addFunction("i32.load", {i32}, {i32}, false); - m_functions["i32.load"_yulstring].sideEffects.canBeRemoved = true; - m_functions["i32.load"_yulstring].sideEffects.canBeRemovedIfNoMSize = true; - m_functions["i32.load"_yulstring].sideEffects.storage = SideEffects::None; - m_functions["i32.load"_yulstring].sideEffects.memory = SideEffects::Read; - m_functions["i32.load"_yulstring].sideEffects.otherState = SideEffects::None; - addFunction("i64.load", {i32}, {i64}, false); - // TODO: add i32.load8, i32.load16, i64.load8, i64.load16, i64.load32 - m_functions["i64.load"_yulstring].sideEffects.canBeRemoved = true; - m_functions["i64.load"_yulstring].sideEffects.canBeRemovedIfNoMSize = true; - m_functions["i64.load"_yulstring].sideEffects.storage = SideEffects::None; - m_functions["i64.load"_yulstring].sideEffects.memory = SideEffects::Read; - m_functions["i64.load"_yulstring].sideEffects.otherState = SideEffects::None; - - // Drop is actually overloaded for all types, but Yul does not support that. - // Because of that, we introduce "i32.drop" and "i64.drop". - addFunction("i32.drop", {i32}, {}); - addFunction("i64.drop", {i64}, {}); - - // Select is also overloaded. - addFunction("i32.select", {i32, i32, i32}, {i32}); - addFunction("i64.select", {i64, i64, i32}, {i64}); - - addFunction("nop", {}, {}); - addFunction("unreachable", {}, {}, false); - m_functions["unreachable"_yulstring].sideEffects.storage = SideEffects::None; - m_functions["unreachable"_yulstring].sideEffects.memory = SideEffects::None; - m_functions["unreachable"_yulstring].sideEffects.otherState = SideEffects::None; - m_functions["unreachable"_yulstring].controlFlowSideEffects.canTerminate = false; - m_functions["unreachable"_yulstring].controlFlowSideEffects.canRevert = true; - m_functions["unreachable"_yulstring].controlFlowSideEffects.canContinue = false; - - addFunction("datasize", {i64}, {i64}, true, {LiteralKind::String}); - addFunction("dataoffset", {i64}, {i64}, true, {LiteralKind::String}); - - addExternals(); -} - -BuiltinFunction const* WasmDialect::builtin(YulString _name) const -{ - auto it = m_functions.find(_name); - if (it != m_functions.end()) - return &it->second; - else - return nullptr; -} - -BuiltinFunction const* WasmDialect::discardFunction(YulString _type) const -{ - if (_type == "i32"_yulstring) - return builtin("i32.drop"_yulstring); - yulAssert(_type == "i64"_yulstring, ""); - return builtin("i64.drop"_yulstring); -} - -BuiltinFunction const* WasmDialect::equalityFunction(YulString _type) const -{ - if (_type == "i32"_yulstring) - return builtin("i32.eq"_yulstring); - yulAssert(_type == "i64"_yulstring, ""); - return builtin("i64.eq"_yulstring); -} - -WasmDialect const& WasmDialect::instance() -{ - static std::unique_ptr dialect; - static YulStringRepository::ResetCallback callback{[&] { dialect.reset(); }}; - if (!dialect) - dialect = make_unique(); - return *dialect; -} - -void WasmDialect::addExternals() -{ - // These are not YulStrings because that would be too complicated with regards - // to the YulStringRepository reset. - static string const i64{"i64"}; - static string const i32{"i32"}; - static string const i32ptr{"i32"}; // Uses "i32" on purpose. - struct External - { - string module; - string name; - vector parameters; - vector returns; - ControlFlowSideEffects controlFlowSideEffects = ControlFlowSideEffects{}; - }; - static vector externals{ - {"eth", "getAddress", {i32ptr}, {}}, - {"eth", "getExternalBalance", {i32ptr, i32ptr}, {}}, - {"eth", "getBlockBaseFee", {i32ptr}, {}}, - {"eth", "getBlockHash", {i64, i32ptr}, {i32}}, - {"eth", "call", {i64, i32ptr, i32ptr, i32ptr, i32}, {i32}}, - {"eth", "callDataCopy", {i32ptr, i32, i32}, {}}, - {"eth", "getCallDataSize", {}, {i32}}, - {"eth", "callCode", {i64, i32ptr, i32ptr, i32ptr, i32}, {i32}}, - {"eth", "callDelegate", {i64, i32ptr, i32ptr, i32}, {i32}}, - {"eth", "callStatic", {i64, i32ptr, i32ptr, i32}, {i32}}, - {"eth", "storageStore", {i32ptr, i32ptr}, {}}, - {"eth", "storageLoad", {i32ptr, i32ptr}, {}}, - {"eth", "getCaller", {i32ptr}, {}}, - {"eth", "getCallValue", {i32ptr}, {}}, - {"eth", "codeCopy", {i32ptr, i32, i32}, {}}, - {"eth", "getCodeSize", {}, {i32}}, - {"eth", "getBlockCoinbase", {i32ptr}, {}}, - {"eth", "create", {i32ptr, i32ptr, i32, i32ptr}, {i32}}, - {"eth", "getBlockDifficulty", {i32ptr}, {}}, - {"eth", "externalCodeCopy", {i32ptr, i32ptr, i32, i32}, {}}, - {"eth", "getExternalCodeSize", {i32ptr}, {i32}}, - {"eth", "getGasLeft", {}, {i64}}, - {"eth", "getBlockGasLimit", {}, {i64}}, - {"eth", "getTxGasPrice", {i32ptr}, {}}, - {"eth", "log", {i32ptr, i32, i32, i32ptr, i32ptr, i32ptr, i32ptr}, {}}, - {"eth", "getBlockNumber", {}, {i64}}, - {"eth", "getTxOrigin", {i32ptr}, {}}, - {"eth", "finish", {i32ptr, i32}, {}, ControlFlowSideEffects{true, false, false}}, - {"eth", "revert", {i32ptr, i32}, {}, ControlFlowSideEffects{false, true, false}}, - {"eth", "getReturnDataSize", {}, {i32}}, - {"eth", "returnDataCopy", {i32ptr, i32, i32}, {}}, - {"eth", "selfDestruct", {i32ptr}, {}, ControlFlowSideEffects{false, true, false}}, - {"eth", "getBlockTimestamp", {}, {i64}}, - {"debug", "print32", {i32}, {}}, - {"debug", "print64", {i64}, {}}, - {"debug", "printMem", {i32, i32}, {}}, - {"debug", "printMemHex", {i32, i32}, {}}, - {"debug", "printStorage", {i32}, {}}, - {"debug", "printStorageHex", {i32}, {}}, - }; - for (External const& ext: externals) - { - YulString name{ext.module + "." + ext.name}; - BuiltinFunction& f = m_functions[name]; - f.name = name; - for (string const& p: ext.parameters) - f.parameters.emplace_back(YulString(p)); - for (string const& p: ext.returns) - f.returns.emplace_back(YulString(p)); - // TODO some of them are side effect free. - f.sideEffects = SideEffects::worst(); - f.sideEffects.cannotLoop = true; - f.sideEffects.movableApartFromEffects = !ext.controlFlowSideEffects.terminatesOrReverts(); - f.controlFlowSideEffects = ext.controlFlowSideEffects; - f.isMSize = false; - f.literalArguments.clear(); - - static set const writesToStorage{ - "storageStore", - "call", - "callcode", - "callDelegate", - "create" - }; - static set const readsStorage{"storageLoad", "callStatic"}; - if (readsStorage.count(ext.name)) - f.sideEffects.storage = SideEffects::Read; - else if (!writesToStorage.count(ext.name)) - f.sideEffects.storage = SideEffects::None; - } -} - -void WasmDialect::addFunction( - string _name, - vector _params, - vector _returns, - bool _movable, - vector> _literalArguments -) -{ - YulString name{std::move(_name)}; - BuiltinFunction& f = m_functions[name]; - f.name = name; - f.parameters = std::move(_params); - yulAssert(_returns.size() <= 1, "The Wasm 1.0 specification only allows up to 1 return value."); - f.returns = std::move(_returns); - f.sideEffects = _movable ? SideEffects{} : SideEffects::worst(); - f.sideEffects.cannotLoop = true; - // TODO This should be improved when LoopInvariantCodeMotion gets specialized for WASM - f.sideEffects.movableApartFromEffects = _movable; - f.isMSize = false; - f.literalArguments = std::move(_literalArguments); -} diff --git a/libyul/backends/wasm/WasmDialect.h b/libyul/backends/wasm/WasmDialect.h deleted file mode 100644 index 2776c14e79f4..000000000000 --- a/libyul/backends/wasm/WasmDialect.h +++ /dev/null @@ -1,71 +0,0 @@ -/* - This file is part of solidity. - - solidity is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - solidity is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with solidity. If not, see . -*/ -// SPDX-License-Identifier: GPL-3.0 -/** - * Dialects for Wasm. - */ - -#pragma once - -#include - -#include - -namespace solidity::yul -{ - -class YulString; -using Type = YulString; -struct FunctionCall; -struct Object; - -/** - * Yul dialect for Wasm as a backend. - * - * Builtin functions are a subset of the wasm instructions. - * - * There is a builtin function `i32.drop` that takes an i32, while `i64.drop` takes i64. - * - */ -struct WasmDialect: public Dialect -{ - WasmDialect(); - - BuiltinFunction const* builtin(YulString _name) const override; - BuiltinFunction const* discardFunction(YulString _type) const override; - BuiltinFunction const* equalityFunction(YulString _type) const override; - BuiltinFunction const* booleanNegationFunction() const override { return builtin("i32.eqz"_yulstring); } - - std::set fixedFunctionNames() const override { return {"main"_yulstring}; } - - static WasmDialect const& instance(); - -private: - void addExternals(); - - void addFunction( - std::string _name, - std::vector _params, - std::vector _returns, - bool _movable = true, - std::vector> _literalArguments = std::vector>{} - ); - - std::map m_functions; -}; - -} diff --git a/libyul/backends/wasm/WasmObjectCompiler.cpp b/libyul/backends/wasm/WasmObjectCompiler.cpp deleted file mode 100644 index bdd109d31ccf..000000000000 --- a/libyul/backends/wasm/WasmObjectCompiler.cpp +++ /dev/null @@ -1,60 +0,0 @@ -/* - This file is part of solidity. - - solidity is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - solidity is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with solidity. If not, see . -*/ -// SPDX-License-Identifier: GPL-3.0 -/** - * Compiler that transforms Yul Objects to Wasm text and binary representation (Ewasm flavoured). - */ - -#include - -#include -#include -#include - -#include -#include - -#include - -using namespace solidity; -using namespace solidity::yul; -using namespace std; - -pair WasmObjectCompiler::compile(Object& _object, Dialect const& _dialect) -{ - WasmObjectCompiler compiler(_dialect); - wasm::Module module = compiler.run(_object); - return {wasm::TextTransform().run(module), wasm::BinaryTransform::run(module)}; -} - -wasm::Module WasmObjectCompiler::run(Object& _object) -{ - yulAssert(_object.analysisInfo, "No analysis info."); - yulAssert(_object.code, "No code."); - - wasm::Module module = WasmCodeTransform::run(m_dialect, *_object.code); - - for (auto& subNode: _object.subObjects) - if (Object* subObject = dynamic_cast(subNode.get())) - module.subModules[subObject->name.str()] = run(*subObject); - else if (Data* subObject = dynamic_cast(subNode.get())) - module.customSections[subObject->name.str()] = subObject->data; - else - yulAssert(false, ""); - - return module; -} diff --git a/libyul/backends/wasm/WasmObjectCompiler.h b/libyul/backends/wasm/WasmObjectCompiler.h deleted file mode 100644 index 52e48a9d5ecf..000000000000 --- a/libyul/backends/wasm/WasmObjectCompiler.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - This file is part of solidity. - - solidity is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - solidity is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with solidity. If not, see . -*/ -// SPDX-License-Identifier: GPL-3.0 -/** - * Compiler that transforms Yul Objects to Wasm text and binary representation (Ewasm flavoured). - */ - -#pragma once - -#include -#include -#include -#include // solidity::bytes - -namespace solidity::yul -{ -struct Object; -struct Dialect; -namespace wasm -{ -struct Module; -} - -class WasmObjectCompiler -{ -public: - /// Compiles the given object and returns the Wasm text and binary representation. - static std::pair compile(Object& _object, Dialect const& _dialect); -private: - WasmObjectCompiler(Dialect const& _dialect): - m_dialect(_dialect) - {} - - wasm::Module run(Object& _object); - - Dialect const& m_dialect; -}; - -} diff --git a/libyul/backends/wasm/WordSizeTransform.cpp b/libyul/backends/wasm/WordSizeTransform.cpp deleted file mode 100644 index ad723717b65a..000000000000 --- a/libyul/backends/wasm/WordSizeTransform.cpp +++ /dev/null @@ -1,433 +0,0 @@ -/* - This file is part of solidity. - - solidity is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - solidity is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with solidity. If not, see . -*/ -// SPDX-License-Identifier: GPL-3.0 - -#include -#include -#include -#include -#include - -#include - -#include -#include -#include -#include - -using namespace std; -using namespace solidity; -using namespace solidity::yul; -using namespace solidity::util; - -void WordSizeTransform::operator()(FunctionDefinition& _fd) -{ - rewriteVarDeclList(_fd.parameters); - rewriteVarDeclList(_fd.returnVariables); - (*this)(_fd.body); -} - -void WordSizeTransform::operator()(FunctionCall& _fc) -{ - vector> const* literalArguments = nullptr; - - if (BuiltinFunction const* fun = m_inputDialect.builtin(_fc.functionName.name)) - if (!fun->literalArguments.empty()) - literalArguments = &fun->literalArguments; - - vector newArgs; - - for (size_t i = 0; i < _fc.arguments.size(); i++) - if (!literalArguments || !(*literalArguments)[i].has_value()) - newArgs += expandValueToVector(_fc.arguments[i]); - else - { - get(_fc.arguments[i]).type = m_targetDialect.defaultType; - newArgs.emplace_back(std::move(_fc.arguments[i])); - } - - _fc.arguments = std::move(newArgs); -} - -void WordSizeTransform::operator()(If& _if) -{ - _if.condition = make_unique(FunctionCall{ - debugDataOf(*_if.condition), - Identifier{debugDataOf(*_if.condition), "or_bool"_yulstring}, - expandValueToVector(*_if.condition) - }); - (*this)(_if.body); -} - -void WordSizeTransform::operator()(Switch&) -{ - yulAssert(false, "Switch statement has to be handled inside the containing block."); -} - -void WordSizeTransform::operator()(ForLoop& _for) -{ - (*this)(_for.pre); - _for.condition = make_unique(FunctionCall{ - debugDataOf(*_for.condition), - Identifier{debugDataOf(*_for.condition), "or_bool"_yulstring}, - expandValueToVector(*_for.condition) - }); - (*this)(_for.post); - (*this)(_for.body); -} - -void WordSizeTransform::operator()(Block& _block) -{ - iterateReplacing( - _block.statements, - [&](Statement& _s) -> std::optional> - { - if (holds_alternative(_s)) - { - VariableDeclaration& varDecl = std::get(_s); - - if (!varDecl.value) - rewriteVarDeclList(varDecl.variables); - else if (holds_alternative(*varDecl.value)) - { - visit(*varDecl.value); - - // Special handling for datasize and dataoffset - they will only need one variable. - if (BuiltinFunction const* f = m_inputDialect.builtin(std::get(*varDecl.value).functionName.name)) - if (f->name == "datasize"_yulstring || f->name == "dataoffset"_yulstring) - { - yulAssert(f->literalArguments.size() == 1, ""); - yulAssert(f->literalArguments.at(0) == LiteralKind::String, ""); - yulAssert(varDecl.variables.size() == 1, ""); - auto newLhs = generateU64IdentifierNames(varDecl.variables[0].name); - vector ret; - for (size_t i = 0; i < 3; i++) - ret.emplace_back(VariableDeclaration{ - varDecl.debugData, - {TypedName{varDecl.debugData, newLhs[i], m_targetDialect.defaultType}}, - make_unique(Literal{ - debugDataOf(*varDecl.value), - LiteralKind::Number, - "0"_yulstring, - m_targetDialect.defaultType - }) - }); - ret.emplace_back(VariableDeclaration{ - varDecl.debugData, - {TypedName{varDecl.debugData, newLhs[3], m_targetDialect.defaultType}}, - std::move(varDecl.value) - }); - return {std::move(ret)}; - } - - rewriteVarDeclList(varDecl.variables); - return std::nullopt; - } - else if ( - holds_alternative(*varDecl.value) || - holds_alternative(*varDecl.value) - ) - { - yulAssert(varDecl.variables.size() == 1, ""); - auto newRhs = expandValue(*varDecl.value); - auto newLhs = generateU64IdentifierNames(varDecl.variables[0].name); - vector ret; - for (size_t i = 0; i < 4; i++) - ret.emplace_back(VariableDeclaration{ - varDecl.debugData, - {TypedName{varDecl.debugData, newLhs[i], m_targetDialect.defaultType}}, - std::move(newRhs[i]) - } - ); - return {std::move(ret)}; - } - else - yulAssert(false, ""); - } - else if (holds_alternative(_s)) - { - Assignment& assignment = std::get(_s); - yulAssert(assignment.value, ""); - - if (holds_alternative(*assignment.value)) - { - visit(*assignment.value); - - // Special handling for datasize and dataoffset - they will only need one variable. - if (BuiltinFunction const* f = m_inputDialect.builtin(std::get(*assignment.value).functionName.name)) - if (f->name == "datasize"_yulstring || f->name == "dataoffset"_yulstring) - { - yulAssert(f->literalArguments.size() == 1, ""); - yulAssert(f->literalArguments[0] == LiteralKind::String, ""); - yulAssert(assignment.variableNames.size() == 1, ""); - auto newLhs = generateU64IdentifierNames(assignment.variableNames[0].name); - vector ret; - for (size_t i = 0; i < 3; i++) - ret.emplace_back(Assignment{ - assignment.debugData, - {Identifier{assignment.debugData, newLhs[i]}}, - make_unique(Literal{ - debugDataOf(*assignment.value), - LiteralKind::Number, - "0"_yulstring, - m_targetDialect.defaultType - }) - }); - ret.emplace_back(Assignment{ - assignment.debugData, - {Identifier{assignment.debugData, newLhs[3]}}, - std::move(assignment.value) - }); - return {std::move(ret)}; - } - - rewriteIdentifierList(assignment.variableNames); - return std::nullopt; - } - else if ( - holds_alternative(*assignment.value) || - holds_alternative(*assignment.value) - ) - { - yulAssert(assignment.variableNames.size() == 1, ""); - auto newRhs = expandValue(*assignment.value); - YulString lhsName = assignment.variableNames[0].name; - vector ret; - for (size_t i = 0; i < 4; i++) - ret.emplace_back(Assignment{ - assignment.debugData, - {Identifier{assignment.debugData, m_variableMapping.at(lhsName)[i]}}, - std::move(newRhs[i]) - } - ); - return {std::move(ret)}; - } - else - yulAssert(false, ""); - } - else if (holds_alternative(_s)) - return handleSwitch(std::get(_s)); - else - visit(_s); - return std::nullopt; - } - ); -} - -void WordSizeTransform::run( - Dialect const& _inputDialect, - Dialect const& _targetDialect, - Block& _ast, - NameDispenser& _nameDispenser -) -{ - // Free the name `or_bool`. - NameDisplacer{_nameDispenser, {"or_bool"_yulstring}}(_ast); - WordSizeTransform{_inputDialect, _targetDialect, _nameDispenser}(_ast); -} - -WordSizeTransform::WordSizeTransform( - Dialect const& _inputDialect, - Dialect const& _targetDialect, - NameDispenser& _nameDispenser -): - m_inputDialect(_inputDialect), - m_targetDialect(_targetDialect), - m_nameDispenser(_nameDispenser) -{ -} - -void WordSizeTransform::rewriteVarDeclList(TypedNameList& _nameList) -{ - iterateReplacing( - _nameList, - [&](TypedName const& _n) -> std::optional - { - TypedNameList ret; - for (auto newName: generateU64IdentifierNames(_n.name)) - ret.emplace_back(TypedName{_n.debugData, newName, m_targetDialect.defaultType}); - return ret; - } - ); -} - -void WordSizeTransform::rewriteIdentifierList(vector& _ids) -{ - iterateReplacing( - _ids, - [&](Identifier const& _id) -> std::optional> - { - vector ret; - for (auto newId: m_variableMapping.at(_id.name)) - ret.push_back(Identifier{_id.debugData, newId}); - return ret; - } - ); -} - -vector WordSizeTransform::handleSwitchInternal( - shared_ptr const& _debugData, - vector const& _splitExpressions, - vector _cases, - YulString _runDefaultFlag, - size_t _depth -) -{ - if (_depth == 4) - { - yulAssert(_cases.size() == 1, ""); - return std::move(_cases.front().body.statements); - } - - // Extract current 64 bit segment and group by it. - map> cases; - for (Case& c: _cases) - { - yulAssert(c.value, "Default case still present."); - cases[ - (valueOfLiteral(*c.value) >> (256 - 64 * (_depth + 1))) & - std::numeric_limits::max() - ].emplace_back(std::move(c)); - } - - Switch ret{ - _debugData, - make_unique(Identifier{_debugData, _splitExpressions.at(_depth)}), - {} - }; - - for (auto& c: cases) - { - Literal label{_debugData, LiteralKind::Number, YulString(c.first.str()), m_targetDialect.defaultType}; - ret.cases.emplace_back(Case{ - c.second.front().debugData, - make_unique(std::move(label)), - Block{_debugData, handleSwitchInternal( - _debugData, - _splitExpressions, - std::move(c.second), - _runDefaultFlag, - _depth + 1 - )} - }); - } - if (!_runDefaultFlag.empty()) - ret.cases.emplace_back(Case{ - _debugData, - nullptr, - Block{_debugData, make_vector( - Assignment{ - _debugData, - {{_debugData, _runDefaultFlag}}, - make_unique(Literal{_debugData, LiteralKind::Boolean, "true"_yulstring, m_targetDialect.boolType}) - } - )} - }); - return make_vector(std::move(ret)); -} - -std::vector WordSizeTransform::handleSwitch(Switch& _switch) -{ - for (auto& c: _switch.cases) - (*this)(c.body); - - // Turns the switch into a quadruply-nested switch plus - // a flag that tells to execute the default case after all the switches. - vector ret; - - YulString runDefaultFlag; - Case defaultCase; - if (!_switch.cases.back().value) - { - runDefaultFlag = m_nameDispenser.newName("run_default"_yulstring); - defaultCase = std::move(_switch.cases.back()); - _switch.cases.pop_back(); - ret.emplace_back(VariableDeclaration{ - _switch.debugData, - {TypedName{_switch.debugData, runDefaultFlag, m_targetDialect.boolType}}, - {} - }); - } - vector splitExpressions; - for (auto const& expr: expandValue(*_switch.expression)) - splitExpressions.emplace_back(std::get(*expr).name); - - ret += handleSwitchInternal( - _switch.debugData, - splitExpressions, - std::move(_switch.cases), - runDefaultFlag, - 0 - ); - if (!runDefaultFlag.empty()) - ret.emplace_back(If{ - _switch.debugData, - make_unique(Identifier{_switch.debugData, runDefaultFlag}), - std::move(defaultCase.body) - }); - return ret; -} - - -array WordSizeTransform::generateU64IdentifierNames(YulString const& _s) -{ - yulAssert(m_variableMapping.find(_s) == m_variableMapping.end(), ""); - for (size_t i = 0; i < 4; i++) - m_variableMapping[_s][i] = m_nameDispenser.newName(YulString{_s.str() + "_" + to_string(i)}); - return m_variableMapping[_s]; -} - -array, 4> WordSizeTransform::expandValue(Expression const& _e) -{ - array, 4> ret; - if (holds_alternative(_e)) - { - auto const& id = std::get(_e); - for (size_t i = 0; i < 4; i++) - ret[i] = make_unique(Identifier{id.debugData, m_variableMapping.at(id.name)[i]}); - } - else if (holds_alternative(_e)) - { - auto const& lit = std::get(_e); - u256 val = valueOfLiteral(lit); - for (size_t exprIndex = 0; exprIndex < 4; ++exprIndex) - { - size_t exprIndexReverse = 3 - exprIndex; - u256 currentVal = val & std::numeric_limits::max(); - val >>= 64; - ret[exprIndexReverse] = make_unique( - Literal{ - lit.debugData, - LiteralKind::Number, - YulString(currentVal.str()), - m_targetDialect.defaultType - } - ); - } - } - else - yulAssert(false, "Invalid expression to split."); - return ret; -} - -vector WordSizeTransform::expandValueToVector(Expression const& _e) -{ - vector ret; - for (unique_ptr& val: expandValue(_e)) - ret.emplace_back(std::move(*val)); - return ret; -} diff --git a/libyul/backends/wasm/WordSizeTransform.h b/libyul/backends/wasm/WordSizeTransform.h deleted file mode 100644 index faa7806a562d..000000000000 --- a/libyul/backends/wasm/WordSizeTransform.h +++ /dev/null @@ -1,108 +0,0 @@ -/* - This file is part of solidity. - - solidity is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - solidity is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with solidity. If not, see . -*/ -// SPDX-License-Identifier: GPL-3.0 -/** - * Replace every u256 variable with four u64 variables. - */ - -#pragma once - -#include -#include - -#include - -#include -#include - -namespace solidity::yul -{ - -/** - * A stage that replace every u256 variable with four u64 variables. - * This transformation stage is required because values in EVM are 256 bits, - * but wasm only supports values up to 64 bits, so we use four u64 values to simulate - * one u256 value. - * - * For FunctionCall that accepts or returns u256 values, they accepts or returns - * four times the number of values after this transformation, with the order of significance, - * from the most significant to the least significant. - * - * For example, the FunctionCall MUL supplied by code generator - * should take 8 arguments and return 4 values (instead of 2 and 1) after this transformation. - * - * mul(a1, a2, a3, a4, b1, b2, b3, b4) -> c1, c2, c3, c4 - * - * the value of c4 should be - * ((a1*(2^192) + a2*(2^128) + a3(2^64) + a4) * (b1*(2^192) + b2*(2^128) + b3(2^64) + b4)) & ((1<<64)-1) - * - * The resulting code still uses the EVM builtin functions but assumes that they - * take four times the parameters and each of type u64. - * In addition, it uses a single other builtin function called `or_bool` that - * takes four u64 parameters and is supposed to return the logical disjunction - * of them as a i32 value. If this name is already used somewhere, it is renamed. - * - * Prerequisite: Disambiguator, ForLoopConditionIntoBody, ExpressionSplitter - */ -class WordSizeTransform: public ASTModifier -{ -public: - void operator()(FunctionDefinition&) override; - void operator()(FunctionCall&) override; - void operator()(If&) override; - void operator()(Switch&) override; - void operator()(ForLoop&) override; - void operator()(Block& _block) override; - - static void run( - Dialect const& _inputDialect, - Dialect const& _targetDialect, - Block& _ast, - NameDispenser& _nameDispenser - ); - -private: - explicit WordSizeTransform( - Dialect const& _inputDialect, - Dialect const& _targetDialect, - NameDispenser& _nameDispenser - ); - - void rewriteVarDeclList(std::vector&); - void rewriteIdentifierList(std::vector&); - - std::vector handleSwitch(Switch& _switch); - std::vector handleSwitchInternal( - std::shared_ptr const& _debugData, - std::vector const& _splitExpressions, - std::vector _cases, - YulString _runDefaultFlag, - size_t _depth - ); - - std::array generateU64IdentifierNames(YulString const& _s); - std::array, 4> expandValue(Expression const& _e); - std::vector expandValueToVector(Expression const& _e); - - Dialect const& m_inputDialect; - Dialect const& m_targetDialect; - NameDispenser& m_nameDispenser; - /// maps original u256 variable's name to corresponding u64 variables' names - std::map> m_variableMapping; -}; - -} diff --git a/libyul/backends/wasm/polyfill/Arithmetic.yul b/libyul/backends/wasm/polyfill/Arithmetic.yul deleted file mode 100644 index 7a4a80f5f1d5..000000000000 --- a/libyul/backends/wasm/polyfill/Arithmetic.yul +++ /dev/null @@ -1,396 +0,0 @@ -/* - This file is part of solidity. - - solidity is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - solidity is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with solidity. If not, see . -*/ -// SPDX-License-Identifier: GPL-3.0 - -// NOTE: This file is used to generate `ewasmPolyfills/Arithmetic.h`. - -// returns a + y + c plus carry value on 64 bit values. -// c should be at most 1 -function add_carry(x, y, c) -> r, r_c { - let t := i64.add(x, y) - r := i64.add(t, c) - r_c := i64.extend_i32_u(i32.or( - i64.lt_u(t, x), - i64.lt_u(r, t) - )) -} - -function add(x1, x2, x3, x4, y1, y2, y3, y4) -> r1, r2, r3, r4 { - let carry - r4, carry := add_carry(x4, y4, 0) - r3, carry := add_carry(x3, y3, carry) - r2, carry := add_carry(x2, y2, carry) - r1, carry := add_carry(x1, y1, carry) -} - -function sub(x1, x2, x3, x4, y1, y2, y3, y4) -> r1, r2, r3, r4 { - // x - y = x + (~y + 1) - let carry - r4, carry := add_carry(x4, bit_negate(y4), 1) - r3, carry := add_carry(x3, bit_negate(y3), carry) - r2, carry := add_carry(x2, bit_negate(y2), carry) - r1, carry := add_carry(x1, bit_negate(y1), carry) -} - -function sub320(x1, x2, x3, x4, x5, y1, y2, y3, y4, y5) -> r1, r2, r3, r4, r5 { - // x - y = x + (~y + 1) - let carry - r5, carry := add_carry(x5, bit_negate(y5), 1) - r4, carry := add_carry(x4, bit_negate(y4), carry) - r3, carry := add_carry(x3, bit_negate(y3), carry) - r2, carry := add_carry(x2, bit_negate(y2), carry) - r1, carry := add_carry(x1, bit_negate(y1), carry) -} - -function sub512(x1, x2, x3, x4, x5, x6, x7, x8, y1, y2, y3, y4, y5, y6, y7, y8) -> r1, r2, r3, r4, r5, r6, r7, r8 { - // x - y = x + (~y + 1) - let carry - r8, carry := add_carry(x8, bit_negate(y8), 1) - r7, carry := add_carry(x7, bit_negate(y7), carry) - r6, carry := add_carry(x6, bit_negate(y6), carry) - r5, carry := add_carry(x5, bit_negate(y5), carry) - r4, carry := add_carry(x4, bit_negate(y4), carry) - r3, carry := add_carry(x3, bit_negate(y3), carry) - r2, carry := add_carry(x2, bit_negate(y2), carry) - r1, carry := add_carry(x1, bit_negate(y1), carry) -} - -// Multiplies two 64 bit values resulting in a 128 bit -// value split into two 64 bit values. -function mul_64x64_128(x, y) -> hi, lo { - let xh, xl := split(x) - let yh, yl := split(y) - let t0 := i64.mul(xl, yl) - let t1 := i64.mul(xh, yl) - let t2 := i64.mul(xl, yh) - let t3 := i64.mul(xh, yh) - let t0h, t0l := split(t0) - let u1 := i64.add(t1, t0h) - let u1h, u1l := split(u1) - let u2 := i64.add(t2, u1l) - lo := i64.or(i64.shl(u2, 32), t0l) - hi := i64.add(t3, i64.add(i64.shr_u(u2, 32), u1h)) -} - -// Multiplies two 128 bit values resulting in a 256 bit -// value split into four 64 bit values. -function mul_128x128_256(x1, x2, y1, y2) -> r1, r2, r3, r4 { - let ah, al := mul_64x64_128(x1, y1) - let bh, bl := mul_64x64_128(x1, y2) - let ch, cl := mul_64x64_128(x2, y1) - let dh, dl := mul_64x64_128(x2, y2) - r4 := dl - let carry1, carry2 - let t1, t2 - r3, carry1 := add_carry(bl, cl, 0) - r3, carry2 := add_carry(r3, dh, 0) - t1, carry1 := add_carry(bh, ch, carry1) - r2, carry2 := add_carry(t1, al, carry2) - r1 := i64.add(i64.add(ah, carry1), carry2) -} - -// Multiplies two 256 bit values resulting in a 512 bit -// value split into eight 64 bit values. -function mul_256x256_512(x1, x2, x3, x4, y1, y2, y3, y4) -> r1, r2, r3, r4, r5, r6, r7, r8 { - let a1, a2, a3, a4 := mul_128x128_256(x1, x2, y1, y2) - let b1, b2, b3, b4 := mul_128x128_256(x1, x2, y3, y4) - let c1, c2, c3, c4 := mul_128x128_256(x3, x4, y1, y2) - let d1, d2, d3, d4 := mul_128x128_256(x3, x4, y3, y4) - r8 := d4 - r7 := d3 - let carry1, carry2 - let t1, t2 - r6, carry1 := add_carry(b4, c4, 0) - r6, carry2 := add_carry(r6, d2, 0) - r5, carry1 := add_carry(b3, c3, carry1) - r5, carry2 := add_carry(r5, d1, carry2) - r4, carry1 := add_carry(a4, b2, carry1) - r4, carry2 := add_carry(r4, c2, carry2) - r3, carry1 := add_carry(a3, b1, carry1) - r3, carry2 := add_carry(r3, c1, carry2) - r2, carry1 := add_carry(a2, carry1, carry2) - r1 := i64.add(a1, carry1) -} - -function mul(x1, x2, x3, x4, y1, y2, y3, y4) -> r1, r2, r3, r4 { - // TODO it would actually suffice to have mul_128x128_128 for the first two. - let b1, b2, b3, b4 := mul_128x128_256(x3, x4, y1, y2) - let c1, c2, c3, c4 := mul_128x128_256(x1, x2, y3, y4) - let d1, d2, d3, d4 := mul_128x128_256(x3, x4, y3, y4) - r4 := d4 - r3 := d3 - let t1, t2 - t1, t2, r1, r2 := add(0, 0, b3, b4, 0, 0, c3, c4) - t1, t2, r1, r2 := add(0, 0, r1, r2, 0, 0, d1, d2) -} - -function div(x1, x2, x3, x4, y1, y2, y3, y4) -> r1, r2, r3, r4 { - // Based on https://github.com/ewasm/evm2wasm/blob/master/wasm/DIV.wast - if iszero256(y1, y2, y3, y4) { - leave - } - - let m1 := 0 - let m2 := 0 - let m3 := 0 - let m4 := 1 - - for {} true {} { - if i32.or(i64.eqz(i64.clz(y1)), gte_256x256_64(y1, y2, y3, y4, x1, x2, x3, x4)) { - break - } - y1, y2, y3, y4 := shl_internal(1, y1, y2, y3, y4) - m1, m2, m3, m4 := shl_internal(1, m1, m2, m3, m4) - } - - for {} or_bool(m1, m2, m3, m4) {} { - if gte_256x256_64(x1, x2, x3, x4, y1, y2, y3, y4) { - x1, x2, x3, x4 := sub(x1, x2, x3, x4, y1, y2, y3, y4) - r1, r2, r3, r4 := add(r1, r2, r3, r4, m1, m2, m3, m4) - } - y1, y2, y3, y4 := shr_internal(1, y1, y2, y3, y4) - m1, m2, m3, m4 := shr_internal(1, m1, m2, m3, m4) - } -} - -function sdiv(x1, x2, x3, x4, y1, y2, y3, y4) -> r1, r2, r3, r4 { - // Based on https://github.com/ewasm/evm2wasm/blob/master/wasm/SDIV.wast - - let sign:i32 := i32.wrap_i64(i64.shr_u(i64.xor(x1, y1), 63)) - - if i64.eqz(i64.clz(x1)) { - x1, x2, x3, x4 := xor( - x1, x2, x3, x4, - 0xffffffffffffffff, 0xffffffffffffffff, 0xffffffffffffffff, 0xffffffffffffffff - ) - x1, x2, x3, x4 := add(x1, x2, x3, x4, 0, 0, 0, 1) - } - - if i64.eqz(i64.clz(y1)) { - y1, y2, y3, y4 := xor( - y1, y2, y3, y4, - 0xffffffffffffffff, 0xffffffffffffffff, 0xffffffffffffffff, 0xffffffffffffffff - ) - y1, y2, y3, y4 := add(y1, y2, y3, y4, 0, 0, 0, 1) - } - - r1, r2, r3, r4 := div(x1, x2, x3, x4, y1, y2, y3, y4) - - if sign { - r1, r2, r3, r4 := xor( - r1, r2, r3, r4, - 0xffffffffffffffff, 0xffffffffffffffff, 0xffffffffffffffff, 0xffffffffffffffff - ) - r1, r2, r3, r4 := add(r1, r2, r3, r4, 0, 0, 0, 1) - } -} - -function mod(x1, x2, x3, x4, y1, y2, y3, y4) -> r1, r2, r3, r4 { - // Based on https://github.com/ewasm/evm2wasm/blob/master/wasm/MOD.wast - if iszero256(y1, y2, y3, y4) { - leave - } - - r1 := x1 - r2 := x2 - r3 := x3 - r4 := x4 - - let m1 := 0 - let m2 := 0 - let m3 := 0 - let m4 := 1 - - for {} true {} { - if i32.or(i64.eqz(i64.clz(y1)), gte_256x256_64(y1, y2, y3, y4, r1, r2, r3, r4)) { - break - } - - y1, y2, y3, y4 := shl_internal(1, y1, y2, y3, y4) - m1, m2, m3, m4 := shl_internal(1, m1, m2, m3, m4) - } - - for {} or_bool(m1, m2, m3, m4) {} { - if gte_256x256_64(r1, r2, r3, r4, y1, y2, y3, y4) { - r1, r2, r3, r4 := sub(r1, r2, r3, r4, y1, y2, y3, y4) - } - - y1, y2, y3, y4 := shr_internal(1, y1, y2, y3, y4) - m1, m2, m3, m4 := shr_internal(1, m1, m2, m3, m4) - } -} - -function mod320(x1, x2, x3, x4, x5, y1, y2, y3, y4, y5) -> r1, r2, r3, r4, r5 { - // Based on https://github.com/ewasm/evm2wasm/blob/master/wasm/mod_320.wast - if iszero320(y1, y2, y3, y4, y5) { - leave - } - - let m1 := 0 - let m2 := 0 - let m3 := 0 - let m4 := 0 - let m5 := 1 - - r1 := x1 - r2 := x2 - r3 := x3 - r4 := x4 - r5 := x5 - - for {} true {} { - if i32.or(i64.eqz(i64.clz(y1)), gte_320x320_64(y1, y2, y3, y4, y5, r1, r2, r3, r4, r5)) { - break - } - y1, y2, y3, y4, y5 := shl320_internal(1, y1, y2, y3, y4, y5) - m1, m2, m3, m4, m5 := shl320_internal(1, m1, m2, m3, m4, m5) - } - - for {} or_bool_320(m1, m2, m3, m4, m5) {} { - if gte_320x320_64(r1, r2, r3, r4, r5, y1, y2, y3, y4, y5) { - r1, r2, r3, r4, r5 := sub320(r1, r2, r3, r4, r5, y1, y2, y3, y4, y5) - } - - y1, y2, y3, y4, y5 := shr320_internal(1, y1, y2, y3, y4, y5) - m1, m2, m3, m4, m5 := shr320_internal(1, m1, m2, m3, m4, m5) - } -} - -function mod512(x1, x2, x3, x4, x5, x6, x7, x8, y1, y2, y3, y4, y5, y6, y7, y8) -> r1, r2, r3, r4, r5, r6, r7, r8 { - // Based on https://github.com/ewasm/evm2wasm/blob/master/wasm/mod_512.wast - if iszero512(y1, y2, y3, y4, y5, y6, y7, y8) { - leave - } - - let m1 := 0 - let m2 := 0 - let m3 := 0 - let m4 := 0 - let m5 := 0 - let m6 := 0 - let m7 := 0 - let m8 := 1 - - r1 := x1 - r2 := x2 - r3 := x3 - r4 := x4 - r5 := x5 - r6 := x6 - r7 := x7 - r8 := x8 - - for {} true {} { - if i32.or( - i64.eqz(i64.clz(y1)), - gte_512x512_64(y1, y2, y3, y4, y5, y6, y7, y8, r1, r2, r3, r4, r5, r6, r7, r8) - ) - { - break - } - y1, y2, y3, y4, y5, y6, y7, y8 := shl512_internal(1, y1, y2, y3, y4, y5, y6, y7, y8) - m1, m2, m3, m4, m5, m6, m7, m8 := shl512_internal(1, m1, m2, m3, m4, m5, m6, m7, m8) - } - - for {} or_bool_512(m1, m2, m3, m4, m5, m6, m7, m8) {} { - if gte_512x512_64(r1, r2, r3, r4, r5, r6, r7, r8, y1, y2, y3, y4, y5, y6, y7, y8) { - r1, r2, r3, r4, r5, r6, r7, r8 := sub512(r1, r2, r3, r4, r5, r6, r7, r8, y1, y2, y3, y4, y5, y6, y7, y8) - } - - y1, y2, y3, y4, y5, y6, y7, y8 := shr512_internal(1, y1, y2, y3, y4, y5, y6, y7, y8) - m1, m2, m3, m4, m5, m6, m7, m8 := shr512_internal(1, m1, m2, m3, m4, m5, m6, m7, m8) - } -} - -function smod(x1, x2, x3, x4, y1, y2, y3, y4) -> r1, r2, r3, r4 { - // Based on https://github.com/ewasm/evm2wasm/blob/master/wasm/SMOD.wast - let m1 := 0 - let m2 := 0 - let m3 := 0 - let m4 := 1 - - let sign:i32 := i32.wrap_i64(i64.shr_u(x1, 63)) - - if i64.eqz(i64.clz(x1)) { - x1, x2, x3, x4 := xor( - x1, x2, x3, x4, - 0xffffffffffffffff, 0xffffffffffffffff, 0xffffffffffffffff, 0xffffffffffffffff - ) - x1, x2, x3, x4 := add(x1, x2, x3, x4, 0, 0, 0, 1) - } - - if i64.eqz(i64.clz(y1)) { - y1, y2, y3, y4 := xor( - y1, y2, y3, y4, - 0xffffffffffffffff, 0xffffffffffffffff, 0xffffffffffffffff, 0xffffffffffffffff - ) - y1, y2, y3, y4 := add(y1, y2, y3, y4, 0, 0, 0, 1) - } - - r1, r2, r3, r4 := mod(x1, x2, x3, x4, y1, y2, y3, y4) - - if sign { - r1, r2, r3, r4 := xor( - r1, r2, r3, r4, - 0xffffffffffffffff, 0xffffffffffffffff, 0xffffffffffffffff, 0xffffffffffffffff - ) - r1, r2, r3, r4 := add(r1, r2, r3, r4, 0, 0, 0, 1) - } -} - -function exp(x1, x2, x3, x4, y1, y2, y3, y4) -> r1, r2, r3, r4 { - r4 := 1 - for {} or_bool(y1, y2, y3, y4) {} { - if i32.wrap_i64(i64.and(y4, 1)) { - r1, r2, r3, r4 := mul(r1, r2, r3, r4, x1, x2, x3, x4) - } - x1, x2, x3, x4 := mul(x1, x2, x3, x4, x1, x2, x3, x4) - y1, y2, y3, y4 := shr_internal(1, y1, y2, y3, y4) - } -} - -function addmod(x1, x2, x3, x4, y1, y2, y3, y4, m1, m2, m3, m4) -> z1, z2, z3, z4 { - let carry - z4, carry := add_carry(x4, y4, 0) - z3, carry := add_carry(x3, y3, carry) - z2, carry := add_carry(x2, y2, carry) - z1, carry := add_carry(x1, y1, carry) - - let z0 - z0, z1, z2, z3, z4 := mod320(carry, z1, z2, z3, z4, 0, m1, m2, m3, m4) -} - -function mulmod(x1, x2, x3, x4, y1, y2, y3, y4, m1, m2, m3, m4) -> z1, z2, z3, z4 { - let r1, r2, r3, r4, r5, r6, r7, r8 := mul_256x256_512(x1, x2, x3, x4, y1, y2, y3, y4) - let t1 - let t2 - let t3 - let t4 - t1, t2, t3, t4, z1, z2, z3, z4 := mod512(r1, r2, r3, r4, r5, r6, r7, r8, 0, 0, 0, 0, m1, m2, m3, m4) -} - -function signextend(x1, x2, x3, x4, y1, y2, y3, y4) -> z1, z2, z3, z4 { - z1 := y1 - z2 := y2 - z3 := y3 - z4 := y4 - if lt_256x256_64(x1, x2, x3, x4, 0, 0, 0, 32) { - let d := i64.mul(i64.sub(31, x4), 8) - z1, z2, z3, z4 := shl(0, 0, 0, d, z1, z2, z3, z4) - z1, z2, z3, z4 := sar(0, 0, 0, d, z1, z2, z3, z4) - } -} diff --git a/libyul/backends/wasm/polyfill/Bitwise.yul b/libyul/backends/wasm/polyfill/Bitwise.yul deleted file mode 100644 index 3efa07bf50e5..000000000000 --- a/libyul/backends/wasm/polyfill/Bitwise.yul +++ /dev/null @@ -1,222 +0,0 @@ -/* - This file is part of solidity. - - solidity is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - solidity is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with solidity. If not, see . -*/ -// SPDX-License-Identifier: GPL-3.0 - -// NOTE: This file is used to generate `ewasmPolyfills/Bitwise.h`. - -function bit_negate(x) -> y { - y := i64.xor(x, 0xffffffffffffffff) -} - -function split(x) -> hi, lo { - hi := i64.shr_u(x, 32) - lo := i64.and(x, 0xffffffff) -} - -function shl_internal(amount, x1, x2, x3, x4) -> r1, r2, r3, r4 { - // amount < 64 - r1 := i64.add(i64.shl(x1, amount), i64.shr_u(x2, i64.sub(64, amount))) - r2 := i64.add(i64.shl(x2, amount), i64.shr_u(x3, i64.sub(64, amount))) - r3 := i64.add(i64.shl(x3, amount), i64.shr_u(x4, i64.sub(64, amount))) - r4 := i64.shl(x4, amount) -} - -function shr_internal(amount, x1, x2, x3, x4) -> r1, r2, r3, r4 { - // amount < 64 - r4 := i64.add(i64.shr_u(x4, amount), i64.shl(x3, i64.sub(64, amount))) - r3 := i64.add(i64.shr_u(x3, amount), i64.shl(x2, i64.sub(64, amount))) - r2 := i64.add(i64.shr_u(x2, amount), i64.shl(x1, i64.sub(64, amount))) - r1 := i64.shr_u(x1, amount) -} - -function shl320_internal(amount, x1, x2, x3, x4, x5) -> r1, r2, r3, r4, r5 { - // amount < 64 - r1 := i64.add(i64.shl(x1, amount), i64.shr_u(x2, i64.sub(64, amount))) - r2 := i64.add(i64.shl(x2, amount), i64.shr_u(x3, i64.sub(64, amount))) - r3 := i64.add(i64.shl(x3, amount), i64.shr_u(x4, i64.sub(64, amount))) - r4 := i64.add(i64.shl(x4, amount), i64.shr_u(x5, i64.sub(64, amount))) - r5 := i64.shl(x5, 1) -} - -function shr320_internal(amount, x1, x2, x3, x4, x5) -> r1, r2, r3, r4, r5 { - // amount < 64 - r5 := i64.add(i64.shr_u(x5, amount), i64.shl(x4, i64.sub(64, amount))) - r4 := i64.add(i64.shr_u(x4, amount), i64.shl(x3, i64.sub(64, amount))) - r3 := i64.add(i64.shr_u(x3, amount), i64.shl(x2, i64.sub(64, amount))) - r2 := i64.add(i64.shr_u(x2, amount), i64.shl(x1, i64.sub(64, amount))) - r1 := i64.shr_u(x1, 1) -} - -function shl512_internal(amount, x1, x2, x3, x4, x5, x6, x7, x8) -> r1, r2, r3, r4, r5, r6, r7, r8 { - // amount < 64 - r1 := i64.add(i64.shl(x1, amount), i64.shr_u(x2, i64.sub(64, amount))) - r2 := i64.add(i64.shl(x2, amount), i64.shr_u(x3, i64.sub(64, amount))) - r3 := i64.add(i64.shl(x3, amount), i64.shr_u(x4, i64.sub(64, amount))) - r4 := i64.add(i64.shl(x4, amount), i64.shr_u(x5, i64.sub(64, amount))) - r5 := i64.add(i64.shl(x5, amount), i64.shr_u(x6, i64.sub(64, amount))) - r6 := i64.add(i64.shl(x6, amount), i64.shr_u(x7, i64.sub(64, amount))) - r7 := i64.add(i64.shl(x7, amount), i64.shr_u(x8, i64.sub(64, amount))) - r8 := i64.shl(x8, amount) -} - -function shr512_internal(amount, x1, x2, x3, x4, x5, x6, x7, x8) -> r1, r2, r3, r4, r5, r6, r7, r8 { - // amount < 64 - r8 := i64.add(i64.shr_u(x8, amount), i64.shl(x7, i64.sub(64, amount))) - r7 := i64.add(i64.shr_u(x7, amount), i64.shl(x6, i64.sub(64, amount))) - r6 := i64.add(i64.shr_u(x6, amount), i64.shl(x5, i64.sub(64, amount))) - r5 := i64.add(i64.shr_u(x5, amount), i64.shl(x4, i64.sub(64, amount))) - r4 := i64.add(i64.shr_u(x4, amount), i64.shl(x3, i64.sub(64, amount))) - r3 := i64.add(i64.shr_u(x3, amount), i64.shl(x2, i64.sub(64, amount))) - r2 := i64.add(i64.shr_u(x2, amount), i64.shl(x1, i64.sub(64, amount))) - r1 := i64.shr_u(x1, amount) -} - -function byte(x1, x2, x3, x4, y1, y2, y3, y4) -> r1, r2, r3, r4 { - if i64.eqz(i64.or(i64.or(x1, x2), x3)) { - let component - switch i64.div_u(x4, 8) - case 0 { component := y1 } - case 1 { component := y2 } - case 2 { component := y3 } - case 3 { component := y4 } - x4 := i64.mul(i64.rem_u(x4, 8), 8) - r4 := i64.shr_u(component, i64.sub(56, x4)) - r4 := i64.and(0xff, r4) - } -} - -function xor(x1, x2, x3, x4, y1, y2, y3, y4) -> r1, r2, r3, r4 { - r1 := i64.xor(x1, y1) - r2 := i64.xor(x2, y2) - r3 := i64.xor(x3, y3) - r4 := i64.xor(x4, y4) -} - -function or(x1, x2, x3, x4, y1, y2, y3, y4) -> r1, r2, r3, r4 { - r1 := i64.or(x1, y1) - r2 := i64.or(x2, y2) - r3 := i64.or(x3, y3) - r4 := i64.or(x4, y4) -} - -function and(x1, x2, x3, x4, y1, y2, y3, y4) -> r1, r2, r3, r4 { - r1 := i64.and(x1, y1) - r2 := i64.and(x2, y2) - r3 := i64.and(x3, y3) - r4 := i64.and(x4, y4) -} - -function not(x1, x2, x3, x4) -> r1, r2, r3, r4 { - let mask := 0xffffffffffffffff - r1, r2, r3, r4 := xor(x1, x2, x3, x4, mask, mask, mask, mask) -} - -function shl_single(a, amount) -> x, y { - // amount < 64 - x := i64.shr_u(a, i64.sub(64, amount)) - y := i64.shl(a, amount) -} - -function shl(x1, x2, x3, x4, y1, y2, y3, y4) -> z1, z2, z3, z4 { - if i32.and(i64.eqz(x1), i64.eqz(x2)) { - if i64.eqz(x3) { - if i64.lt_u(x4, 256) { - if i64.ge_u(x4, 128) { - y1 := y3 - y2 := y4 - y3 := 0 - y4 := 0 - x4 := i64.sub(x4, 128) - } - if i64.ge_u(x4, 64) { - y1 := y2 - y2 := y3 - y3 := y4 - y4 := 0 - x4 := i64.sub(x4, 64) - } - let t, r - t, z4 := shl_single(y4, x4) - r, z3 := shl_single(y3, x4) - z3 := i64.or(z3, t) - t, z2 := shl_single(y2, x4) - z2 := i64.or(z2, r) - r, z1 := shl_single(y1, x4) - z1 := i64.or(z1, t) - } - } - } -} - -function shr_single(a, amount) -> x, y { - // amount < 64 - y := i64.shl(a, i64.sub(64, amount)) - x := i64.shr_u(a, amount) -} - -function shr(x1, x2, x3, x4, y1, y2, y3, y4) -> z1, z2, z3, z4 { - if i32.and(i64.eqz(x1), i64.eqz(x2)) { - if i64.eqz(x3) { - if i64.lt_u(x4, 256) { - if i64.ge_u(x4, 128) { - y4 := y2 - y3 := y1 - y2 := 0 - y1 := 0 - x4 := i64.sub(x4, 128) - } - if i64.ge_u(x4, 64) { - y4 := y3 - y3 := y2 - y2 := y1 - y1 := 0 - x4 := i64.sub(x4, 64) - } - let t - z4, t := shr_single(y4, x4) - z3, t := shr_single(y3, x4) - z4 := i64.or(z4, t) - z2, t := shr_single(y2, x4) - z3 := i64.or(z3, t) - z1, t := shr_single(y1, x4) - z2 := i64.or(z2, t) - } - } - } -} - -function sar(x1, x2, x3, x4, y1, y2, y3, y4) -> z1, z2, z3, z4 { - if i64.gt_u(i64.clz(y1), 0) { - z1, z2, z3, z4 := shr(x1, x2, x3, x4, y1, y2, y3, y4) - leave - } - - if gte_256x256_64(x1, x2, x3, x4, 0, 0, 0, 256) { - z1 := 0xffffffffffffffff - z2 := 0xffffffffffffffff - z3 := 0xffffffffffffffff - z4 := 0xffffffffffffffff - } - if lt_256x256_64(x1, x2, x3, x4, 0, 0, 0, 256) { - y1, y2, y3, y4 := shr(0, 0, 0, x4, y1, y2, y3, y4) - z1, z2, z3, z4 := shl( - 0, 0, 0, i64.sub(256, x4), - 0xffffffffffffffff, 0xffffffffffffffff, 0xffffffffffffffff, 0xffffffffffffffff - ) - z1, z2, z3, z4 := or(y1, y2, y3, y4, z1, z2, z3, z4) - } -} diff --git a/libyul/backends/wasm/polyfill/Comparison.yul b/libyul/backends/wasm/polyfill/Comparison.yul deleted file mode 100644 index dc052a14595d..000000000000 --- a/libyul/backends/wasm/polyfill/Comparison.yul +++ /dev/null @@ -1,168 +0,0 @@ -/* - This file is part of solidity. - - solidity is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - solidity is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with solidity. If not, see . -*/ -// SPDX-License-Identifier: GPL-3.0 - -// NOTE: This file is used to generate `ewasmPolyfills/Comparison.h`. - -function iszero(x1, x2, x3, x4) -> r1, r2, r3, r4 { - r4 := i64.extend_i32_u(iszero256(x1, x2, x3, x4)) -} - -function iszero256(x1, x2, x3, x4) -> r:i32 { - r := i64.eqz(i64.or(i64.or(x1, x2), i64.or(x3, x4))) -} - -function iszero320(x1, x2, x3, x4, x5) -> r:i32 { - r := i64.eqz(i64.or(i64.or(i64.or(x1, x2), i64.or(x3, x4)), x5)) -} - -function iszero512(x1, x2, x3, x4, x5, x6, x7, x8) -> r:i32 { - r := i32.and(iszero256(x1, x2, x3, x4), iszero256(x5, x6, x7, x8)) -} - -function eq(x1, x2, x3, x4, y1, y2, y3, y4) -> r1, r2, r3, r4 { - r4 := i64.extend_i32_u( - i32.and( - i64.eq(x1, y1), - i32.and( - i64.eq(x2, y2), - i32.and( - i64.eq(x3, y3), - i64.eq(x4, y4) - ) - ) - ) - ) -} - -// returns 0 if a == b, -1 if a < b and 1 if a > b -function cmp(a, b) -> r:i32 { - r := i32.select(0xffffffff:i32, i64.ne(a, b), i64.lt_u(a, b)) -} - -function lt_320x320_64(x1, x2, x3, x4, x5, y1, y2, y3, y4, y5) -> z:i32 { - switch cmp(x1, y1) - case 0:i32 { - switch cmp(x2, y2) - case 0:i32 { - switch cmp(x3, y3) - case 0:i32 { - switch cmp(x4, y4) - case 0:i32 { - z := i64.lt_u(x5, y5) - } - case 1:i32 { z := 0:i32 } - default { z := 1:i32 } - } - case 1:i32 { z := 0:i32 } - default { z := 1:i32 } - } - case 1:i32 { z := 0:i32 } - default { z := 1:i32 } - } - case 1:i32 { z := 0:i32 } - default { z := 1:i32 } -} - -function lt_512x512_64(x1, x2, x3, x4, x5, x6, x7, x8, y1, y2, y3, y4, y5, y6, y7, y8) -> z:i32 { - switch cmp(x1, y1) - case 0:i32 { - switch cmp(x2, y2) - case 0:i32 { - switch cmp(x3, y3) - case 0:i32 { - switch cmp(x4, y4) - case 0:i32 { - switch cmp(x5, y5) - case 0:i32 { - switch cmp(x6, y6) - case 0:i32 { - switch cmp(x7, y7) - case 0:i32 { - z := i64.lt_u(x8, y8) - } - case 1:i32 { z := 0:i32 } - default { z := 1:i32 } - } - case 1:i32 { z := 0:i32 } - default { z := 1:i32 } - } - case 1:i32 { z := 0:i32 } - default { z := 1:i32 } - } - case 1:i32 { z := 0:i32 } - default { z := 1:i32 } - } - case 1:i32 { z := 0:i32 } - default { z := 1:i32 } - } - case 1:i32 { z := 0:i32 } - default { z := 1:i32 } - } - case 1:i32 { z := 0:i32 } - default { z := 1:i32 } -} - -function lt_256x256_64(x1, x2, x3, x4, y1, y2, y3, y4) -> z:i32 { - switch cmp(x1, y1) - case 0:i32 { - switch cmp(x2, y2) - case 0:i32 { - switch cmp(x3, y3) - case 0:i32 { - z := i64.lt_u(x4, y4) - } - case 1:i32 { z := 0:i32 } - default { z := 1:i32 } - } - case 1:i32 { z := 0:i32 } - default { z := 1:i32 } - } - case 1:i32 { z := 0:i32 } - default { z := 1:i32 } -} - -function lt(x1, x2, x3, x4, y1, y2, y3, y4) -> z1, z2, z3, z4 { - z4 := i64.extend_i32_u(lt_256x256_64(x1, x2, x3, x4, y1, y2, y3, y4)) -} - -function gte_256x256_64(x1, x2, x3, x4, y1, y2, y3, y4) -> z:i32 { - z := i32.eqz(lt_256x256_64(x1, x2, x3, x4, y1, y2, y3, y4)) -} - -function gte_320x320_64(x1, x2, x3, x4, x5, y1, y2, y3, y4, y5) -> z:i32 { - z := i32.eqz(lt_320x320_64(x1, x2, x3, x4, x5, y1, y2, y3, y4, y5)) -} - -function gte_512x512_64(x1, x2, x3, x4, x5, x6, x7, x8, y1, y2, y3, y4, y5, y6, y7, y8) -> z:i32 { - z := i32.eqz(lt_512x512_64(x1, x2, x3, x4, x5, x6, x7, x8, y1, y2, y3, y4, y5, y6, y7, y8)) -} - -function gt(x1, x2, x3, x4, y1, y2, y3, y4) -> z1, z2, z3, z4 { - z1, z2, z3, z4 := lt(y1, y2, y3, y4, x1, x2, x3, x4) -} - -function slt(x1, x2, x3, x4, y1, y2, y3, y4) -> z1, z2, z3, z4 { - // TODO correct? - x1 := i64.add(x1, 0x8000000000000000) - y1 := i64.add(y1, 0x8000000000000000) - z1, z2, z3, z4 := lt(x1, x2, x3, x4, y1, y2, y3, y4) -} - -function sgt(x1, x2, x3, x4, y1, y2, y3, y4) -> z1, z2, z3, z4 { - z1, z2, z3, z4 := slt(y1, y2, y3, y4, x1, x2, x3, x4) -} diff --git a/libyul/backends/wasm/polyfill/Conversion.yul b/libyul/backends/wasm/polyfill/Conversion.yul deleted file mode 100644 index 17d205ddd564..000000000000 --- a/libyul/backends/wasm/polyfill/Conversion.yul +++ /dev/null @@ -1,79 +0,0 @@ -/* - This file is part of solidity. - - solidity is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - solidity is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with solidity. If not, see . -*/ -// SPDX-License-Identifier: GPL-3.0 - -// NOTE: This file is used to generate `ewasmPolyfills/Conversion.h`. - -function u256_to_u128(x1, x2, x3, x4) -> v1, v2 { - if i64.ne(0, i64.or(x1, x2)) { invalid() } - v2 := x4 - v1 := x3 -} - -function u256_to_i64(x1, x2, x3, x4) -> v { - if i64.ne(0, i64.or(i64.or(x1, x2), x3)) { invalid() } - v := x4 -} - -function u256_to_i32(x1, x2, x3, x4) -> v:i32 { - if i64.ne(0, i64.or(i64.or(x1, x2), x3)) { invalid() } - if i64.ne(0, i64.shr_u(x4, 32)) { invalid() } - v := i32.wrap_i64(x4) -} - -function u256_to_byte(x1, x2, x3, x4) -> v { - if i64.ne(0, i64.or(i64.or(x1, x2), x3)) { invalid() } - if i64.gt_u(x4, 255) { invalid() } - v := x4 -} - -function u256_to_i32ptr(x1, x2, x3, x4) -> v:i32 { - v := u256_to_i32(x1, x2, x3, x4) -} - -function to_internal_i32ptr(x1, x2, x3, x4) -> r:i32 { - let p:i32 := u256_to_i32ptr(x1, x2, x3, x4) - r := i32.add(p, 64:i32) - if i32.lt_u(r, p) { invalid() } -} - -function u256_to_address(x1, x2, x3, x4) -> r1, r2, r3 { - if i64.ne(0, x1) { invalid() } - if i64.ne(0, i64.shr_u(x2, 32)) { invalid() } - r1 := x2 - r2 := x3 - r3 := x4 -} - -function bswap16(x:i32) -> y:i32 { - let hi:i32 := i32.and(i32.shl(x, 8:i32), 0xff00:i32) - let lo:i32 := i32.and(i32.shr_u(x, 8:i32), 0xff:i32) - y := i32.or(hi, lo) -} - -function bswap32(x:i32) -> y:i32 { - let hi:i32 := i32.shl(bswap16(x), 16:i32) - let lo:i32 := bswap16(i32.shr_u(x, 16:i32)) - y := i32.or(hi, lo) -} - - -function bswap64(x) -> y { - let hi := i64.shl(i64.extend_i32_u(bswap32(i32.wrap_i64(x))), 32) - let lo := i64.extend_i32_u(bswap32(i32.wrap_i64(i64.shr_u(x, 32)))) - y := i64.or(hi, lo) -} diff --git a/libyul/backends/wasm/polyfill/Interface.yul b/libyul/backends/wasm/polyfill/Interface.yul deleted file mode 100644 index a840e3bb016d..000000000000 --- a/libyul/backends/wasm/polyfill/Interface.yul +++ /dev/null @@ -1,413 +0,0 @@ -/* - This file is part of solidity. - - solidity is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - solidity is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with solidity. If not, see . -*/ -// SPDX-License-Identifier: GPL-3.0 - -// NOTE: This file is used to generate `ewasmPolyfills/Interface.h`. - -function address() -> z1, z2, z3, z4 { - eth.getAddress(12:i32) - z1, z2, z3, z4 := mload_address(0:i32) -} - -function balance(x1, x2, x3, x4) -> z1, z2, z3, z4 { - mstore_address(0:i32, x1, x2, x3, x4) - eth.getExternalBalance(12:i32, 32:i32) - z3 := i64.load(40:i32) - z4 := i64.load(32:i32) -} - -function selfbalance() -> z1, z2, z3, z4 { - // TODO: not part of current Ewasm spec - unreachable() -} - -function chainid() -> z1, z2, z3, z4 { - // TODO: not part of current Ewasm spec - unreachable() -} - -function origin() -> z1, z2, z3, z4 { - eth.getTxOrigin(12:i32) - z1, z2, z3, z4 := mload_address(0:i32) -} - -function caller() -> z1, z2, z3, z4 { - eth.getCaller(12:i32) - z1, z2, z3, z4 := mload_address(0:i32) -} - -function callvalue() -> z1, z2, z3, z4 { - eth.getCallValue(0:i32) - z3 := i64.load(8:i32) - z4 := i64.load(0:i32) -} - -function calldataload(x1, x2, x3, x4) -> z1, z2, z3, z4 { - calldatacopy(0, 0, 0, 0, x1, x2, x3, x4, 0, 0, 0, 32) - z1, z2, z3, z4 := mload_internal(0:i32) -} - -function calldatasize() -> z1, z2, z3, z4 { - z4 := i64.extend_i32_u(eth.getCallDataSize()) -} - -function calldatacopy(x1, x2, x3, x4, y1, y2, y3, y4, z1, z2, z3, z4) { - let cds:i32 := eth.getCallDataSize() - let destination:i32 := u256_to_i32(x1, x2, x3, x4) - let offset:i32 := u256_to_i32(y1, y2, y3, y4) - let requested_size:i32 := u256_to_i32(z1, z2, z3, z4) - // overflow? - if i32.gt_u(offset, i32.sub(0xffffffff:i32, requested_size)) { - eth.revert(0:i32, 0:i32) - } - - let available_size:i32 := i32.sub(cds, offset) - if i32.gt_u(offset, cds) { - available_size := 0:i32 - } - - if i32.gt_u(available_size, 0:i32) { - eth.callDataCopy( - destination, - offset, - available_size - ) - } - - if i32.gt_u(requested_size, available_size) { - memset(i32.add(destination, available_size), 0:i32, i32.sub(requested_size, available_size)) - } -} - -// Needed? -function codesize() -> z1, z2, z3, z4 { - z4 := i64.extend_i32_u(eth.getCodeSize()) -} - -function codecopy(x1, x2, x3, x4, y1, y2, y3, y4, z1, z2, z3, z4) { - eth.codeCopy( - to_internal_i32ptr(x1, x2, x3, x4), - u256_to_i32(y1, y2, y3, y4), - u256_to_i32(z1, z2, z3, z4) - ) -} - -function datacopy(x1, x2, x3, x4, y1, y2, y3, y4, z1, z2, z3, z4) { - // TODO correct? - codecopy(x1, x2, x3, x4, y1, y2, y3, y4, z1, z2, z3, z4) -} - -function gasprice() -> z1, z2, z3, z4 { - eth.getTxGasPrice(0:i32) - z3 := i64.load(8:i32) - z4 := i64.load(0:i32) -} - -function extcodesize_internal(x1, x2, x3, x4) -> r:i32 { - mstore_address(0:i32, x1, x2, x3, x4) - r := eth.getExternalCodeSize(12:i32) -} - -function extcodesize(x1, x2, x3, x4) -> z1, z2, z3, z4 { - z4 := i64.extend_i32_u(extcodesize_internal(x1, x2, x3, x4)) -} - -function extcodehash(x1, x2, x3, x4) -> z1, z2, z3, z4 { - // TODO: not part of current Ewasm spec - unreachable() -} - -function extcodecopy(a1, a2, a3, a4, p1, p2, p3, p4, o1, o2, o3, o4, l1, l2, l3, l4) { - mstore_address(0:i32, a1, a2, a3, a4) - let codeOffset:i32 := u256_to_i32(o1, o2, o3, o4) - let codeLength:i32 := u256_to_i32(l1, l2, l3, l4) - eth.externalCodeCopy(12:i32, to_internal_i32ptr(p1, p2, p3, p4), codeOffset, codeLength) -} - -function returndatasize() -> z1, z2, z3, z4 { - z4 := i64.extend_i32_u(eth.getReturnDataSize()) -} - -function returndatacopy(x1, x2, x3, x4, y1, y2, y3, y4, z1, z2, z3, z4) { - eth.returnDataCopy( - to_internal_i32ptr(x1, x2, x3, x4), - u256_to_i32(y1, y2, y3, y4), - u256_to_i32(z1, z2, z3, z4) - ) -} - -function blockhash(x1, x2, x3, x4) -> z1, z2, z3, z4 { - let r:i32 := eth.getBlockHash(u256_to_i64(x1, x2, x3, x4), 0:i32) - if i32.eqz(r) { - z1, z2, z3, z4 := mload_internal(0:i32) - } -} - -function coinbase() -> z1, z2, z3, z4 { - eth.getBlockCoinbase(12:i32) - z1, z2, z3, z4 := mload_address(0:i32) -} - -function timestamp() -> z1, z2, z3, z4 { - z4 := eth.getBlockTimestamp() -} - -function number() -> z1, z2, z3, z4 { - z4 := eth.getBlockNumber() -} - -function difficulty() -> z1, z2, z3, z4 { - eth.getBlockDifficulty(0:i32) - z1 := i64.load(24:i32) - z2 := i64.load(16:i32) - z3 := i64.load(8:i32) - z4 := i64.load(0:i32) -} - -function gaslimit() -> z1, z2, z3, z4 { - z4 := eth.getBlockGasLimit() -} - -function mload(x1, x2, x3, x4) -> z1, z2, z3, z4 { - z1, z2, z3, z4 := mload_internal(to_internal_i32ptr(x1, x2, x3, x4)) -} - -function mstore(x1, x2, x3, x4, y1, y2, y3, y4) { - mstore_internal(to_internal_i32ptr(x1, x2, x3, x4), y1, y2, y3, y4) -} - -// Needed? -function msize() -> z1, z2, z3, z4 { - // TODO implement - unreachable() -} - -function sload(x1, x2, x3, x4) -> z1, z2, z3, z4 { - mstore_internal(0:i32, x1, x2, x3, x4) - eth.storageLoad(0:i32, 32:i32) - z1, z2, z3, z4 := mload_internal(32:i32) -} - -function sstore(x1, x2, x3, x4, y1, y2, y3, y4) { - mstore_internal(0:i32, x1, x2, x3, x4) - mstore_internal(32:i32, y1, y2, y3, y4) - eth.storageStore(0:i32, 32:i32) -} - -function gas() -> z1, z2, z3, z4 { - z4 := eth.getGasLeft() -} - -function log0(p1, p2, p3, p4, s1, s2, s3, s4) { - eth.log( - to_internal_i32ptr(p1, p2, p3, p4), - u256_to_i32(s1, s2, s3, s4), - 0:i32, 0:i32, 0:i32, 0:i32, 0:i32 - ) -} - -function log1( - p1, p2, p3, p4, s1, s2, s3, s4, - t1_1, t1_2, t1_3, t1_4 -) { - eth.log( - to_internal_i32ptr(p1, p2, p3, p4), - u256_to_i32(s1, s2, s3, s4), - 1:i32, - to_internal_i32ptr(t1_1, t1_2, t1_3, t1_4), - 0:i32, 0:i32, 0:i32 - ) -} - -function log2( - p1, p2, p3, p4, s1, s2, s3, s4, - t1_1, t1_2, t1_3, t1_4, - t2_1, t2_2, t2_3, t2_4 -) { - eth.log( - to_internal_i32ptr(p1, p2, p3, p4), - u256_to_i32(s1, s2, s3, s4), - 2:i32, - to_internal_i32ptr(t1_1, t1_2, t1_3, t1_4), - to_internal_i32ptr(t2_1, t2_2, t2_3, t2_4), - 0:i32, 0:i32 - ) -} - -function log3( - p1, p2, p3, p4, s1, s2, s3, s4, - t1_1, t1_2, t1_3, t1_4, - t2_1, t2_2, t2_3, t2_4, - t3_1, t3_2, t3_3, t3_4 -) { - eth.log( - to_internal_i32ptr(p1, p2, p3, p4), - u256_to_i32(s1, s2, s3, s4), - 3:i32, - to_internal_i32ptr(t1_1, t1_2, t1_3, t1_4), - to_internal_i32ptr(t2_1, t2_2, t2_3, t2_4), - to_internal_i32ptr(t3_1, t3_2, t3_3, t3_4), - 0:i32 - ) -} - -function log4( - p1, p2, p3, p4, s1, s2, s3, s4, - t1_1, t1_2, t1_3, t1_4, - t2_1, t2_2, t2_3, t2_4, - t3_1, t3_2, t3_3, t3_4, - t4_1, t4_2, t4_3, t4_4, -) { - eth.log( - to_internal_i32ptr(p1, p2, p3, p4), - u256_to_i32(s1, s2, s3, s4), - 4:i32, - to_internal_i32ptr(t1_1, t1_2, t1_3, t1_4), - to_internal_i32ptr(t2_1, t2_2, t2_3, t2_4), - to_internal_i32ptr(t3_1, t3_2, t3_3, t3_4), - to_internal_i32ptr(t4_1, t4_2, t4_3, t4_4) - ) -} - -function create( - x1, x2, x3, x4, - y1, y2, y3, y4, - z1, z2, z3, z4 -) -> a1, a2, a3, a4 { - let v1, v2 := u256_to_u128(x1, x2, x3, x4) - mstore_internal(0:i32, 0, 0, v1, v2) - - let r:i32 := eth.create(0:i32, to_internal_i32ptr(y1, y2, y3, y4), u256_to_i32(z1, z2, z3, z4), 32:i32) - if i32.eqz(r) { - a1, a2, a3, a4 := mload_internal(32:i32) - } -} - -function call( - a1, a2, a3, a4, - b1, b2, b3, b4, - c1, c2, c3, c4, - d1, d2, d3, d4, - e1, e2, e3, e4, - f1, f2, f3, f4, - g1, g2, g3, g4 -) -> x1, x2, x3, x4 { - let g := u256_to_i64(a1, a2, a3, a4) - mstore_address(0:i32, b1, b2, b3, b4) - - let v1, v2 := u256_to_u128(c1, c2, c3, c4) - mstore_internal(32:i32, 0, 0, v1, v2) - - x4 := i64.extend_i32_u(eth.call(g, 12:i32, 32:i32, to_internal_i32ptr(d1, d2, d3, d4), u256_to_i32(e1, e2, e3, e4))) -} - -function callcode( - a1, a2, a3, a4, - b1, b2, b3, b4, - c1, c2, c3, c4, - d1, d2, d3, d4, - e1, e2, e3, e4, - f1, f2, f3, f4, - g1, g2, g3, g4 -) -> x1, x2, x3, x4 { - mstore_address(0:i32, b1, b2, b3, b4) - - let v1, v2 := u256_to_u128(c1, c2, c3, c4) - mstore_internal(32:i32, 0, 0, v1, v2) - - x4 := i64.extend_i32_u(eth.callCode( - u256_to_i64(a1, a2, a3, a4), - 12:i32, - 32:i32, - to_internal_i32ptr(d1, d2, d3, d4), - u256_to_i32(e1, e2, e3, e4) - )) -} - -function delegatecall( - a1, a2, a3, a4, - b1, b2, b3, b4, - c1, c2, c3, c4, - d1, d2, d3, d4, - e1, e2, e3, e4, - f1, f2, f3, f4 -) -> x1, x2, x3, x4 { - mstore_address(0:i32, b1, b2, b3, b4) - - x4 := i64.extend_i32_u(eth.callDelegate( - u256_to_i64(a1, a2, a3, a4), - 12:i32, - to_internal_i32ptr(c1, c2, c3, c4), - u256_to_i32(d1, d2, d3, d4) - )) -} - -function staticcall( - a1, a2, a3, a4, - b1, b2, b3, b4, - c1, c2, c3, c4, - d1, d2, d3, d4, - e1, e2, e3, e4, - f1, f2, f3, f4 -) -> x1, x2, x3, x4 { - mstore_address(0:i32, b1, b2, b3, b4) - - x4 := i64.extend_i32_u(eth.callStatic( - u256_to_i64(a1, a2, a3, a4), - 12:i32, - to_internal_i32ptr(c1, c2, c3, c4), - u256_to_i32(d1, d2, d3, d4) - )) -} - -function create2( - a1, a2, a3, a4, - b1, b2, b3, b4, - c1, c2, c3, c4, - d1, d2, d3, d4 -) -> x1, x2, x3, x4 { - // TODO: not part of current Ewasm spec - unreachable() -} - -function selfdestruct(a1, a2, a3, a4) { - mstore_address(0:i32, a1, a2, a3, a4) - // In EVM, addresses are padded to 32 bytes, so discard the first 12. - eth.selfDestruct(12:i32) -} - -function return(x1, x2, x3, x4, y1, y2, y3, y4) { - eth.finish( - to_internal_i32ptr(x1, x2, x3, x4), - u256_to_i32(y1, y2, y3, y4) - ) -} - -function revert(x1, x2, x3, x4, y1, y2, y3, y4) { - eth.revert( - to_internal_i32ptr(x1, x2, x3, x4), - u256_to_i32(y1, y2, y3, y4) - ) -} - -function invalid() { - unreachable() -} - -function stop() { - eth.finish(0:i32, 0:i32) -} diff --git a/libyul/backends/wasm/polyfill/Keccak.yul b/libyul/backends/wasm/polyfill/Keccak.yul deleted file mode 100644 index 2dae23394101..000000000000 --- a/libyul/backends/wasm/polyfill/Keccak.yul +++ /dev/null @@ -1,24 +0,0 @@ -/* - This file is part of solidity. - - solidity is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - solidity is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with solidity. If not, see . -*/ -// SPDX-License-Identifier: GPL-3.0 - -// NOTE: This file is used to generate `ewasmPolyfills/Keccak.h`. - -function keccak256(x1, x2, x3, x4, y1, y2, y3, y4) -> z1, z2, z3, z4 { - // TODO implement - unreachable() -} diff --git a/libyul/backends/wasm/polyfill/Logical.yul b/libyul/backends/wasm/polyfill/Logical.yul deleted file mode 100644 index 8d297d3545e6..000000000000 --- a/libyul/backends/wasm/polyfill/Logical.yul +++ /dev/null @@ -1,31 +0,0 @@ -/* - This file is part of solidity. - - solidity is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - solidity is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with solidity. If not, see . -*/ -// SPDX-License-Identifier: GPL-3.0 - -// NOTE: This file is used to generate `ewasmPolyfills/Logical.h`. - -function or_bool(a, b, c, d) -> r:i32 { - r := i32.eqz(i64.eqz(i64.or(i64.or(a, b), i64.or(c, d)))) -} - -function or_bool_320(a, b, c, d, e) -> r:i32 { - r := i32.or(or_bool(a, b, c, 0), or_bool(d, e, 0, 0)) -} - -function or_bool_512(a, b, c, d, e, f, g, h) -> r:i32 { - r := i32.or(or_bool(a, b, c, d), or_bool(e, f, g, h)) -} diff --git a/libyul/backends/wasm/polyfill/Memory.yul b/libyul/backends/wasm/polyfill/Memory.yul deleted file mode 100644 index 410c42d8fa2b..000000000000 --- a/libyul/backends/wasm/polyfill/Memory.yul +++ /dev/null @@ -1,109 +0,0 @@ -/* - This file is part of solidity. - - solidity is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - solidity is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with solidity. If not, see . -*/ -// SPDX-License-Identifier: GPL-3.0 - -// NOTE: This file is used to generate `ewasmPolyfills/Memory.h`. - -function save_temp_mem_32() -> t1, t2, t3, t4 { - t1 := i64.load(0:i32) - t2 := i64.load(8:i32) - t3 := i64.load(16:i32) - t4 := i64.load(24:i32) -} - -function restore_temp_mem_32(t1, t2, t3, t4) { - i64.store(0:i32, t1) - i64.store(8:i32, t2) - i64.store(16:i32, t3) - i64.store(24:i32, t4) -} - -function save_temp_mem_64() -> t1, t2, t3, t4, t5, t6, t7, t8 { - t1 := i64.load(0:i32) - t2 := i64.load(8:i32) - t3 := i64.load(16:i32) - t4 := i64.load(24:i32) - t5 := i64.load(32:i32) - t6 := i64.load(40:i32) - t7 := i64.load(48:i32) - t8 := i64.load(54:i32) -} - -function restore_temp_mem_64(t1, t2, t3, t4, t5, t6, t7, t8) { - i64.store(0:i32, t1) - i64.store(8:i32, t2) - i64.store(16:i32, t3) - i64.store(24:i32, t4) - i64.store(32:i32, t5) - i64.store(40:i32, t6) - i64.store(48:i32, t7) - i64.store(54:i32, t8) -} - -function pop(x1, x2, x3, x4) { -} - -function memoryguard(x:i64) -> y1, y2, y3, y4 { - y4 := x -} - -// Fill `length` bytes starting from `ptr` with `value`. -function memset(ptr:i32, value:i32, length:i32) { - for { let i:i32 := 0:i32 } i32.lt_u(i, length) { i := i32.add(i, 1:i32) } - { - i32.store8(i32.add(ptr, i), value) - } -} - -// Writes 256-bits from `pos`, but only set the bottom 160-bits. -function mstore_address(pos:i32, a1, a2, a3, a4) { - a1, a2, a3 := u256_to_address(a1, a2, a3, a4) - i64.store(pos, 0:i64) - i32.store(i32.add(pos, 8:i32), 0:i32) - i32.store(i32.add(pos, 12:i32), bswap32(i32.wrap_i64(a1))) - i64.store(i32.add(pos, 16:i32), bswap64(a2)) - i64.store(i32.add(pos, 24:i32), bswap64(a3)) -} - -// Reads 256-bits from `pos`, but only returns the bottom 160-bits. -function mload_address(pos:i32) -> z1, z2, z3, z4 { - z2 := i64.extend_i32_u(bswap32(i32.load(i32.add(pos, 12:i32)))) - z3 := bswap64(i64.load(i32.add(pos, 16:i32))) - z4 := bswap64(i64.load(i32.add(pos, 24:i32))) -} - -// Writes 256-bits from `pos`. -function mstore_internal(pos:i32, y1, y2, y3, y4) { - i64.store(pos, bswap64(y1)) - i64.store(i32.add(pos, 8:i32), bswap64(y2)) - i64.store(i32.add(pos, 16:i32), bswap64(y3)) - i64.store(i32.add(pos, 24:i32), bswap64(y4)) -} - -// Reads 256-bits from `pos`. -function mload_internal(pos:i32) -> z1, z2, z3, z4 { - z1 := bswap64(i64.load(pos)) - z2 := bswap64(i64.load(i32.add(pos, 8:i32))) - z3 := bswap64(i64.load(i32.add(pos, 16:i32))) - z4 := bswap64(i64.load(i32.add(pos, 24:i32))) -} - -// Stores one byte at position `x` of value `y`. -function mstore8(x1, x2, x3, x4, y1, y2, y3, y4) { - let v := u256_to_byte(y1, y2, y3, y4) - i64.store8(to_internal_i32ptr(x1, x2, x3, x4), v) -} diff --git a/libyul/optimiser/Suite.cpp b/libyul/optimiser/Suite.cpp index 0641328f141e..e29112b01d80 100644 --- a/libyul/optimiser/Suite.cpp +++ b/libyul/optimiser/Suite.cpp @@ -70,7 +70,6 @@ #include #include -#include #include #include @@ -212,13 +211,6 @@ void OptimiserSuite::run( else if (evmDialect->providesObjectAccess() && _optimizeStackAllocation) StackLimitEvader::run(suite.m_context, _object); } - else if (dynamic_cast(&_dialect)) - { - // If the first statement is an empty block, remove it. - // We should only have function definitions after that. - if (ast.statements.size() > 1 && std::get(ast.statements.front()).statements.empty()) - ast.statements.erase(ast.statements.begin()); - } dispenser.reset(ast); NameSimplifier::run(suite.m_context, ast); diff --git a/solc/CommandLineInterface.cpp b/solc/CommandLineInterface.cpp index 7da0d3bf1b1a..0f45f519630e 100644 --- a/solc/CommandLineInterface.cpp +++ b/solc/CommandLineInterface.cpp @@ -239,29 +239,6 @@ void CommandLineInterface::handleIROptimized(string const& _contractName) } } -void CommandLineInterface::handleEwasm(string const& _contractName) -{ - solAssert(CompilerInputModes.count(m_options.input.mode) == 1); - - if (!m_options.compiler.outputs.ewasm) - return; - - if (!m_options.output.dir.empty()) - { - createFile(m_compiler->filesystemFriendlyName(_contractName) + ".wast", m_compiler->ewasm(_contractName)); - createFile( - m_compiler->filesystemFriendlyName(_contractName) + ".wasm", - asString(m_compiler->ewasmObject(_contractName).bytecode) - ); - } - else - { - sout() << "Ewasm text:" << endl; - sout() << m_compiler->ewasm(_contractName) << endl; - sout() << "Ewasm binary (hex): " << m_compiler->ewasmObject(_contractName).toHex() << endl; - } -} - void CommandLineInterface::handleBytecode(string const& _contract) { solAssert(CompilerInputModes.count(m_options.input.mode) == 1); @@ -715,7 +692,6 @@ void CommandLineInterface::compile() // TODO: Perhaps we should not compile unless requested m_compiler->enableIRGeneration(m_options.compiler.outputs.ir || m_options.compiler.outputs.irOptimized); - m_compiler->enableEwasmGeneration(m_options.compiler.outputs.ewasm); m_compiler->enableEvmBytecodeGeneration( m_options.compiler.estimateGas || m_options.compiler.outputs.asm_ || @@ -1082,9 +1058,8 @@ void CommandLineInterface::assembleYul(yul::YulStack::Language _language, yul::Y for (auto const& src: m_fileReader.sourceUnits()) { - string machine = - _targetMachine == yul::YulStack::Machine::EVM ? "EVM" : - "Ewasm"; + solAssert(_targetMachine == yul::YulStack::Machine::EVM); + string machine = "EVM"; sout() << endl << "======= " << src.first << " (" << machine << ") =======" << endl; yul::YulStack& stack = yulStacks[src.first]; @@ -1097,19 +1072,6 @@ void CommandLineInterface::assembleYul(yul::YulStack::Language _language, yul::Y sout() << stack.print() << endl; } - if (_language != yul::YulStack::Language::Ewasm && _targetMachine == yul::YulStack::Machine::Ewasm) - { - stack.translate(yul::YulStack::Language::Ewasm); - stack.optimize(); - - if (m_options.compiler.outputs.ewasmIR) - { - sout() << endl << "==========================" << endl; - sout() << endl << "Translated source:" << endl; - sout() << stack.print() << endl; - } - } - yul::MachineAssemblyObject object; object = stack.assemble(_targetMachine); object.bytecode->link(m_options.linker.libraries); @@ -1123,11 +1085,8 @@ void CommandLineInterface::assembleYul(yul::YulStack::Language _language, yul::Y serr() << "No binary representation found." << endl; } - solAssert(_targetMachine == yul::YulStack::Machine::Ewasm || _targetMachine == yul::YulStack::Machine::EVM, ""); - if ( - (_targetMachine == yul::YulStack::Machine::EVM && m_options.compiler.outputs.asm_) || - (_targetMachine == yul::YulStack::Machine::Ewasm && m_options.compiler.outputs.ewasm) - ) + solAssert(_targetMachine == yul::YulStack::Machine::EVM, ""); + if (m_options.compiler.outputs.asm_) { sout() << endl << "Text representation:" << endl; if (!object.assembly.empty()) @@ -1183,7 +1142,6 @@ void CommandLineInterface::outputCompilationResults() handleBytecode(contract); handleIR(contract); handleIROptimized(contract); - handleEwasm(contract); handleSignatureHashes(contract); handleMetadata(contract); handleABI(contract); diff --git a/solc/CommandLineInterface.h b/solc/CommandLineInterface.h index 80b4bee6fb2c..b6d7f92a8c63 100644 --- a/solc/CommandLineInterface.h +++ b/solc/CommandLineInterface.h @@ -102,7 +102,6 @@ class CommandLineInterface void handleOpcode(std::string const& _contract); void handleIR(std::string const& _contract); void handleIROptimized(std::string const& _contract); - void handleEwasm(std::string const& _contract); void handleBytecode(std::string const& _contract); void handleSignatureHashes(std::string const& _contract); void handleMetadata(std::string const& _contract); diff --git a/solc/CommandLineParser.cpp b/solc/CommandLineParser.cpp index a3e7829660f1..1f11fc57c0d7 100644 --- a/solc/CommandLineParser.cpp +++ b/solc/CommandLineParser.cpp @@ -46,7 +46,6 @@ static string const g_strCombinedJson = "combined-json"; static string const g_strErrorRecovery = "error-recovery"; static string const g_strEVM = "evm"; static string const g_strEVMVersion = "evm-version"; -static string const g_strEwasm = "ewasm"; static string const g_strEOFVersion = "experimental-eof-version"; static string const g_strViaIR = "via-ir"; static string const g_strExperimentalViaIR = "experimental-via-ir"; @@ -114,15 +113,13 @@ static string const g_strErrorIds = "error-codes"; /// Possible arguments to for --machine static set const g_machineArgs { - g_strEVM, - g_strEwasm + g_strEVM }; /// Possible arguments to for --yul-dialect static set const g_yulDialectArgs { - g_strEVM, - g_strEwasm + g_strEVM }; /// Possible arguments to for --metadata-hash @@ -460,13 +457,11 @@ void CommandLineParser::parseOutputSelection() CompilerOutputs::componentMap() | ranges::views::keys | ranges::to() - ) - set{CompilerOutputs::componentName(&CompilerOutputs::ewasmIR)}; + ); static set const assemblerModeOutputs = { CompilerOutputs::componentName(&CompilerOutputs::asm_), CompilerOutputs::componentName(&CompilerOutputs::binary), - CompilerOutputs::componentName(&CompilerOutputs::irOptimized), - CompilerOutputs::componentName(&CompilerOutputs::ewasm), - CompilerOutputs::componentName(&CompilerOutputs::ewasmIR), + CompilerOutputs::componentName(&CompilerOutputs::irOptimized) }; switch (_mode) @@ -499,8 +494,6 @@ void CommandLineParser::parseOutputSelection() m_options.compiler.outputs.asm_ = true; m_options.compiler.outputs.binary = true; m_options.compiler.outputs.irOptimized = true; - m_options.compiler.outputs.ewasm = true; - m_options.compiler.outputs.ewasmIR = true; } vector unsupportedOutputs; @@ -743,8 +736,6 @@ General Information)").c_str(), (CompilerOutputs::componentName(&CompilerOutputs::abi).c_str(), "ABI specification of the contracts.") (CompilerOutputs::componentName(&CompilerOutputs::ir).c_str(), "Intermediate Representation (IR) of all contracts.") (CompilerOutputs::componentName(&CompilerOutputs::irOptimized).c_str(), "Optimized intermediate Representation (IR) of all contracts.") - (CompilerOutputs::componentName(&CompilerOutputs::ewasm).c_str(), "Ewasm text representation of all contracts (EXPERIMENTAL).") - (CompilerOutputs::componentName(&CompilerOutputs::ewasmIR).c_str(), "Intermediate representation (IR) converted to a form that can be translated directly into Ewasm text representation (EXPERIMENTAL).") (CompilerOutputs::componentName(&CompilerOutputs::signatureHashes).c_str(), "Function signature hashes of the contracts.") (CompilerOutputs::componentName(&CompilerOutputs::natspecUser).c_str(), "Natspec user documentation of all contracts.") (CompilerOutputs::componentName(&CompilerOutputs::natspecDev).c_str(), "Natspec developer documentation of all contracts.") @@ -1001,8 +992,6 @@ void CommandLineParser::processArgs() CompilerOutputs::componentName(&CompilerOutputs::binary), CompilerOutputs::componentName(&CompilerOutputs::ir), CompilerOutputs::componentName(&CompilerOutputs::irOptimized), - CompilerOutputs::componentName(&CompilerOutputs::ewasm), - CompilerOutputs::componentName(&CompilerOutputs::ewasmIR), g_strGas, CompilerOutputs::componentName(&CompilerOutputs::asm_), CompilerOutputs::componentName(&CompilerOutputs::asmJson), @@ -1215,42 +1204,22 @@ void CommandLineParser::processArgs() string machine = m_args[g_strMachine].as(); if (machine == g_strEVM) m_options.assembly.targetMachine = Machine::EVM; - else if (machine == g_strEwasm) - m_options.assembly.targetMachine = Machine::Ewasm; else solThrow(CommandLineValidationError, "Invalid option for --" + g_strMachine + ": " + machine); } - if (m_options.assembly.targetMachine == Machine::Ewasm && m_options.assembly.inputLanguage == Input::StrictAssembly) - m_options.assembly.inputLanguage = Input::Ewasm; if (m_args.count(g_strYulDialect)) { string dialect = m_args[g_strYulDialect].as(); if (dialect == g_strEVM) m_options.assembly.inputLanguage = Input::StrictAssembly; - else if (dialect == g_strEwasm) - { - m_options.assembly.inputLanguage = Input::Ewasm; - if (m_options.assembly.targetMachine != Machine::Ewasm) - solThrow( - CommandLineValidationError, - "If you select Ewasm as --" + g_strYulDialect + ", " - "--" + g_strMachine + " has to be Ewasm as well." - ); - } else solThrow(CommandLineValidationError, "Invalid option for --" + g_strYulDialect + ": " + dialect); } - if (m_options.optimizer.enabled && (m_options.assembly.inputLanguage != Input::StrictAssembly && m_options.assembly.inputLanguage != Input::Ewasm)) + if (m_options.optimizer.enabled && (m_options.assembly.inputLanguage != Input::StrictAssembly)) solThrow( CommandLineValidationError, "Optimizer can only be used for strict assembly. Use --" + g_strStrictAssembly + "." ); - if (m_options.assembly.targetMachine == Machine::Ewasm && m_options.assembly.inputLanguage != Input::StrictAssembly && m_options.assembly.inputLanguage != Input::Ewasm) - solThrow( - CommandLineValidationError, - "The selected input language is not directly supported when targeting the Ewasm machine " - "and automatic translation is not available." - ); return; } else if (countEnabledOptions({g_strYulDialect, g_strMachine}) >= 1) diff --git a/solc/CommandLineParser.h b/solc/CommandLineParser.h index 51efc9e40828..9bfae034625e 100644 --- a/solc/CommandLineParser.h +++ b/solc/CommandLineParser.h @@ -78,8 +78,6 @@ struct CompilerOutputs {"abi", &CompilerOutputs::abi}, {"ir", &CompilerOutputs::ir}, {"ir-optimized", &CompilerOutputs::irOptimized}, - {"ewasm", &CompilerOutputs::ewasm}, - {"ewasm-ir", &CompilerOutputs::ewasmIR}, {"hashes", &CompilerOutputs::signatureHashes}, {"userdoc", &CompilerOutputs::natspecUser}, {"devdoc", &CompilerOutputs::natspecDev}, @@ -98,8 +96,6 @@ struct CompilerOutputs bool abi = false; bool ir = false; bool irOptimized = false; - bool ewasm = false; - bool ewasmIR = false; bool signatureHashes = false; bool natspecUser = false; bool natspecDev = false; diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 9a2c78fd8c1b..9a3fa84b490f 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -135,8 +135,6 @@ set(libyul_sources libyul/ControlFlowSideEffectsTest.h libyul/EVMCodeTransformTest.cpp libyul/EVMCodeTransformTest.h - libyul/EwasmTranslationTest.cpp - libyul/EwasmTranslationTest.h libyul/FunctionSideEffects.cpp libyul/FunctionSideEffects.h libyul/Inliner.cpp diff --git a/test/Common.cpp b/test/Common.cpp index 3af23c782783..72e4d13e8f6f 100644 --- a/test/Common.cpp +++ b/test/Common.cpp @@ -108,13 +108,11 @@ void CommonOptions::addOptions() ("eof-version", po::value()->implicit_value(1u), "which EOF version to use") ("testpath", po::value(&this->testPath)->default_value(solidity::test::testPath()), "path to test files") ("vm", po::value>(&vmPaths), "path to evmc library, can be supplied multiple times.") - ("ewasm", po::bool_switch(&ewasm)->default_value(ewasm), "tries to automatically find an ewasm vm and enable ewasm test-execution.") ("batches", po::value(&this->batches)->default_value(1), "set number of batches to split the tests into") ("selected-batch", po::value(&this->selectedBatch)->default_value(0), "zero-based number of batch to execute") ("no-semantic-tests", po::bool_switch(&disableSemanticTests)->default_value(disableSemanticTests), "disable semantic tests") ("no-smt", po::bool_switch(&disableSMT)->default_value(disableSMT), "disable SMT checker") ("optimize", po::bool_switch(&optimize)->default_value(optimize), "enables optimization") - ("enforce-compile-to-ewasm", po::bool_switch(&enforceCompileToEwasm)->default_value(enforceCompileToEwasm), "Enforce compiling all tests to Ewasm to see if additional tests can be activated.") ("enforce-gas-cost", po::value(&enforceGasTest)->default_value(enforceGasTest)->implicit_value(true), "Enforce checking gas cost in semantic tests.") ("enforce-gas-cost-min-value", po::value(&enforceGasTestMinValue)->default_value(enforceGasTestMinValue), "Threshold value to enforce adding gas checks to a test.") ("abiencoderv1", po::bool_switch(&useABIEncoderV1)->default_value(useABIEncoderV1), "enables abi encoder v1") @@ -209,14 +207,6 @@ bool CommonOptions::parse(int argc, char const* const* argv) vmPaths.emplace_back(*repoPath); else vmPaths.emplace_back(evmoneFilename); - if (ewasm) { - if (auto envPath = getenv("ETH_HERA")) - vmPaths.emplace_back(envPath); - else if (auto repoPath = findInDefaultPath(heraFilename)) - vmPaths.emplace_back(*repoPath); - else - vmPaths.emplace_back(heraFilename); - } } return true; @@ -234,8 +224,6 @@ string CommonOptions::toString(vector const& _selectedOptions) const {"optimize", boolToString(optimize)}, {"useABIEncoderV1", boolToString(useABIEncoderV1)}, {"batch", to_string(selectedBatch + 1) + "/" + to_string(batches)}, - {"ewasm", boolToString(ewasm)}, - {"enforceCompileToEwasm", boolToString(enforceCompileToEwasm)}, {"enforceGasTest", boolToString(enforceGasTest)}, {"enforceGasTestMinValue", enforceGasTestMinValue.str()}, {"disableSemanticTests", boolToString(disableSemanticTests)}, @@ -303,10 +291,10 @@ bool isValidSemanticTestPath(boost::filesystem::path const& _testPath) bool loadVMs(CommonOptions const& _options) { - if (_options.disableSemanticTests && !_options.ewasm) + if (_options.disableSemanticTests) return true; - auto [evmSupported, ewasmSupported] = solidity::test::EVMHost::checkVmPaths(_options.vmPaths); + bool evmSupported = solidity::test::EVMHost::checkVmPaths(_options.vmPaths); if (!_options.disableSemanticTests && !evmSupported) { std::cerr << "Unable to find " << solidity::test::evmoneFilename; @@ -315,14 +303,6 @@ bool loadVMs(CommonOptions const& _options) std::cerr << solidity::test::evmoneDownloadLink << std::endl; return false; } - if (_options.ewasm && !ewasmSupported) - { - std::cerr << "Unable to find " << solidity::test::heraFilename; - std::cerr << ". To be able to enable ewasm tests, please provide the path using --vm ." << std::endl; - std::cerr << "You can download it at" << std::endl; - std::cerr << solidity::test::heraDownloadLink << std::endl; - return false; - } return true; } diff --git a/test/Common.h b/test/Common.h index 468e5af645d3..d82ff9c6b71f 100644 --- a/test/Common.h +++ b/test/Common.h @@ -34,18 +34,12 @@ namespace solidity::test #ifdef _WIN32 static constexpr auto evmoneFilename = "evmone.dll"; static constexpr auto evmoneDownloadLink = "https://github.com/ethereum/evmone/releases/download/v0.10.0/evmone-0.10.0-windows-amd64.zip"; -static constexpr auto heraFilename = "hera.dll"; -static constexpr auto heraDownloadLink = "https://github.com/ewasm/hera/archive/v0.6.0.tar.gz"; #elif defined(__APPLE__) static constexpr auto evmoneFilename = "libevmone.dylib"; static constexpr auto evmoneDownloadLink = "https://github.com/ethereum/evmone/releases/download/v0.10.0/evmone-0.10.0-darwin-x86_64.tar.gz"; -static constexpr auto heraFilename = "libhera.dylib"; -static constexpr auto heraDownloadLink = "https://github.com/ewasm/hera/releases/download/v0.6.0/hera-0.6.0-darwin-x86_64.tar.gz"; #else static constexpr auto evmoneFilename = "libevmone.so"; static constexpr auto evmoneDownloadLink = "https://github.com/ethereum/evmone/releases/download/v0.10.0/evmone-0.10.0-linux-x86_64.tar.gz"; -static constexpr auto heraFilename = "libhera.so"; -static constexpr auto heraDownloadLink = "https://github.com/ewasm/hera/releases/download/v0.6.0/hera-0.6.0-linux-x86_64.tar.gz"; #endif struct ConfigException: public util::Exception {}; @@ -58,9 +52,7 @@ struct CommonOptions std::vector vmPaths; boost::filesystem::path testPath; - bool ewasm = false; bool optimize = false; - bool enforceCompileToEwasm = false; bool enforceGasTest = false; u256 enforceGasTestMinValue = 100000; bool disableSemanticTests = false; diff --git a/test/EVMHost.cpp b/test/EVMHost.cpp index 132ce2bebadb..81005547d2de 100644 --- a/test/EVMHost.cpp +++ b/test/EVMHost.cpp @@ -47,10 +47,10 @@ evmc::VM& EVMHost::getVM(string const& _path) auto vm = evmc::VM{evmc_load_and_configure(_path.c_str(), &errorCode)}; if (vm && errorCode == EVMC_LOADER_SUCCESS) { - if (vm.get_capabilities() & (EVMC_CAPABILITY_EVM1 | EVMC_CAPABILITY_EWASM)) + if (vm.get_capabilities() & (EVMC_CAPABILITY_EVM1)) vms[_path] = make_unique(evmc::VM(std::move(vm))); else - cerr << "VM loaded neither supports EVM1 nor EWASM" << endl; + cerr << "VM loaded does not support EVM1" << endl; } else { @@ -67,10 +67,9 @@ evmc::VM& EVMHost::getVM(string const& _path) return NullVM; } -std::tuple EVMHost::checkVmPaths(vector const& _vmPaths) +bool EVMHost::checkVmPaths(vector const& _vmPaths) { bool evmVmFound = false; - bool ewasmVmFound = false; for (auto const& path: _vmPaths) { evmc::VM& vm = EVMHost::getVM(path.string()); @@ -83,15 +82,8 @@ std::tuple EVMHost::checkVmPaths(vector con BOOST_THROW_EXCEPTION(runtime_error("Multiple evm1 evmc vms defined. Please only define one evm1 evmc vm.")); evmVmFound = true; } - - if (vm.has_capability(EVMC_CAPABILITY_EWASM)) - { - if (ewasmVmFound) - BOOST_THROW_EXCEPTION(runtime_error("Multiple ewasm evmc vms where defined. Please only define one ewasm evmc vm.")); - ewasmVmFound = true; - } } - return {evmVmFound, ewasmVmFound}; + return evmVmFound; } EVMHost::EVMHost(langutil::EVMVersion _evmVersion, evmc::VM& _vm): diff --git a/test/EVMHost.h b/test/EVMHost.h index 61b4c3c71c8f..967adc2486aa 100644 --- a/test/EVMHost.h +++ b/test/EVMHost.h @@ -65,16 +65,15 @@ class EVMHost: public evmc::MockedHost // Solidity testing specific features. - /// Tries to dynamically load an evmc vm supporting evm1 or ewasm and caches the loaded VM. + /// Tries to dynamically load an evmc vm supporting evm1 and caches the loaded VM. /// @returns vmc::VM(nullptr) on failure. static evmc::VM& getVM(std::string const& _path = {}); /// Tries to load all defined evmc vm shared libraries. /// @param _vmPaths paths to multiple evmc shared libraries. - /// @throw Exception if multiple evm1 or multiple ewasm evmc vms where loaded. - /// @returns A pair of booleans, the first element being true, if an evmc vm supporting evm1 was loaded properly, - /// the second being true, if an evmc vm supporting ewasm was loaded properly. - static std::tuple checkVmPaths(std::vector const& _vmPaths); + /// @throw Exception if multiple evm1 vms where loaded. + /// @returns true, if an evmc vm supporting evm1 was loaded properly, + static bool checkVmPaths(std::vector const& _vmPaths); explicit EVMHost(langutil::EVMVersion _evmVersion, evmc::VM& _vm); diff --git a/test/ExecutionFramework.cpp b/test/ExecutionFramework.cpp index 0b7c6ea80caf..a18a73de06b8 100644 --- a/test/ExecutionFramework.cpp +++ b/test/ExecutionFramework.cpp @@ -60,11 +60,6 @@ ExecutionFramework::ExecutionFramework(langutil::EVMVersion _evmVersion, vector< { if (solidity::test::CommonOptions::get().optimize) m_optimiserSettings = solidity::frontend::OptimiserSettings::standard(); - - for (auto const& path: m_vmPaths) - if (EVMHost::getVM(path.string()).has_capability(EVMC_CAPABILITY_EWASM)) - m_supportsEwasm = true; - selectVM(evmc_capabilities::EVMC_CAPABILITY_EVM1); } diff --git a/test/ExecutionFramework.h b/test/ExecutionFramework.h index b39751142847..27ceb4f28033 100644 --- a/test/ExecutionFramework.h +++ b/test/ExecutionFramework.h @@ -295,7 +295,6 @@ class ExecutionFramework solidity::frontend::RevertStrings m_revertStrings = solidity::frontend::RevertStrings::Default; solidity::frontend::OptimiserSettings m_optimiserSettings = solidity::frontend::OptimiserSettings::minimal(); bool m_showMessages = false; - bool m_supportsEwasm = false; std::unique_ptr m_evmcHost; std::vector m_vmPaths; diff --git a/test/InteractiveTests.h b/test/InteractiveTests.h index e58beabbf8e4..9e054c109c5d 100644 --- a/test/InteractiveTests.h +++ b/test/InteractiveTests.h @@ -28,7 +28,6 @@ #include #include #include -#include #include #include #include @@ -78,7 +77,6 @@ Testsuite const g_interactiveTestsuites[] = { {"SMT Checker", "libsolidity", "smtCheckerTests", true, false, &SMTCheckerTest::create}, {"Gas Estimates", "libsolidity", "gasTests", false, false, &GasTest::create}, {"Memory Guard Tests", "libsolidity", "memoryGuardTests", false, false, &MemoryGuardTest::create}, - {"Ewasm Translation", "libyul", "ewasmTranslationTests", false, false, &yul::test::EwasmTranslationTest::create} }; } diff --git a/test/TestCase.h b/test/TestCase.h index 7a5c75c50209..f631bea8dce3 100644 --- a/test/TestCase.h +++ b/test/TestCase.h @@ -41,7 +41,6 @@ class TestCase langutil::EVMVersion evmVersion; std::optional eofVersion; std::vector vmPaths; - bool enforceCompileToEwasm = false; bool enforceGasCost = false; u256 enforceGasCostMinValue; }; diff --git a/test/cmdlineTests.sh b/test/cmdlineTests.sh index ce9af142fc76..c492f529092a 100755 --- a/test/cmdlineTests.sh +++ b/test/cmdlineTests.sh @@ -209,8 +209,6 @@ EOF sed -i.bak -E -e 's/([0-9a-f]{34}\$__)[0-9a-f]+(__\$[0-9a-f]{17})/\1\2/g' "$stdout_path" # Remove metadata in assembly output (see below about the magic numbers) sed -i.bak -E -e 's/"[0-9a-f]+64697066735822[0-9a-f]+64736f6c63[0-9a-f]+/"/g' "$stdout_path" - # Remove hash of text representation in ewasm - sed -i.bak -E -e 's/The Keccak-256 hash of the text representation of .*: [0-9a-f]+/The Keccak-256 hash of the text representation of /g' "$stdout_path" # Replace escaped newlines by actual newlines for readability # shellcheck disable=SC1003 diff --git a/test/cmdlineTests/evm_to_wasm/args b/test/cmdlineTests/evm_to_wasm/args deleted file mode 100644 index 099ebdc3a380..000000000000 --- a/test/cmdlineTests/evm_to_wasm/args +++ /dev/null @@ -1 +0,0 @@ ---assemble --optimize --yul-dialect evm --machine ewasm diff --git a/test/cmdlineTests/evm_to_wasm/input.yul b/test/cmdlineTests/evm_to_wasm/input.yul deleted file mode 100644 index f21cd2b7e038..000000000000 --- a/test/cmdlineTests/evm_to_wasm/input.yul +++ /dev/null @@ -1,3 +0,0 @@ -{ - sstore(0, 1) -} diff --git a/test/cmdlineTests/evm_to_wasm/output b/test/cmdlineTests/evm_to_wasm/output deleted file mode 100644 index fa454f80f7e9..000000000000 --- a/test/cmdlineTests/evm_to_wasm/output +++ /dev/null @@ -1,96 +0,0 @@ - -======= evm_to_wasm/input.yul (Ewasm) ======= - -Pretty printed source: -object "object" { - code { { sstore(0, 1) } } -} - - -========================== - -Translated source: -object "object" { - code { - function main() - { - let hi := i64.shl(i64.extend_i32_u(bswap32(i32.wrap_i64(0))), 32) - let y := i64.or(hi, i64.extend_i32_u(bswap32(i32.wrap_i64(i64.shr_u(0, 32))))) - i64.store(0:i32, y) - i64.store(i32.add(0:i32, 8:i32), y) - i64.store(i32.add(0:i32, 16:i32), y) - i64.store(i32.add(0:i32, 24:i32), y) - i64.store(32:i32, y) - i64.store(i32.add(32:i32, 8:i32), y) - i64.store(i32.add(32:i32, 16:i32), y) - let hi_1 := i64.shl(i64.extend_i32_u(bswap32(i32.wrap_i64(1))), 32) - i64.store(i32.add(32:i32, 24:i32), i64.or(hi_1, i64.extend_i32_u(bswap32(i32.wrap_i64(i64.shr_u(1, 32)))))) - eth.storageStore(0:i32, 32:i32) - } - function bswap16(x:i32) -> y:i32 - { - y := i32.or(i32.and(i32.shl(x, 8:i32), 0xff00:i32), i32.and(i32.shr_u(x, 8:i32), 0xff:i32)) - } - function bswap32(x:i32) -> y:i32 - { - let hi:i32 := i32.shl(bswap16(x), 16:i32) - y := i32.or(hi, bswap16(i32.shr_u(x, 16:i32))) - } - } -} - - -Binary representation: -0061736d01000000010e0360000060017f017f60027f7f0002190108657468657265756d0c73746f7261676553746f726500020304030001010503010001060100071102066d656d6f72790200046d61696e00010ac70103850101037e02404200a71003ad422086210020004200422088a71003ad84210141002001370000410041086a2001370000410041106a2001370000410041186a200137000041202001370000412041086a2001370000412041106a20013700004201a71003ad4220862102412041186a20024201422088a71003ad843700004100412010000b0b1f01017f024020004108744180fe0371200041087641ff01717221010b20010b1e01027f02402000100241107421022002200041107610027221010b20010b - -Text representation: -(module - (import "ethereum" "storageStore" (func $eth.storageStore (param i32 i32))) - (memory $memory (export "memory") 1) - (export "main" (func $main)) - -(func $main - (local $hi i64) - (local $y i64) - (local $hi_1 i64) - (block $label_ - (local.set $hi (i64.shl (i64.extend_i32_u (call $bswap32 (i32.wrap_i64 (i64.const 0)))) (i64.const 32))) - (local.set $y (i64.or (local.get $hi) (i64.extend_i32_u (call $bswap32 (i32.wrap_i64 (i64.shr_u (i64.const 0) (i64.const 32))))))) - (i64.store (i32.const 0) (local.get $y)) - (i64.store (i32.add (i32.const 0) (i32.const 8)) (local.get $y)) - (i64.store (i32.add (i32.const 0) (i32.const 16)) (local.get $y)) - (i64.store (i32.add (i32.const 0) (i32.const 24)) (local.get $y)) - (i64.store (i32.const 32) (local.get $y)) - (i64.store (i32.add (i32.const 32) (i32.const 8)) (local.get $y)) - (i64.store (i32.add (i32.const 32) (i32.const 16)) (local.get $y)) - (local.set $hi_1 (i64.shl (i64.extend_i32_u (call $bswap32 (i32.wrap_i64 (i64.const 1)))) (i64.const 32))) - (i64.store (i32.add (i32.const 32) (i32.const 24)) (i64.or (local.get $hi_1) (i64.extend_i32_u (call $bswap32 (i32.wrap_i64 (i64.shr_u (i64.const 1) (i64.const 32))))))) - (call $eth.storageStore (i32.const 0) (i32.const 32)) - ) -) - -(func $bswap16 - (param $x i32) - (result i32) - (local $y i32) - (block $label__1 - (local.set $y (i32.or (i32.and (i32.shl (local.get $x) (i32.const 8)) (i32.const 65280)) (i32.and (i32.shr_u (local.get $x) (i32.const 8)) (i32.const 255)))) - - ) - (local.get $y) -) - -(func $bswap32 - (param $x i32) - (result i32) - (local $y i32) - (local $hi i32) - (block $label__2 - (local.set $hi (i32.shl (call $bswap16 (local.get $x)) (i32.const 16))) - (local.set $y (i32.or (local.get $hi) (call $bswap16 (i32.shr_u (local.get $x) (i32.const 16))))) - - ) - (local.get $y) -) - -) diff --git a/test/cmdlineTests/evm_to_wasm_break/args b/test/cmdlineTests/evm_to_wasm_break/args deleted file mode 100644 index 099ebdc3a380..000000000000 --- a/test/cmdlineTests/evm_to_wasm_break/args +++ /dev/null @@ -1 +0,0 @@ ---assemble --optimize --yul-dialect evm --machine ewasm diff --git a/test/cmdlineTests/evm_to_wasm_break/input.yul b/test/cmdlineTests/evm_to_wasm_break/input.yul deleted file mode 100644 index a625eea088e1..000000000000 --- a/test/cmdlineTests/evm_to_wasm_break/input.yul +++ /dev/null @@ -1,8 +0,0 @@ -{ - let x := calldataload(0) - for { } lt(x, 10) { x := add(x, 1) } { - if eq(x, 2) { break } - if eq(x, 4) { continue } - } - sstore(0, x) -} diff --git a/test/cmdlineTests/evm_to_wasm_break/output b/test/cmdlineTests/evm_to_wasm_break/output deleted file mode 100644 index 01a4cbb411aa..000000000000 --- a/test/cmdlineTests/evm_to_wasm_break/output +++ /dev/null @@ -1,583 +0,0 @@ - -======= evm_to_wasm_break/input.yul (Ewasm) ======= - -Pretty printed source: -object "object" { - code { - { - let x := calldataload(0) - for { } lt(x, 10) { x := add(x, 1) } - { - if eq(x, 2) { break } - if eq(x, 4) { continue } - } - sstore(0, x) - } - } -} - - -========================== - -Translated source: -object "object" { - code { - function main() - { - let x, x_1, x_2, x_3 := calldataload() - let x_4 := x - let x_5 := x_1 - let x_6 := x_2 - let x_7 := x_3 - let _1:i32 := i32.eqz(i32.eqz(i64.eqz(i64.or(i64.or(0, 0), i64.or(0, 1))))) - for { } - i32.eqz(_1) - { - let x_8, x_9, x_10, x_11 := add(x_4, x_5, x_6, x_7) - x_4 := x_8 - x_5 := x_9 - x_6 := x_10 - x_7 := x_11 - } - { - let _2, _3, _4, _5 := iszero_1324_2108(lt(x_4, x_5, x_6, x_7)) - if i32.eqz(i64.eqz(i64.or(i64.or(_2, _3), i64.or(_4, _5)))) { break } - let _6, _7, _8, _9 := eq_771_2109(x_4, x_5, x_6, x_7) - if i32.eqz(i64.eqz(i64.or(i64.or(_6, _7), i64.or(_8, _9)))) { break } - let _10, _11, _12, _13 := eq_772_2110(x_4, x_5, x_6, x_7) - if i32.eqz(i64.eqz(i64.or(i64.or(_10, _11), i64.or(_12, _13)))) { continue } - } - sstore(x_4, x_5, x_6, x_7) - } - function add(x1, x2, x3, x4) -> r1, r2, r3, r4 - { - let t := i64.add(x4, 1) - r4 := i64.add(t, 0) - let t_1 := i64.add(x3, 0) - r3 := i64.add(t_1, i64.extend_i32_u(i32.or(i64.lt_u(t, x4), i64.lt_u(r4, t)))) - let t_2 := i64.add(x2, 0) - r2 := i64.add(t_2, i64.extend_i32_u(i32.or(i64.lt_u(t_1, x3), i64.lt_u(r3, t_1)))) - r1 := i64.add(i64.add(x1, 0), i64.extend_i32_u(i32.or(i64.lt_u(t_2, x2), i64.lt_u(r2, t_2)))) - } - function iszero_1324_2108(x4) -> r1, r2, r3, r4 - { - r4 := i64.extend_i32_u(i64.eqz(i64.or(i64.or(0, 0), i64.or(0, x4)))) - } - function eq_771_2109(x1, x2, x3, x4) -> r1, r2, r3, r4 - { - r4 := i64.extend_i32_u(i32.and(i64.eq(x1, 0), i32.and(i64.eq(x2, 0), i32.and(i64.eq(x3, 0), i64.eq(x4, 2))))) - } - function eq_772_2110(x1, x2, x3, x4) -> r1, r2, r3, r4 - { - r4 := i64.extend_i32_u(i32.and(i64.eq(x1, 0), i32.and(i64.eq(x2, 0), i32.and(i64.eq(x3, 0), i64.eq(x4, 4))))) - } - function lt(x1, x2, x3, x4) -> z4 - { - let z:i32 := false - let _1 := 0 - let _2:i32 := 0xffffffff:i32 - switch i32.select(_2, i64.ne(x1, _1), i64.lt_u(x1, _1)) - case 0:i32 { - switch i32.select(_2, i64.ne(x2, _1), i64.lt_u(x2, _1)) - case 0:i32 { - switch i32.select(_2, i64.ne(x3, _1), i64.lt_u(x3, _1)) - case 0:i32 { z := i64.lt_u(x4, 10) } - case 1:i32 { z := 0:i32 } - default { z := 1:i32 } - } - case 1:i32 { z := 0:i32 } - default { z := 1:i32 } - } - case 1:i32 { z := 0:i32 } - default { z := 1:i32 } - z4 := i64.extend_i32_u(z) - } - function u256_to_i32_774() -> v:i32 - { - let _1 := 0 - if i64.ne(_1, i64.or(i64.or(_1, _1), _1)) { unreachable() } - if i64.ne(_1, i64.shr_u(_1, 32)) { unreachable() } - v := i32.wrap_i64(_1) - } - function u256_to_i32() -> v:i32 - { - if i64.ne(0, i64.or(i64.or(0, 0), 0)) { unreachable() } - if i64.ne(0, i64.shr_u(32, 32)) { unreachable() } - v := i32.wrap_i64(32) - } - function bswap16(x:i32) -> y:i32 - { - y := i32.or(i32.and(i32.shl(x, 8:i32), 0xff00:i32), i32.and(i32.shr_u(x, 8:i32), 0xff:i32)) - } - function bswap32(x:i32) -> y:i32 - { - let hi:i32 := i32.shl(bswap16(x), 16:i32) - y := i32.or(hi, bswap16(i32.shr_u(x, 16:i32))) - } - function bswap64(x) -> y - { - let hi := i64.shl(i64.extend_i32_u(bswap32(i32.wrap_i64(x))), 32) - y := i64.or(hi, i64.extend_i32_u(bswap32(i32.wrap_i64(i64.shr_u(x, 32))))) - } - function calldataload() -> z1, z2, z3, z4 - { - let cds:i32 := eth.getCallDataSize() - let destination:i32 := u256_to_i32_774() - let offset:i32 := u256_to_i32_774() - let requested_size:i32 := u256_to_i32() - if i32.gt_u(offset, i32.sub(0xffffffff:i32, requested_size)) { eth.revert(0:i32, 0:i32) } - let available_size:i32 := i32.sub(cds, offset) - if i32.gt_u(offset, cds) { available_size := 0:i32 } - let _1:i32 := 0:i32 - if i32.gt_u(available_size, _1) - { - eth.callDataCopy(destination, offset, available_size) - } - if i32.gt_u(requested_size, available_size) - { - let _2:i32 := i32.sub(requested_size, available_size) - let _3:i32 := i32.add(destination, available_size) - let i:i32 := _1 - for { } i32.lt_u(i, _2) { i := i32.add(i, 1:i32) } - { - i32.store8(i32.add(_3, i), _1) - } - } - let z1_1 := bswap64(i64.load(_1)) - let z2_1 := bswap64(i64.load(i32.add(_1, 8:i32))) - let z3_1 := bswap64(i64.load(i32.add(_1, 16:i32))) - let z4_1 := bswap64(i64.load(i32.add(_1, 24:i32))) - z1 := z1_1 - z2 := z2_1 - z3 := z3_1 - z4 := z4_1 - } - function sstore(y1, y2, y3, y4) - { - let hi := i64.shl(i64.extend_i32_u(bswap32(i32.wrap_i64(0))), 32) - let y := i64.or(hi, i64.extend_i32_u(bswap32(i32.wrap_i64(i64.shr_u(0, 32))))) - i64.store(0:i32, y) - i64.store(i32.add(0:i32, 8:i32), y) - i64.store(i32.add(0:i32, 16:i32), y) - i64.store(i32.add(0:i32, 24:i32), y) - i64.store(32:i32, bswap64(y1)) - i64.store(i32.add(32:i32, 8:i32), bswap64(y2)) - i64.store(i32.add(32:i32, 16:i32), bswap64(y3)) - i64.store(i32.add(32:i32, 24:i32), bswap64(y4)) - eth.storageStore(0:i32, 32:i32) - } - } -} - - -Binary representation: -0061736d010000000130096000006000017e6000017f60017e017e60047e7e7e7e0060047e7e7e7e017e60017f017f60027f7f0060037f7f7f00025e0408657468657265756d0c73746f7261676553746f7265000708657468657265756d06726576657274000708657468657265756d0f67657443616c6c4461746153697a65000208657468657265756d0c63616c6c44617461436f70790008030e0d0005030505050202060603010405030100010615047e0142000b7e0142000b7e0142000b7f0141000b071102066d656d6f72790200046d61696e00040abd090d8d0203087e017f107e02400240100f21002300210123012102230221030b200021042001210520022106200321074200420084420042018484504545210802400340200845450d010240024020042005200620071009100621092303210a2300210b2301210c0b2009200a84200b200c8484504504400c030b024020042005200620071007210d2300210e2301210f230221100b200d200e84200f20108484504504400c030b02402004200520062007100821112300211223012113230221140b2011201284201320148484504504400c010b0b02402004200520062007100521152300211623012117230221180b201521042016210520172106201821070c000b0b200420052006200710100b0b6701077e0240200342017c2108200842007c2107200242007c210920092008200354200720085472ad7c2106200142007c210a200a2009200254200620095472ad7c2105200042007c200a2001542005200a5472ad7c21040b20052400200624012007240220040b2401047e0240420042008442002000848450ad21040b20022400200324012004240220010b2f01047e02402000420051200142005120024200512003420251717171ad21070b20052400200624012007240220040b2f01047e02402000420051200142005120024200512003420451717171ad21070b20052400200624012007240220040bab0104017e017f017e047f02404100210542002106417f210702402007200020065220002006541b21082008410046044002402007200120065220012006541b21092009410046044002402007200220065220022006541b210a200a41004604402003420a54210505200a41014604404100210505410121050b0b0b05200941014604404100210505410121050b0b0b05200841014604404100210505410121050b0b0b2005ad21040b20040b2f02017f017e02404200210120012001200184200184520440000b20012001422088520440000b2001a721000b20000b2901017f024042004200420084420084520440000b42004220422088520440000b4220a721000b20000b1f01017f024020004108744180fe0371200041087641ff01717221010b20010b1e01027f02402000100c411074210220022000411076100c7221010b20010b2201027e02402000a7100dad422086210220022000422088a7100dad8421010b20010bdc0103047e097f047e024010022104100a2105100a2106100b21072006417f20076b4b04404100410010010b200420066b2108200620044b0440410021080b41002109200820094b044020052006200810030b200720084b0440200720086b210a200520086a210b2009210c02400340200c200a49450d010240200b200c6a20093a00000b200c41016a210c0c000b0b0b2009290000100e210d200941086a290000100e210e200941106a290000100e210f200941186a290000100e2110200d2100200e2101200f2102201021030b20012400200224012003240220000b7801027e02404200a7100dad422086210420044200422088a7100dad84210541002005370000410041086a2005370000410041106a2005370000410041186a200537000041202000100e370000412041086a2001100e370000412041106a2002100e370000412041186a2003100e3700004100412010000b0b - -Text representation: -(module - (import "ethereum" "storageStore" (func $eth.storageStore (param i32 i32))) - (import "ethereum" "revert" (func $eth.revert (param i32 i32))) - (import "ethereum" "getCallDataSize" (func $eth.getCallDataSize (result i32))) - (import "ethereum" "callDataCopy" (func $eth.callDataCopy (param i32 i32 i32))) - (memory $memory (export "memory") 1) - (export "main" (func $main)) - (global $global_ (mut i64) (i64.const 0)) - (global $global__1 (mut i64) (i64.const 0)) - (global $global__2 (mut i64) (i64.const 0)) - (global $global__6 (mut i32) (i32.const 0)) - -(func $main - (local $x i64) - (local $x_1 i64) - (local $x_2 i64) - (local $x_3 i64) - (local $x_4 i64) - (local $x_5 i64) - (local $x_6 i64) - (local $x_7 i64) - (local $_1 i32) - (local $_2 i64) - (local $_3 i64) - (local $_4 i64) - (local $_5 i64) - (local $_6 i64) - (local $_7 i64) - (local $_8 i64) - (local $_9 i64) - (local $_10 i64) - (local $_11 i64) - (local $_12 i64) - (local $_13 i64) - (local $x_8 i64) - (local $x_9 i64) - (local $x_10 i64) - (local $x_11 i64) - (block $label_ - (block - (local.set $x (call $calldataload)) - (local.set $x_1 (global.get $global_)) - (local.set $x_2 (global.get $global__1)) - (local.set $x_3 (global.get $global__2)) - - ) - (local.set $x_4 (local.get $x)) - (local.set $x_5 (local.get $x_1)) - (local.set $x_6 (local.get $x_2)) - (local.set $x_7 (local.get $x_3)) - (local.set $_1 (i32.eqz (i32.eqz (i64.eqz (i64.or (i64.or (i64.const 0) (i64.const 0)) (i64.or (i64.const 0) (i64.const 1))))))) - (block $label__3 - (loop $label__5 - (br_if $label__3 (i32.eqz (i32.eqz (local.get $_1)))) - (block $label__4 - (block - (local.set $_2 (call $iszero_1324_2108 (call $lt (local.get $x_4) (local.get $x_5) (local.get $x_6) (local.get $x_7)))) - (local.set $_3 (global.get $global__6)) - (local.set $_4 (global.get $global_)) - (local.set $_5 (global.get $global__1)) - - ) - (if (i32.eqz (i64.eqz (i64.or (i64.or (local.get $_2) (local.get $_3)) (i64.or (local.get $_4) (local.get $_5))))) (then - (br $label__3) - )) - (block - (local.set $_6 (call $eq_771_2109 (local.get $x_4) (local.get $x_5) (local.get $x_6) (local.get $x_7))) - (local.set $_7 (global.get $global_)) - (local.set $_8 (global.get $global__1)) - (local.set $_9 (global.get $global__2)) - - ) - (if (i32.eqz (i64.eqz (i64.or (i64.or (local.get $_6) (local.get $_7)) (i64.or (local.get $_8) (local.get $_9))))) (then - (br $label__3) - )) - (block - (local.set $_10 (call $eq_772_2110 (local.get $x_4) (local.get $x_5) (local.get $x_6) (local.get $x_7))) - (local.set $_11 (global.get $global_)) - (local.set $_12 (global.get $global__1)) - (local.set $_13 (global.get $global__2)) - - ) - (if (i32.eqz (i64.eqz (i64.or (i64.or (local.get $_10) (local.get $_11)) (i64.or (local.get $_12) (local.get $_13))))) (then - (br $label__4) - )) - - ) - (block - (local.set $x_8 (call $add (local.get $x_4) (local.get $x_5) (local.get $x_6) (local.get $x_7))) - (local.set $x_9 (global.get $global_)) - (local.set $x_10 (global.get $global__1)) - (local.set $x_11 (global.get $global__2)) - - ) - (local.set $x_4 (local.get $x_8)) - (local.set $x_5 (local.get $x_9)) - (local.set $x_6 (local.get $x_10)) - (local.set $x_7 (local.get $x_11)) - (br $label__5) - ) - - ) - (call $sstore (local.get $x_4) (local.get $x_5) (local.get $x_6) (local.get $x_7)) - ) -) - -(func $add - (param $x1 i64) - (param $x2 i64) - (param $x3 i64) - (param $x4 i64) - (result i64) - (local $r1 i64) - (local $r2 i64) - (local $r3 i64) - (local $r4 i64) - (local $t i64) - (local $t_1 i64) - (local $t_2 i64) - (block $label__7 - (local.set $t (i64.add (local.get $x4) (i64.const 1))) - (local.set $r4 (i64.add (local.get $t) (i64.const 0))) - (local.set $t_1 (i64.add (local.get $x3) (i64.const 0))) - (local.set $r3 (i64.add (local.get $t_1) (i64.extend_i32_u (i32.or (i64.lt_u (local.get $t) (local.get $x4)) (i64.lt_u (local.get $r4) (local.get $t)))))) - (local.set $t_2 (i64.add (local.get $x2) (i64.const 0))) - (local.set $r2 (i64.add (local.get $t_2) (i64.extend_i32_u (i32.or (i64.lt_u (local.get $t_1) (local.get $x3)) (i64.lt_u (local.get $r3) (local.get $t_1)))))) - (local.set $r1 (i64.add (i64.add (local.get $x1) (i64.const 0)) (i64.extend_i32_u (i32.or (i64.lt_u (local.get $t_2) (local.get $x2)) (i64.lt_u (local.get $r2) (local.get $t_2)))))) - - ) - (global.set $global_ (local.get $r2)) - (global.set $global__1 (local.get $r3)) - (global.set $global__2 (local.get $r4)) - (local.get $r1) -) - -(func $iszero_1324_2108 - (param $x4 i64) - (result i64) - (local $r1 i64) - (local $r2 i64) - (local $r3 i64) - (local $r4 i64) - (block $label__8 - (local.set $r4 (i64.extend_i32_u (i64.eqz (i64.or (i64.or (i64.const 0) (i64.const 0)) (i64.or (i64.const 0) (local.get $x4)))))) - - ) - (global.set $global_ (local.get $r2)) - (global.set $global__1 (local.get $r3)) - (global.set $global__2 (local.get $r4)) - (local.get $r1) -) - -(func $eq_771_2109 - (param $x1 i64) - (param $x2 i64) - (param $x3 i64) - (param $x4 i64) - (result i64) - (local $r1 i64) - (local $r2 i64) - (local $r3 i64) - (local $r4 i64) - (block $label__9 - (local.set $r4 (i64.extend_i32_u (i32.and (i64.eq (local.get $x1) (i64.const 0)) (i32.and (i64.eq (local.get $x2) (i64.const 0)) (i32.and (i64.eq (local.get $x3) (i64.const 0)) (i64.eq (local.get $x4) (i64.const 2))))))) - - ) - (global.set $global_ (local.get $r2)) - (global.set $global__1 (local.get $r3)) - (global.set $global__2 (local.get $r4)) - (local.get $r1) -) - -(func $eq_772_2110 - (param $x1 i64) - (param $x2 i64) - (param $x3 i64) - (param $x4 i64) - (result i64) - (local $r1 i64) - (local $r2 i64) - (local $r3 i64) - (local $r4 i64) - (block $label__10 - (local.set $r4 (i64.extend_i32_u (i32.and (i64.eq (local.get $x1) (i64.const 0)) (i32.and (i64.eq (local.get $x2) (i64.const 0)) (i32.and (i64.eq (local.get $x3) (i64.const 0)) (i64.eq (local.get $x4) (i64.const 4))))))) - - ) - (global.set $global_ (local.get $r2)) - (global.set $global__1 (local.get $r3)) - (global.set $global__2 (local.get $r4)) - (local.get $r1) -) - -(func $lt - (param $x1 i64) - (param $x2 i64) - (param $x3 i64) - (param $x4 i64) - (result i64) - (local $z4 i64) - (local $z i32) - (local $_1 i64) - (local $_2 i32) - (local $condition i32) - (local $condition_12 i32) - (local $condition_13 i32) - (block $label__11 - (local.set $z (i32.const 0)) - (local.set $_1 (i64.const 0)) - (local.set $_2 (i32.const 4294967295)) - (block - (local.set $condition (select (local.get $_2) (i64.ne (local.get $x1) (local.get $_1)) (i64.lt_u (local.get $x1) (local.get $_1)))) - (if (i32.eq (local.get $condition) (i32.const 0)) (then - (block - (local.set $condition_12 (select (local.get $_2) (i64.ne (local.get $x2) (local.get $_1)) (i64.lt_u (local.get $x2) (local.get $_1)))) - (if (i32.eq (local.get $condition_12) (i32.const 0)) (then - (block - (local.set $condition_13 (select (local.get $_2) (i64.ne (local.get $x3) (local.get $_1)) (i64.lt_u (local.get $x3) (local.get $_1)))) - (if (i32.eq (local.get $condition_13) (i32.const 0)) (then - (local.set $z (i64.lt_u (local.get $x4) (i64.const 10))) - )(else - (if (i32.eq (local.get $condition_13) (i32.const 1)) (then - (local.set $z (i32.const 0)) - )(else - (local.set $z (i32.const 1)) - )) - )) - - ) - )(else - (if (i32.eq (local.get $condition_12) (i32.const 1)) (then - (local.set $z (i32.const 0)) - )(else - (local.set $z (i32.const 1)) - )) - )) - - ) - )(else - (if (i32.eq (local.get $condition) (i32.const 1)) (then - (local.set $z (i32.const 0)) - )(else - (local.set $z (i32.const 1)) - )) - )) - - ) - (local.set $z4 (i64.extend_i32_u (local.get $z))) - - ) - (local.get $z4) -) - -(func $u256_to_i32_774 - (result i32) - (local $v i32) - (local $_1 i64) - (block $label__14 - (local.set $_1 (i64.const 0)) - (if (i64.ne (local.get $_1) (i64.or (i64.or (local.get $_1) (local.get $_1)) (local.get $_1))) (then - (unreachable))) - (if (i64.ne (local.get $_1) (i64.shr_u (local.get $_1) (i64.const 32))) (then - (unreachable))) - (local.set $v (i32.wrap_i64 (local.get $_1))) - - ) - (local.get $v) -) - -(func $u256_to_i32 - (result i32) - (local $v i32) - (block $label__15 - (if (i64.ne (i64.const 0) (i64.or (i64.or (i64.const 0) (i64.const 0)) (i64.const 0))) (then - (unreachable))) - (if (i64.ne (i64.const 0) (i64.shr_u (i64.const 32) (i64.const 32))) (then - (unreachable))) - (local.set $v (i32.wrap_i64 (i64.const 32))) - - ) - (local.get $v) -) - -(func $bswap16 - (param $x i32) - (result i32) - (local $y i32) - (block $label__16 - (local.set $y (i32.or (i32.and (i32.shl (local.get $x) (i32.const 8)) (i32.const 65280)) (i32.and (i32.shr_u (local.get $x) (i32.const 8)) (i32.const 255)))) - - ) - (local.get $y) -) - -(func $bswap32 - (param $x i32) - (result i32) - (local $y i32) - (local $hi i32) - (block $label__17 - (local.set $hi (i32.shl (call $bswap16 (local.get $x)) (i32.const 16))) - (local.set $y (i32.or (local.get $hi) (call $bswap16 (i32.shr_u (local.get $x) (i32.const 16))))) - - ) - (local.get $y) -) - -(func $bswap64 - (param $x i64) - (result i64) - (local $y i64) - (local $hi i64) - (block $label__18 - (local.set $hi (i64.shl (i64.extend_i32_u (call $bswap32 (i32.wrap_i64 (local.get $x)))) (i64.const 32))) - (local.set $y (i64.or (local.get $hi) (i64.extend_i32_u (call $bswap32 (i32.wrap_i64 (i64.shr_u (local.get $x) (i64.const 32))))))) - - ) - (local.get $y) -) - -(func $calldataload - (result i64) - (local $z1 i64) - (local $z2 i64) - (local $z3 i64) - (local $z4 i64) - (local $cds i32) - (local $destination i32) - (local $offset i32) - (local $requested_size i32) - (local $available_size i32) - (local $_1 i32) - (local $_2 i32) - (local $_3 i32) - (local $i i32) - (local $z1_1 i64) - (local $z2_1 i64) - (local $z3_1 i64) - (local $z4_1 i64) - (block $label__19 - (local.set $cds (call $eth.getCallDataSize)) - (local.set $destination (call $u256_to_i32_774)) - (local.set $offset (call $u256_to_i32_774)) - (local.set $requested_size (call $u256_to_i32)) - (if (i32.gt_u (local.get $offset) (i32.sub (i32.const 4294967295) (local.get $requested_size))) (then - (call $eth.revert (i32.const 0) (i32.const 0)))) - (local.set $available_size (i32.sub (local.get $cds) (local.get $offset))) - (if (i32.gt_u (local.get $offset) (local.get $cds)) (then - (local.set $available_size (i32.const 0)) - )) - (local.set $_1 (i32.const 0)) - (if (i32.gt_u (local.get $available_size) (local.get $_1)) (then - (call $eth.callDataCopy (local.get $destination) (local.get $offset) (local.get $available_size)))) - (if (i32.gt_u (local.get $requested_size) (local.get $available_size)) (then - (local.set $_2 (i32.sub (local.get $requested_size) (local.get $available_size))) - (local.set $_3 (i32.add (local.get $destination) (local.get $available_size))) - (local.set $i (local.get $_1)) - (block $label__20 - (loop $label__22 - (br_if $label__20 (i32.eqz (i32.lt_u (local.get $i) (local.get $_2)))) - (block $label__21 - (i32.store8 (i32.add (local.get $_3) (local.get $i)) (local.get $_1)) - ) - (local.set $i (i32.add (local.get $i) (i32.const 1))) - (br $label__22) - ) - - ) - )) - (local.set $z1_1 (call $bswap64 (i64.load (local.get $_1)))) - (local.set $z2_1 (call $bswap64 (i64.load (i32.add (local.get $_1) (i32.const 8))))) - (local.set $z3_1 (call $bswap64 (i64.load (i32.add (local.get $_1) (i32.const 16))))) - (local.set $z4_1 (call $bswap64 (i64.load (i32.add (local.get $_1) (i32.const 24))))) - (local.set $z1 (local.get $z1_1)) - (local.set $z2 (local.get $z2_1)) - (local.set $z3 (local.get $z3_1)) - (local.set $z4 (local.get $z4_1)) - - ) - (global.set $global_ (local.get $z2)) - (global.set $global__1 (local.get $z3)) - (global.set $global__2 (local.get $z4)) - (local.get $z1) -) - -(func $sstore - (param $y1 i64) - (param $y2 i64) - (param $y3 i64) - (param $y4 i64) - (local $hi i64) - (local $y i64) - (block $label__23 - (local.set $hi (i64.shl (i64.extend_i32_u (call $bswap32 (i32.wrap_i64 (i64.const 0)))) (i64.const 32))) - (local.set $y (i64.or (local.get $hi) (i64.extend_i32_u (call $bswap32 (i32.wrap_i64 (i64.shr_u (i64.const 0) (i64.const 32))))))) - (i64.store (i32.const 0) (local.get $y)) - (i64.store (i32.add (i32.const 0) (i32.const 8)) (local.get $y)) - (i64.store (i32.add (i32.const 0) (i32.const 16)) (local.get $y)) - (i64.store (i32.add (i32.const 0) (i32.const 24)) (local.get $y)) - (i64.store (i32.const 32) (call $bswap64 (local.get $y1))) - (i64.store (i32.add (i32.const 32) (i32.const 8)) (call $bswap64 (local.get $y2))) - (i64.store (i32.add (i32.const 32) (i32.const 16)) (call $bswap64 (local.get $y3))) - (i64.store (i32.add (i32.const 32) (i32.const 24)) (call $bswap64 (local.get $y4))) - (call $eth.storageStore (i32.const 0) (i32.const 32)) - ) -) - -) diff --git a/test/cmdlineTests/evm_to_wasm_output_selection_asm_only/args b/test/cmdlineTests/evm_to_wasm_output_selection_asm_only/args deleted file mode 100644 index f39038498198..000000000000 --- a/test/cmdlineTests/evm_to_wasm_output_selection_asm_only/args +++ /dev/null @@ -1 +0,0 @@ ---assemble --optimize --yul-dialect evm --machine ewasm --asm diff --git a/test/cmdlineTests/evm_to_wasm_output_selection_asm_only/input.yul b/test/cmdlineTests/evm_to_wasm_output_selection_asm_only/input.yul deleted file mode 100644 index 4fa5ef66f8da..000000000000 --- a/test/cmdlineTests/evm_to_wasm_output_selection_asm_only/input.yul +++ /dev/null @@ -1,4 +0,0 @@ -{ - let x := 42 - sstore(0, x) -} diff --git a/test/cmdlineTests/evm_to_wasm_output_selection_asm_only/output b/test/cmdlineTests/evm_to_wasm_output_selection_asm_only/output deleted file mode 100644 index d0cb60f39bee..000000000000 --- a/test/cmdlineTests/evm_to_wasm_output_selection_asm_only/output +++ /dev/null @@ -1,2 +0,0 @@ - -======= evm_to_wasm_output_selection_asm_only/input.yul (Ewasm) ======= diff --git a/test/cmdlineTests/evm_to_wasm_output_selection_ewasm_ir_only/args b/test/cmdlineTests/evm_to_wasm_output_selection_ewasm_ir_only/args deleted file mode 100644 index 7c6526b562d3..000000000000 --- a/test/cmdlineTests/evm_to_wasm_output_selection_ewasm_ir_only/args +++ /dev/null @@ -1 +0,0 @@ ---assemble --optimize --yul-dialect evm --machine ewasm --ewasm-ir diff --git a/test/cmdlineTests/evm_to_wasm_output_selection_ewasm_ir_only/input.yul b/test/cmdlineTests/evm_to_wasm_output_selection_ewasm_ir_only/input.yul deleted file mode 100644 index 4fa5ef66f8da..000000000000 --- a/test/cmdlineTests/evm_to_wasm_output_selection_ewasm_ir_only/input.yul +++ /dev/null @@ -1,4 +0,0 @@ -{ - let x := 42 - sstore(0, x) -} diff --git a/test/cmdlineTests/evm_to_wasm_output_selection_ewasm_ir_only/output b/test/cmdlineTests/evm_to_wasm_output_selection_ewasm_ir_only/output deleted file mode 100644 index 3124db17da95..000000000000 --- a/test/cmdlineTests/evm_to_wasm_output_selection_ewasm_ir_only/output +++ /dev/null @@ -1,34 +0,0 @@ - -======= evm_to_wasm_output_selection_ewasm_ir_only/input.yul (Ewasm) ======= - -========================== - -Translated source: -object "object" { - code { - function main() - { - let hi := i64.shl(i64.extend_i32_u(bswap32(i32.wrap_i64(0))), 32) - let y := i64.or(hi, i64.extend_i32_u(bswap32(i32.wrap_i64(i64.shr_u(0, 32))))) - i64.store(0:i32, y) - i64.store(i32.add(0:i32, 8:i32), y) - i64.store(i32.add(0:i32, 16:i32), y) - i64.store(i32.add(0:i32, 24:i32), y) - i64.store(32:i32, y) - i64.store(i32.add(32:i32, 8:i32), y) - i64.store(i32.add(32:i32, 16:i32), y) - let hi_1 := i64.shl(i64.extend_i32_u(bswap32(i32.wrap_i64(42))), 32) - i64.store(i32.add(32:i32, 24:i32), i64.or(hi_1, i64.extend_i32_u(bswap32(i32.wrap_i64(i64.shr_u(42, 32)))))) - eth.storageStore(0:i32, 32:i32) - } - function bswap16(x:i32) -> y:i32 - { - y := i32.or(i32.and(i32.shl(x, 8:i32), 0xff00:i32), i32.and(i32.shr_u(x, 8:i32), 0xff:i32)) - } - function bswap32(x:i32) -> y:i32 - { - let hi:i32 := i32.shl(bswap16(x), 16:i32) - y := i32.or(hi, bswap16(i32.shr_u(x, 16:i32))) - } - } -} diff --git a/test/cmdlineTests/evm_to_wasm_output_selection_ewasm_only/args b/test/cmdlineTests/evm_to_wasm_output_selection_ewasm_only/args deleted file mode 100644 index 48a844213a96..000000000000 --- a/test/cmdlineTests/evm_to_wasm_output_selection_ewasm_only/args +++ /dev/null @@ -1 +0,0 @@ ---assemble --optimize --yul-dialect evm --machine ewasm --ewasm diff --git a/test/cmdlineTests/evm_to_wasm_output_selection_ewasm_only/input.yul b/test/cmdlineTests/evm_to_wasm_output_selection_ewasm_only/input.yul deleted file mode 100644 index 4fa5ef66f8da..000000000000 --- a/test/cmdlineTests/evm_to_wasm_output_selection_ewasm_only/input.yul +++ /dev/null @@ -1,4 +0,0 @@ -{ - let x := 42 - sstore(0, x) -} diff --git a/test/cmdlineTests/evm_to_wasm_output_selection_ewasm_only/output b/test/cmdlineTests/evm_to_wasm_output_selection_ewasm_only/output deleted file mode 100644 index e8b306260504..000000000000 --- a/test/cmdlineTests/evm_to_wasm_output_selection_ewasm_only/output +++ /dev/null @@ -1,54 +0,0 @@ - -======= evm_to_wasm_output_selection_ewasm_only/input.yul (Ewasm) ======= - -Text representation: -(module - (import "ethereum" "storageStore" (func $eth.storageStore (param i32 i32))) - (memory $memory (export "memory") 1) - (export "main" (func $main)) - -(func $main - (local $hi i64) - (local $y i64) - (local $hi_1 i64) - (block $label_ - (local.set $hi (i64.shl (i64.extend_i32_u (call $bswap32 (i32.wrap_i64 (i64.const 0)))) (i64.const 32))) - (local.set $y (i64.or (local.get $hi) (i64.extend_i32_u (call $bswap32 (i32.wrap_i64 (i64.shr_u (i64.const 0) (i64.const 32))))))) - (i64.store (i32.const 0) (local.get $y)) - (i64.store (i32.add (i32.const 0) (i32.const 8)) (local.get $y)) - (i64.store (i32.add (i32.const 0) (i32.const 16)) (local.get $y)) - (i64.store (i32.add (i32.const 0) (i32.const 24)) (local.get $y)) - (i64.store (i32.const 32) (local.get $y)) - (i64.store (i32.add (i32.const 32) (i32.const 8)) (local.get $y)) - (i64.store (i32.add (i32.const 32) (i32.const 16)) (local.get $y)) - (local.set $hi_1 (i64.shl (i64.extend_i32_u (call $bswap32 (i32.wrap_i64 (i64.const 42)))) (i64.const 32))) - (i64.store (i32.add (i32.const 32) (i32.const 24)) (i64.or (local.get $hi_1) (i64.extend_i32_u (call $bswap32 (i32.wrap_i64 (i64.shr_u (i64.const 42) (i64.const 32))))))) - (call $eth.storageStore (i32.const 0) (i32.const 32)) - ) -) - -(func $bswap16 - (param $x i32) - (result i32) - (local $y i32) - (block $label__1 - (local.set $y (i32.or (i32.and (i32.shl (local.get $x) (i32.const 8)) (i32.const 65280)) (i32.and (i32.shr_u (local.get $x) (i32.const 8)) (i32.const 255)))) - - ) - (local.get $y) -) - -(func $bswap32 - (param $x i32) - (result i32) - (local $y i32) - (local $hi i32) - (block $label__2 - (local.set $hi (i32.shl (call $bswap16 (local.get $x)) (i32.const 16))) - (local.set $y (i32.or (local.get $hi) (call $bswap16 (i32.shr_u (local.get $x) (i32.const 16))))) - - ) - (local.get $y) -) - -) diff --git a/test/cmdlineTests/evm_to_wasm_unsupported_translation/args b/test/cmdlineTests/evm_to_wasm_unsupported_translation/args deleted file mode 100644 index cc6c07083182..000000000000 --- a/test/cmdlineTests/evm_to_wasm_unsupported_translation/args +++ /dev/null @@ -1 +0,0 @@ ---assemble --machine ewasm diff --git a/test/cmdlineTests/evm_to_wasm_unsupported_translation/err b/test/cmdlineTests/evm_to_wasm_unsupported_translation/err deleted file mode 100644 index 5ef050f64424..000000000000 --- a/test/cmdlineTests/evm_to_wasm_unsupported_translation/err +++ /dev/null @@ -1 +0,0 @@ -The selected input language is not directly supported when targeting the Ewasm machine and automatic translation is not available. diff --git a/test/cmdlineTests/evm_to_wasm_unsupported_translation/exit b/test/cmdlineTests/evm_to_wasm_unsupported_translation/exit deleted file mode 100644 index d00491fd7e5b..000000000000 --- a/test/cmdlineTests/evm_to_wasm_unsupported_translation/exit +++ /dev/null @@ -1 +0,0 @@ -1 diff --git a/test/cmdlineTests/evm_to_wasm_unsupported_translation/input.yul b/test/cmdlineTests/evm_to_wasm_unsupported_translation/input.yul deleted file mode 100644 index f21cd2b7e038..000000000000 --- a/test/cmdlineTests/evm_to_wasm_unsupported_translation/input.yul +++ /dev/null @@ -1,3 +0,0 @@ -{ - sstore(0, 1) -} diff --git a/test/cmdlineTests/evm_to_wasm_unsupported_translation/output b/test/cmdlineTests/evm_to_wasm_unsupported_translation/output deleted file mode 100644 index 8b137891791f..000000000000 --- a/test/cmdlineTests/evm_to_wasm_unsupported_translation/output +++ /dev/null @@ -1 +0,0 @@ - diff --git a/test/cmdlineTests/linker_mode_output_selection_invalid/args b/test/cmdlineTests/linker_mode_output_selection_invalid/args index ded0d6efc551..6c5b1680bc18 100644 --- a/test/cmdlineTests/linker_mode_output_selection_invalid/args +++ b/test/cmdlineTests/linker_mode_output_selection_invalid/args @@ -1 +1 @@ ---link --asm --asm-json --opcodes --bin --bin-runtime --abi --ir --ir-optimized --ewasm --hashes --userdoc --devdoc --metadata --storage-layout +--link --asm --asm-json --opcodes --bin --bin-runtime --abi --ir --ir-optimized --hashes --userdoc --devdoc --metadata --storage-layout diff --git a/test/cmdlineTests/linker_mode_output_selection_invalid/err b/test/cmdlineTests/linker_mode_output_selection_invalid/err index c84a12d97ede..614ade61f23c 100644 --- a/test/cmdlineTests/linker_mode_output_selection_invalid/err +++ b/test/cmdlineTests/linker_mode_output_selection_invalid/err @@ -1 +1 @@ -The following outputs are not supported in linker mode: --abi, --asm, --asm-json, --bin, --bin-runtime, --devdoc, --ewasm, --hashes, --ir, --ir-optimized, --metadata, --opcodes, --storage-layout, --userdoc. +The following outputs are not supported in linker mode: --abi, --asm, --asm-json, --bin, --bin-runtime, --devdoc, --hashes, --ir, --ir-optimized, --metadata, --opcodes, --storage-layout, --userdoc. diff --git a/test/cmdlineTests/output_selection_ewasm_ir_only/args b/test/cmdlineTests/output_selection_ewasm_ir_only/args deleted file mode 100644 index bccff6085e10..000000000000 --- a/test/cmdlineTests/output_selection_ewasm_ir_only/args +++ /dev/null @@ -1 +0,0 @@ ---optimize --ewasm-ir diff --git a/test/cmdlineTests/output_selection_ewasm_ir_only/err b/test/cmdlineTests/output_selection_ewasm_ir_only/err deleted file mode 100644 index 52dd265b5dbd..000000000000 --- a/test/cmdlineTests/output_selection_ewasm_ir_only/err +++ /dev/null @@ -1 +0,0 @@ -The following outputs are not supported in compiler mode: --ewasm-ir. diff --git a/test/cmdlineTests/output_selection_ewasm_ir_only/exit b/test/cmdlineTests/output_selection_ewasm_ir_only/exit deleted file mode 100644 index d00491fd7e5b..000000000000 --- a/test/cmdlineTests/output_selection_ewasm_ir_only/exit +++ /dev/null @@ -1 +0,0 @@ -1 diff --git a/test/cmdlineTests/output_selection_ewasm_ir_only/input.sol b/test/cmdlineTests/output_selection_ewasm_ir_only/input.sol deleted file mode 100644 index 9755e16e71db..000000000000 --- a/test/cmdlineTests/output_selection_ewasm_ir_only/input.sol +++ /dev/null @@ -1,4 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0 -pragma solidity *; - -contract C {} diff --git a/test/cmdlineTests/standard_cli_output_selection_invalid/args b/test/cmdlineTests/standard_cli_output_selection_invalid/args index 538c8709722d..691b7fa54acd 100644 --- a/test/cmdlineTests/standard_cli_output_selection_invalid/args +++ b/test/cmdlineTests/standard_cli_output_selection_invalid/args @@ -1 +1 @@ ---ast-compact-json --asm --asm-json --opcodes --bin --bin-runtime --abi --ir --ir-optimized --ewasm --ewasm-ir --hashes --userdoc --devdoc --metadata --storage-layout +--ast-compact-json --asm --asm-json --opcodes --bin --bin-runtime --abi --ir --ir-optimized --hashes --userdoc --devdoc --metadata --storage-layout diff --git a/test/cmdlineTests/standard_cli_output_selection_invalid/err b/test/cmdlineTests/standard_cli_output_selection_invalid/err index e9d24e61d486..ead982255667 100644 --- a/test/cmdlineTests/standard_cli_output_selection_invalid/err +++ b/test/cmdlineTests/standard_cli_output_selection_invalid/err @@ -1 +1 @@ -The following outputs are not supported in standard JSON mode: --abi, --asm, --asm-json, --ast-compact-json, --bin, --bin-runtime, --devdoc, --ewasm, --ewasm-ir, --hashes, --ir, --ir-optimized, --metadata, --opcodes, --storage-layout, --userdoc. +The following outputs are not supported in standard JSON mode: --abi, --asm, --asm-json, --ast-compact-json, --bin, --bin-runtime, --devdoc, --hashes, --ir, --ir-optimized, --metadata, --opcodes, --storage-layout, --userdoc. diff --git a/test/cmdlineTests/standard_ewasm_requested/input.json b/test/cmdlineTests/standard_ewasm_requested/input.json deleted file mode 100644 index 53dcc68eefe7..000000000000 --- a/test/cmdlineTests/standard_ewasm_requested/input.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "language": "Solidity", - "sources": - { - "A": - { - "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.0; pragma abicoder v2; contract C { }" - } - }, - "settings": - { - "optimizer": - { - "enabled": true, - "details": {"yul": true} - }, - "outputSelection": - { - "*": { "*": ["ewasm.wast", "ewasm.wasm"] } - } - } -} diff --git a/test/cmdlineTests/standard_ewasm_requested/output.json b/test/cmdlineTests/standard_ewasm_requested/output.json deleted file mode 100644 index 1db94af7d10d..000000000000 --- a/test/cmdlineTests/standard_ewasm_requested/output.json +++ /dev/null @@ -1,176 +0,0 @@ -{ - "contracts": - { - "A": - { - "C": - { - "ewasm": - { - "wasm": "", - "wast": "(module - ;; custom section for sub-module - ;; The Keccak-256 hash of the text representation of - ;; (@custom \"C_3_deployed\" \"\") - (import \"ethereum\" \"codeCopy\" (func $eth.codeCopy (param i32 i32 i32))) - (import \"ethereum\" \"revert\" (func $eth.revert (param i32 i32))) - (import \"ethereum\" \"getCallValue\" (func $eth.getCallValue (param i32))) - (import \"ethereum\" \"finish\" (func $eth.finish (param i32 i32))) - (memory $memory (export \"memory\") 1) - (export \"main\" (func $main)) - -(func $main - (local $p i32) - (local $r i32) - (local $hi i64) - (local $y i64) - (local $z3 i64) - (local $_1 i64) - (block $label_ - (local.set $p (call $u256_to_i32_716)) - (local.set $r (i32.add (local.get $p) (i32.const 64))) - (if (i32.lt_u (local.get $r) (local.get $p)) (then - (unreachable))) - (local.set $hi (i64.shl (i64.extend_i32_u (call $bswap32 (i32.wrap_i64 (i64.const 0)))) (i64.const 32))) - (local.set $y (i64.or (local.get $hi) (i64.extend_i32_u (call $bswap32 (i32.wrap_i64 (i64.shr_u (i64.const 0) (i64.const 32))))))) - (i64.store (local.get $r) (local.get $y)) - (i64.store (i32.add (local.get $r) (i32.const 8)) (local.get $y)) - (i64.store (i32.add (local.get $r) (i32.const 16)) (local.get $y)) - (i64.store (i32.add (local.get $r) (i32.const 24)) (call $bswap64)) - (call $eth.getCallValue (i32.const 0)) - (local.set $z3 (i64.load (i32.const 8))) - (if (i32.eqz (i64.eqz (i64.or (i64.or (i64.const 0) (i64.const 0)) (i64.or (local.get $z3) (i64.load (i32.const 0)))))) (then - (call $eth.revert (call $to_internal_i32ptr_334) (call $u256_to_i32_333)))) - (local.set $_1 (datasize \"C_3_deployed\")) - (call $eth.codeCopy (call $to_internal_i32ptr) (call $u256_to_i32 (dataoffset \"C_3_deployed\")) (call $u256_to_i32 (local.get $_1))) - (call $eth.finish (call $to_internal_i32ptr) (call $u256_to_i32 (local.get $_1))) - ) -) - -(func $u256_to_i32_333 - (result i32) - (local $v i32) - (local $_1 i64) - (block $label__1 - (local.set $_1 (i64.const 0)) - (if (i64.ne (local.get $_1) (i64.or (i64.or (local.get $_1) (local.get $_1)) (local.get $_1))) (then - (unreachable))) - (if (i64.ne (local.get $_1) (i64.shr_u (local.get $_1) (i64.const 32))) (then - (unreachable))) - (local.set $v (i32.wrap_i64 (local.get $_1))) - - ) - (local.get $v) -) - -(func $u256_to_i32 - (param $x4 i64) - (result i32) - (local $v i32) - (block $label__2 - (if (i64.ne (i64.const 0) (i64.or (i64.or (i64.const 0) (i64.const 0)) (i64.const 0))) (then - (unreachable))) - (if (i64.ne (i64.const 0) (i64.shr_u (local.get $x4) (i64.const 32))) (then - (unreachable))) - (local.set $v (i32.wrap_i64 (local.get $x4))) - - ) - (local.get $v) -) - -(func $u256_to_i32_716 - (result i32) - (local $v i32) - (block $label__3 - (if (i64.ne (i64.const 0) (i64.or (i64.or (i64.const 0) (i64.const 0)) (i64.const 0))) (then - (unreachable))) - (if (i64.ne (i64.const 0) (i64.shr_u (i64.const 64) (i64.const 32))) (then - (unreachable))) - (local.set $v (i32.wrap_i64 (i64.const 64))) - - ) - (local.get $v) -) - -(func $to_internal_i32ptr_334 - (result i32) - (local $r i32) - (local $p i32) - (block $label__4 - (local.set $p (call $u256_to_i32_333)) - (local.set $r (i32.add (local.get $p) (i32.const 64))) - (if (i32.lt_u (local.get $r) (local.get $p)) (then - (unreachable))) - - ) - (local.get $r) -) - -(func $to_internal_i32ptr - (result i32) - (local $r i32) - (local $v i32) - (block $label__5 - (if (i64.ne (i64.const 0) (i64.or (i64.or (i64.const 0) (i64.const 0)) (i64.const 0))) (then - (unreachable))) - (if (i64.ne (i64.const 0) (i64.shr_u (i64.const 128) (i64.const 32))) (then - (unreachable))) - (local.set $v (i32.wrap_i64 (i64.const 128))) - (local.set $r (i32.add (local.get $v) (i32.const 64))) - (if (i32.lt_u (local.get $r) (local.get $v)) (then - (unreachable))) - - ) - (local.get $r) -) - -(func $bswap16 - (param $x i32) - (result i32) - (local $y i32) - (block $label__6 - (local.set $y (i32.or (i32.and (i32.shl (local.get $x) (i32.const 8)) (i32.const 65280)) (i32.and (i32.shr_u (local.get $x) (i32.const 8)) (i32.const 255)))) - - ) - (local.get $y) -) - -(func $bswap32 - (param $x i32) - (result i32) - (local $y i32) - (local $hi i32) - (block $label__7 - (local.set $hi (i32.shl (call $bswap16 (local.get $x)) (i32.const 16))) - (local.set $y (i32.or (local.get $hi) (call $bswap16 (i32.shr_u (local.get $x) (i32.const 16))))) - - ) - (local.get $y) -) - -(func $bswap64 - (result i64) - (local $y i64) - (local $hi i64) - (block $label__8 - (local.set $hi (i64.shl (i64.extend_i32_u (call $bswap32 (i32.wrap_i64 (i64.const 128)))) (i64.const 32))) - (local.set $y (i64.or (local.get $hi) (i64.extend_i32_u (call $bswap32 (i32.wrap_i64 (i64.shr_u (i64.const 128) (i64.const 32))))))) - - ) - (local.get $y) -) - -) -" - } - } - } - }, - "sources": - { - "A": - { - "id": 0 - } - } -} diff --git a/test/cmdlineTests/standard_ewasm_requested_abstract/input.json b/test/cmdlineTests/standard_ewasm_requested_abstract/input.json deleted file mode 100644 index 2ee666fe2d58..000000000000 --- a/test/cmdlineTests/standard_ewasm_requested_abstract/input.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "language": "Solidity", - "sources": - { - "A": - { - "content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.0; pragma abicoder v2; abstract contract C { }" - } - }, - "settings": - { - "optimizer": - { - "enabled": true, - "details": {"yul": true} - }, - "outputSelection": - { - "*": { "*": ["ewasm.wast", "ewasm.wasm"] } - } - } -} diff --git a/test/cmdlineTests/standard_ewasm_requested_abstract/output.json b/test/cmdlineTests/standard_ewasm_requested_abstract/output.json deleted file mode 100644 index 14a4ef2df946..000000000000 --- a/test/cmdlineTests/standard_ewasm_requested_abstract/output.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "contracts": - { - "A": - { - "C": - { - "ewasm": - { - "wasm": "", - "wast": "" - } - } - } - }, - "sources": - { - "A": - { - "id": 0 - } - } -} diff --git a/test/cmdlineTests/strict_asm_options_in_non_asm_mode/args b/test/cmdlineTests/strict_asm_options_in_non_asm_mode/args index 6f9a273ab6a0..9efe91f61f29 100644 --- a/test/cmdlineTests/strict_asm_options_in_non_asm_mode/args +++ b/test/cmdlineTests/strict_asm_options_in_non_asm_mode/args @@ -1 +1 @@ ---yul-dialect evm --machine ewasm +--yul-dialect evm --machine evm diff --git a/test/cmdlineTests/strict_asm_output_selection_ewasm_ir_only/args b/test/cmdlineTests/strict_asm_output_selection_ewasm_ir_only/args deleted file mode 100644 index 647c63654cfa..000000000000 --- a/test/cmdlineTests/strict_asm_output_selection_ewasm_ir_only/args +++ /dev/null @@ -1 +0,0 @@ ---strict-assembly --optimize --ewasm-ir diff --git a/test/cmdlineTests/strict_asm_output_selection_ewasm_ir_only/input.yul b/test/cmdlineTests/strict_asm_output_selection_ewasm_ir_only/input.yul deleted file mode 100644 index 4fa5ef66f8da..000000000000 --- a/test/cmdlineTests/strict_asm_output_selection_ewasm_ir_only/input.yul +++ /dev/null @@ -1,4 +0,0 @@ -{ - let x := 42 - sstore(0, x) -} diff --git a/test/cmdlineTests/strict_asm_output_selection_ewasm_ir_only/output b/test/cmdlineTests/strict_asm_output_selection_ewasm_ir_only/output deleted file mode 100644 index 8026a6e83e85..000000000000 --- a/test/cmdlineTests/strict_asm_output_selection_ewasm_ir_only/output +++ /dev/null @@ -1,2 +0,0 @@ - -======= strict_asm_output_selection_ewasm_ir_only/input.yul (EVM) ======= diff --git a/test/cmdlineTests/strict_asm_output_selection_ewasm_only/args b/test/cmdlineTests/strict_asm_output_selection_ewasm_only/args deleted file mode 100644 index bb147ae337d9..000000000000 --- a/test/cmdlineTests/strict_asm_output_selection_ewasm_only/args +++ /dev/null @@ -1 +0,0 @@ ---strict-assembly --optimize --ewasm diff --git a/test/cmdlineTests/strict_asm_output_selection_ewasm_only/input.yul b/test/cmdlineTests/strict_asm_output_selection_ewasm_only/input.yul deleted file mode 100644 index 4fa5ef66f8da..000000000000 --- a/test/cmdlineTests/strict_asm_output_selection_ewasm_only/input.yul +++ /dev/null @@ -1,4 +0,0 @@ -{ - let x := 42 - sstore(0, x) -} diff --git a/test/cmdlineTests/strict_asm_output_selection_ewasm_only/output b/test/cmdlineTests/strict_asm_output_selection_ewasm_only/output deleted file mode 100644 index f90f049aaa49..000000000000 --- a/test/cmdlineTests/strict_asm_output_selection_ewasm_only/output +++ /dev/null @@ -1,2 +0,0 @@ - -======= strict_asm_output_selection_ewasm_only/input.yul (EVM) ======= diff --git a/test/cmdlineTests/strict_asm_output_selection_invalid/args b/test/cmdlineTests/strict_asm_output_selection_invalid/args index 85814eb29b53..daeb64aae98b 100644 --- a/test/cmdlineTests/strict_asm_output_selection_invalid/args +++ b/test/cmdlineTests/strict_asm_output_selection_invalid/args @@ -1 +1 @@ ---strict-assembly --asm --asm-json --opcodes --bin --bin-runtime --abi --ir --ir-optimized --ewasm --hashes --userdoc --devdoc --metadata --storage-layout +--strict-assembly --asm --asm-json --opcodes --bin --bin-runtime --abi --ir --ir-optimized --hashes --userdoc --devdoc --metadata --storage-layout diff --git a/test/cmdlineTests/wasm_to_wasm_function_returning_multiple_values/args b/test/cmdlineTests/wasm_to_wasm_function_returning_multiple_values/args deleted file mode 100644 index 04cd5f05ba49..000000000000 --- a/test/cmdlineTests/wasm_to_wasm_function_returning_multiple_values/args +++ /dev/null @@ -1 +0,0 @@ ---yul --yul-dialect ewasm --machine ewasm diff --git a/test/cmdlineTests/wasm_to_wasm_function_returning_multiple_values/input.yul b/test/cmdlineTests/wasm_to_wasm_function_returning_multiple_values/input.yul deleted file mode 100644 index 2b1a6d9606c0..000000000000 --- a/test/cmdlineTests/wasm_to_wasm_function_returning_multiple_values/input.yul +++ /dev/null @@ -1,17 +0,0 @@ -object "object" { - code { - function main() - { - let m:i64, n:i32, p:i32, q:i64 := multireturn(1:i32, 2:i64, 3:i64, 4:i32) - } - - function multireturn(a:i32, b:i64, c:i64, d:i32) -> x:i64, y:i32, z:i32, w:i64 - { - x := b - w := c - - y := a - z := d - } - } -} diff --git a/test/cmdlineTests/wasm_to_wasm_function_returning_multiple_values/output b/test/cmdlineTests/wasm_to_wasm_function_returning_multiple_values/output deleted file mode 100644 index 4a3ef4eba760..000000000000 --- a/test/cmdlineTests/wasm_to_wasm_function_returning_multiple_values/output +++ /dev/null @@ -1,73 +0,0 @@ - -======= wasm_to_wasm_function_returning_multiple_values/input.yul (Ewasm) ======= - -Pretty printed source: -object "object" { - code { - function main() - { - let m, n:i32, p:i32, q := multireturn(1:i32, 2, 3, 4:i32) - } - function multireturn(a:i32, b, c, d:i32) -> x, y:i32, z:i32, w - { - x := b - w := c - y := a - z := d - } - } -} - - -Binary representation: -0061736d01000000010c0260000060047f7e7e7f017e020100030302000105030100010610037f0141000b7f0141000b7e0142000b071102066d656d6f72790200046d61696e00000a52022603017e027f017e024002404101420242034104100121002300210123012102230221030b0b0b2903017e027f017e0240200121042002210720002105200321060b20052400200624012007240220040b - -Text representation: -(module - (memory $memory (export "memory") 1) - (export "main" (func $main)) - (global $global_ (mut i32) (i32.const 0)) - (global $global__1 (mut i32) (i32.const 0)) - (global $global__2 (mut i64) (i64.const 0)) - -(func $main - (local $m i64) - (local $n i32) - (local $p i32) - (local $q i64) - (block $label_ - (block - (local.set $m (call $multireturn (i32.const 1) (i64.const 2) (i64.const 3) (i32.const 4))) - (local.set $n (global.get $global_)) - (local.set $p (global.get $global__1)) - (local.set $q (global.get $global__2)) - - ) - - ) -) - -(func $multireturn - (param $a i32) - (param $b i64) - (param $c i64) - (param $d i32) - (result i64) - (local $x i64) - (local $y i32) - (local $z i32) - (local $w i64) - (block $label__3 - (local.set $x (local.get $b)) - (local.set $w (local.get $c)) - (local.set $y (local.get $a)) - (local.set $z (local.get $d)) - - ) - (global.set $global_ (local.get $y)) - (global.set $global__1 (local.get $z)) - (global.set $global__2 (local.get $w)) - (local.get $x) -) - -) diff --git a/test/cmdlineTests/wasm_to_wasm_memory_instructions_alignment/args b/test/cmdlineTests/wasm_to_wasm_memory_instructions_alignment/args deleted file mode 100644 index 04cd5f05ba49..000000000000 --- a/test/cmdlineTests/wasm_to_wasm_memory_instructions_alignment/args +++ /dev/null @@ -1 +0,0 @@ ---yul --yul-dialect ewasm --machine ewasm diff --git a/test/cmdlineTests/wasm_to_wasm_memory_instructions_alignment/input.yul b/test/cmdlineTests/wasm_to_wasm_memory_instructions_alignment/input.yul deleted file mode 100644 index 731e6c9bb21a..000000000000 --- a/test/cmdlineTests/wasm_to_wasm_memory_instructions_alignment/input.yul +++ /dev/null @@ -1,8 +0,0 @@ -object "object" { - code { - function main() - { - i64.store8(0x01:i32, 42:i64) - } - } -} diff --git a/test/cmdlineTests/wasm_to_wasm_memory_instructions_alignment/output b/test/cmdlineTests/wasm_to_wasm_memory_instructions_alignment/output deleted file mode 100644 index e0cc44e57771..000000000000 --- a/test/cmdlineTests/wasm_to_wasm_memory_instructions_alignment/output +++ /dev/null @@ -1,27 +0,0 @@ - -======= wasm_to_wasm_memory_instructions_alignment/input.yul (Ewasm) ======= - -Pretty printed source: -object "object" { - code { - function main() - { i64.store8(0x01:i32, 42) } - } -} - - -Binary representation: -0061736d01000000010401600000020100030201000503010001060100071102066d656d6f72790200046d61696e00000a0e010c0002404101422a3c00000b0b - -Text representation: -(module - (memory $memory (export "memory") 1) - (export "main" (func $main)) - -(func $main - (block $label_ - (i64.store8 (i32.const 1) (i64.const 42)) - ) -) - -) diff --git a/test/cmdlineTests/yul_to_wasm_source_location_crash/args b/test/cmdlineTests/yul_to_wasm_source_location_crash/args deleted file mode 100644 index 254a1883c133..000000000000 --- a/test/cmdlineTests/yul_to_wasm_source_location_crash/args +++ /dev/null @@ -1 +0,0 @@ ---strict-assembly --yul-dialect evm --machine ewasm --optimize --ewasm-ir diff --git a/test/cmdlineTests/yul_to_wasm_source_location_crash/input.yul b/test/cmdlineTests/yul_to_wasm_source_location_crash/input.yul deleted file mode 100644 index 89e060931b95..000000000000 --- a/test/cmdlineTests/yul_to_wasm_source_location_crash/input.yul +++ /dev/null @@ -1,4 +0,0 @@ -/// @use-src 0:"test.sol" -object "C" { - code { sstore(0,0) } -} diff --git a/test/cmdlineTests/yul_to_wasm_source_location_crash/output b/test/cmdlineTests/yul_to_wasm_source_location_crash/output deleted file mode 100644 index 29ff631aa52a..000000000000 --- a/test/cmdlineTests/yul_to_wasm_source_location_crash/output +++ /dev/null @@ -1,34 +0,0 @@ - -======= yul_to_wasm_source_location_crash/input.yul (Ewasm) ======= - -========================== - -Translated source: -/// @use-src 0:"test.sol" -object "C" { - code { - function main() - { - let hi := i64.shl(i64.extend_i32_u(bswap32(i32.wrap_i64(0))), 32) - let y := i64.or(hi, i64.extend_i32_u(bswap32(i32.wrap_i64(i64.shr_u(0, 32))))) - i64.store(0:i32, y) - i64.store(i32.add(0:i32, 8:i32), y) - i64.store(i32.add(0:i32, 16:i32), y) - i64.store(i32.add(0:i32, 24:i32), y) - i64.store(32:i32, y) - i64.store(i32.add(32:i32, 8:i32), y) - i64.store(i32.add(32:i32, 16:i32), y) - i64.store(i32.add(32:i32, 24:i32), y) - eth.storageStore(0:i32, 32:i32) - } - function bswap16(x:i32) -> y:i32 - { - y := i32.or(i32.and(i32.shl(x, 8:i32), 0xff00:i32), i32.and(i32.shr_u(x, 8:i32), 0xff:i32)) - } - function bswap32(x:i32) -> y:i32 - { - let hi:i32 := i32.shl(bswap16(x), 16:i32) - y := i32.or(hi, bswap16(i32.shr_u(x, 16:i32))) - } - } -} diff --git a/test/libsolidity/ASTJSON/abstract_contract.sol b/test/libsolidity/ASTJSON/abstract_contract.sol index bddbc177931a..3ef96612f5fb 100644 --- a/test/libsolidity/ASTJSON/abstract_contract.sol +++ b/test/libsolidity/ASTJSON/abstract_contract.sol @@ -2,5 +2,4 @@ abstract contract C { constructor() { } } - // ---- diff --git a/test/libsolidity/ASTJSON/address_payable.sol b/test/libsolidity/ASTJSON/address_payable.sol index 28c9c8a20da4..f9ebb124ebaf 100644 --- a/test/libsolidity/ASTJSON/address_payable.sol +++ b/test/libsolidity/ASTJSON/address_payable.sol @@ -7,5 +7,4 @@ contract C { m[c] = payable(0); } } - // ---- diff --git a/test/libsolidity/ASTJSON/assembly/call.sol b/test/libsolidity/ASTJSON/assembly/call.sol index 09d1ce184378..1735fd7f7e22 100644 --- a/test/libsolidity/ASTJSON/assembly/call.sol +++ b/test/libsolidity/ASTJSON/assembly/call.sol @@ -3,5 +3,4 @@ contract C { assembly { pop(call(0, 1, 2, 3, 4, 5, 6)) } } } - // ---- diff --git a/test/libsolidity/ASTJSON/assembly/empty_block.sol b/test/libsolidity/ASTJSON/assembly/empty_block.sol index 23c2babbe36d..33bb796ea615 100644 --- a/test/libsolidity/ASTJSON/assembly/empty_block.sol +++ b/test/libsolidity/ASTJSON/assembly/empty_block.sol @@ -3,5 +3,4 @@ contract C { assembly { {} } } } - // ---- diff --git a/test/libsolidity/ASTJSON/assembly/function.sol b/test/libsolidity/ASTJSON/assembly/function.sol index 6020f1f51318..1edf2f2de24d 100644 --- a/test/libsolidity/ASTJSON/assembly/function.sol +++ b/test/libsolidity/ASTJSON/assembly/function.sol @@ -3,5 +3,4 @@ contract C { assembly { function g() { pop(blockhash(20)) } g() } } } - // ---- diff --git a/test/libsolidity/ASTJSON/assembly/leave.sol b/test/libsolidity/ASTJSON/assembly/leave.sol index 5ae4a9e0dd09..39f1cafedb22 100644 --- a/test/libsolidity/ASTJSON/assembly/leave.sol +++ b/test/libsolidity/ASTJSON/assembly/leave.sol @@ -3,5 +3,4 @@ contract C { assembly { function f() { leave } } } } - // ---- diff --git a/test/libsolidity/ASTJSON/assembly/loop.sol b/test/libsolidity/ASTJSON/assembly/loop.sol index bba8d282f63d..baa45e62c489 100644 --- a/test/libsolidity/ASTJSON/assembly/loop.sol +++ b/test/libsolidity/ASTJSON/assembly/loop.sol @@ -3,5 +3,4 @@ contract C { assembly { for {} 1 { pop(sload(0)) } { break continue } } } } - // ---- diff --git a/test/libsolidity/ASTJSON/assembly/nested_functions.sol b/test/libsolidity/ASTJSON/assembly/nested_functions.sol index 396efa0bf8a2..42479fa94ad3 100644 --- a/test/libsolidity/ASTJSON/assembly/nested_functions.sol +++ b/test/libsolidity/ASTJSON/assembly/nested_functions.sol @@ -8,5 +8,4 @@ contract C { } } } - // ---- diff --git a/test/libsolidity/ASTJSON/assembly/slot_offset.sol b/test/libsolidity/ASTJSON/assembly/slot_offset.sol index d3c8f75542e2..0cc2b07c116b 100644 --- a/test/libsolidity/ASTJSON/assembly/slot_offset.sol +++ b/test/libsolidity/ASTJSON/assembly/slot_offset.sol @@ -5,5 +5,4 @@ contract C { assembly { let x := s.offset let y := mul(s.slot, 2) } } } - // ---- diff --git a/test/libsolidity/ASTJSON/assembly/stringlit.sol b/test/libsolidity/ASTJSON/assembly/stringlit.sol index e382095ad0be..6f5278ac17f1 100644 --- a/test/libsolidity/ASTJSON/assembly/stringlit.sol +++ b/test/libsolidity/ASTJSON/assembly/stringlit.sol @@ -3,5 +3,4 @@ contract C { assembly { let x := "abc" } } } - // ---- diff --git a/test/libsolidity/ASTJSON/assembly/switch.sol b/test/libsolidity/ASTJSON/assembly/switch.sol index c04d311b09e4..a7a23d26aac3 100644 --- a/test/libsolidity/ASTJSON/assembly/switch.sol +++ b/test/libsolidity/ASTJSON/assembly/switch.sol @@ -8,5 +8,4 @@ contract C { } } } - // ---- diff --git a/test/libsolidity/ASTJSON/assembly/switch_default.sol b/test/libsolidity/ASTJSON/assembly/switch_default.sol index 1f61896fe275..0760bb7dfdb7 100644 --- a/test/libsolidity/ASTJSON/assembly/switch_default.sol +++ b/test/libsolidity/ASTJSON/assembly/switch_default.sol @@ -3,5 +3,4 @@ contract C { assembly { switch 0 case 0 {} default {} } } } - // ---- diff --git a/test/libsolidity/ASTJSON/assembly/var_access.sol b/test/libsolidity/ASTJSON/assembly/var_access.sol index 768f38c3342c..e4b7423fde04 100644 --- a/test/libsolidity/ASTJSON/assembly/var_access.sol +++ b/test/libsolidity/ASTJSON/assembly/var_access.sol @@ -4,5 +4,4 @@ contract C { assembly { x := 7 } } } - // ---- diff --git a/test/libsolidity/ASTJSON/constructor.sol b/test/libsolidity/ASTJSON/constructor.sol index b2b1c646048b..b48aa1be342a 100644 --- a/test/libsolidity/ASTJSON/constructor.sol +++ b/test/libsolidity/ASTJSON/constructor.sol @@ -2,5 +2,4 @@ contract C { constructor() { } } - // ---- diff --git a/test/libsolidity/ASTJSON/documentation.sol b/test/libsolidity/ASTJSON/documentation.sol index 4d354dd26a1d..6bbf4042af60 100644 --- a/test/libsolidity/ASTJSON/documentation.sol +++ b/test/libsolidity/ASTJSON/documentation.sol @@ -16,5 +16,4 @@ contract C { /** Some comment on mod.*/ modifier mod() { _; } /** Some comment on fn.*/ function fn() public {} } - // ---- diff --git a/test/libsolidity/ASTJSON/documentation_local_variable.sol b/test/libsolidity/ASTJSON/documentation_local_variable.sol index b21602d9280b..a593e0194a9a 100644 --- a/test/libsolidity/ASTJSON/documentation_local_variable.sol +++ b/test/libsolidity/ASTJSON/documentation_local_variable.sol @@ -21,5 +21,4 @@ contract C { uint param3 ) public {} } - // ---- diff --git a/test/libsolidity/ASTJSON/documentation_on_statements.sol b/test/libsolidity/ASTJSON/documentation_on_statements.sol index 235fa3d20bb4..9506bb05c165 100644 --- a/test/libsolidity/ASTJSON/documentation_on_statements.sol +++ b/test/libsolidity/ASTJSON/documentation_on_statements.sol @@ -12,5 +12,4 @@ contract C { return x; } } - // ---- diff --git a/test/libsolidity/ASTJSON/documentation_triple.sol b/test/libsolidity/ASTJSON/documentation_triple.sol index 578933d9c74e..5b14e58f6f05 100644 --- a/test/libsolidity/ASTJSON/documentation_triple.sol +++ b/test/libsolidity/ASTJSON/documentation_triple.sol @@ -12,5 +12,4 @@ contract C { return x; } } - // ---- diff --git a/test/libsolidity/ASTJSON/event_with_variables_of_internal_types.sol b/test/libsolidity/ASTJSON/event_with_variables_of_internal_types.sol index a2291057003d..6fe58c39c168 100644 --- a/test/libsolidity/ASTJSON/event_with_variables_of_internal_types.sol +++ b/test/libsolidity/ASTJSON/event_with_variables_of_internal_types.sol @@ -1,5 +1,4 @@ contract C { event E(function() internal); } - // ---- diff --git a/test/libsolidity/ASTJSON/fail_after_parsing.sol b/test/libsolidity/ASTJSON/fail_after_parsing.sol index b3b53a7c1611..882b4c950267 100644 --- a/test/libsolidity/ASTJSON/fail_after_parsing.sol +++ b/test/libsolidity/ASTJSON/fail_after_parsing.sol @@ -11,6 +11,5 @@ interface I { uint calldata c = 123.4; } } - // ---- // failAfter: Parsed diff --git a/test/libsolidity/ASTJSON/fallback.sol b/test/libsolidity/ASTJSON/fallback.sol index 219d85db593a..170e77958c97 100644 --- a/test/libsolidity/ASTJSON/fallback.sol +++ b/test/libsolidity/ASTJSON/fallback.sol @@ -2,5 +2,4 @@ contract C { fallback() external payable { } } - // ---- diff --git a/test/libsolidity/ASTJSON/fallback_and_receive_ether.sol b/test/libsolidity/ASTJSON/fallback_and_receive_ether.sol index 89acccf5a603..7eb712582db6 100644 --- a/test/libsolidity/ASTJSON/fallback_and_receive_ether.sol +++ b/test/libsolidity/ASTJSON/fallback_and_receive_ether.sol @@ -4,5 +4,4 @@ contract C { fallback() external payable { } } - // ---- diff --git a/test/libsolidity/ASTJSON/fallback_payable.sol b/test/libsolidity/ASTJSON/fallback_payable.sol index d66d378aff8d..7eff747af373 100644 --- a/test/libsolidity/ASTJSON/fallback_payable.sol +++ b/test/libsolidity/ASTJSON/fallback_payable.sol @@ -1,5 +1,4 @@ contract C { fallback() external {} } - // ---- diff --git a/test/libsolidity/ASTJSON/mappings.sol b/test/libsolidity/ASTJSON/mappings.sol index 05912d21f703..5412ca601eb9 100644 --- a/test/libsolidity/ASTJSON/mappings.sol +++ b/test/libsolidity/ASTJSON/mappings.sol @@ -5,5 +5,4 @@ contract C { mapping(E => bool) c; mapping(address keyAddress => uint256 value) d; } - // ---- diff --git a/test/libsolidity/ASTJSON/mutability.sol b/test/libsolidity/ASTJSON/mutability.sol index 7688186e773f..3f67c29e0981 100644 --- a/test/libsolidity/ASTJSON/mutability.sol +++ b/test/libsolidity/ASTJSON/mutability.sol @@ -4,5 +4,4 @@ contract C uint public constant b = 2; uint public c = 3; } - // ---- diff --git a/test/libsolidity/ASTJSON/not_existing_import.sol b/test/libsolidity/ASTJSON/not_existing_import.sol index 7251a02b84a5..ad3c100c499b 100644 --- a/test/libsolidity/ASTJSON/not_existing_import.sol +++ b/test/libsolidity/ASTJSON/not_existing_import.sol @@ -4,6 +4,5 @@ contract C is NotExisting.X NotExisting.SomeStruct public myStruct; constructor() {} } - // ---- // failAfter: Parsed diff --git a/test/libsolidity/ASTJSON/override.sol b/test/libsolidity/ASTJSON/override.sol index 1aaa58c600ab..a03244985744 100644 --- a/test/libsolidity/ASTJSON/override.sol +++ b/test/libsolidity/ASTJSON/override.sol @@ -9,5 +9,4 @@ contract C is B { function foo() public override { } function faa() public override { } } - // ---- diff --git a/test/libsolidity/ASTJSON/receive_ether.sol b/test/libsolidity/ASTJSON/receive_ether.sol index f75a43b2dfd1..1e59dc1317bc 100644 --- a/test/libsolidity/ASTJSON/receive_ether.sol +++ b/test/libsolidity/ASTJSON/receive_ether.sol @@ -2,5 +2,4 @@ contract C { receive() external payable { } } - // ---- diff --git a/test/libsolidity/ASTJSON/two_base_functions.sol b/test/libsolidity/ASTJSON/two_base_functions.sol index 89c8e207a531..0a00bcc14505 100644 --- a/test/libsolidity/ASTJSON/two_base_functions.sol +++ b/test/libsolidity/ASTJSON/two_base_functions.sol @@ -7,5 +7,4 @@ contract B { contract C is A, B { function f() public override(A, B) {} } - // ---- diff --git a/test/libsolidity/ASTJSON/used_errors.sol b/test/libsolidity/ASTJSON/used_errors.sol index 24c03982fed6..97f7a27f48e2 100644 --- a/test/libsolidity/ASTJSON/used_errors.sol +++ b/test/libsolidity/ASTJSON/used_errors.sol @@ -4,5 +4,4 @@ contract C { error T(); function h() public { f(); } } - // ---- diff --git a/test/libsolidity/ASTJSON/userDefinedValueType.sol b/test/libsolidity/ASTJSON/userDefinedValueType.sol index f1124f8cd6fd..d5ef2e00b9f8 100644 --- a/test/libsolidity/ASTJSON/userDefinedValueType.sol +++ b/test/libsolidity/ASTJSON/userDefinedValueType.sol @@ -9,5 +9,4 @@ contract C { type MyUInt is uint; mapping(MyAddress => MyUInt) public m; } - // ---- diff --git a/test/libsolidity/ASTJSON/user_defined_operator.sol b/test/libsolidity/ASTJSON/user_defined_operator.sol index df5d0ed32609..bfbdf7b9bf83 100644 --- a/test/libsolidity/ASTJSON/user_defined_operator.sol +++ b/test/libsolidity/ASTJSON/user_defined_operator.sol @@ -7,5 +7,4 @@ contract C { return -a - b; } } - // ---- diff --git a/test/libsolidity/ASTJSON/yul_hex_literal.sol b/test/libsolidity/ASTJSON/yul_hex_literal.sol index f441866c1d1b..c3b57a8fe8d2 100644 --- a/test/libsolidity/ASTJSON/yul_hex_literal.sol +++ b/test/libsolidity/ASTJSON/yul_hex_literal.sol @@ -7,5 +7,4 @@ contract Sample { } } } - // ---- diff --git a/test/libsolidity/SemanticTest.cpp b/test/libsolidity/SemanticTest.cpp index 4746999a3ec8..1d8a9c9c09ce 100644 --- a/test/libsolidity/SemanticTest.cpp +++ b/test/libsolidity/SemanticTest.cpp @@ -50,7 +50,6 @@ SemanticTest::SemanticTest( langutil::EVMVersion _evmVersion, optional _eofVersion, vector const& _vmPaths, - bool _enforceCompileToEwasm, bool _enforceGasCost, u256 _enforceGasCostMinValue ): @@ -60,7 +59,6 @@ SemanticTest::SemanticTest( m_lineOffset(m_reader.lineNumber()), m_builtins(makeBuiltins()), m_sideEffectHooks(makeSideEffectHooks()), - m_enforceCompileToEwasm(_enforceCompileToEwasm), m_enforceGasCost(_enforceGasCost), m_enforceGasCostMinValue(std::move(_enforceGasCostMinValue)) { @@ -83,25 +81,6 @@ SemanticTest::SemanticTest( m_testCaseWantsYulRun = util::contains(yulRunTriggers, compileViaYul); m_testCaseWantsLegacyRun = util::contains(legacyRunTriggers, compileViaYul); - // Do not enforce ewasm, if via yul was explicitly denied. - if (compileViaYul == "false") - m_enforceCompileToEwasm = false; - - string compileToEwasm = m_reader.stringSetting("compileToEwasm", "false"); - if (compileToEwasm == "also") - m_testCaseWantsEwasmRun = true; - else if (compileToEwasm == "false") - m_testCaseWantsEwasmRun = false; - else - BOOST_THROW_EXCEPTION(runtime_error("Invalid compileToEwasm value: " + compileToEwasm + ".")); - - if (m_testCaseWantsEwasmRun && !m_testCaseWantsYulRun) - BOOST_THROW_EXCEPTION(runtime_error("Invalid compileToEwasm value: " + compileToEwasm + ", compileViaYul need to be enabled.")); - - // run ewasm tests only if an ewasm evmc vm was defined - if (m_testCaseWantsEwasmRun && !m_supportsEwasm) - m_testCaseWantsEwasmRun = false; - auto revertStrings = revertStringsFromString(m_reader.stringSetting("revertStrings", "default")); soltestAssert(revertStrings, "Invalid revertStrings setting."); m_revertStrings = revertStrings.value(); @@ -298,24 +277,10 @@ TestCase::TestResult SemanticTest::run(ostream& _stream, string const& _linePref TestResult result = TestResult::Success; if (m_testCaseWantsLegacyRun && !m_eofVersion.has_value()) - result = runTest(_stream, _linePrefix, _formatted, false, false); + result = runTest(_stream, _linePrefix, _formatted, false); if (m_testCaseWantsYulRun && result == TestResult::Success) - result = runTest(_stream, _linePrefix, _formatted, true, false); - - if (!m_eofVersion.has_value() && (m_testCaseWantsEwasmRun || m_enforceCompileToEwasm) && result == TestResult::Success) - { - // TODO: Once we have full Ewasm support, we could remove try/catch here. - try - { - result = runTest(_stream, _linePrefix, _formatted, true, true); - } - catch (...) - { - if (!m_enforceCompileToEwasm) - throw; - } - } + result = runTest(_stream, _linePrefix, _formatted, true); if (result != TestResult::Success) solidity::test::CommonOptions::get().printSelectedOptions( @@ -331,33 +296,19 @@ TestCase::TestResult SemanticTest::runTest( ostream& _stream, string const& _linePrefix, bool _formatted, - bool _isYulRun, - bool _isEwasmRun) + bool _isYulRun) { bool success = true; m_gasCostFailure = false; - if (_isEwasmRun) - { - soltestAssert(_isYulRun, ""); - selectVM(evmc_capabilities::EVMC_CAPABILITY_EWASM); - } - else - selectVM(evmc_capabilities::EVMC_CAPABILITY_EVM1); + selectVM(evmc_capabilities::EVMC_CAPABILITY_EVM1); reset(); m_compileViaYul = _isYulRun; - if (_isEwasmRun) - { - soltestAssert(m_compileViaYul, ""); - m_compileToEwasm = _isEwasmRun; - } - - m_canEnableEwasmRun = false; if (_isYulRun) - AnsiColorized(_stream, _formatted, {BOLD, CYAN}) << _linePrefix << "Running via Yul" << (_isEwasmRun ? " (ewasm):" : ":") << endl; + AnsiColorized(_stream, _formatted, {BOLD, CYAN}) << _linePrefix << "Running via Yul: " << endl; for (TestFunctionCall& test: m_tests) test.reset(); @@ -470,31 +421,8 @@ TestCase::TestResult SemanticTest::runTest( success &= test.call().expectedSideEffects == test.call().actualSideEffects; } - // Right now we have sometimes different test results in Yul vs. Ewasm. - // The main reason is that Ewasm just returns a failure in some cases. - // TODO: If Ewasm support got fully implemented, we could implement this in the same way as above. - if (success && !m_testCaseWantsEwasmRun && _isEwasmRun) - { - // TODO: There is something missing in Ewasm to support other types of revert strings: - // for now, we just ignore test-cases that do not use RevertStrings::Default. - if (m_revertStrings != RevertStrings::Default) - return TestResult::Success; - - m_canEnableEwasmRun = true; - AnsiColorized(_stream, _formatted, {BOLD, YELLOW}) << - _linePrefix << endl << - _linePrefix << "Test can pass via Yul (Ewasm), but marked with \"compileToEwasm: false.\"" << endl; - return TestResult::Failure; - } - if (!success) { - // Ignore failing tests that can't yet get compiled to Ewasm: - // if the test run was not successful and enforce compiling to ewasm was set, - // but the test case did not want to get run with Ewasm, we just ignore this failure. - if (m_enforceCompileToEwasm && !m_testCaseWantsEwasmRun) - return TestResult::Success; - AnsiColorized(_stream, _formatted, {BOLD, CYAN}) << _linePrefix << "Expected result:" << endl; for (TestFunctionCall const& test: m_tests) { @@ -647,21 +575,12 @@ void SemanticTest::printUpdatedExpectations(ostream& _stream, string const&) con void SemanticTest::printUpdatedSettings(ostream& _stream, string const& _linePrefix) { auto& settings = m_reader.settings(); - if (settings.empty() && !m_canEnableEwasmRun) + if (settings.empty()) return; _stream << _linePrefix << "// ====" << endl; - if (m_canEnableEwasmRun) - { - soltestAssert(m_testCaseWantsYulRun, ""); - _stream << _linePrefix << "// compileToEwasm: also\n"; - } - for (auto const& [settingName, settingValue]: settings) - if ( - !(settingName == "compileToEwasm" && m_canEnableEwasmRun) - ) - _stream << _linePrefix << "// " << settingName << ": " << settingValue<< endl; + _stream << _linePrefix << "// " << settingName << ": " << settingValue<< endl; } void SemanticTest::parseExpectations(istream& _stream) diff --git a/test/libsolidity/SemanticTest.h b/test/libsolidity/SemanticTest.h index c5abb93e270d..b5b7be83afa9 100644 --- a/test/libsolidity/SemanticTest.h +++ b/test/libsolidity/SemanticTest.h @@ -53,7 +53,6 @@ class SemanticTest: public SolidityExecutionFramework, public EVMVersionRestrict _options.evmVersion, _options.eofVersion, _options.vmPaths, - _options.enforceCompileToEwasm, _options.enforceGasCost, _options.enforceGasCostMinValue ); @@ -64,7 +63,6 @@ class SemanticTest: public SolidityExecutionFramework, public EVMVersionRestrict langutil::EVMVersion _evmVersion, std::optional _eofVersion, std::vector const& _vmPaths, - bool _enforceCompileToEwasm = false, bool _enforceGasCost = false, u256 _enforceGasCostMinValue = 100000 ); @@ -85,7 +83,7 @@ class SemanticTest: public SolidityExecutionFramework, public EVMVersionRestrict bool deploy(std::string const& _contractName, u256 const& _value, bytes const& _arguments, std::map const& _libraries = {}); private: - TestResult runTest(std::ostream& _stream, std::string const& _linePrefix, bool _formatted, bool _isYulRun, bool _isEwasmRun); + TestResult runTest(std::ostream& _stream, std::string const& _linePrefix, bool _formatted, bool _isYulRun); bool checkGasCostExpectation(TestFunctionCall& io_test, bool _compileViaYul) const; std::map makeBuiltins(); std::vector makeSideEffectHooks() const; @@ -98,12 +96,9 @@ class SemanticTest: public SolidityExecutionFramework, public EVMVersionRestrict std::map const m_builtins; std::vector const m_sideEffectHooks; bool m_testCaseWantsYulRun = true; - bool m_testCaseWantsEwasmRun = false; bool m_testCaseWantsLegacyRun = true; - bool m_enforceCompileToEwasm = false; bool m_runWithABIEncoderV1Only = false; bool m_allowNonExistingFunctions = false; - bool m_canEnableEwasmRun = false; bool m_gasCostFailure = false; bool m_enforceGasCost = false; u256 m_enforceGasCostMinValue; diff --git a/test/libsolidity/SolidityEndToEndTest.cpp b/test/libsolidity/SolidityEndToEndTest.cpp index 268861fd2abc..b174419d21d2 100644 --- a/test/libsolidity/SolidityEndToEndTest.cpp +++ b/test/libsolidity/SolidityEndToEndTest.cpp @@ -53,33 +53,19 @@ using namespace solidity::langutil; #define ALSO_VIA_YUL(CODE) \ { \ - m_doEwasmTestrun = true; \ - \ m_compileViaYul = false; \ - m_compileToEwasm = false; \ { CODE } \ \ m_compileViaYul = true; \ reset(); \ { CODE } \ - \ - if (m_doEwasmTestrun) \ - { \ - m_compileToEwasm = true; \ - reset(); \ - { CODE } \ - } \ } -#define DISABLE_EWASM_TESTRUN() \ - { m_doEwasmTestrun = false; } - namespace solidity::frontend::test { struct SolidityEndToEndTestExecutionFramework: public SolidityExecutionFramework { - bool m_doEwasmTestrun = false; }; BOOST_FIXTURE_TEST_SUITE(SolidityEndToEndTest, SolidityEndToEndTestExecutionFramework) @@ -108,7 +94,6 @@ BOOST_AUTO_TEST_CASE(creation_code_optimizer) reset(); compileAndRun(codeC + codeD); ABI_CHECK(callContractFunction("f()"), encodeArgs(0x20, bytecodeC.size()) + encode(bytecodeC, false)); - m_doEwasmTestrun = false; }) } @@ -166,8 +151,6 @@ BOOST_AUTO_TEST_CASE(recursive_calls) } )"; ALSO_VIA_YUL( - DISABLE_EWASM_TESTRUN() - compileAndRun(sourceCode); function recursive_calls_cpp = [&recursive_calls_cpp](u256 const& n) -> u256 { @@ -193,8 +176,6 @@ BOOST_AUTO_TEST_CASE(while_loop) } )"; ALSO_VIA_YUL( - DISABLE_EWASM_TESTRUN() - compileAndRun(sourceCode); auto while_loop_cpp = [](u256 const& n) -> u256 @@ -223,8 +204,6 @@ BOOST_AUTO_TEST_CASE(do_while_loop) } )"; ALSO_VIA_YUL( - DISABLE_EWASM_TESTRUN() - compileAndRun(sourceCode); auto do_while_loop_cpp = [](u256 const& n) -> u256 @@ -270,8 +249,6 @@ BOOST_AUTO_TEST_CASE(do_while_loop_multiple_local_vars) } )"; ALSO_VIA_YUL( - DISABLE_EWASM_TESTRUN() - compileAndRun(sourceCode); auto do_while = [](u256 n) -> u256 @@ -322,8 +299,6 @@ BOOST_AUTO_TEST_CASE(nested_loops) } )"; ALSO_VIA_YUL( - DISABLE_EWASM_TESTRUN() - compileAndRun(sourceCode); auto nested_loops_cpp = [](u256 n) -> u256 @@ -390,8 +365,6 @@ BOOST_AUTO_TEST_CASE(nested_loops_multiple_local_vars) } )"; ALSO_VIA_YUL( - DISABLE_EWASM_TESTRUN() - compileAndRun(sourceCode); auto nested_loops_cpp = [](u256 n) -> u256 @@ -446,8 +419,6 @@ BOOST_AUTO_TEST_CASE(for_loop_multiple_local_vars) } )"; ALSO_VIA_YUL( - DISABLE_EWASM_TESTRUN() - compileAndRun(sourceCode); auto for_loop = [](u256 n) -> u256 @@ -509,8 +480,6 @@ BOOST_AUTO_TEST_CASE(nested_for_loop_multiple_local_vars) } )"; ALSO_VIA_YUL( - DISABLE_EWASM_TESTRUN() - compileAndRun(sourceCode); auto for_loop = [](u256 n) -> u256 @@ -551,8 +520,6 @@ BOOST_AUTO_TEST_CASE(for_loop) } )"; ALSO_VIA_YUL( - DISABLE_EWASM_TESTRUN() - compileAndRun(sourceCode); auto for_loop_cpp = [](u256 const& n) -> u256 @@ -580,8 +547,6 @@ BOOST_AUTO_TEST_CASE(for_loop_simple_init_expr) } )"; ALSO_VIA_YUL( - DISABLE_EWASM_TESTRUN() - compileAndRun(sourceCode); auto for_loop_simple_init_expr_cpp = [](u256 const& n) -> u256 @@ -621,7 +586,6 @@ BOOST_AUTO_TEST_CASE(for_loop_break_continue) } )"; ALSO_VIA_YUL( - DISABLE_EWASM_TESTRUN() compileAndRun(sourceCode); auto breakContinue = [](u256 const& n) -> u256 @@ -657,8 +621,6 @@ BOOST_AUTO_TEST_CASE(short_circuiting) } )"; ALSO_VIA_YUL( - DISABLE_EWASM_TESTRUN() - compileAndRun(sourceCode); auto short_circuiting_cpp = [](u256 n) -> u256 @@ -776,8 +738,6 @@ BOOST_AUTO_TEST_CASE(mapping_state_inc_dec) return --table[value++]; }; ALSO_VIA_YUL( - DISABLE_EWASM_TESTRUN() - compileAndRun(sourceCode); value = 0; table.clear(); @@ -804,8 +764,6 @@ BOOST_AUTO_TEST_CASE(multi_level_mapping) else return table[_x][_y] = _z; }; ALSO_VIA_YUL( - DISABLE_EWASM_TESTRUN() - compileAndRun(sourceCode); table.clear(); @@ -842,8 +800,6 @@ BOOST_AUTO_TEST_CASE(constructor) }; ALSO_VIA_YUL( - DISABLE_EWASM_TESTRUN() - compileAndRun(sourceCode); testContractAgainstCpp("get(uint256)", get, u256(6)); testContractAgainstCpp("get(uint256)", get, u256(7)); @@ -862,8 +818,6 @@ BOOST_AUTO_TEST_CASE(send_ether) } )"; ALSO_VIA_YUL( - DISABLE_EWASM_TESTRUN() - u256 amount(250); compileAndRun(sourceCode, amount + 1); h160 address(23); @@ -896,8 +850,6 @@ BOOST_AUTO_TEST_CASE(transfer_ether) } )"; ALSO_VIA_YUL( - DISABLE_EWASM_TESTRUN() - compileAndRun(sourceCode, 0, "B"); h160 const nonPayableRecipient = m_contractAddress; compileAndRun(sourceCode, 0, "C"); @@ -1237,8 +1189,6 @@ BOOST_AUTO_TEST_CASE(empty_name_input_parameter_with_named_one) } )"; ALSO_VIA_YUL( - DISABLE_EWASM_TESTRUN() - compileAndRun(sourceCode); BOOST_CHECK(callContractFunction("f(uint256,uint256)", 5, 9) != encodeArgs(5, 8)); ABI_CHECK(callContractFunction("f(uint256,uint256)", 5, 9), encodeArgs(9, 8)); @@ -1382,7 +1332,6 @@ BOOST_AUTO_TEST_CASE(library_call_protection) } )"; ALSO_VIA_YUL( - DISABLE_EWASM_TESTRUN() compileAndRun(sourceCode, 0, "Lib"); ABI_CHECK(callContractFunction("np(Lib.S storage)", 0), encodeArgs()); ABI_CHECK(callContractFunction("v(Lib.S storage)", 0), encodeArgs(m_sender)); @@ -1406,7 +1355,6 @@ BOOST_AUTO_TEST_CASE(bytes_from_calldata_to_memory) } )"; ALSO_VIA_YUL( - DISABLE_EWASM_TESTRUN(); compileAndRun(sourceCode); bytes calldata1 = util::selectorFromSignatureH32("f()").asBytes() + bytes(61, 0x22) + bytes(12, 0x12); sendMessage(calldata1, false); @@ -1446,7 +1394,6 @@ BOOST_AUTO_TEST_CASE(call_forward_bytes_length) } )"; ALSO_VIA_YUL( - DISABLE_EWASM_TESTRUN(); compileAndRun(sourceCode, 0, "sender"); // No additional data, just function selector @@ -1485,7 +1432,6 @@ BOOST_AUTO_TEST_CASE(copying_bytes_multiassign) } )"; ALSO_VIA_YUL( - DISABLE_EWASM_TESTRUN() compileAndRun(sourceCode, 0, "sender"); ABI_CHECK(callContractFunction("recv(uint256)", 7), bytes()); ABI_CHECK(callContractFunction("val()"), encodeArgs(0)); @@ -1508,7 +1454,6 @@ BOOST_AUTO_TEST_CASE(copy_from_calldata_removes_bytes_data) } )"; ALSO_VIA_YUL( - DISABLE_EWASM_TESTRUN() compileAndRun(sourceCode); ABI_CHECK(callContractFunction("set()", 1, 2, 3, 4, 5), encodeArgs(true)); BOOST_CHECK(!storageEmpty(m_contractAddress)); @@ -1569,7 +1514,6 @@ BOOST_AUTO_TEST_CASE(struct_referencing) } )"; ALSO_VIA_YUL( - DISABLE_EWASM_TESTRUN() compileAndRun(sourceCode, 0, "L"); ABI_CHECK(callContractFunction("f()"), encodeArgs(0, 3)); ABI_CHECK(callContractFunction("g()"), encodeArgs(4)); @@ -1618,7 +1562,6 @@ BOOST_AUTO_TEST_CASE(enum_referencing) } )"; ALSO_VIA_YUL( - DISABLE_EWASM_TESTRUN() compileAndRun(sourceCode, 0, "L"); ABI_CHECK(callContractFunction("f()"), encodeArgs(1)); ABI_CHECK(callContractFunction("g()"), encodeArgs(3)); @@ -1649,8 +1592,6 @@ BOOST_AUTO_TEST_CASE(bytes_in_arguments) } )"; ALSO_VIA_YUL( - DISABLE_EWASM_TESTRUN() - compileAndRun(sourceCode); string innercalldata1 = asString(util::selectorFromSignatureH32("f(uint256,uint256)").asBytes() + encodeArgs(8, 9)); @@ -1702,8 +1643,6 @@ BOOST_AUTO_TEST_CASE(array_copy_storage_abi) } )"; ALSO_VIA_YUL( - DISABLE_EWASM_TESTRUN() - compileAndRun(sourceCode); bytes valueSequence; for (size_t i = 0; i < 101; ++i) @@ -2138,8 +2077,6 @@ BOOST_AUTO_TEST_CASE(string_as_mapping_key) }; ALSO_VIA_YUL( - DISABLE_EWASM_TESTRUN() - compileAndRun(sourceCode, 0, "Test"); for (unsigned i = 0; i < strings.size(); i++) ABI_CHECK(callContractFunction( @@ -2308,7 +2245,6 @@ BOOST_AUTO_TEST_CASE(library_call) } )"; ALSO_VIA_YUL( - DISABLE_EWASM_TESTRUN() compileAndRun(sourceCode, 0, "Lib"); compileAndRun(sourceCode, 0, "Test", bytes(), map{{":Lib", m_contractAddress}}); ABI_CHECK(callContractFunction("f(uint256)", u256(33)), encodeArgs(u256(33) * 9)); @@ -2326,7 +2262,6 @@ BOOST_AUTO_TEST_CASE(library_function_external) } )"; ALSO_VIA_YUL( - DISABLE_EWASM_TESTRUN() compileAndRun(sourceCode, 0, "Lib"); compileAndRun(sourceCode, 0, "Test", bytes(), map{{":Lib", m_contractAddress}}); ABI_CHECK(callContractFunction("f(bytes)", u256(0x20), u256(5), "abcde"), encodeArgs("c")); @@ -2478,7 +2413,6 @@ BOOST_AUTO_TEST_CASE(short_strings) } )"; ALSO_VIA_YUL( - DISABLE_EWASM_TESTRUN() compileAndRun(sourceCode, 0, "A"); ABI_CHECK(callContractFunction("data1()"), encodeDyn(string("123"))); ABI_CHECK(callContractFunction("lengthChange()"), encodeArgs(u256(0))); @@ -2522,7 +2456,6 @@ BOOST_AUTO_TEST_CASE(reject_ether_sent_to_library) } )"; ALSO_VIA_YUL( - DISABLE_EWASM_TESTRUN() compileAndRun(sourceCode, 0, "lib"); Address libraryAddress = m_contractAddress; compileAndRun(sourceCode, 10, "c"); @@ -2737,7 +2670,6 @@ BOOST_AUTO_TEST_CASE(non_payable_throw) } )"; ALSO_VIA_YUL( - DISABLE_EWASM_TESTRUN() compileAndRun(sourceCode, 0, "C"); ABI_CHECK(callContractFunctionWithValue("f()", 27), encodeArgs()); BOOST_CHECK_EQUAL(balanceAt(m_contractAddress), 0); @@ -2784,7 +2716,6 @@ BOOST_AUTO_TEST_CASE(receive_external_function_type) )"; ALSO_VIA_YUL( - DISABLE_EWASM_TESTRUN() compileAndRun(sourceCode, 0, "C"); ABI_CHECK(callContractFunction( "f(function)", @@ -2839,8 +2770,6 @@ BOOST_AUTO_TEST_CASE(contracts_separated_with_comment) contract C2 {} )"; ALSO_VIA_YUL( - DISABLE_EWASM_TESTRUN() - compileAndRun(sourceCode, 0, "C1"); compileAndRun(sourceCode, 0, "C2"); ) @@ -3308,7 +3237,6 @@ BOOST_AUTO_TEST_CASE(bare_call_return_data) } )DELIMITER"; ALSO_VIA_YUL( - DISABLE_EWASM_TESTRUN() compileAndRun(sourceCode, 0, "C"); ABI_CHECK(callContractFunction("f(string)", encodeDyn(string("return_bool()"))), encodeArgs(true, 0x40, 0x20, true)); ABI_CHECK(callContractFunction("f(string)", encodeDyn(string("return_int32()"))), encodeArgs(true, 0x40, 0x20, u256(-32))); @@ -3369,7 +3297,6 @@ BOOST_AUTO_TEST_CASE(abi_encodePacked) for (auto v2: {false, true}) { ALSO_VIA_YUL( - DISABLE_EWASM_TESTRUN() string prefix = "pragma abicoder " + string(v2 ? "v2" : "v1") + ";\n"; compileAndRun(prefix + sourceCode, 0, "C"); ABI_CHECK(callContractFunction("f0()"), encodeArgs(0x20, 0)); @@ -3447,7 +3374,6 @@ BOOST_AUTO_TEST_CASE(abi_encodePacked_from_storage) for (auto v2: {false, true}) { ALSO_VIA_YUL( - DISABLE_EWASM_TESTRUN() string prefix = "pragma abicoder " + string(v2 ? "v2" : "v1") + ";\n"; compileAndRun(prefix + sourceCode, 0, "C"); bytes payload = encodeArgs(0xfffff1, 0, 0xfffff2, 0, 0, 0xfffff3, 0, 0, 0xfffff4); @@ -3521,7 +3447,6 @@ BOOST_AUTO_TEST_CASE(abi_encodePacked_from_memory) for (auto v2: {false, true}) { ALSO_VIA_YUL( - DISABLE_EWASM_TESTRUN() string prefix = "pragma abicoder " + string(v2 ? "v2" : "v1") + ";\n"; compileAndRun(prefix + sourceCode, 0, "C"); bytes payload = encodeArgs(0xfffff1, 0, 0xfffff2, 0, 0, 0xfffff3, 0, 0, 0xfffff4); @@ -3568,7 +3493,6 @@ BOOST_AUTO_TEST_CASE(abi_encodePacked_functionPtr) for (auto v2: {false, true}) { ALSO_VIA_YUL( - DISABLE_EWASM_TESTRUN() string prefix = "pragma abicoder " + string(v2 ? "v2" : "v1") + ";\n"; compileAndRun(prefix + sourceCode, 0, "C"); string directEncoding = asString(fromHex("08" "1112131400000000000011121314000000000087" "26121ff0" "02")); @@ -3611,7 +3535,6 @@ BOOST_AUTO_TEST_CASE(abi_encodePackedV2_structs) } )"; ALSO_VIA_YUL( - DISABLE_EWASM_TESTRUN() compileAndRun(sourceCode, 0, "C"); bytes structEnc = encodeArgs(int(0x12), u256(-7), int(2), int(3), u256(-7), u256(-8)); ABI_CHECK(callContractFunction("testStorage()"), encodeArgs()); @@ -3647,7 +3570,6 @@ BOOST_AUTO_TEST_CASE(abi_encodePackedV2_nestedArray) } )"; ALSO_VIA_YUL( - DISABLE_EWASM_TESTRUN() compileAndRun(sourceCode, 0, "C"); bytes structEnc = encodeArgs(1, 2, 3, 0, 0, 0, 0, 4); ABI_CHECK(callContractFunction("testNestedArrays()"), encodeArgs()); @@ -3678,7 +3600,6 @@ BOOST_AUTO_TEST_CASE(abi_encodePackedV2_arrayOfStrings) } )"; ALSO_VIA_YUL( - DISABLE_EWASM_TESTRUN() compileAndRun(sourceCode, 0, "C"); bytes arrayEncoding = encodeArgs("abc", "0123456789012345678901234567890123456789"); ABI_CHECK(callContractFunction("testStorage()"), encodeArgs()); @@ -3798,7 +3719,6 @@ BOOST_AUTO_TEST_CASE(event_wrong_abi_name) } )"; ALSO_VIA_YUL( - DISABLE_EWASM_TESTRUN() compileAndRun(sourceCode, 0, "ClientReceipt", bytes()); compileAndRun(sourceCode, 0, "Test", bytes(), map{{":ClientReceipt", m_contractAddress}}); @@ -3874,7 +3794,6 @@ BOOST_AUTO_TEST_CASE(strip_reason_strings) } )"; ALSO_VIA_YUL( - DISABLE_EWASM_TESTRUN() m_revertStrings = RevertStrings::Default; compileAndRun(sourceCode, 0, "C"); diff --git a/test/libsolidity/SolidityExecutionFramework.cpp b/test/libsolidity/SolidityExecutionFramework.cpp index 3e8372ef78a7..7d18e1bb4aa5 100644 --- a/test/libsolidity/SolidityExecutionFramework.cpp +++ b/test/libsolidity/SolidityExecutionFramework.cpp @@ -53,7 +53,6 @@ bytes SolidityExecutionFramework::multiSourceCompileContract( entry.second = addPreamble(entry.second); m_compiler.reset(); - m_compiler.enableEwasmGeneration(m_compileToEwasm); m_compiler.setSources(sourcesWithPreamble); m_compiler.setLibraries(_libraryAddresses); m_compiler.setRevertStringBehaviour(m_revertStrings); @@ -83,46 +82,41 @@ bytes SolidityExecutionFramework::multiSourceCompileContract( evmasm::LinkerObject obj; if (m_compileViaYul) { - if (m_compileToEwasm) - obj = m_compiler.ewasmObject(contractName); - else + // Try compiling twice: If the first run fails due to stack errors, forcefully enable + // the optimizer. + for (bool forceEnableOptimizer: {false, true}) { - // Try compiling twice: If the first run fails due to stack errors, forcefully enable - // the optimizer. - for (bool forceEnableOptimizer: {false, true}) + OptimiserSettings optimiserSettings = m_optimiserSettings; + if (!forceEnableOptimizer && !optimiserSettings.runYulOptimiser) { - OptimiserSettings optimiserSettings = m_optimiserSettings; - if (!forceEnableOptimizer && !optimiserSettings.runYulOptimiser) - { - // Enable some optimizations on the first run - optimiserSettings.runYulOptimiser = true; - optimiserSettings.yulOptimiserSteps = "uljmul jmul"; - } - else if (forceEnableOptimizer) - optimiserSettings = OptimiserSettings::full(); + // Enable some optimizations on the first run + optimiserSettings.runYulOptimiser = true; + optimiserSettings.yulOptimiserSteps = "uljmul jmul"; + } + else if (forceEnableOptimizer) + optimiserSettings = OptimiserSettings::full(); - yul::YulStack asmStack( - m_evmVersion, - m_eofVersion, - yul::YulStack::Language::StrictAssembly, - optimiserSettings, - DebugInfoSelection::All() - ); - bool analysisSuccessful = asmStack.parseAndAnalyze("", m_compiler.yulIROptimized(contractName)); - solAssert(analysisSuccessful, "Code that passed analysis in CompilerStack can't have errors"); + yul::YulStack asmStack( + m_evmVersion, + m_eofVersion, + yul::YulStack::Language::StrictAssembly, + optimiserSettings, + DebugInfoSelection::All() + ); + bool analysisSuccessful = asmStack.parseAndAnalyze("", m_compiler.yulIROptimized(contractName)); + solAssert(analysisSuccessful, "Code that passed analysis in CompilerStack can't have errors"); - try - { - asmStack.optimize(); - obj = std::move(*asmStack.assemble(yul::YulStack::Machine::EVM).bytecode); - obj.link(_libraryAddresses); - break; - } - catch (...) - { - if (forceEnableOptimizer || optimiserSettings == OptimiserSettings::full()) - throw; - } + try + { + asmStack.optimize(); + obj = std::move(*asmStack.assemble(yul::YulStack::Machine::EVM).bytecode); + obj.link(_libraryAddresses); + break; + } + catch (...) + { + if (forceEnableOptimizer || optimiserSettings == OptimiserSettings::full()) + throw; } } } diff --git a/test/libsolidity/SolidityExecutionFramework.h b/test/libsolidity/SolidityExecutionFramework.h index 4865c68a2253..c2cea6600ae6 100644 --- a/test/libsolidity/SolidityExecutionFramework.h +++ b/test/libsolidity/SolidityExecutionFramework.h @@ -87,7 +87,6 @@ class SolidityExecutionFramework: public solidity::test::ExecutionFramework std::optional m_eofVersion; CompilerStack m_compiler; bool m_compileViaYul = false; - bool m_compileToEwasm = false; bool m_showMetadata = false; bool m_appendCBORMetadata = true; CompilerStack::MetadataHash m_metadataHash = CompilerStack::MetadataHash::IPFS; diff --git a/test/libsolidity/errorRecoveryTests/contract_recovery.sol b/test/libsolidity/errorRecoveryTests/contract_recovery.sol index 980c2beaba5c..082d91be6c76 100644 --- a/test/libsolidity/errorRecoveryTests/contract_recovery.sol +++ b/test/libsolidity/errorRecoveryTests/contract_recovery.sol @@ -1,7 +1,6 @@ contract Errort6 { using foo for ; // missing type name } - // ---- // ParserError 3546: (36-37): Expected type name // Warning 3796: (59-60): Recovered in ContractDefinition at '}'. diff --git a/test/libsolidity/errorRecoveryTests/error_to_eos.sol b/test/libsolidity/errorRecoveryTests/error_to_eos.sol index 6ecc6d9d63fe..5d09898601cc 100644 --- a/test/libsolidity/errorRecoveryTests/error_to_eos.sol +++ b/test/libsolidity/errorRecoveryTests/error_to_eos.sol @@ -15,7 +15,6 @@ contract SendCoin { return true; } } - // ---- // ParserError 6635: (235-236): Expected identifier but got '}' // ParserError 6635: (276-284): Expected ';' but got 'contract' diff --git a/test/libsolidity/lsp/rename/function.sol b/test/libsolidity/lsp/rename/function.sol index ffd8f6b58967..852086c2c785 100644 --- a/test/libsolidity/lsp/rename/function.sol +++ b/test/libsolidity/lsp/rename/function.sol @@ -40,7 +40,6 @@ function free() pure // ^^^^^^^^ @FunctionInFreeFunction // ^ @CursorInFreeFunction } - // ---- // -> textDocument/rename { // "newName": "Renamed", diff --git a/test/libsolidity/lsp/rename/import_directive.sol b/test/libsolidity/lsp/rename/import_directive.sol index a6b596866a7b..70d86f5d0619 100644 --- a/test/libsolidity/lsp/rename/import_directive.sol +++ b/test/libsolidity/lsp/rename/import_directive.sol @@ -26,7 +26,6 @@ contract C // ^^^^ @UserInPublicVariable // ^ @CursorOnUserInPublicVariable } - // ---- // contract: // -> textDocument/rename { diff --git a/test/libsolidity/lsp/rename/variable.sol b/test/libsolidity/lsp/rename/variable.sol index 39c23bcd72a8..a3c08f320229 100644 --- a/test/libsolidity/lsp/rename/variable.sol +++ b/test/libsolidity/lsp/rename/variable.sol @@ -24,7 +24,6 @@ function freeFunction(C _contract) view returns(int) // ^^^^^^^^ @VariableInFreeFunction // ^ @CursorOnVariableInFreeFunction } - // ---- // -> textDocument/rename { // "newName": "Renamed", diff --git a/test/libsolidity/lsp/semanticTokens/enums.sol b/test/libsolidity/lsp/semanticTokens/enums.sol index ea1655e1ef6f..848c08e7fe55 100644 --- a/test/libsolidity/lsp/semanticTokens/enums.sol +++ b/test/libsolidity/lsp/semanticTokens/enums.sol @@ -17,7 +17,6 @@ function getColorEnum() pure returns (Color result) { result = Color.Red; } - // ---- // -> textDocument/semanticTokens/full { // } diff --git a/test/libsolidity/lsp/semanticTokens/functions.sol b/test/libsolidity/lsp/semanticTokens/functions.sol index fee9af788783..a7a53495fddc 100644 --- a/test/libsolidity/lsp/semanticTokens/functions.sol +++ b/test/libsolidity/lsp/semanticTokens/functions.sol @@ -22,7 +22,6 @@ contract Contract return true; } } - // ---- // functions: @unusedVariable 2072 // -> textDocument/semanticTokens/full { diff --git a/test/libsolidity/semanticTests/abiEncoderV1/abi_decode_dynamic_array.sol b/test/libsolidity/semanticTests/abiEncoderV1/abi_decode_dynamic_array.sol index 180d89ec185b..4d6b92073212 100644 --- a/test/libsolidity/semanticTests/abiEncoderV1/abi_decode_dynamic_array.sol +++ b/test/libsolidity/semanticTests/abiEncoderV1/abi_decode_dynamic_array.sol @@ -3,6 +3,5 @@ contract C { return abi.decode(data, (uint256[])); } } - // ---- // f(bytes): 0x20, 0xc0, 0x20, 0x4, 0x3, 0x4, 0x5, 0x6 -> 0x20, 0x4, 0x3, 0x4, 0x5, 0x6 diff --git a/test/libsolidity/semanticTests/abiEncoderV1/abi_decode_static_array.sol b/test/libsolidity/semanticTests/abiEncoderV1/abi_decode_static_array.sol index 270a5abc0695..fd0a59abb8f6 100644 --- a/test/libsolidity/semanticTests/abiEncoderV1/abi_decode_static_array.sol +++ b/test/libsolidity/semanticTests/abiEncoderV1/abi_decode_static_array.sol @@ -7,6 +7,5 @@ contract C { return abi.decode(data, (uint256[2][3])); } } - // ---- // f(bytes): 0x20, 0xc0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6 -> 1, 2, 3, 4, 5, 6 diff --git a/test/libsolidity/semanticTests/abiEncoderV1/abi_decode_static_array_v2.sol b/test/libsolidity/semanticTests/abiEncoderV1/abi_decode_static_array_v2.sol index 5e4d03a7e044..e228099c4eb3 100644 --- a/test/libsolidity/semanticTests/abiEncoderV1/abi_decode_static_array_v2.sol +++ b/test/libsolidity/semanticTests/abiEncoderV1/abi_decode_static_array_v2.sol @@ -10,6 +10,5 @@ contract C { return abi.decode(data, (uint256[2][3])); } } - // ---- // f(bytes): 0x20, 0xc0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6 -> 1, 2, 3, 4, 5, 6 diff --git a/test/libsolidity/semanticTests/abiEncoderV1/abi_decode_trivial.sol b/test/libsolidity/semanticTests/abiEncoderV1/abi_decode_trivial.sol index 7b873951f676..c1b91815accf 100644 --- a/test/libsolidity/semanticTests/abiEncoderV1/abi_decode_trivial.sol +++ b/test/libsolidity/semanticTests/abiEncoderV1/abi_decode_trivial.sol @@ -3,6 +3,5 @@ contract C { return abi.decode(data, (uint256)); } } - // ---- // f(bytes): 0x20, 0x20, 0x21 -> 33 diff --git a/test/libsolidity/semanticTests/abiEncoderV1/abi_decode_v2.sol b/test/libsolidity/semanticTests/abiEncoderV1/abi_decode_v2.sol index eb4bd70fbca3..782971c59c5d 100644 --- a/test/libsolidity/semanticTests/abiEncoderV1/abi_decode_v2.sol +++ b/test/libsolidity/semanticTests/abiEncoderV1/abi_decode_v2.sol @@ -17,6 +17,5 @@ contract C { return abi.decode(abi.encode(s), (S)); } } - // ---- // f() -> 0x20, 0x8, 0x40, 0x3, 0x9, 0xa, 0xb diff --git a/test/libsolidity/semanticTests/abiEncoderV1/abi_decode_v2_calldata.sol b/test/libsolidity/semanticTests/abiEncoderV1/abi_decode_v2_calldata.sol index ddfe343294a6..8bbb77b9aad0 100644 --- a/test/libsolidity/semanticTests/abiEncoderV1/abi_decode_v2_calldata.sol +++ b/test/libsolidity/semanticTests/abiEncoderV1/abi_decode_v2_calldata.sol @@ -11,6 +11,5 @@ contract C { return abi.decode(data, (S)); } } - // ---- // f(bytes): 0x20, 0xe0, 0x20, 0x21, 0x40, 0x3, 0xa, 0xb, 0xc -> 0x20, 0x21, 0x40, 0x3, 0xa, 0xb, 0xc diff --git a/test/libsolidity/semanticTests/abiEncoderV1/abi_decode_v2_storage.sol b/test/libsolidity/semanticTests/abiEncoderV1/abi_decode_v2_storage.sol index 61360868be69..c13f004fba41 100644 --- a/test/libsolidity/semanticTests/abiEncoderV1/abi_decode_v2_storage.sol +++ b/test/libsolidity/semanticTests/abiEncoderV1/abi_decode_v2_storage.sol @@ -19,7 +19,6 @@ contract C { return abi.decode(data, (S)); } } - // ---- // f() -> 0x20, 0x8, 0x40, 0x3, 0x9, 0xa, 0xb // gas irOptimized: 203166 diff --git a/test/libsolidity/semanticTests/abiEncoderV1/abi_encode.sol b/test/libsolidity/semanticTests/abiEncoderV1/abi_encode.sol index 773b7d2c6600..1e654d281ce0 100644 --- a/test/libsolidity/semanticTests/abiEncoderV1/abi_encode.sol +++ b/test/libsolidity/semanticTests/abiEncoderV1/abi_encode.sol @@ -27,9 +27,6 @@ contract C { return abi.encode(bytes2(x)); } } - -// ==== -// compileToEwasm: also // ---- // f0() -> 0x20, 0x0 // f1() -> 0x20, 0x40, 0x1, 0x2 diff --git a/test/libsolidity/semanticTests/abiEncoderV1/abi_encode_call.sol b/test/libsolidity/semanticTests/abiEncoderV1/abi_encode_call.sol index d73db5da6228..e34d46b74a42 100644 --- a/test/libsolidity/semanticTests/abiEncoderV1/abi_encode_call.sol +++ b/test/libsolidity/semanticTests/abiEncoderV1/abi_encode_call.sol @@ -21,6 +21,5 @@ contract C { return x; } } - // ---- // f() -> true diff --git a/test/libsolidity/semanticTests/abiEncoderV1/abi_encode_decode_simple.sol b/test/libsolidity/semanticTests/abiEncoderV1/abi_encode_decode_simple.sol index fb093b41a7da..627f0b0c6b7f 100644 --- a/test/libsolidity/semanticTests/abiEncoderV1/abi_encode_decode_simple.sol +++ b/test/libsolidity/semanticTests/abiEncoderV1/abi_encode_decode_simple.sol @@ -4,8 +4,5 @@ contract C { return abi.decode(abi.encode(uint256(33), arg), (uint256, bytes)); } } - -// ==== -// compileToEwasm: also // ---- // f() -> 0x21, 0x40, 0x7, "abcdefg" diff --git a/test/libsolidity/semanticTests/abiEncoderV1/abi_encode_empty_string.sol b/test/libsolidity/semanticTests/abiEncoderV1/abi_encode_empty_string.sol index 7497d3c35a91..601fb3cbeea5 100644 --- a/test/libsolidity/semanticTests/abiEncoderV1/abi_encode_empty_string.sol +++ b/test/libsolidity/semanticTests/abiEncoderV1/abi_encode_empty_string.sol @@ -19,7 +19,6 @@ contract C { return abi.encodeWithSelector(0x00000001, msg); } } - // ==== // ABIEncoderV1Only: true // compileViaYul: false diff --git a/test/libsolidity/semanticTests/abiEncoderV1/abi_encode_rational.sol b/test/libsolidity/semanticTests/abiEncoderV1/abi_encode_rational.sol index c5ba49368f50..44cf1ab5b9fd 100644 --- a/test/libsolidity/semanticTests/abiEncoderV1/abi_encode_rational.sol +++ b/test/libsolidity/semanticTests/abiEncoderV1/abi_encode_rational.sol @@ -4,8 +4,5 @@ contract C { return abi.encode(1, -2); } } - -// ==== -// compileToEwasm: also // ---- // f() -> 0x20, 0x40, 0x1, -2 diff --git a/test/libsolidity/semanticTests/abiEncoderV1/calldata_arrays_too_large.sol b/test/libsolidity/semanticTests/abiEncoderV1/calldata_arrays_too_large.sol index b372a4c47a43..49bee94ea344 100644 --- a/test/libsolidity/semanticTests/abiEncoderV1/calldata_arrays_too_large.sol +++ b/test/libsolidity/semanticTests/abiEncoderV1/calldata_arrays_too_large.sol @@ -3,7 +3,5 @@ contract C { return 7; } } -// ==== -// compileToEwasm: also // ---- // f(uint256,uint256[],uint256): 6, 0x60, 9, 0x8000000000000000000000000000000000000000000000000000000000000002, 1, 2 -> FAILURE diff --git a/test/libsolidity/semanticTests/abiEncoderV1/decode_slice.sol b/test/libsolidity/semanticTests/abiEncoderV1/decode_slice.sol index 11e79dec03ff..35cb15077abc 100644 --- a/test/libsolidity/semanticTests/abiEncoderV1/decode_slice.sol +++ b/test/libsolidity/semanticTests/abiEncoderV1/decode_slice.sol @@ -5,8 +5,5 @@ contract C { f = abi.decode(msg.data[4 + 32 : 4 + 32 + 32], (uint256)); } } - -// ==== -// compileToEwasm: also // ---- // f(uint256,uint256): 42, 23 -> 42, 23, 42, 23 diff --git a/test/libsolidity/semanticTests/abiEncoderV1/dynamic_memory_copy.sol b/test/libsolidity/semanticTests/abiEncoderV1/dynamic_memory_copy.sol index 126c6c950bde..ef2b07cb5213 100644 --- a/test/libsolidity/semanticTests/abiEncoderV1/dynamic_memory_copy.sol +++ b/test/libsolidity/semanticTests/abiEncoderV1/dynamic_memory_copy.sol @@ -18,7 +18,6 @@ contract C { } } } - // ---- // test(bytes): 0x20, 0x80, 0x40, 0x60, 0, 0 -> false, false // test(bytes): 0x20, 0xC0, 0x40, 0x80, 1, 0x42, 1, 0x42 -> false, false diff --git a/test/libsolidity/semanticTests/abiEncoderV1/memory_dynamic_array_and_calldata_bytes.sol b/test/libsolidity/semanticTests/abiEncoderV1/memory_dynamic_array_and_calldata_bytes.sol index 3b2b90c6c3a1..f828ab41e88c 100644 --- a/test/libsolidity/semanticTests/abiEncoderV1/memory_dynamic_array_and_calldata_bytes.sol +++ b/test/libsolidity/semanticTests/abiEncoderV1/memory_dynamic_array_and_calldata_bytes.sol @@ -9,7 +9,6 @@ contract C { return f(a, b); } } - // ==== // EVMVersion: >homestead // ---- diff --git a/test/libsolidity/semanticTests/abiEncoderV2/abi_encode_empty_string_v2.sol b/test/libsolidity/semanticTests/abiEncoderV2/abi_encode_empty_string_v2.sol index 8db4674c22f8..849c24a91f3c 100644 --- a/test/libsolidity/semanticTests/abiEncoderV2/abi_encode_empty_string_v2.sol +++ b/test/libsolidity/semanticTests/abiEncoderV2/abi_encode_empty_string_v2.sol @@ -8,8 +8,5 @@ contract C { return (abi.encode(""), abi.encodePacked("")); } } - -// ==== -// compileToEwasm: also // ---- // f() -> 0x40, 0xa0, 0x40, 0x20, 0x0, 0x0 diff --git a/test/libsolidity/semanticTests/abiEncoderV2/abi_encode_rational_v2.sol b/test/libsolidity/semanticTests/abiEncoderV2/abi_encode_rational_v2.sol index 106c26ea9723..edd319d45a39 100644 --- a/test/libsolidity/semanticTests/abiEncoderV2/abi_encode_rational_v2.sol +++ b/test/libsolidity/semanticTests/abiEncoderV2/abi_encode_rational_v2.sol @@ -7,8 +7,5 @@ contract C { return abi.encode(1, -2); } } - -// ==== -// compileToEwasm: also // ---- // f() -> 0x20, 0x40, 0x1, -2 diff --git a/test/libsolidity/semanticTests/abiEncoderV2/abi_encode_v2.sol b/test/libsolidity/semanticTests/abiEncoderV2/abi_encode_v2.sol index a0b732caed24..cdf2d3087d35 100644 --- a/test/libsolidity/semanticTests/abiEncoderV2/abi_encode_v2.sol +++ b/test/libsolidity/semanticTests/abiEncoderV2/abi_encode_v2.sol @@ -44,7 +44,6 @@ contract C { require(y[0] == "e"); } } - // ---- // f0() -> 0x20, 0x0 // f1() -> 0x20, 0x40, 0x1, 0x2 diff --git a/test/libsolidity/semanticTests/abiEncoderV2/bool_out_of_bounds.sol b/test/libsolidity/semanticTests/abiEncoderV2/bool_out_of_bounds.sol index 1a6856ff4d47..e47125707515 100644 --- a/test/libsolidity/semanticTests/abiEncoderV2/bool_out_of_bounds.sol +++ b/test/libsolidity/semanticTests/abiEncoderV2/bool_out_of_bounds.sol @@ -3,8 +3,6 @@ pragma abicoder v2; contract C { function f(bool b) public pure returns (bool) { return b; } } -// ==== -// compileToEwasm: also // ---- // f(bool): true -> true // f(bool): false -> false diff --git a/test/libsolidity/semanticTests/abiEncoderV2/calldata_array_dynamic_static_short_decode.sol b/test/libsolidity/semanticTests/abiEncoderV2/calldata_array_dynamic_static_short_decode.sol index 9fab29f9f791..2d8095704751 100644 --- a/test/libsolidity/semanticTests/abiEncoderV2/calldata_array_dynamic_static_short_decode.sol +++ b/test/libsolidity/semanticTests/abiEncoderV2/calldata_array_dynamic_static_short_decode.sol @@ -5,8 +5,6 @@ contract C { return 23; } } -// ==== -// compileToEwasm: also // ---- // f(uint256[][2][]): 0x20, 0x01, 0x20, 0x40, 0x60, 0x00, 0x00 -> 23 # this is the common encoding for x.length == 1 && x[0][0].length == 0 && x[0][1].length == 0 # // f(uint256[][2][]): 0x20, 0x01, 0x20, 0x00, 0x00 -> 23 # exotic, but still valid encoding # diff --git a/test/libsolidity/semanticTests/abiEncoderV2/calldata_dynamic_array_to_memory.sol b/test/libsolidity/semanticTests/abiEncoderV2/calldata_dynamic_array_to_memory.sol index f044d6f05a42..1fca188a6857 100644 --- a/test/libsolidity/semanticTests/abiEncoderV2/calldata_dynamic_array_to_memory.sol +++ b/test/libsolidity/semanticTests/abiEncoderV2/calldata_dynamic_array_to_memory.sol @@ -13,7 +13,6 @@ contract C { return a; } } - // ---- // f(uint256[][]): 0x20, 2, 0x40, 0xa0, 2, 5, 6, 2, 7, 8 -> 0x20, 2, 0x40, 0xa0, 2, 5, 6, 2, 7, 8 // f(uint256[][]): 0x20, 2, 0x40, 0xa0, 2, 5, 6, 2, 7, 8, 9 -> 0x20, 2, 0x40, 0xa0, 2, 5, 6, 2, 7, 8 diff --git a/test/libsolidity/semanticTests/abiEncoderV2/calldata_overlapped_dynamic_arrays.sol b/test/libsolidity/semanticTests/abiEncoderV2/calldata_overlapped_dynamic_arrays.sol index 1b1f360f48d0..796488a9fe4a 100644 --- a/test/libsolidity/semanticTests/abiEncoderV2/calldata_overlapped_dynamic_arrays.sol +++ b/test/libsolidity/semanticTests/abiEncoderV2/calldata_overlapped_dynamic_arrays.sol @@ -22,7 +22,6 @@ contract C { return abi.encode(s); } } - // ---- // f_memory(uint256[],uint256[2]): 0x20, 1, 2 -> 0x60, 0x01, 0x02, 1, 2 // f_memory(uint256[],uint256[2]): 0x40, 1, 2, 5, 6 -> 0x60, 1, 2, 2, 5, 6 diff --git a/test/libsolidity/semanticTests/abiEncoderV2/calldata_overlapped_nested_dynamic_arrays.sol b/test/libsolidity/semanticTests/abiEncoderV2/calldata_overlapped_nested_dynamic_arrays.sol index f7ed9daf4563..d5a3266f0520 100644 --- a/test/libsolidity/semanticTests/abiEncoderV2/calldata_overlapped_nested_dynamic_arrays.sol +++ b/test/libsolidity/semanticTests/abiEncoderV2/calldata_overlapped_nested_dynamic_arrays.sol @@ -16,7 +16,6 @@ contract C { return a[which]; } } - // ---- // f_memory(uint256[][]): 0x20, 2, 0x40, 0x40, 2, 1, 2 -> 0x20, 2, 0x40, 0xa0, 2, 1, 2, 2, 1, 2 // f_memory(uint256[][]): 0x20, 2, 0x40, 0x60, 2, 1, 2 -> 0x20, 2, 0x40, 0xa0, 2, 1, 2, 1, 2 diff --git a/test/libsolidity/semanticTests/abiEncoderV2/calldata_struct_array_reencode.sol b/test/libsolidity/semanticTests/abiEncoderV2/calldata_struct_array_reencode.sol index d456cdfcc255..347710a30dd2 100644 --- a/test/libsolidity/semanticTests/abiEncoderV2/calldata_struct_array_reencode.sol +++ b/test/libsolidity/semanticTests/abiEncoderV2/calldata_struct_array_reencode.sol @@ -33,7 +33,6 @@ contract C { } } - // ---- // f((uint256[])): 0x20, 0x20, 0 -> 0x20, 0x60, 0x20, 0x20, 0 // f((uint256[])): 0x20, 0x20, 1 -> FAILURE diff --git a/test/libsolidity/semanticTests/abiEncoderV2/calldata_three_dimensional_dynamic_array_index_access.sol b/test/libsolidity/semanticTests/abiEncoderV2/calldata_three_dimensional_dynamic_array_index_access.sol index a97c4f6d8a37..745bebe72891 100644 --- a/test/libsolidity/semanticTests/abiEncoderV2/calldata_three_dimensional_dynamic_array_index_access.sol +++ b/test/libsolidity/semanticTests/abiEncoderV2/calldata_three_dimensional_dynamic_array_index_access.sol @@ -23,7 +23,6 @@ contract C { return abi.encode(s[i][j].a); } } - // ==== // revertStrings: debug // ---- diff --git a/test/libsolidity/semanticTests/abiEncoderV2/calldata_with_garbage.sol b/test/libsolidity/semanticTests/abiEncoderV2/calldata_with_garbage.sol index b126928546fd..58f68b8cc268 100644 --- a/test/libsolidity/semanticTests/abiEncoderV2/calldata_with_garbage.sol +++ b/test/libsolidity/semanticTests/abiEncoderV2/calldata_with_garbage.sol @@ -39,7 +39,6 @@ contract C { return (a[which], b[0]); } } - // ---- // f_memory(uint256[]): 0x80, 9, 9, 9, 0 -> 0x20, 0 // f_memory(uint256[]): 0x80, 9, 9, 9, 1, 7 -> 0x20, 1, 7 diff --git a/test/libsolidity/semanticTests/abiEncoderV2/cleanup/cleanup.sol b/test/libsolidity/semanticTests/abiEncoderV2/cleanup/cleanup.sol index b680e9cd23c1..4286f8f07d34 100644 --- a/test/libsolidity/semanticTests/abiEncoderV2/cleanup/cleanup.sol +++ b/test/libsolidity/semanticTests/abiEncoderV2/cleanup/cleanup.sol @@ -6,8 +6,6 @@ contract C { assembly { v := a w := b x := c y := d z := e} } } -// ==== -// compileToEwasm: also // ---- // f(uint16,int16,address,bytes3,bool): 1, 2, 3, "a", true -> 1, 2, 3, "a", true // f(uint16,int16,address,bytes3,bool): 0xffffff, 0x1ffff, 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff, "abcd", 1 -> FAILURE diff --git a/test/libsolidity/semanticTests/abiEncoderV2/enums.sol b/test/libsolidity/semanticTests/abiEncoderV2/enums.sol index 285bf334f951..1e323472897f 100644 --- a/test/libsolidity/semanticTests/abiEncoderV2/enums.sol +++ b/test/libsolidity/semanticTests/abiEncoderV2/enums.sol @@ -6,8 +6,6 @@ contract C { assembly { x := e } } } -// ==== -// compileToEwasm: also // ---- // f(uint8): 0 -> 0 // f(uint8): 1 -> 1 diff --git a/test/libsolidity/semanticTests/abiEncoderV2/memory_dynamic_array_and_calldata_bytes.sol b/test/libsolidity/semanticTests/abiEncoderV2/memory_dynamic_array_and_calldata_bytes.sol index 07d035080090..3fe54eff57e5 100644 --- a/test/libsolidity/semanticTests/abiEncoderV2/memory_dynamic_array_and_calldata_bytes.sol +++ b/test/libsolidity/semanticTests/abiEncoderV2/memory_dynamic_array_and_calldata_bytes.sol @@ -7,7 +7,6 @@ contract C { return f(a, b); } } - // ---- // f(uint256[],bytes): 0x40, 0x80, 1, 0xFF, 6, "123456" -> 0x20, 0xc0, 0x40, 0x80, 1, 0xff, 6, "123456" // g(uint256[],bytes): 0x40, 0x80, 1, 0xffff, 8, "12345678" -> 0x20, 0xc0, 0x40, 0x80, 1, 0xffff, 8, "12345678" diff --git a/test/libsolidity/semanticTests/abiEncoderV2/memory_dynamic_array_and_calldata_static_array.sol b/test/libsolidity/semanticTests/abiEncoderV2/memory_dynamic_array_and_calldata_static_array.sol index a8f4f55541a4..a734103f10d2 100644 --- a/test/libsolidity/semanticTests/abiEncoderV2/memory_dynamic_array_and_calldata_static_array.sol +++ b/test/libsolidity/semanticTests/abiEncoderV2/memory_dynamic_array_and_calldata_static_array.sol @@ -11,7 +11,6 @@ contract C { return (a, b); } } - // ---- // f(uint256[],uint256[1]): 0x40, 0xff, 1, 0xffff -> 0x20, 0x80, 0x40, 0xff, 1, 0xffff // g(uint256[],uint256[1]): 0x40, 0xff, 1, 0xffff -> 0x20, 0x80, 0x40, 0xff, 1, 0xffff diff --git a/test/libsolidity/semanticTests/abiEncoderV2/struct/struct_short.sol b/test/libsolidity/semanticTests/abiEncoderV2/struct/struct_short.sol index 73fa9b415f30..ce6550d31a34 100644 --- a/test/libsolidity/semanticTests/abiEncoderV2/struct/struct_short.sol +++ b/test/libsolidity/semanticTests/abiEncoderV2/struct/struct_short.sol @@ -6,8 +6,6 @@ contract C { q = s; } } -// ==== -// compileToEwasm: also // ---- // f((int256,uint256,bytes16)): 0xff010, 0xff0002, "abcd" -> 0xff010, 0xff0002, "abcd" // f((int256,uint256,bytes16)): 0xff010, 0xff0002, 0x1111222233334444555566667777888800000000000000000000000000000000 -> 0xff010, 0xff0002, left(0x11112222333344445555666677778888) diff --git a/test/libsolidity/semanticTests/abiEncoderV2/struct/struct_simple.sol b/test/libsolidity/semanticTests/abiEncoderV2/struct/struct_simple.sol index 80fe3149b742..cf631b8aec79 100644 --- a/test/libsolidity/semanticTests/abiEncoderV2/struct/struct_simple.sol +++ b/test/libsolidity/semanticTests/abiEncoderV2/struct/struct_simple.sol @@ -9,7 +9,5 @@ contract C { d = uint16(s.d); } } -// ==== -// compileToEwasm: also // ---- // f((uint256,uint8,uint8,bytes2)): 1, 2, 3, "ab" -> 1, 2, 3, 0x6162 diff --git a/test/libsolidity/semanticTests/abiEncoderV2/struct/struct_validation.sol b/test/libsolidity/semanticTests/abiEncoderV2/struct/struct_validation.sol index 3e266410244c..57e218f7d561 100644 --- a/test/libsolidity/semanticTests/abiEncoderV2/struct/struct_validation.sol +++ b/test/libsolidity/semanticTests/abiEncoderV2/struct/struct_validation.sol @@ -10,8 +10,6 @@ contract C { } } } -// ==== -// compileToEwasm: also // ---- // f((int16,uint8,bytes2)): 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01, 0xff, "ab" -> 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01, 0xff, "ab" // f((int16,uint8,bytes2)): 0xff010, 0xff, "ab" -> FAILURE diff --git a/test/libsolidity/semanticTests/abiEncoderV2/struct/validation_function_type_inside_struct.sol b/test/libsolidity/semanticTests/abiEncoderV2/struct/validation_function_type_inside_struct.sol index b1151c2fac5b..8a22b037f6de 100644 --- a/test/libsolidity/semanticTests/abiEncoderV2/struct/validation_function_type_inside_struct.sol +++ b/test/libsolidity/semanticTests/abiEncoderV2/struct/validation_function_type_inside_struct.sol @@ -6,8 +6,6 @@ contract C { function g(S calldata) external pure returns (uint r) { r = 2; } function h(S calldata s) external pure returns (uint r) { s.x; r = 3; } } -// ==== -// compileToEwasm: also // ---- // f((function)): "01234567890123456789abcd" -> 1 // f((function)): "01234567890123456789abcdX" -> FAILURE diff --git a/test/libsolidity/semanticTests/abiencodedecode/abi_decode_calldata.sol b/test/libsolidity/semanticTests/abiencodedecode/abi_decode_calldata.sol index 3bab26b831a2..6b6e55e02241 100644 --- a/test/libsolidity/semanticTests/abiencodedecode/abi_decode_calldata.sol +++ b/test/libsolidity/semanticTests/abiencodedecode/abi_decode_calldata.sol @@ -7,6 +7,5 @@ contract C { return abi.decode(data, (uint256, bytes)); } } - // ---- // f(bytes): 0x20, 0x80, 0x21, 0x40, 0x7, "abcdefg" -> 0x21, 0x40, 0x7, "abcdefg" diff --git a/test/libsolidity/semanticTests/abiencodedecode/abi_decode_simple.sol b/test/libsolidity/semanticTests/abiencodedecode/abi_decode_simple.sol index 2703f25e93e9..9ae6602f310f 100644 --- a/test/libsolidity/semanticTests/abiencodedecode/abi_decode_simple.sol +++ b/test/libsolidity/semanticTests/abiencodedecode/abi_decode_simple.sol @@ -3,6 +3,5 @@ contract C { return abi.decode(data, (uint256, bytes)); } } - // ---- // f(bytes): 0x20, 0x80, 0x21, 0x40, 0x7, "abcdefg" -> 0x21, 0x40, 0x7, "abcdefg" diff --git a/test/libsolidity/semanticTests/abiencodedecode/abi_decode_simple_storage.sol b/test/libsolidity/semanticTests/abiencodedecode/abi_decode_simple_storage.sol index 93fe74c99168..03084f0a35b6 100644 --- a/test/libsolidity/semanticTests/abiencodedecode/abi_decode_simple_storage.sol +++ b/test/libsolidity/semanticTests/abiencodedecode/abi_decode_simple_storage.sol @@ -6,7 +6,6 @@ contract C { return abi.decode(data, (uint256, bytes)); } } - // ---- // f(bytes): 0x20, 0x80, 0x21, 0x40, 0x7, "abcdefg" -> 0x21, 0x40, 0x7, "abcdefg" // gas irOptimized: 135693 diff --git a/test/libsolidity/semanticTests/abiencodedecode/abi_encode_call.sol b/test/libsolidity/semanticTests/abiencodedecode/abi_encode_call.sol index ab7a94372eb2..1edede787853 100644 --- a/test/libsolidity/semanticTests/abiencodedecode/abi_encode_call.sol +++ b/test/libsolidity/semanticTests/abiencodedecode/abi_encode_call.sol @@ -44,6 +44,5 @@ contract C { return success; } } - // ---- // callExternal() -> true diff --git a/test/libsolidity/semanticTests/abiencodedecode/abi_encode_call_declaration.sol b/test/libsolidity/semanticTests/abiencodedecode/abi_encode_call_declaration.sol index 86399614105d..752298fbb059 100644 --- a/test/libsolidity/semanticTests/abiencodedecode/abi_encode_call_declaration.sol +++ b/test/libsolidity/semanticTests/abiencodedecode/abi_encode_call_declaration.sol @@ -46,7 +46,6 @@ contract C is Base { } } - // ==== // EVMVersion: >=byzantium // ---- diff --git a/test/libsolidity/semanticTests/abiencodedecode/abi_encode_call_memory.sol b/test/libsolidity/semanticTests/abiencodedecode/abi_encode_call_memory.sol index 2e2420af3519..5f67174cfcb4 100644 --- a/test/libsolidity/semanticTests/abiencodedecode/abi_encode_call_memory.sol +++ b/test/libsolidity/semanticTests/abiencodedecode/abi_encode_call_memory.sol @@ -21,6 +21,5 @@ contract C { return bytes4(a); } } - // ---- // test() -> 0xa7a0d53700000000000000000000000000000000000000000000000000000000 diff --git a/test/libsolidity/semanticTests/abiencodedecode/abi_encode_with_selector.sol b/test/libsolidity/semanticTests/abiencodedecode/abi_encode_with_selector.sol index 45c71e4d81d3..f72de4379bad 100644 --- a/test/libsolidity/semanticTests/abiencodedecode/abi_encode_with_selector.sol +++ b/test/libsolidity/semanticTests/abiencodedecode/abi_encode_with_selector.sol @@ -15,8 +15,6 @@ contract C { return abi.encodeWithSelector(x, type(uint).max); } } -// ==== -// compileToEwasm: also // ---- // f0() -> 0x20, 4, 8234104107246695022420661102507966550300666591269321702959126607540084801536 // f1() -> 0x20, 0x64, 8234104107246695022420661102507966550300666591269321702959126607540084801536, 862718293348820473429344482784628181556388621521298319395315527974912, 91135606241822717681769169345594720818313984248279388438121731325952, 0 diff --git a/test/libsolidity/semanticTests/abiencodedecode/abi_encode_with_selectorv2.sol b/test/libsolidity/semanticTests/abiencodedecode/abi_encode_with_selectorv2.sol index a4f24a963e2f..b23e2dd27e85 100644 --- a/test/libsolidity/semanticTests/abiencodedecode/abi_encode_with_selectorv2.sol +++ b/test/libsolidity/semanticTests/abiencodedecode/abi_encode_with_selectorv2.sol @@ -24,8 +24,6 @@ contract C { return abi.encodeWithSelector(x, type(uint).max, s, uint(3)); } } -// ==== -// compileToEwasm: also // ---- // f0() -> 0x20, 4, 8234104107246695022420661102507966550300666591269321702959126607540084801536 // f1() -> 0x20, 0x64, 8234104107246695022420661102507966550300666591269321702959126607540084801536, 862718293348820473429344482784628181556388621521298319395315527974912, 91135606241822717681769169345594720818313984248279388438121731325952, 0 diff --git a/test/libsolidity/semanticTests/abiencodedecode/offset_overflow_in_array_decoding.sol b/test/libsolidity/semanticTests/abiencodedecode/offset_overflow_in_array_decoding.sol index 736794dc4f82..02937aced8da 100644 --- a/test/libsolidity/semanticTests/abiencodedecode/offset_overflow_in_array_decoding.sol +++ b/test/libsolidity/semanticTests/abiencodedecode/offset_overflow_in_array_decoding.sol @@ -23,7 +23,5 @@ contract Test { return decoded[1][0]; } } -// ==== -// compileToEwasm: also // ---- // test() -> FAILURE diff --git a/test/libsolidity/semanticTests/abiencodedecode/offset_overflow_in_array_decoding_2.sol b/test/libsolidity/semanticTests/abiencodedecode/offset_overflow_in_array_decoding_2.sol index fe956322f18a..0a874914a93d 100644 --- a/test/libsolidity/semanticTests/abiencodedecode/offset_overflow_in_array_decoding_2.sol +++ b/test/libsolidity/semanticTests/abiencodedecode/offset_overflow_in_array_decoding_2.sol @@ -24,7 +24,5 @@ contract Test { return decoded[0][0] + decoded[1][0]; } } -// ==== -// compileToEwasm: also // ---- // withinArray() -> FAILURE diff --git a/test/libsolidity/semanticTests/abiencodedecode/offset_overflow_in_array_decoding_3.sol b/test/libsolidity/semanticTests/abiencodedecode/offset_overflow_in_array_decoding_3.sol index 8a7e572cc8ee..a20e9ae49fe1 100644 --- a/test/libsolidity/semanticTests/abiencodedecode/offset_overflow_in_array_decoding_3.sol +++ b/test/libsolidity/semanticTests/abiencodedecode/offset_overflow_in_array_decoding_3.sol @@ -17,7 +17,5 @@ contract Test { return decoded[1][0]; } } -// ==== -// compileToEwasm: also // ---- // test() -> FAILURE diff --git a/test/libsolidity/semanticTests/accessor/accessor_for_const_state_variable.sol b/test/libsolidity/semanticTests/accessor/accessor_for_const_state_variable.sol index 1d6346259ce8..b8def58898a7 100644 --- a/test/libsolidity/semanticTests/accessor/accessor_for_const_state_variable.sol +++ b/test/libsolidity/semanticTests/accessor/accessor_for_const_state_variable.sol @@ -1,7 +1,5 @@ contract Lotto { uint256 public constant ticketPrice = 555; } -// ==== -// compileToEwasm: also // ---- // ticketPrice() -> 555 diff --git a/test/libsolidity/semanticTests/accessor/accessor_for_state_variable.sol b/test/libsolidity/semanticTests/accessor/accessor_for_state_variable.sol index 16b534585a37..51cb8e5e2369 100644 --- a/test/libsolidity/semanticTests/accessor/accessor_for_state_variable.sol +++ b/test/libsolidity/semanticTests/accessor/accessor_for_state_variable.sol @@ -1,8 +1,5 @@ contract Lotto { uint256 public ticketPrice = 500; } - -// ==== -// compileToEwasm: also // ---- // ticketPrice() -> 500 diff --git a/test/libsolidity/semanticTests/arithmetics/addmod_mulmod.sol b/test/libsolidity/semanticTests/arithmetics/addmod_mulmod.sol index 034abce943ed..e6f703bd7681 100644 --- a/test/libsolidity/semanticTests/arithmetics/addmod_mulmod.sol +++ b/test/libsolidity/semanticTests/arithmetics/addmod_mulmod.sol @@ -7,8 +7,5 @@ contract C { return 0; } } - -// ==== -// compileToEwasm: also // ---- // test() -> 0 diff --git a/test/libsolidity/semanticTests/arithmetics/addmod_mulmod_zero.sol b/test/libsolidity/semanticTests/arithmetics/addmod_mulmod_zero.sol index cfcd9463faa6..cd32ceffa039 100644 --- a/test/libsolidity/semanticTests/arithmetics/addmod_mulmod_zero.sol +++ b/test/libsolidity/semanticTests/arithmetics/addmod_mulmod_zero.sol @@ -17,9 +17,6 @@ contract C { return 2; } } - -// ==== -// compileToEwasm: also // ---- // f(uint256): 0 -> FAILURE, hex"4e487b71", 0x12 // g(uint256): 0 -> FAILURE, hex"4e487b71", 0x12 diff --git a/test/libsolidity/semanticTests/arithmetics/block_inside_unchecked.sol b/test/libsolidity/semanticTests/arithmetics/block_inside_unchecked.sol index b626289104cb..7a8504d53178 100644 --- a/test/libsolidity/semanticTests/arithmetics/block_inside_unchecked.sol +++ b/test/libsolidity/semanticTests/arithmetics/block_inside_unchecked.sol @@ -7,7 +7,5 @@ contract C { }} } } -// ==== -// compileToEwasm: also // ---- // f() -> 0x00 diff --git a/test/libsolidity/semanticTests/arithmetics/checked_called_by_unchecked.sol b/test/libsolidity/semanticTests/arithmetics/checked_called_by_unchecked.sol index 4fc0ff189fd2..420a52cde48e 100644 --- a/test/libsolidity/semanticTests/arithmetics/checked_called_by_unchecked.sol +++ b/test/libsolidity/semanticTests/arithmetics/checked_called_by_unchecked.sol @@ -7,8 +7,6 @@ contract C { unchecked { return add(a, b) + c; } } } -// ==== -// compileToEwasm: also // ---- // f(uint16,uint16,uint16): 0xe000, 0xe500, 2 -> FAILURE, hex"4e487b71", 0x11 // f(uint16,uint16,uint16): 0xe000, 0x1000, 0x1000 -> 0x00 diff --git a/test/libsolidity/semanticTests/arithmetics/checked_modifier_called_by_unchecked.sol b/test/libsolidity/semanticTests/arithmetics/checked_modifier_called_by_unchecked.sol index 267489b419a2..42658f83a4f2 100644 --- a/test/libsolidity/semanticTests/arithmetics/checked_modifier_called_by_unchecked.sol +++ b/test/libsolidity/semanticTests/arithmetics/checked_modifier_called_by_unchecked.sol @@ -8,8 +8,6 @@ contract C { return b + c; } } -// ==== -// compileToEwasm: also // ---- // f(uint16,uint16,uint16): 0xe000, 0xe500, 2 -> 58626 // f(uint16,uint16,uint16): 0x1000, 0xe500, 0xe000 -> FAILURE, hex"4e487b71", 0x11 diff --git a/test/libsolidity/semanticTests/arithmetics/divisiod_by_zero.sol b/test/libsolidity/semanticTests/arithmetics/divisiod_by_zero.sol index d996409ca8c0..517c4966e984 100644 --- a/test/libsolidity/semanticTests/arithmetics/divisiod_by_zero.sol +++ b/test/libsolidity/semanticTests/arithmetics/divisiod_by_zero.sol @@ -7,8 +7,6 @@ contract C { return a % b; } } -// ==== -// compileToEwasm: also // ---- // div(uint256,uint256): 7, 2 -> 3 // div(uint256,uint256): 7, 0 -> FAILURE, hex"4e487b71", 0x12 # throws # diff --git a/test/libsolidity/semanticTests/arithmetics/exp_associativity.sol b/test/libsolidity/semanticTests/arithmetics/exp_associativity.sol index 730209fb58a4..0ec9f2c79077 100644 --- a/test/libsolidity/semanticTests/arithmetics/exp_associativity.sol +++ b/test/libsolidity/semanticTests/arithmetics/exp_associativity.sol @@ -29,7 +29,6 @@ contract C { (b**a**a/b**a**b == (b**(a**a))/(b**(a**b))); } } - // ---- // test_hardcode1(uint256,uint256,uint256): 2, 3, 4 -> 2417851639229258349412352 // test_hardcode2(uint256,uint256,uint256,uint256): 3, 2, 2, 2 -> 43046721 diff --git a/test/libsolidity/semanticTests/arithmetics/signed_mod.sol b/test/libsolidity/semanticTests/arithmetics/signed_mod.sol index 0239810ab9a6..3062562069ce 100644 --- a/test/libsolidity/semanticTests/arithmetics/signed_mod.sol +++ b/test/libsolidity/semanticTests/arithmetics/signed_mod.sol @@ -11,9 +11,6 @@ contract C { } } } - -// ==== -// compileToEwasm: also // ---- // f(int256,int256): 7, 5 -> 2 // f(int256,int256): 7, -5 -> 2 diff --git a/test/libsolidity/semanticTests/arithmetics/unchecked_called_by_checked.sol b/test/libsolidity/semanticTests/arithmetics/unchecked_called_by_checked.sol index f7859e6c131c..140506279d0a 100644 --- a/test/libsolidity/semanticTests/arithmetics/unchecked_called_by_checked.sol +++ b/test/libsolidity/semanticTests/arithmetics/unchecked_called_by_checked.sol @@ -9,8 +9,6 @@ contract C { return add(a, 0x100) + 0x100; } } -// ==== -// compileToEwasm: also // ---- // f(uint16): 7 -> 0x0207 // f(uint16): 0xffff -> 511 diff --git a/test/libsolidity/semanticTests/arithmetics/unchecked_div_by_zero.sol b/test/libsolidity/semanticTests/arithmetics/unchecked_div_by_zero.sol index 6e9cc90aeecd..ae91ea278f05 100644 --- a/test/libsolidity/semanticTests/arithmetics/unchecked_div_by_zero.sol +++ b/test/libsolidity/semanticTests/arithmetics/unchecked_div_by_zero.sol @@ -13,8 +13,6 @@ contract C { } } } -// ==== -// compileToEwasm: also // ---- // div(uint256,uint256): 7, 2 -> 3 // div(uint256,uint256): 7, 0 -> FAILURE, hex"4e487b71", 0x12 # throws # diff --git a/test/libsolidity/semanticTests/array/calldata_array.sol b/test/libsolidity/semanticTests/array/calldata_array.sol index cdb1c9b6d5d0..c524d06e003b 100644 --- a/test/libsolidity/semanticTests/array/calldata_array.sol +++ b/test/libsolidity/semanticTests/array/calldata_array.sol @@ -11,7 +11,5 @@ contract C { b = s[1]; } } -// ==== -// compileToEwasm: also // ---- // f(uint256[2]): 42, 23 -> 42, 23 diff --git a/test/libsolidity/semanticTests/array/calldata_array_as_argument_internal_function.sol b/test/libsolidity/semanticTests/array/calldata_array_as_argument_internal_function.sol index 99bd31c57f4c..d21c40caeef6 100644 --- a/test/libsolidity/semanticTests/array/calldata_array_as_argument_internal_function.sol +++ b/test/libsolidity/semanticTests/array/calldata_array_as_argument_internal_function.sol @@ -12,8 +12,6 @@ contract Test { return f(c[start: end]); } } -// ==== -// compileToEwasm: also // ---- // g(uint256[]): 0x20, 4, 1, 2, 3, 4 -> 4, 1 // h(uint256[],uint256,uint256): 0x60, 1, 3, 4, 1, 2, 3, 4 -> 2, 2 diff --git a/test/libsolidity/semanticTests/array/calldata_array_dynamic_invalid.sol b/test/libsolidity/semanticTests/array/calldata_array_dynamic_invalid.sol index 190d73d79a1c..dc1d1c31a18b 100644 --- a/test/libsolidity/semanticTests/array/calldata_array_dynamic_invalid.sol +++ b/test/libsolidity/semanticTests/array/calldata_array_dynamic_invalid.sol @@ -11,8 +11,6 @@ contract C { return 42; } } -// ==== -// compileToEwasm: also // ---- // f(uint256[][]): 0x20, 0x0 -> 42 # valid access stub # // f(uint256[][]): 0x20, 0x1 -> FAILURE # invalid on argument decoding # diff --git a/test/libsolidity/semanticTests/array/calldata_array_of_struct.sol b/test/libsolidity/semanticTests/array/calldata_array_of_struct.sol index c31ffcb53623..006bf2521e32 100644 --- a/test/libsolidity/semanticTests/array/calldata_array_of_struct.sol +++ b/test/libsolidity/semanticTests/array/calldata_array_of_struct.sol @@ -19,8 +19,5 @@ contract C { d = s[1].b; } } - -// ==== -// compileToEwasm: also // ---- // f((uint256,uint256)[]): 0x20, 0x2, 0x1, 0x2, 0x3, 0x4 -> 2, 1, 2, 3, 4 diff --git a/test/libsolidity/semanticTests/array/calldata_slice_access.sol b/test/libsolidity/semanticTests/array/calldata_slice_access.sol index b8eb63829e0e..76af2214f429 100644 --- a/test/libsolidity/semanticTests/array/calldata_slice_access.sol +++ b/test/libsolidity/semanticTests/array/calldata_slice_access.sol @@ -6,8 +6,6 @@ contract C { return (x[start:end][index], x[start:][0:end-start][index], x[:end][start:][index]); } } -// ==== -// compileToEwasm: also // ---- // f(uint256[],uint256,uint256): 0x80, 0, 0, 0, 1, 42 -> // f(uint256[],uint256,uint256): 0x80, 0, 1, 0, 1, 42 -> diff --git a/test/libsolidity/semanticTests/array/concat/bytes_concat_empty_argument_list.sol b/test/libsolidity/semanticTests/array/concat/bytes_concat_empty_argument_list.sol index 0485012e38e9..7041ff8513b5 100644 --- a/test/libsolidity/semanticTests/array/concat/bytes_concat_empty_argument_list.sol +++ b/test/libsolidity/semanticTests/array/concat/bytes_concat_empty_argument_list.sol @@ -3,7 +3,5 @@ contract C { return bytes.concat(); } } -// ==== -// compileToEwasm: also // ---- // f() -> 0x20, 0 diff --git a/test/libsolidity/semanticTests/array/concat/bytes_concat_empty_strings.sol b/test/libsolidity/semanticTests/array/concat/bytes_concat_empty_strings.sol index a83e5462b350..10d31162cb42 100644 --- a/test/libsolidity/semanticTests/array/concat/bytes_concat_empty_strings.sol +++ b/test/libsolidity/semanticTests/array/concat/bytes_concat_empty_strings.sol @@ -18,8 +18,6 @@ contract C { return bytes.concat(b, "abc", b, "abc", b); } } -// ==== -// compileToEwasm: also // ---- // f() -> 0x20, 0 // g() -> 0x20, 6, "abcabc" diff --git a/test/libsolidity/semanticTests/array/constant_var_as_array_length.sol b/test/libsolidity/semanticTests/array/constant_var_as_array_length.sol index ffd4b54033e7..fe6f07a40e5d 100644 --- a/test/libsolidity/semanticTests/array/constant_var_as_array_length.sol +++ b/test/libsolidity/semanticTests/array/constant_var_as_array_length.sol @@ -6,7 +6,6 @@ contract C { a = _a; } } - // ---- // constructor(): 1, 2, 3 -> // gas irOptimized: 140952 diff --git a/test/libsolidity/semanticTests/array/copying/array_copy_different_packing.sol b/test/libsolidity/semanticTests/array/copying/array_copy_different_packing.sol index 55e20f91729f..6f616f4b5328 100644 --- a/test/libsolidity/semanticTests/array/copying/array_copy_different_packing.sol +++ b/test/libsolidity/semanticTests/array/copying/array_copy_different_packing.sol @@ -16,7 +16,6 @@ contract c { e = data2[5]; } } - // ---- // test() -> 0x01000000000000000000000000000000000000000000000000, 0x02000000000000000000000000000000000000000000000000, 0x03000000000000000000000000000000000000000000000000, 0x04000000000000000000000000000000000000000000000000, 0x05000000000000000000000000000000000000000000000000 // gas irOptimized: 208122 diff --git a/test/libsolidity/semanticTests/array/copying/array_copy_nested_array.sol b/test/libsolidity/semanticTests/array/copying/array_copy_nested_array.sol index 03f58e11900f..7b5b30b79fd1 100644 --- a/test/libsolidity/semanticTests/array/copying/array_copy_nested_array.sol +++ b/test/libsolidity/semanticTests/array/copying/array_copy_nested_array.sol @@ -10,7 +10,6 @@ contract c { return c[1][1] | c[1][2] | c[1][3] | c[1][4]; } } - // ---- // test(uint256[2][]): 32, 3, 7, 8, 9, 10, 11, 12 -> 10 // gas irOptimized: 689714 diff --git a/test/libsolidity/semanticTests/array/copying/array_copy_storage_abi_signed.sol b/test/libsolidity/semanticTests/array/copying/array_copy_storage_abi_signed.sol index 0e225f1e598c..335afd0ac45e 100644 --- a/test/libsolidity/semanticTests/array/copying/array_copy_storage_abi_signed.sol +++ b/test/libsolidity/semanticTests/array/copying/array_copy_storage_abi_signed.sol @@ -15,6 +15,5 @@ contract c { return x; } } - // ---- // test() -> 0x20, 0x8, -1, -1, 8, -16, -2, 6, 8, -1 diff --git a/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_different_base_nested.sol b/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_different_base_nested.sol index 113269ea2ba3..4ab3d0bd870c 100644 --- a/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_different_base_nested.sol +++ b/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_different_base_nested.sol @@ -19,8 +19,6 @@ contract c { y = data2[0][4]; } } -// ==== -// compileToEwasm: also // ---- // test() -> 3, 4 // gas irOptimized: 169602 diff --git a/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_dynamic_dynamic.sol b/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_dynamic_dynamic.sol index 1582b711837c..fcdcf9c2d2c4 100644 --- a/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_dynamic_dynamic.sol +++ b/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_dynamic_dynamic.sol @@ -15,7 +15,6 @@ contract c { y = data2[4]; } } - // ---- // test() -> 5, 4 // gas irOptimized: 252986 diff --git a/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_static_dynamic.sol b/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_static_dynamic.sol index 8b750efa7ad3..943a5206eef4 100644 --- a/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_static_dynamic.sol +++ b/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_static_dynamic.sol @@ -9,7 +9,6 @@ contract c { y = data2[8]; } } - // ---- // test() -> 9, 4 // gas irOptimized: 123142 diff --git a/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_static_simple.sol b/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_static_simple.sol index 00c69b7deeef..2fccff774e94 100644 --- a/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_static_simple.sol +++ b/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_static_simple.sol @@ -9,8 +9,6 @@ contract C { return (data2[0], data2[1]); } } -// ==== -// compileToEwasm: also // ---- // test() -> left(0x01), left(0x02) // gas legacy: 90001 diff --git a/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_static_static.sol b/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_static_static.sol index f7f0560653b4..3b0a229c96f1 100644 --- a/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_static_static.sol +++ b/test/libsolidity/semanticTests/array/copying/array_copy_storage_storage_static_static.sol @@ -12,9 +12,6 @@ contract c { y = data1[30]; // should be cleared } } - -// ==== -// compileToEwasm: also // ---- // test() -> 8, 0 // gas irOptimized: 196278 diff --git a/test/libsolidity/semanticTests/array/copying/array_copy_target_leftover.sol b/test/libsolidity/semanticTests/array/copying/array_copy_target_leftover.sol index a3f800b0834f..31addad5ecab 100644 --- a/test/libsolidity/semanticTests/array/copying/array_copy_target_leftover.sol +++ b/test/libsolidity/semanticTests/array/copying/array_copy_target_leftover.sol @@ -15,8 +15,6 @@ contract c { res2 |= uint(uint16(data2[16 + i])) * 0x10000**i; } } -// ==== -// compileToEwasm: also // ---- // test() -> 0xffffffff, 0x0000000000000000000000000a00090008000700060005000400030002000100, 0x0000000000000000000000000000000000000000000000000000000000000000 // gas irOptimized: 104665 diff --git a/test/libsolidity/semanticTests/array/copying/array_copy_target_leftover2.sol b/test/libsolidity/semanticTests/array/copying/array_copy_target_leftover2.sol index 0e0a26fc9dff..0a2bcffce201 100644 --- a/test/libsolidity/semanticTests/array/copying/array_copy_target_leftover2.sol +++ b/test/libsolidity/semanticTests/array/copying/array_copy_target_leftover2.sol @@ -17,8 +17,6 @@ contract c { r3 = data2[5]; } } -// ==== -// compileToEwasm: also // ---- // test() -> 0x04000000000000000000000000000000000000000000000000, 0x0, 0x0 // gas irOptimized: 93858 diff --git a/test/libsolidity/semanticTests/array/copying/array_copy_target_simple.sol b/test/libsolidity/semanticTests/array/copying/array_copy_target_simple.sol index 160697c6b157..0a306cade434 100644 --- a/test/libsolidity/semanticTests/array/copying/array_copy_target_simple.sol +++ b/test/libsolidity/semanticTests/array/copying/array_copy_target_simple.sol @@ -16,9 +16,6 @@ contract c { e = data2[9]; } } - -// ==== -// compileToEwasm: also // ---- // test() -> 0x01000000000000000000000000000000000000000000000000, 0x02000000000000000000000000000000000000000000000000, 0x03000000000000000000000000000000000000000000000000, 0x04000000000000000000000000000000000000000000000000, 0x0 // gas irOptimized: 273576 diff --git a/test/libsolidity/semanticTests/array/copying/array_copy_target_simple_2.sol b/test/libsolidity/semanticTests/array/copying/array_copy_target_simple_2.sol index c2ab09c6432e..de100d0964d6 100644 --- a/test/libsolidity/semanticTests/array/copying/array_copy_target_simple_2.sol +++ b/test/libsolidity/semanticTests/array/copying/array_copy_target_simple_2.sol @@ -16,9 +16,6 @@ contract c { e = data2[9]; } } - -// ==== -// compileToEwasm: also // ---- // test() -> 0x01000000000000000000000000000000000000000000000000, 0x02000000000000000000000000000000000000000000000000, 0x03000000000000000000000000000000000000000000000000, 0x04000000000000000000000000000000000000000000000000, 0x00 // gas irOptimized: 233285 diff --git a/test/libsolidity/semanticTests/array/copying/array_elements_to_mapping.sol b/test/libsolidity/semanticTests/array/copying/array_elements_to_mapping.sol index e139e200ffe3..53ca44cdc5b3 100644 --- a/test/libsolidity/semanticTests/array/copying/array_elements_to_mapping.sol +++ b/test/libsolidity/semanticTests/array/copying/array_elements_to_mapping.sol @@ -50,7 +50,6 @@ contract C { return m[0]; } } - // ---- // from_storage() -> 0x20, 2, 0x40, 0xa0, 2, 10, 11, 3, 12, 13, 14 // gas irOptimized: 150061 diff --git a/test/libsolidity/semanticTests/array/copying/array_nested_storage_to_memory.sol b/test/libsolidity/semanticTests/array/copying/array_nested_storage_to_memory.sol index 40990ba81285..ebaada764708 100644 --- a/test/libsolidity/semanticTests/array/copying/array_nested_storage_to_memory.sol +++ b/test/libsolidity/semanticTests/array/copying/array_nested_storage_to_memory.sol @@ -37,7 +37,6 @@ contract C { return a4; } } - // ---- // test1() -> 0x20, 2, 0x40, 0xa0, 2, 1, 2, 3, 3, 4, 5 // test2() -> 0x20, 0x40, 0xc0, 3, 6, 7, 8, 1, 9 diff --git a/test/libsolidity/semanticTests/array/copying/array_storage_multi_items_per_slot.sol b/test/libsolidity/semanticTests/array/copying/array_storage_multi_items_per_slot.sol index cbb87a2788ca..e335d8684978 100644 --- a/test/libsolidity/semanticTests/array/copying/array_storage_multi_items_per_slot.sol +++ b/test/libsolidity/semanticTests/array/copying/array_storage_multi_items_per_slot.sol @@ -10,8 +10,6 @@ contract C { return (a[32], b[1], c[2]); } } -// ==== -// compileToEwasm: also // ---- // f() -> 1, 2, 3 // gas irOptimized: 131932 diff --git a/test/libsolidity/semanticTests/array/copying/array_to_mapping.sol b/test/libsolidity/semanticTests/array/copying/array_to_mapping.sol index 5c36ed3f3a0e..9fcbbffcea46 100644 --- a/test/libsolidity/semanticTests/array/copying/array_to_mapping.sol +++ b/test/libsolidity/semanticTests/array/copying/array_to_mapping.sol @@ -35,7 +35,6 @@ contract C { return m[0]; } } - // ---- // from_storage() -> 0x20, 2, 0x40, 0xa0, 2, 10, 11, 3, 12, 13, 14 // gas irOptimized: 147892 diff --git a/test/libsolidity/semanticTests/array/copying/bytes_memory_to_storage.sol b/test/libsolidity/semanticTests/array/copying/bytes_memory_to_storage.sol index 6cdd48bf1c47..d1202e27eb07 100644 --- a/test/libsolidity/semanticTests/array/copying/bytes_memory_to_storage.sol +++ b/test/libsolidity/semanticTests/array/copying/bytes_memory_to_storage.sol @@ -6,7 +6,5 @@ contract C { return s[0]; } } -// ==== -// compileToEwasm: also // ---- // f() -> "a" diff --git a/test/libsolidity/semanticTests/array/copying/bytes_storage_to_memory.sol b/test/libsolidity/semanticTests/array/copying/bytes_storage_to_memory.sol index e996714ce278..84e11c1384b5 100644 --- a/test/libsolidity/semanticTests/array/copying/bytes_storage_to_memory.sol +++ b/test/libsolidity/semanticTests/array/copying/bytes_storage_to_memory.sol @@ -5,7 +5,5 @@ contract C { return data[0]; } } -// ==== -// compileToEwasm: also // ---- // f() -> "a" diff --git a/test/libsolidity/semanticTests/array/copying/calldata_array_of_struct_to_memory.sol b/test/libsolidity/semanticTests/array/copying/calldata_array_of_struct_to_memory.sol index 25a2c05f1668..fcf4aca21eaa 100644 --- a/test/libsolidity/semanticTests/array/copying/calldata_array_of_struct_to_memory.sol +++ b/test/libsolidity/semanticTests/array/copying/calldata_array_of_struct_to_memory.sol @@ -20,6 +20,5 @@ contract C { d = m[1].b; } } - // ---- // f((uint256,uint256)[]): 0x20, 0x2, 0x1, 0x2, 0x3, 0x4 -> 2, 1, 2, 3, 4 diff --git a/test/libsolidity/semanticTests/array/copying/calldata_array_static_to_memory.sol b/test/libsolidity/semanticTests/array/copying/calldata_array_static_to_memory.sol index fbc1d03d94aa..ace6550bb87f 100644 --- a/test/libsolidity/semanticTests/array/copying/calldata_array_static_to_memory.sol +++ b/test/libsolidity/semanticTests/array/copying/calldata_array_static_to_memory.sol @@ -4,7 +4,5 @@ contract C { return (m1[0], m1[1]); } } -// ==== -// compileToEwasm: also // ---- // f(uint256[2]): 43, 57 -> 43, 57 diff --git a/test/libsolidity/semanticTests/array/copying/calldata_array_to_mapping.sol b/test/libsolidity/semanticTests/array/copying/calldata_array_to_mapping.sol index 90b5b85d6afe..26f3d587f0c0 100644 --- a/test/libsolidity/semanticTests/array/copying/calldata_array_to_mapping.sol +++ b/test/libsolidity/semanticTests/array/copying/calldata_array_to_mapping.sol @@ -10,7 +10,6 @@ contract C { return m[0]; } } - // ==== // compileViaYul: true // ---- diff --git a/test/libsolidity/semanticTests/array/copying/calldata_bytes_to_storage.sol b/test/libsolidity/semanticTests/array/copying/calldata_bytes_to_storage.sol index 57f6b3a3e756..2409893e36a4 100644 --- a/test/libsolidity/semanticTests/array/copying/calldata_bytes_to_storage.sol +++ b/test/libsolidity/semanticTests/array/copying/calldata_bytes_to_storage.sol @@ -5,7 +5,5 @@ contract C { return s[0]; } } -// ==== -// compileToEwasm: also // ---- // f(bytes): 0x20, 0x08, "abcdefgh" -> "a" diff --git a/test/libsolidity/semanticTests/array/copying/calldata_dynamic_array_to_memory.sol b/test/libsolidity/semanticTests/array/copying/calldata_dynamic_array_to_memory.sol index 28eecc4f2e40..db6625c8e7bf 100644 --- a/test/libsolidity/semanticTests/array/copying/calldata_dynamic_array_to_memory.sol +++ b/test/libsolidity/semanticTests/array/copying/calldata_dynamic_array_to_memory.sol @@ -10,6 +10,5 @@ contract C { return (a.length, m); } } - // ---- // f(uint256[][]): 0x20, 0x1, 0x20, 0x2, 0x17, 0x2a -> 0x1, 0x40, 0x2, 0x17, 0x2a diff --git a/test/libsolidity/semanticTests/array/copying/copy_function_internal_storage_array.sol b/test/libsolidity/semanticTests/array/copying/copy_function_internal_storage_array.sol index d4d535950181..18795ff798c2 100644 --- a/test/libsolidity/semanticTests/array/copying/copy_function_internal_storage_array.sol +++ b/test/libsolidity/semanticTests/array/copying/copy_function_internal_storage_array.sol @@ -13,7 +13,6 @@ contract C { return 7; } } - // ---- // test() -> 7 // gas irOptimized: 122477 diff --git a/test/libsolidity/semanticTests/array/copying/copy_internal_function_array_to_storage.sol b/test/libsolidity/semanticTests/array/copying/copy_internal_function_array_to_storage.sol index 20b894082ca1..95ba9d8ed8e8 100644 --- a/test/libsolidity/semanticTests/array/copying/copy_internal_function_array_to_storage.sol +++ b/test/libsolidity/semanticTests/array/copying/copy_internal_function_array_to_storage.sol @@ -16,9 +16,6 @@ contract C { return 2; } } - -// ==== -// compileToEwasm: also // ---- // one() -> 3 // gas legacy: 140253 diff --git a/test/libsolidity/semanticTests/array/copying/copying_bytes_multiassign.sol b/test/libsolidity/semanticTests/array/copying/copying_bytes_multiassign.sol index ca6362b5c01d..8277df30a1e1 100644 --- a/test/libsolidity/semanticTests/array/copying/copying_bytes_multiassign.sol +++ b/test/libsolidity/semanticTests/array/copying/copying_bytes_multiassign.sol @@ -16,8 +16,6 @@ contract sender { bytes savedData1; bytes savedData2; } -// ==== -// compileToEwasm: false // ---- // (): 7 -> // gas irOptimized: 110820 diff --git a/test/libsolidity/semanticTests/array/copying/dirty_memory_bytes_to_storage_copy_ir.sol b/test/libsolidity/semanticTests/array/copying/dirty_memory_bytes_to_storage_copy_ir.sol index 2af9270624f6..3704e36821af 100644 --- a/test/libsolidity/semanticTests/array/copying/dirty_memory_bytes_to_storage_copy_ir.sol +++ b/test/libsolidity/semanticTests/array/copying/dirty_memory_bytes_to_storage_copy_ir.sol @@ -14,6 +14,5 @@ contract C { } // ==== // compileViaYul: true -// compileToEwasm: also // ---- // f() -> 0x6465616462656566000000000000000000000000000000000000000000000010 diff --git a/test/libsolidity/semanticTests/array/copying/elements_of_nested_array_of_structs_calldata_to_storage.sol b/test/libsolidity/semanticTests/array/copying/elements_of_nested_array_of_structs_calldata_to_storage.sol index f435d9136367..eb0eb108fbf9 100644 --- a/test/libsolidity/semanticTests/array/copying/elements_of_nested_array_of_structs_calldata_to_storage.sol +++ b/test/libsolidity/semanticTests/array/copying/elements_of_nested_array_of_structs_calldata_to_storage.sol @@ -27,8 +27,6 @@ contract C { return s3[0]; } } - - // ==== // compileViaYul: true // ---- diff --git a/test/libsolidity/semanticTests/array/copying/elements_of_nested_array_of_structs_memory_to_storage.sol b/test/libsolidity/semanticTests/array/copying/elements_of_nested_array_of_structs_memory_to_storage.sol index 3a52e0a58488..9dbc64f734a9 100644 --- a/test/libsolidity/semanticTests/array/copying/elements_of_nested_array_of_structs_memory_to_storage.sol +++ b/test/libsolidity/semanticTests/array/copying/elements_of_nested_array_of_structs_memory_to_storage.sol @@ -27,8 +27,6 @@ contract C { return s3[0]; } } - - // ==== // compileViaYul: true // ---- diff --git a/test/libsolidity/semanticTests/array/copying/nested_array_element_calldata_to_memory.sol b/test/libsolidity/semanticTests/array/copying/nested_array_element_calldata_to_memory.sol index ee715b5b6c11..e3843537fbed 100644 --- a/test/libsolidity/semanticTests/array/copying/nested_array_element_calldata_to_memory.sol +++ b/test/libsolidity/semanticTests/array/copying/nested_array_element_calldata_to_memory.sol @@ -31,7 +31,6 @@ contract C { return tmp[0]; } } - // ---- // test1(uint8[][][]): 0x20, 2, 0x40, 0x60, 0, 2, 0x40, 0x80, 1, 7, 2, 8, 9 -> 0x20, 2, 0x40, 0x80, 1, 7, 2, 8, 9 // test2(uint8[][1][]): 0x20, 2, 0x40, 0xe0, 0x20, 3, 12, 13, 14, 0x20, 3, 15, 16, 17 -> 0x20, 0x20, 3, 12, 13, 14 diff --git a/test/libsolidity/semanticTests/array/copying/nested_array_element_calldata_to_storage.sol b/test/libsolidity/semanticTests/array/copying/nested_array_element_calldata_to_storage.sol index 93c458341b04..5040a72cadb5 100644 --- a/test/libsolidity/semanticTests/array/copying/nested_array_element_calldata_to_storage.sol +++ b/test/libsolidity/semanticTests/array/copying/nested_array_element_calldata_to_storage.sol @@ -22,7 +22,6 @@ contract C { require(a2[1][1][1] == 0); } } - // ---- // test(uint8[2][2][2]): 1, 2, 3, 4, 5, 6, 7, 8 // test2(uint8[2][2]): 1, 2, 3, 4 diff --git a/test/libsolidity/semanticTests/array/copying/nested_array_element_memory_to_memory.sol b/test/libsolidity/semanticTests/array/copying/nested_array_element_memory_to_memory.sol index ab3d472d6f29..3058df842a27 100644 --- a/test/libsolidity/semanticTests/array/copying/nested_array_element_memory_to_memory.sol +++ b/test/libsolidity/semanticTests/array/copying/nested_array_element_memory_to_memory.sol @@ -31,7 +31,6 @@ contract C { return tmp[0]; } } - // ---- // test1(uint8[][][]): 0x20, 2, 0x40, 0x60, 0, 2, 0x40, 0x80, 1, 7, 2, 8, 9 -> 0x20, 2, 0x40, 0x80, 1, 7, 2, 8, 9 // test2(uint8[][1][]): 0x20, 2, 0x40, 0xe0, 0x20, 3, 12, 13, 14, 0x20, 3, 15, 16, 17 -> 0x20, 0x20, 3, 12, 13, 14 diff --git a/test/libsolidity/semanticTests/array/copying/nested_array_element_memory_to_storage.sol b/test/libsolidity/semanticTests/array/copying/nested_array_element_memory_to_storage.sol index 2dd2e7aa37b5..2f4b4ca7c9a1 100644 --- a/test/libsolidity/semanticTests/array/copying/nested_array_element_memory_to_storage.sol +++ b/test/libsolidity/semanticTests/array/copying/nested_array_element_memory_to_storage.sol @@ -22,7 +22,6 @@ contract C { require(a2[1][1][1] == 0); } } - // ---- // test(uint8[2][2][2]): 1, 2, 3, 4, 5, 6, 7, 8 // test2(uint8[2][2]): 1, 2, 3, 4 diff --git a/test/libsolidity/semanticTests/array/copying/nested_array_element_storage_to_memory.sol b/test/libsolidity/semanticTests/array/copying/nested_array_element_storage_to_memory.sol index 2f78042a488c..e30ca769bd42 100644 --- a/test/libsolidity/semanticTests/array/copying/nested_array_element_storage_to_memory.sol +++ b/test/libsolidity/semanticTests/array/copying/nested_array_element_storage_to_memory.sol @@ -60,7 +60,6 @@ contract C { return tmp; } } - // ---- // test1() -> 0x20, 2, 0x40, 0xa0, 2, 3, 4, 2, 5, 6 // test2() -> 0x20, 2, 0x40, 0xa0, 2, 6, 7, 2, 8, 9 diff --git a/test/libsolidity/semanticTests/array/copying/nested_array_element_storage_to_storage.sol b/test/libsolidity/semanticTests/array/copying/nested_array_element_storage_to_storage.sol index c402c14b2099..c962d815f434 100644 --- a/test/libsolidity/semanticTests/array/copying/nested_array_element_storage_to_storage.sol +++ b/test/libsolidity/semanticTests/array/copying/nested_array_element_storage_to_storage.sol @@ -68,7 +68,6 @@ contract C { require(dst4[1][1] == src4[0][1][1]); } } - // ---- // test1() -> // gas irOptimized: 150508 diff --git a/test/libsolidity/semanticTests/array/copying/nested_array_of_structs_calldata_to_memory.sol b/test/libsolidity/semanticTests/array/copying/nested_array_of_structs_calldata_to_memory.sol index 159486eda666..3d424a7c5976 100644 --- a/test/libsolidity/semanticTests/array/copying/nested_array_of_structs_calldata_to_memory.sol +++ b/test/libsolidity/semanticTests/array/copying/nested_array_of_structs_calldata_to_memory.sol @@ -18,7 +18,6 @@ contract C { return a; } } - // ---- // test1((uint8,uint8)[1][2]): 1, 2, 3, 4 -> 1, 2, 3, 4 // test2((uint8,uint8)[1][]): 0x20, 3, 7, 11, 13, 17, 19, 23 -> 0x20, 3, 7, 11, 13, 17, 19, 23 diff --git a/test/libsolidity/semanticTests/array/copying/nested_array_of_structs_calldata_to_storage.sol b/test/libsolidity/semanticTests/array/copying/nested_array_of_structs_calldata_to_storage.sol index 60d65cb59bd6..fe60365e4aa7 100644 --- a/test/libsolidity/semanticTests/array/copying/nested_array_of_structs_calldata_to_storage.sol +++ b/test/libsolidity/semanticTests/array/copying/nested_array_of_structs_calldata_to_storage.sol @@ -25,8 +25,6 @@ contract C { return s3; } } - - // ==== // compileViaYul: true // ---- diff --git a/test/libsolidity/semanticTests/array/copying/nested_array_of_structs_memory_to_memory.sol b/test/libsolidity/semanticTests/array/copying/nested_array_of_structs_memory_to_memory.sol index 55a4d6aedb2c..6c8da98dd66c 100644 --- a/test/libsolidity/semanticTests/array/copying/nested_array_of_structs_memory_to_memory.sol +++ b/test/libsolidity/semanticTests/array/copying/nested_array_of_structs_memory_to_memory.sol @@ -18,7 +18,6 @@ contract C { r = a; } } - // ---- // test1((uint8,uint8)[1][2]): 1, 2, 3, 4 -> 1, 2, 3, 4 // test2((uint8,uint8)[1][]): 0x20, 3, 7, 11, 13, 17, 19, 23 -> 0x20, 3, 7, 11, 13, 17, 19, 23 diff --git a/test/libsolidity/semanticTests/array/copying/nested_array_of_structs_memory_to_storage.sol b/test/libsolidity/semanticTests/array/copying/nested_array_of_structs_memory_to_storage.sol index 13b350262162..ccf2f2a2082d 100644 --- a/test/libsolidity/semanticTests/array/copying/nested_array_of_structs_memory_to_storage.sol +++ b/test/libsolidity/semanticTests/array/copying/nested_array_of_structs_memory_to_storage.sol @@ -25,8 +25,6 @@ contract C { return s3; } } - - // ==== // compileViaYul: true // ---- diff --git a/test/libsolidity/semanticTests/array/copying/nested_array_of_structs_storage_to_storage.sol b/test/libsolidity/semanticTests/array/copying/nested_array_of_structs_storage_to_storage.sol index 64c7f06a57c1..fb06b318874a 100644 --- a/test/libsolidity/semanticTests/array/copying/nested_array_of_structs_storage_to_storage.sol +++ b/test/libsolidity/semanticTests/array/copying/nested_array_of_structs_storage_to_storage.sol @@ -59,7 +59,6 @@ contract C { require(dst3[1][0].y == src3[1][0].y); } } - // ==== // compileViaYul: true // ---- diff --git a/test/libsolidity/semanticTests/array/copying/nested_array_of_structs_with_nested_array_from_storage_to_memory.sol b/test/libsolidity/semanticTests/array/copying/nested_array_of_structs_with_nested_array_from_storage_to_memory.sol index 58240492ca75..3a5e44a5df01 100644 --- a/test/libsolidity/semanticTests/array/copying/nested_array_of_structs_with_nested_array_from_storage_to_memory.sol +++ b/test/libsolidity/semanticTests/array/copying/nested_array_of_structs_with_nested_array_from_storage_to_memory.sol @@ -37,7 +37,6 @@ contract C { return s2[0]; } } - // ==== // compileViaYul: true // ---- diff --git a/test/libsolidity/semanticTests/array/copying/nested_dynamic_array_element_calldata_to_storage.sol b/test/libsolidity/semanticTests/array/copying/nested_dynamic_array_element_calldata_to_storage.sol index 5b7205553026..6e44ed2686ab 100644 --- a/test/libsolidity/semanticTests/array/copying/nested_dynamic_array_element_calldata_to_storage.sol +++ b/test/libsolidity/semanticTests/array/copying/nested_dynamic_array_element_calldata_to_storage.sol @@ -26,7 +26,6 @@ contract C { require(a2[1].length == 0); } } - // ==== // compileViaYul: true // ---- diff --git a/test/libsolidity/semanticTests/array/copying/storage_memory_packed.sol b/test/libsolidity/semanticTests/array/copying/storage_memory_packed.sol index b1410f7e2775..f49b4923b81f 100644 --- a/test/libsolidity/semanticTests/array/copying/storage_memory_packed.sol +++ b/test/libsolidity/semanticTests/array/copying/storage_memory_packed.sol @@ -9,7 +9,5 @@ contract C { return (m[0], m[16], m[32]); } } -// ==== -// compileToEwasm: also // ---- // f() -> 2, 3, 4 diff --git a/test/libsolidity/semanticTests/array/create_dynamic_array_with_zero_length.sol b/test/libsolidity/semanticTests/array/create_dynamic_array_with_zero_length.sol index 3856e23dc27c..9d2dbd8c28bb 100644 --- a/test/libsolidity/semanticTests/array/create_dynamic_array_with_zero_length.sol +++ b/test/libsolidity/semanticTests/array/create_dynamic_array_with_zero_length.sol @@ -4,7 +4,5 @@ contract C { return 7; } } -// ==== -// compileToEwasm: also // ---- // f() -> 7 diff --git a/test/libsolidity/semanticTests/array/create_memory_array_too_large.sol b/test/libsolidity/semanticTests/array/create_memory_array_too_large.sol index ed6a3740370a..1d886a8c0e7d 100644 --- a/test/libsolidity/semanticTests/array/create_memory_array_too_large.sol +++ b/test/libsolidity/semanticTests/array/create_memory_array_too_large.sol @@ -19,8 +19,6 @@ contract C { y[0] = 23; return x[2]; }} -// ==== -// compileToEwasm: also // ---- // f() -> FAILURE, hex"4e487b71", 0x41 // g() -> FAILURE, hex"4e487b71", 0x41 diff --git a/test/libsolidity/semanticTests/array/create_multiple_dynamic_arrays.sol b/test/libsolidity/semanticTests/array/create_multiple_dynamic_arrays.sol index ad5c3927927f..2396e3179b63 100644 --- a/test/libsolidity/semanticTests/array/create_multiple_dynamic_arrays.sol +++ b/test/libsolidity/semanticTests/array/create_multiple_dynamic_arrays.sol @@ -29,7 +29,5 @@ contract C { return 0; } } -// ==== -// compileToEwasm: also // ---- // f() -> 7 diff --git a/test/libsolidity/semanticTests/array/delete/delete_bytes_array.sol b/test/libsolidity/semanticTests/array/delete/delete_bytes_array.sol index 77096a645c32..b735d182d555 100644 --- a/test/libsolidity/semanticTests/array/delete/delete_bytes_array.sol +++ b/test/libsolidity/semanticTests/array/delete/delete_bytes_array.sol @@ -29,7 +29,6 @@ contract C { assert(size == 0); } } - // ---- // f() -> 0 // g() -> 0 diff --git a/test/libsolidity/semanticTests/array/delete/delete_memory_array.sol b/test/libsolidity/semanticTests/array/delete/delete_memory_array.sol index 54abc495c9b2..53a66af34337 100644 --- a/test/libsolidity/semanticTests/array/delete/delete_memory_array.sol +++ b/test/libsolidity/semanticTests/array/delete/delete_memory_array.sol @@ -10,6 +10,5 @@ contract C { } } } - // ---- // len() -> 0 diff --git a/test/libsolidity/semanticTests/array/delete/delete_on_array_of_structs.sol b/test/libsolidity/semanticTests/array/delete/delete_on_array_of_structs.sol index 316b8d9efd1e..2c1421eee952 100644 --- a/test/libsolidity/semanticTests/array/delete/delete_on_array_of_structs.sol +++ b/test/libsolidity/semanticTests/array/delete/delete_on_array_of_structs.sol @@ -15,6 +15,5 @@ contract C { return true; } } - // ---- // f() -> true # This code interprets x as an array length and thus will go out of gas. neither of the two should throw due to out-of-bounds access # diff --git a/test/libsolidity/semanticTests/array/delete/delete_storage_array.sol b/test/libsolidity/semanticTests/array/delete/delete_storage_array.sol index 0bb429674741..4136456684e2 100644 --- a/test/libsolidity/semanticTests/array/delete/delete_storage_array.sol +++ b/test/libsolidity/semanticTests/array/delete/delete_storage_array.sol @@ -32,7 +32,6 @@ contract C { } } } - // ---- // len() -> 0 // val() -> 0 diff --git a/test/libsolidity/semanticTests/array/dynamic_arrays_in_storage.sol b/test/libsolidity/semanticTests/array/dynamic_arrays_in_storage.sol index d6e7160be9fc..bce78baa4133 100644 --- a/test/libsolidity/semanticTests/array/dynamic_arrays_in_storage.sol +++ b/test/libsolidity/semanticTests/array/dynamic_arrays_in_storage.sol @@ -38,7 +38,6 @@ contract c { while (ids.length < l2) ids.push(); } } - // ---- // getLengths() -> 0, 0 // setLengths(uint256,uint256): 48, 49 -> diff --git a/test/libsolidity/semanticTests/array/dynamic_out_of_bounds_array_access.sol b/test/libsolidity/semanticTests/array/dynamic_out_of_bounds_array_access.sol index 844324f3253e..5cf35ef3edfe 100644 --- a/test/libsolidity/semanticTests/array/dynamic_out_of_bounds_array_access.sol +++ b/test/libsolidity/semanticTests/array/dynamic_out_of_bounds_array_access.sol @@ -19,7 +19,6 @@ contract c { return data.length; } } - // ---- // length() -> 0 // get(uint256): 3 -> FAILURE, hex"4e487b71", 0x32 diff --git a/test/libsolidity/semanticTests/array/external_array_args.sol b/test/libsolidity/semanticTests/array/external_array_args.sol index 53cc757725f0..da6664f9e91e 100644 --- a/test/libsolidity/semanticTests/array/external_array_args.sol +++ b/test/libsolidity/semanticTests/array/external_array_args.sol @@ -6,7 +6,5 @@ contract c { cv = c[c_index]; } } -// ==== -// compileToEwasm: also // ---- // test(uint256[8],uint256[],uint256[5],uint256,uint256,uint256): 1, 2, 3, 4, 5, 6, 7, 8, 0x220, 21, 22, 23, 24, 25, 0, 1, 2, 3, 11, 12, 13 -> 1, 12, 23 diff --git a/test/libsolidity/semanticTests/array/fixed_array_cleanup.sol b/test/libsolidity/semanticTests/array/fixed_array_cleanup.sol index 51f93db7a29b..337946a20c90 100644 --- a/test/libsolidity/semanticTests/array/fixed_array_cleanup.sol +++ b/test/libsolidity/semanticTests/array/fixed_array_cleanup.sol @@ -7,8 +7,6 @@ contract c { } function clear() public { delete data; } } -// ==== -// compileToEwasm: also // ---- // storageEmpty -> 1 // fill() -> diff --git a/test/libsolidity/semanticTests/array/fixed_arrays_as_return_type.sol b/test/libsolidity/semanticTests/array/fixed_arrays_as_return_type.sol index 519a11131c85..9d8dc0bc7b52 100644 --- a/test/libsolidity/semanticTests/array/fixed_arrays_as_return_type.sol +++ b/test/libsolidity/semanticTests/array/fixed_arrays_as_return_type.sol @@ -16,7 +16,6 @@ contract B { res2 = a.f(1000); } } - // ---- // f() -> 2, 3, 4, 5, 6, 1000, 1001, 1002, 1003, 1004 // gas irOptimized: 115828 diff --git a/test/libsolidity/semanticTests/array/fixed_arrays_in_storage.sol b/test/libsolidity/semanticTests/array/fixed_arrays_in_storage.sol index eb167ee0c8f1..b65a3d254d54 100644 --- a/test/libsolidity/semanticTests/array/fixed_arrays_in_storage.sol +++ b/test/libsolidity/semanticTests/array/fixed_arrays_in_storage.sol @@ -33,8 +33,6 @@ contract c { l2 = ids.length; } } -// ==== -// compileToEwasm: also // ---- // setIDStatic(uint256): 0xb -> // getID(uint256): 0x2 -> 0xb diff --git a/test/libsolidity/semanticTests/array/fixed_bytes_length_access.sol b/test/libsolidity/semanticTests/array/fixed_bytes_length_access.sol index e22b56cfc1a6..d641cd83f1ac 100644 --- a/test/libsolidity/semanticTests/array/fixed_bytes_length_access.sol +++ b/test/libsolidity/semanticTests/array/fixed_bytes_length_access.sol @@ -5,7 +5,5 @@ contract C { return (x.length, bytes16(uint128(2)).length, a.length + 7); } } -// ==== -// compileToEwasm: also // ---- // f(bytes32): "789" -> 32, 16, 8 diff --git a/test/libsolidity/semanticTests/array/fixed_out_of_bounds_array_access.sol b/test/libsolidity/semanticTests/array/fixed_out_of_bounds_array_access.sol index d82ef152c971..1b3b640808b3 100644 --- a/test/libsolidity/semanticTests/array/fixed_out_of_bounds_array_access.sol +++ b/test/libsolidity/semanticTests/array/fixed_out_of_bounds_array_access.sol @@ -14,9 +14,6 @@ contract c { return data.length; } } - -// ==== -// compileToEwasm: also // ---- // length() -> 4 // set(uint256,uint256): 3, 4 -> true diff --git a/test/libsolidity/semanticTests/array/function_array_cross_calls.sol b/test/libsolidity/semanticTests/array/function_array_cross_calls.sol index 8bb4545b2b94..7e29d82a8166 100644 --- a/test/libsolidity/semanticTests/array/function_array_cross_calls.sol +++ b/test/libsolidity/semanticTests/array/function_array_cross_calls.sol @@ -40,7 +40,6 @@ contract C { return this.e; } } - // ---- // test() -> 5, 6, 7 // gas irOptimized: 260895 diff --git a/test/libsolidity/semanticTests/array/function_memory_array.sol b/test/libsolidity/semanticTests/array/function_memory_array.sol index 322eed73ead3..bdd23c67538e 100644 --- a/test/libsolidity/semanticTests/array/function_memory_array.sol +++ b/test/libsolidity/semanticTests/array/function_memory_array.sol @@ -30,8 +30,6 @@ contract C { return arr[i](x); } } -// ==== -// compileToEwasm: also // ---- // test(uint256,uint256): 10, 0 -> 11 // test(uint256,uint256): 10, 1 -> 12 diff --git a/test/libsolidity/semanticTests/array/indexAccess/index_access.sol b/test/libsolidity/semanticTests/array/indexAccess/index_access.sol index b90bbb12e38f..c618ae8e45d4 100644 --- a/test/libsolidity/semanticTests/array/indexAccess/index_access.sol +++ b/test/libsolidity/semanticTests/array/indexAccess/index_access.sol @@ -13,8 +13,6 @@ contract C { ret[7] = bytesValue[0]; } } -// ==== -// compileToEwasm: also // ---- // to_little_endian_64(uint64): 0 -> 0x20, 8, 0x00 // to_little_endian_64(uint64): 0x0102030405060708 -> 0x20, 8, 0x0807060504030201000000000000000000000000000000000000000000000000 diff --git a/test/libsolidity/semanticTests/array/indexAccess/inline_array_index_access_ints.sol b/test/libsolidity/semanticTests/array/indexAccess/inline_array_index_access_ints.sol index c1481fc9973e..0525f6f283ef 100644 --- a/test/libsolidity/semanticTests/array/indexAccess/inline_array_index_access_ints.sol +++ b/test/libsolidity/semanticTests/array/indexAccess/inline_array_index_access_ints.sol @@ -3,8 +3,5 @@ contract C { return ([1, 2, 3, 4][2]); } } - -// ==== -// compileToEwasm: also // ---- // f() -> 3 diff --git a/test/libsolidity/semanticTests/array/indexAccess/inline_array_index_access_strings.sol b/test/libsolidity/semanticTests/array/indexAccess/inline_array_index_access_strings.sol index b826dc13d061..bf6c0b0ee8d4 100644 --- a/test/libsolidity/semanticTests/array/indexAccess/inline_array_index_access_strings.sol +++ b/test/libsolidity/semanticTests/array/indexAccess/inline_array_index_access_strings.sol @@ -9,9 +9,6 @@ contract C { tester = f(); } } - -// ==== -// compileToEwasm: also // ---- // test() -> // tester() -> 0x20, 0x3, "abc" diff --git a/test/libsolidity/semanticTests/array/indexAccess/memory_arrays_index_access_write.sol b/test/libsolidity/semanticTests/array/indexAccess/memory_arrays_index_access_write.sol index ff83a43101bc..7a8a18670ea5 100644 --- a/test/libsolidity/semanticTests/array/indexAccess/memory_arrays_index_access_write.sol +++ b/test/libsolidity/semanticTests/array/indexAccess/memory_arrays_index_access_write.sol @@ -10,7 +10,5 @@ contract Test { return data; } } -// ==== -// compileToEwasm: also // ---- // f() -> 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x07 diff --git a/test/libsolidity/semanticTests/array/inline_array_return.sol b/test/libsolidity/semanticTests/array/inline_array_return.sol index d6673882f606..25302dcbfdd2 100644 --- a/test/libsolidity/semanticTests/array/inline_array_return.sol +++ b/test/libsolidity/semanticTests/array/inline_array_return.sol @@ -10,8 +10,5 @@ contract C { return (tester[0], tester[1], tester[2], tester[3], tester[4]); } } - -// ==== -// compileToEwasm: also // ---- // f() -> 1, 2, 3, 4, 5 diff --git a/test/libsolidity/semanticTests/array/inline_array_singleton.sol b/test/libsolidity/semanticTests/array/inline_array_singleton.sol index 870c853e14fd..b14ade6e48c1 100644 --- a/test/libsolidity/semanticTests/array/inline_array_singleton.sol +++ b/test/libsolidity/semanticTests/array/inline_array_singleton.sol @@ -4,7 +4,5 @@ contract C { return [4][0]; } } -// ==== -// compileToEwasm: also // ---- // f() -> 4 diff --git a/test/libsolidity/semanticTests/array/inline_array_storage_to_memory_conversion_ints.sol b/test/libsolidity/semanticTests/array/inline_array_storage_to_memory_conversion_ints.sol index 18626b055d7c..e145d281c906 100644 --- a/test/libsolidity/semanticTests/array/inline_array_storage_to_memory_conversion_ints.sol +++ b/test/libsolidity/semanticTests/array/inline_array_storage_to_memory_conversion_ints.sol @@ -6,8 +6,5 @@ contract C { return (z[0], z[1]); } } - -// ==== -// compileToEwasm: also // ---- // f() -> 3, 6 diff --git a/test/libsolidity/semanticTests/array/inline_array_storage_to_memory_conversion_strings.sol b/test/libsolidity/semanticTests/array/inline_array_storage_to_memory_conversion_strings.sol index 2b456ca9aadc..7dfe6e642594 100644 --- a/test/libsolidity/semanticTests/array/inline_array_storage_to_memory_conversion_strings.sol +++ b/test/libsolidity/semanticTests/array/inline_array_storage_to_memory_conversion_strings.sol @@ -7,8 +7,5 @@ contract C { return (x[1], x[2]); } } - -// ==== -// compileToEwasm: also // ---- // f() -> 0x40, 0x80, 0x3, "ray", 0x2, "mi" diff --git a/test/libsolidity/semanticTests/array/inline_array_strings_from_document.sol b/test/libsolidity/semanticTests/array/inline_array_strings_from_document.sol index 23f2d89c704f..9cb16349a1ef 100644 --- a/test/libsolidity/semanticTests/array/inline_array_strings_from_document.sol +++ b/test/libsolidity/semanticTests/array/inline_array_strings_from_document.sol @@ -4,9 +4,6 @@ contract C { return (x[i]); } } - -// ==== -// compileToEwasm: also // ---- // f(uint256): 0 -> 0x20, 0x4, "This" // f(uint256): 1 -> 0x20, 0x2, "is" diff --git a/test/libsolidity/semanticTests/array/memory.sol b/test/libsolidity/semanticTests/array/memory.sol index 6bde7c26cde3..88c18d4949b3 100644 --- a/test/libsolidity/semanticTests/array/memory.sol +++ b/test/libsolidity/semanticTests/array/memory.sol @@ -9,7 +9,6 @@ contract C { return this.h(n) * 2; } } - // ---- // h(uint256[4]): 1, 2, 3, 4 -> 10 // i(uint256[4]): 1, 2, 3, 4 -> 20 diff --git a/test/libsolidity/semanticTests/array/pop/array_pop_empty_exception.sol b/test/libsolidity/semanticTests/array/pop/array_pop_empty_exception.sol index 1750711e1349..6130130da2de 100644 --- a/test/libsolidity/semanticTests/array/pop/array_pop_empty_exception.sol +++ b/test/libsolidity/semanticTests/array/pop/array_pop_empty_exception.sol @@ -6,7 +6,5 @@ contract c { return true; } } -// ==== -// compileToEwasm: also // ---- // test() -> FAILURE, hex"4e487b71", 0x31 diff --git a/test/libsolidity/semanticTests/array/pop/array_pop_isolated.sol b/test/libsolidity/semanticTests/array/pop/array_pop_isolated.sol index ce41673e068d..43d7c3a9836d 100644 --- a/test/libsolidity/semanticTests/array/pop/array_pop_isolated.sol +++ b/test/libsolidity/semanticTests/array/pop/array_pop_isolated.sol @@ -8,7 +8,5 @@ contract c { x = 3; } } -// ==== -// compileToEwasm: also // ---- // test() -> 3 diff --git a/test/libsolidity/semanticTests/array/pop/byte_array_pop.sol b/test/libsolidity/semanticTests/array/pop/byte_array_pop.sol index 81e1eb020d53..8f0152180e35 100644 --- a/test/libsolidity/semanticTests/array/pop/byte_array_pop.sol +++ b/test/libsolidity/semanticTests/array/pop/byte_array_pop.sol @@ -12,7 +12,5 @@ contract c { l = data.length; } } -// ==== -// compileToEwasm: also // ---- // test() -> 2, 1, 1 diff --git a/test/libsolidity/semanticTests/array/pop/byte_array_pop_copy_long.sol b/test/libsolidity/semanticTests/array/pop/byte_array_pop_copy_long.sol index 3528e4c8180a..c64d93c1208a 100644 --- a/test/libsolidity/semanticTests/array/pop/byte_array_pop_copy_long.sol +++ b/test/libsolidity/semanticTests/array/pop/byte_array_pop_copy_long.sol @@ -7,7 +7,6 @@ contract c { return data; } } - // ---- // test() -> 0x20, 29, 0x0303030303030303030303030303030303030303030303030303030303000000 // gas irOptimized: 109310 diff --git a/test/libsolidity/semanticTests/array/pop/byte_array_pop_empty_exception.sol b/test/libsolidity/semanticTests/array/pop/byte_array_pop_empty_exception.sol index 5d573a096225..d860275e404f 100644 --- a/test/libsolidity/semanticTests/array/pop/byte_array_pop_empty_exception.sol +++ b/test/libsolidity/semanticTests/array/pop/byte_array_pop_empty_exception.sol @@ -9,7 +9,5 @@ contract c { return true; } } -// ==== -// compileToEwasm: also // ---- // test() -> FAILURE, hex"4e487b71", 0x31 diff --git a/test/libsolidity/semanticTests/array/pop/byte_array_pop_isolated.sol b/test/libsolidity/semanticTests/array/pop/byte_array_pop_isolated.sol index 519b0c5abed4..f74221712534 100644 --- a/test/libsolidity/semanticTests/array/pop/byte_array_pop_isolated.sol +++ b/test/libsolidity/semanticTests/array/pop/byte_array_pop_isolated.sol @@ -8,7 +8,5 @@ contract c { x = 3; } } -// ==== -// compileToEwasm: also // ---- // test() -> 3 diff --git a/test/libsolidity/semanticTests/array/pop/byte_array_pop_masking_long.sol b/test/libsolidity/semanticTests/array/pop/byte_array_pop_masking_long.sol index 6416afb2da74..623b58739a11 100644 --- a/test/libsolidity/semanticTests/array/pop/byte_array_pop_masking_long.sol +++ b/test/libsolidity/semanticTests/array/pop/byte_array_pop_masking_long.sol @@ -7,7 +7,6 @@ contract c { return data; } } - // ---- // test() -> 0x20, 33, 0x303030303030303030303030303030303030303030303030303030303030303, 0x0300000000000000000000000000000000000000000000000000000000000000 // gas irOptimized: 108053 diff --git a/test/libsolidity/semanticTests/array/pop/byte_array_pop_storage_empty.sol b/test/libsolidity/semanticTests/array/pop/byte_array_pop_storage_empty.sol index 4b2e88ffa827..a89f8a2acebf 100644 --- a/test/libsolidity/semanticTests/array/pop/byte_array_pop_storage_empty.sol +++ b/test/libsolidity/semanticTests/array/pop/byte_array_pop_storage_empty.sol @@ -9,8 +9,6 @@ contract c { data.pop(); } } -// ==== -// compileToEwasm: also // ---- // test() -> // storageEmpty -> 1 diff --git a/test/libsolidity/semanticTests/array/push/array_push_packed_array.sol b/test/libsolidity/semanticTests/array/push/array_push_packed_array.sol index 434168119284..e7a3bdbd1f18 100644 --- a/test/libsolidity/semanticTests/array/push/array_push_packed_array.sol +++ b/test/libsolidity/semanticTests/array/push/array_push_packed_array.sol @@ -11,7 +11,6 @@ contract c { return (x[0], x[1], x[2], x[3]); } } - // ---- // test() -> 1, 2, 3, 4 // gas irOptimized: 93017 diff --git a/test/libsolidity/semanticTests/array/push/byte_array_push.sol b/test/libsolidity/semanticTests/array/push/byte_array_push.sol index 28afd9f89c2c..2e0288d24327 100644 --- a/test/libsolidity/semanticTests/array/push/byte_array_push.sol +++ b/test/libsolidity/semanticTests/array/push/byte_array_push.sol @@ -13,7 +13,5 @@ contract c { if (l != 0x03) return true; } } -// ==== -// compileToEwasm: also // ---- // test() -> false diff --git a/test/libsolidity/semanticTests/array/short_fixed_array_cleanup.sol b/test/libsolidity/semanticTests/array/short_fixed_array_cleanup.sol index 6fada19c57a3..8288e1e86165 100644 --- a/test/libsolidity/semanticTests/array/short_fixed_array_cleanup.sol +++ b/test/libsolidity/semanticTests/array/short_fixed_array_cleanup.sol @@ -7,8 +7,6 @@ contract c { } function clear() public { delete data; } } -// ==== -// compileToEwasm: also // ---- // storageEmpty -> 1 // fill() -> diff --git a/test/libsolidity/semanticTests/array/slices/array_calldata_assignment.sol b/test/libsolidity/semanticTests/array/slices/array_calldata_assignment.sol index 282ccba09b2b..c9c489a8fccd 100644 --- a/test/libsolidity/semanticTests/array/slices/array_calldata_assignment.sol +++ b/test/libsolidity/semanticTests/array/slices/array_calldata_assignment.sol @@ -4,7 +4,5 @@ contract C { return x[i]; } } -// ==== -// compileToEwasm: also // ---- // f(uint256[],uint256[],uint256): 0x60, 0xA0, 1, 1, 0, 2, 1, 2 -> 2 diff --git a/test/libsolidity/semanticTests/array/storage_array_ref.sol b/test/libsolidity/semanticTests/array/storage_array_ref.sol index 0a896fed4b5b..37292ae874d1 100644 --- a/test/libsolidity/semanticTests/array/storage_array_ref.sol +++ b/test/libsolidity/semanticTests/array/storage_array_ref.sol @@ -38,7 +38,6 @@ contract Store is BinarySearch { return find(data, v); } } - // ---- // find(uint256): 7 -> -1 // add(uint256): 7 -> diff --git a/test/libsolidity/semanticTests/array/string_allocation_bug.sol b/test/libsolidity/semanticTests/array/string_allocation_bug.sol index bc974a438305..d6dadb78a964 100644 --- a/test/libsolidity/semanticTests/array/string_allocation_bug.sol +++ b/test/libsolidity/semanticTests/array/string_allocation_bug.sol @@ -16,7 +16,5 @@ contract Sample { p[0] = m; } } -// ==== -// compileToEwasm: also // ---- // p(uint256): 0x0 -> 0xbbbb, 0xcccc, 0x80, 0xc0, 0x05, "hello", 0x05, "world" diff --git a/test/libsolidity/semanticTests/array/strings_in_struct.sol b/test/libsolidity/semanticTests/array/strings_in_struct.sol index 1cc6b5a9325d..bacf8dec7a00 100644 --- a/test/libsolidity/semanticTests/array/strings_in_struct.sol +++ b/test/libsolidity/semanticTests/array/strings_in_struct.sol @@ -28,8 +28,6 @@ contract buggystruct { return bug.last; } } -// ==== -// compileToEwasm: also // ---- // getFirst() -> 0x0a // getSecond() -> 0x14 diff --git a/test/libsolidity/semanticTests/asmForLoop/for_loop_break.sol b/test/libsolidity/semanticTests/asmForLoop/for_loop_break.sol index c0c58007210e..d74db942c6a6 100644 --- a/test/libsolidity/semanticTests/asmForLoop/for_loop_break.sol +++ b/test/libsolidity/semanticTests/asmForLoop/for_loop_break.sol @@ -9,7 +9,5 @@ contract C { } } } -// ==== -// compileToEwasm: also // ---- // f() -> 6 diff --git a/test/libsolidity/semanticTests/asmForLoop/for_loop_continue.sol b/test/libsolidity/semanticTests/asmForLoop/for_loop_continue.sol index 4be20d6ba58a..f25a3c06a0bc 100644 --- a/test/libsolidity/semanticTests/asmForLoop/for_loop_continue.sol +++ b/test/libsolidity/semanticTests/asmForLoop/for_loop_continue.sol @@ -9,7 +9,5 @@ contract C { } } } -// ==== -// compileToEwasm: also // ---- // f() -> 5 diff --git a/test/libsolidity/semanticTests/asmForLoop/for_loop_nested.sol b/test/libsolidity/semanticTests/asmForLoop/for_loop_nested.sol index 620f2c3baaba..3a13e9f0e674 100644 --- a/test/libsolidity/semanticTests/asmForLoop/for_loop_nested.sol +++ b/test/libsolidity/semanticTests/asmForLoop/for_loop_nested.sol @@ -13,8 +13,6 @@ contract C { } } } -// ==== -// compileToEwasm: also // ---- // f(uint256): 0 -> 2 // f(uint256): 1 -> 18 diff --git a/test/libsolidity/semanticTests/builtinFunctions/assignment_to_const_var_involving_keccak.sol b/test/libsolidity/semanticTests/builtinFunctions/assignment_to_const_var_involving_keccak.sol index 2e8a66363e51..2fc479d0e10a 100644 --- a/test/libsolidity/semanticTests/builtinFunctions/assignment_to_const_var_involving_keccak.sol +++ b/test/libsolidity/semanticTests/builtinFunctions/assignment_to_const_var_involving_keccak.sol @@ -5,7 +5,5 @@ contract C { return x; } } -// ==== -// compileToEwasm: also // ---- // f() -> 0x4e03657aea45a94fc7d47ba826c8d667c0d1e6e33a64a036ec44f58fa12d6c45 diff --git a/test/libsolidity/semanticTests/builtinFunctions/blockhash.sol b/test/libsolidity/semanticTests/builtinFunctions/blockhash.sol index dc6e26f141a7..008a0467d42f 100644 --- a/test/libsolidity/semanticTests/builtinFunctions/blockhash.sol +++ b/test/libsolidity/semanticTests/builtinFunctions/blockhash.sol @@ -9,8 +9,6 @@ contract C { return blockhash(3); } } -// ==== -// compileToEwasm: also // ---- // f() -> 0x3737373737373737373737373737373737373737373737373737373737373738 // g() -> 0x3737373737373737373737373737373737373737373737373737373737373739 diff --git a/test/libsolidity/semanticTests/builtinFunctions/blockhash_shadow_resolution.sol b/test/libsolidity/semanticTests/builtinFunctions/blockhash_shadow_resolution.sol index fa1d01d4035f..0b532da0ec8d 100644 --- a/test/libsolidity/semanticTests/builtinFunctions/blockhash_shadow_resolution.sol +++ b/test/libsolidity/semanticTests/builtinFunctions/blockhash_shadow_resolution.sol @@ -2,7 +2,5 @@ contract C { function blockhash(uint256 blockNumber) public returns(bytes32) { bytes32 x; return x; } function f() public returns(bytes32) { return blockhash(3); } } -// ==== -// compileToEwasm: also // ---- // f() -> 0 diff --git a/test/libsolidity/semanticTests/builtinFunctions/function_types_sig.sol b/test/libsolidity/semanticTests/builtinFunctions/function_types_sig.sol index 9a8132950c15..2e771032bc7e 100644 --- a/test/libsolidity/semanticTests/builtinFunctions/function_types_sig.sol +++ b/test/libsolidity/semanticTests/builtinFunctions/function_types_sig.sol @@ -19,8 +19,6 @@ contract C { return this.x.selector; } } -// ==== -// compileToEwasm: also // ---- // f() -> 0x26121ff000000000000000000000000000000000000000000000000000000000 // g() -> 0x26121ff000000000000000000000000000000000000000000000000000000000 diff --git a/test/libsolidity/semanticTests/builtinFunctions/keccak256_empty.sol b/test/libsolidity/semanticTests/builtinFunctions/keccak256_empty.sol index 1898f0311374..f75c569e7777 100644 --- a/test/libsolidity/semanticTests/builtinFunctions/keccak256_empty.sol +++ b/test/libsolidity/semanticTests/builtinFunctions/keccak256_empty.sol @@ -3,8 +3,5 @@ contract C { return keccak256(""); } } - -// ==== -// compileToEwasm: also // ---- // f() -> 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 diff --git a/test/libsolidity/semanticTests/builtinFunctions/keccak256_with_bytes.sol b/test/libsolidity/semanticTests/builtinFunctions/keccak256_with_bytes.sol index 725d984d86f8..1904e814021b 100644 --- a/test/libsolidity/semanticTests/builtinFunctions/keccak256_with_bytes.sol +++ b/test/libsolidity/semanticTests/builtinFunctions/keccak256_with_bytes.sol @@ -8,6 +8,5 @@ contract c { return keccak256(data) == keccak256("foo"); } } - // ---- // foo() -> true diff --git a/test/libsolidity/semanticTests/builtinFunctions/msg_sig.sol b/test/libsolidity/semanticTests/builtinFunctions/msg_sig.sol index 21c5ed76dba8..f28658fe7dc1 100644 --- a/test/libsolidity/semanticTests/builtinFunctions/msg_sig.sol +++ b/test/libsolidity/semanticTests/builtinFunctions/msg_sig.sol @@ -3,7 +3,5 @@ contract test { return msg.sig; } } -// ==== -// compileToEwasm: also // ---- // foo(uint256): 0x0 -> 0x2fbebd3800000000000000000000000000000000000000000000000000000000 diff --git a/test/libsolidity/semanticTests/builtinFunctions/msg_sig_after_internal_call_is_same.sol b/test/libsolidity/semanticTests/builtinFunctions/msg_sig_after_internal_call_is_same.sol index a50521610f9c..7ff53efaa478 100644 --- a/test/libsolidity/semanticTests/builtinFunctions/msg_sig_after_internal_call_is_same.sol +++ b/test/libsolidity/semanticTests/builtinFunctions/msg_sig_after_internal_call_is_same.sol @@ -7,7 +7,5 @@ contract test { return boo(); } } -// ==== -// compileToEwasm: also // ---- // foo(uint256): 0x0 -> 0x2fbebd3800000000000000000000000000000000000000000000000000000000 diff --git a/test/libsolidity/semanticTests/builtinFunctions/ripemd160_empty.sol b/test/libsolidity/semanticTests/builtinFunctions/ripemd160_empty.sol index c79625d3cc5b..330fafc4d8df 100644 --- a/test/libsolidity/semanticTests/builtinFunctions/ripemd160_empty.sol +++ b/test/libsolidity/semanticTests/builtinFunctions/ripemd160_empty.sol @@ -3,6 +3,5 @@ contract C { return ripemd160(""); } } - // ---- // f() -> 0x9c1185a5c5e9fc54612808977ee8f548b2258d31000000000000000000000000 diff --git a/test/libsolidity/semanticTests/c99_scoping_activation.sol b/test/libsolidity/semanticTests/c99_scoping_activation.sol index 394b211d625e..6edf9db476fa 100644 --- a/test/libsolidity/semanticTests/c99_scoping_activation.sol +++ b/test/libsolidity/semanticTests/c99_scoping_activation.sol @@ -34,8 +34,6 @@ contract test { } } } -// ==== -// compileToEwasm: also // ---- // f() -> 3 // g() -> 0 diff --git a/test/libsolidity/semanticTests/calldata/calldata_array_index_range_access.sol b/test/libsolidity/semanticTests/calldata/calldata_array_index_range_access.sol index 61013596807b..634e35693ca2 100644 --- a/test/libsolidity/semanticTests/calldata/calldata_array_index_range_access.sol +++ b/test/libsolidity/semanticTests/calldata/calldata_array_index_range_access.sol @@ -25,8 +25,6 @@ contract C { return x[:e][idx]; } } -// ==== -// compileToEwasm: also // ---- // f(uint256[],uint256,uint256): 0x60, 2, 4, 5, 1, 2, 3, 4, 5 -> 2 // f(uint256[],uint256,uint256): 0x60, 2, 6, 5, 1, 2, 3, 4, 5 -> FAILURE diff --git a/test/libsolidity/semanticTests/calldata/calldata_array_three_dimensional.sol b/test/libsolidity/semanticTests/calldata/calldata_array_three_dimensional.sol index 826c5f723b9c..42c360be0b7f 100644 --- a/test/libsolidity/semanticTests/calldata/calldata_array_three_dimensional.sol +++ b/test/libsolidity/semanticTests/calldata/calldata_array_three_dimensional.sol @@ -8,8 +8,6 @@ contract C { d = x[i][j][k]; } } -// ==== -// compileToEwasm: also // ---- // f(uint256[][2][],uint256,uint256,uint256): 0x80, 0, 0, 0, 1, 0x20, 0x40, 0x80, 1, 42, 1, 23 -> 1, 2, 1, 42 // f(uint256[][2][],uint256,uint256,uint256): 0x80, 0, 1, 0, 1, 0x20, 0x40, 0x80, 1, 42, 1, 23 -> 1, 2, 1, 23 diff --git a/test/libsolidity/semanticTests/calldata/calldata_attached_to_bytes.sol b/test/libsolidity/semanticTests/calldata/calldata_attached_to_bytes.sol index e41b75c2dff0..1b6e7379b457 100644 --- a/test/libsolidity/semanticTests/calldata/calldata_attached_to_bytes.sol +++ b/test/libsolidity/semanticTests/calldata/calldata_attached_to_bytes.sol @@ -13,6 +13,5 @@ contract C { return _b.reverse(); } } - // ---- // test(uint256,bytes,uint256): 7, 0x60, 4, 2, "ab" -> "b", "a" diff --git a/test/libsolidity/semanticTests/calldata/calldata_attached_to_dynamic_array_or_slice.sol b/test/libsolidity/semanticTests/calldata/calldata_attached_to_dynamic_array_or_slice.sol index 3ebb4787acc7..5803ef6e845d 100644 --- a/test/libsolidity/semanticTests/calldata/calldata_attached_to_dynamic_array_or_slice.sol +++ b/test/libsolidity/semanticTests/calldata/calldata_attached_to_dynamic_array_or_slice.sol @@ -17,7 +17,6 @@ contract C { return _a[:].reverse(); } } - // ---- // testArray(uint256,uint256[],uint256): 7, 0x60, 4, 2, 66, 77 -> 77, 66 // testSlice(uint256,uint256[],uint256): 7, 0x60, 4, 2, 66, 77 -> 77, 66 diff --git a/test/libsolidity/semanticTests/calldata/calldata_attached_to_static_array.sol b/test/libsolidity/semanticTests/calldata/calldata_attached_to_static_array.sol index e43b17561cb2..a5158dad66a4 100644 --- a/test/libsolidity/semanticTests/calldata/calldata_attached_to_static_array.sol +++ b/test/libsolidity/semanticTests/calldata/calldata_attached_to_static_array.sol @@ -13,6 +13,5 @@ contract C { return _a.reverse(); } } - // ---- // test(uint256,uint256[2],uint256): 7, 66, 77, 4 -> 77, 66 diff --git a/test/libsolidity/semanticTests/calldata/calldata_struct_cleaning.sol b/test/libsolidity/semanticTests/calldata/calldata_struct_cleaning.sol index 493b1ef0b22e..45b323b3d182 100644 --- a/test/libsolidity/semanticTests/calldata/calldata_struct_cleaning.sol +++ b/test/libsolidity/semanticTests/calldata/calldata_struct_cleaning.sol @@ -16,8 +16,6 @@ contract C { } } } -// ==== -// compileToEwasm: also // ---- // f((uint8,bytes1)): 0x12, hex"3400000000000000000000000000000000000000000000000000000000000000" -> 0x12, hex"3400000000000000000000000000000000000000000000000000000000000000" # double check that the valid case goes through # // f((uint8,bytes1)): 0x1234, hex"5678000000000000000000000000000000000000000000000000000000000000" -> FAILURE diff --git a/test/libsolidity/semanticTests/calldata/copy_from_calldata_removes_bytes_data.sol b/test/libsolidity/semanticTests/calldata/copy_from_calldata_removes_bytes_data.sol index 8df274158469..3dd93c12e42c 100644 --- a/test/libsolidity/semanticTests/calldata/copy_from_calldata_removes_bytes_data.sol +++ b/test/libsolidity/semanticTests/calldata/copy_from_calldata_removes_bytes_data.sol @@ -7,7 +7,6 @@ contract c { } // ==== // EVMVersion: >=byzantium -// compileToEwasm: false // ---- // (): 1, 2, 3, 4, 5 -> // gas irOptimized: 155155 diff --git a/test/libsolidity/semanticTests/cleanup/bool_conversion_v2.sol b/test/libsolidity/semanticTests/cleanup/bool_conversion_v2.sol index 821da2dac605..003cdb0ec781 100644 --- a/test/libsolidity/semanticTests/cleanup/bool_conversion_v2.sol +++ b/test/libsolidity/semanticTests/cleanup/bool_conversion_v2.sol @@ -11,8 +11,6 @@ contract C { _out = _in; } } -// ==== -// compileToEwasm: also // ---- // f(bool): 0x0 -> 0x0 // f(bool): 0x1 -> 0x1 diff --git a/test/libsolidity/semanticTests/cleanup/cleanup_address_types_shortening.sol b/test/libsolidity/semanticTests/cleanup/cleanup_address_types_shortening.sol index 916f2e5aad74..8718cb2e6a67 100644 --- a/test/libsolidity/semanticTests/cleanup/cleanup_address_types_shortening.sol +++ b/test/libsolidity/semanticTests/cleanup/cleanup_address_types_shortening.sol @@ -25,9 +25,6 @@ contract C { require(z == 0x1122334455667788990011223344556677889900); } } - -// ==== -// compileToEwasm: also // ---- // f() -> 0x1122334455667788990011223344556677889900 // g() -> 0x1122334455667788990011223344556677889900 diff --git a/test/libsolidity/semanticTests/cleanup/cleanup_address_types_v2.sol b/test/libsolidity/semanticTests/cleanup/cleanup_address_types_v2.sol index d6157ab23eb3..73db35c32cb5 100644 --- a/test/libsolidity/semanticTests/cleanup/cleanup_address_types_v2.sol +++ b/test/libsolidity/semanticTests/cleanup/cleanup_address_types_v2.sol @@ -13,8 +13,6 @@ contract C { return 0; } } -// ==== -// compileToEwasm: also // ---- // f(address): 0xffff1234567890123456789012345678901234567890 -> FAILURE # We input longer data on purpose.# // g(address): 0xffff1234567890123456789012345678901234567890 -> FAILURE diff --git a/test/libsolidity/semanticTests/cleanup/cleanup_bytes_types_shortening_newCodeGen.sol b/test/libsolidity/semanticTests/cleanup/cleanup_bytes_types_shortening_newCodeGen.sol index a99b82a08551..b26ba5640c9a 100644 --- a/test/libsolidity/semanticTests/cleanup/cleanup_bytes_types_shortening_newCodeGen.sol +++ b/test/libsolidity/semanticTests/cleanup/cleanup_bytes_types_shortening_newCodeGen.sol @@ -8,7 +8,6 @@ contract C { } } // ==== -// compileToEwasm: also // compileViaYul: true // ---- // f() -> 0xffff000000000000000000000000000000000000000000000000000000000000 diff --git a/test/libsolidity/semanticTests/cleanup/cleanup_bytes_types_v2.sol b/test/libsolidity/semanticTests/cleanup/cleanup_bytes_types_v2.sol index f481ffed6b54..8a95f10c0911 100644 --- a/test/libsolidity/semanticTests/cleanup/cleanup_bytes_types_v2.sol +++ b/test/libsolidity/semanticTests/cleanup/cleanup_bytes_types_v2.sol @@ -10,7 +10,5 @@ contract C { return 0; } } -// ==== -// compileToEwasm: also // ---- // f(bytes2,uint16): "abc", 0x40102 -> FAILURE # We input longer data on purpose. # diff --git a/test/libsolidity/semanticTests/cleanup/cleanup_in_compound_assign.sol b/test/libsolidity/semanticTests/cleanup/cleanup_in_compound_assign.sol index 51815f5e9681..e0e62971cf89 100644 --- a/test/libsolidity/semanticTests/cleanup/cleanup_in_compound_assign.sol +++ b/test/libsolidity/semanticTests/cleanup/cleanup_in_compound_assign.sol @@ -8,7 +8,5 @@ contract C { return (x, y); } } -// ==== -// compileToEwasm: also // ---- // test() -> 0xff, 0xff diff --git a/test/libsolidity/semanticTests/cleanup/exp_cleanup.sol b/test/libsolidity/semanticTests/cleanup/exp_cleanup.sol index a5145bcebdaa..746f21ef5136 100644 --- a/test/libsolidity/semanticTests/cleanup/exp_cleanup.sol +++ b/test/libsolidity/semanticTests/cleanup/exp_cleanup.sol @@ -6,8 +6,5 @@ contract C { } } } - -// ==== -// compileToEwasm: also // ---- // f() -> 0x1 diff --git a/test/libsolidity/semanticTests/cleanup/exp_cleanup_direct.sol b/test/libsolidity/semanticTests/cleanup/exp_cleanup_direct.sol index 663716a126c2..62f927b5bb6b 100644 --- a/test/libsolidity/semanticTests/cleanup/exp_cleanup_direct.sol +++ b/test/libsolidity/semanticTests/cleanup/exp_cleanup_direct.sol @@ -5,8 +5,5 @@ contract C { } } } - -// ==== -// compileToEwasm: also // ---- // f() -> 0x1 diff --git a/test/libsolidity/semanticTests/cleanup/exp_cleanup_nonzero_base.sol b/test/libsolidity/semanticTests/cleanup/exp_cleanup_nonzero_base.sol index 12c3afba4754..de55afa9c657 100644 --- a/test/libsolidity/semanticTests/cleanup/exp_cleanup_nonzero_base.sol +++ b/test/libsolidity/semanticTests/cleanup/exp_cleanup_nonzero_base.sol @@ -6,8 +6,5 @@ contract C { } } } - -// ==== -// compileToEwasm: also // ---- // f() -> 0x1 diff --git a/test/libsolidity/semanticTests/cleanup/exp_cleanup_smaller_base.sol b/test/libsolidity/semanticTests/cleanup/exp_cleanup_smaller_base.sol index b282948cb0ce..7b81d0a1c57e 100644 --- a/test/libsolidity/semanticTests/cleanup/exp_cleanup_smaller_base.sol +++ b/test/libsolidity/semanticTests/cleanup/exp_cleanup_smaller_base.sol @@ -9,7 +9,5 @@ contract C { } } } -// ==== -// compileToEwasm: also // ---- // f() -> 0x00 diff --git a/test/libsolidity/semanticTests/constantEvaluator/negative_fractional_mod.sol b/test/libsolidity/semanticTests/constantEvaluator/negative_fractional_mod.sol index 0385a4c3089e..4426f0c0c5bf 100644 --- a/test/libsolidity/semanticTests/constantEvaluator/negative_fractional_mod.sol +++ b/test/libsolidity/semanticTests/constantEvaluator/negative_fractional_mod.sol @@ -5,7 +5,5 @@ contract C { return (x, (-(-t % 3)) * 5); } } -// ==== -// compileToEwasm: also // ---- // f() -> 11, 10 diff --git a/test/libsolidity/semanticTests/constantEvaluator/rounding.sol b/test/libsolidity/semanticTests/constantEvaluator/rounding.sol index a7c1b4b45221..837e87dc8726 100644 --- a/test/libsolidity/semanticTests/constantEvaluator/rounding.sol +++ b/test/libsolidity/semanticTests/constantEvaluator/rounding.sol @@ -9,7 +9,5 @@ contract C { return (x.length, c, y.length, -d); } } -// ==== -// compileToEwasm: also // ---- // f() -> 2, 2, 2, 2 diff --git a/test/libsolidity/semanticTests/constants/asm_address_constant_regression.sol b/test/libsolidity/semanticTests/constants/asm_address_constant_regression.sol index 3da3ff646c1d..ae405d8f366f 100644 --- a/test/libsolidity/semanticTests/constants/asm_address_constant_regression.sol +++ b/test/libsolidity/semanticTests/constants/asm_address_constant_regression.sol @@ -7,8 +7,5 @@ contract C { assembly { z := e } } } - -// ==== -// compileToEwasm: also // ---- // f() -> 0x00 diff --git a/test/libsolidity/semanticTests/constants/asm_constant_file_level.sol b/test/libsolidity/semanticTests/constants/asm_constant_file_level.sol index 89d2e250d4d1..4f907646357c 100644 --- a/test/libsolidity/semanticTests/constants/asm_constant_file_level.sol +++ b/test/libsolidity/semanticTests/constants/asm_constant_file_level.sol @@ -5,7 +5,5 @@ contract C { assembly { z := e } } } -// ==== -// compileToEwasm: also // ---- // f() -> 0x1212121212121212121212121000002134593163 diff --git a/test/libsolidity/semanticTests/constants/constant_string.sol b/test/libsolidity/semanticTests/constants/constant_string.sol index 638b24382281..3b53102baaad 100644 --- a/test/libsolidity/semanticTests/constants/constant_string.sol +++ b/test/libsolidity/semanticTests/constants/constant_string.sol @@ -15,9 +15,6 @@ contract C { return bytes(c); } } - -// ==== -// compileToEwasm: also // ---- // f() -> 0x20, 3, "\x03\x01\x02" // g() -> 0x20, 3, "\x03\x01\x02" diff --git a/test/libsolidity/semanticTests/constants/constant_string_at_file_level.sol b/test/libsolidity/semanticTests/constants/constant_string_at_file_level.sol index a8822176da4c..0ff332c4f51d 100644 --- a/test/libsolidity/semanticTests/constants/constant_string_at_file_level.sol +++ b/test/libsolidity/semanticTests/constants/constant_string_at_file_level.sol @@ -23,9 +23,6 @@ contract C { return (x, choices, st); } } - -// ==== -// compileToEwasm: also // ---- // f() -> 0x20, 3, "\x03\x01\x02" // g() -> 0x20, 3, "\x03\x01\x02" diff --git a/test/libsolidity/semanticTests/constants/constant_variables.sol b/test/libsolidity/semanticTests/constants/constant_variables.sol index 4ae4edb976b3..2ecd6e76a6f6 100644 --- a/test/libsolidity/semanticTests/constants/constant_variables.sol +++ b/test/libsolidity/semanticTests/constants/constant_variables.sol @@ -4,8 +4,5 @@ contract Foo { ActionChoices constant choices = ActionChoices.GoLeft; bytes32 constant st = "abc\x00\xff__"; } - -// ==== -// compileToEwasm: also // ---- // constructor() -> diff --git a/test/libsolidity/semanticTests/constants/constants_at_file_level_referencing.sol b/test/libsolidity/semanticTests/constants/constants_at_file_level_referencing.sol index a1ae3911fc82..764ffc245034 100644 --- a/test/libsolidity/semanticTests/constants/constants_at_file_level_referencing.sol +++ b/test/libsolidity/semanticTests/constants/constants_at_file_level_referencing.sol @@ -31,9 +31,6 @@ contract C { return fre(); } } - -// ==== -// compileToEwasm: also // ---- // f() -> 0x20, 3, "\x03\x01\x02" // g() -> 0x20, 3, "\x03\x01\x02" diff --git a/test/libsolidity/semanticTests/constants/consteval_array_length.sol b/test/libsolidity/semanticTests/constants/consteval_array_length.sol index bdf95a9b9efa..91e929834df4 100644 --- a/test/libsolidity/semanticTests/constants/consteval_array_length.sol +++ b/test/libsolidity/semanticTests/constants/consteval_array_length.sol @@ -8,7 +8,6 @@ contract C { } } // ==== -// compileToEwasm: also // compileViaYul: true // ---- // constructor() -> diff --git a/test/libsolidity/semanticTests/constants/function_unreferenced.sol b/test/libsolidity/semanticTests/constants/function_unreferenced.sol index 2b80c440fcac..d7578fecea4d 100644 --- a/test/libsolidity/semanticTests/constants/function_unreferenced.sol +++ b/test/libsolidity/semanticTests/constants/function_unreferenced.sol @@ -5,7 +5,5 @@ contract C is B { bytes4 constant s2 = B.g.selector; function f() external pure returns (bytes4) { return s2; } } -// ==== -// compileToEwasm: also // ---- // f() -> 0xe2179b8e00000000000000000000000000000000000000000000000000000000 diff --git a/test/libsolidity/semanticTests/constants/same_constants_different_files.sol b/test/libsolidity/semanticTests/constants/same_constants_different_files.sol index 5a85c5fd7740..3a819befb824 100644 --- a/test/libsolidity/semanticTests/constants/same_constants_different_files.sol +++ b/test/libsolidity/semanticTests/constants/same_constants_different_files.sol @@ -19,8 +19,5 @@ contract C { return (a, fre(), M.a, b); } } - -// ==== -// compileToEwasm: also // ---- // f() -> 0x0d, 0x59, 0x59, 0x59 diff --git a/test/libsolidity/semanticTests/constants/simple_constant_variables_test.sol b/test/libsolidity/semanticTests/constants/simple_constant_variables_test.sol index ea35262ef414..ed0e919fcd57 100644 --- a/test/libsolidity/semanticTests/constants/simple_constant_variables_test.sol +++ b/test/libsolidity/semanticTests/constants/simple_constant_variables_test.sol @@ -5,8 +5,5 @@ contract Foo { uint256 constant x = 56; } - -// ==== -// compileToEwasm: also // ---- // getX() -> 56 diff --git a/test/libsolidity/semanticTests/constructor/base_constructor_arguments.sol b/test/libsolidity/semanticTests/constructor/base_constructor_arguments.sol index d6d76adc5b18..55daf6d3d547 100644 --- a/test/libsolidity/semanticTests/constructor/base_constructor_arguments.sol +++ b/test/libsolidity/semanticTests/constructor/base_constructor_arguments.sol @@ -19,6 +19,5 @@ contract Derived is Base { return m_a; } } - // ---- // getA() -> 49 diff --git a/test/libsolidity/semanticTests/constructor/constructor_arguments_internal.sol b/test/libsolidity/semanticTests/constructor/constructor_arguments_internal.sol index bb7e7e596aa1..bf3f0c0c9b74 100644 --- a/test/libsolidity/semanticTests/constructor/constructor_arguments_internal.sol +++ b/test/libsolidity/semanticTests/constructor/constructor_arguments_internal.sol @@ -32,7 +32,6 @@ contract Main { return h.getName(); } } - // ---- // getFlag() -> true // getName() -> "abc" diff --git a/test/libsolidity/semanticTests/constructor/constructor_static_array_argument.sol b/test/libsolidity/semanticTests/constructor/constructor_static_array_argument.sol index b6242379e75b..dd91c86a2031 100644 --- a/test/libsolidity/semanticTests/constructor/constructor_static_array_argument.sol +++ b/test/libsolidity/semanticTests/constructor/constructor_static_array_argument.sol @@ -7,7 +7,6 @@ contract C { b = _b; } } - // ---- // constructor(): 1, 2, 3, 4 -> // gas irOptimized: 172314 diff --git a/test/libsolidity/semanticTests/constructor/evm_exceptions_in_constructor_call_fail.sol b/test/libsolidity/semanticTests/constructor/evm_exceptions_in_constructor_call_fail.sol index 92633cdda968..43d1fdab848f 100644 --- a/test/libsolidity/semanticTests/constructor/evm_exceptions_in_constructor_call_fail.sol +++ b/test/libsolidity/semanticTests/constructor/evm_exceptions_in_constructor_call_fail.sol @@ -13,7 +13,6 @@ contract B { ++test; } } - // ---- // testIt() -> // test() -> 2 diff --git a/test/libsolidity/semanticTests/constructor/function_usage_in_constructor_arguments.sol b/test/libsolidity/semanticTests/constructor/function_usage_in_constructor_arguments.sol index 0c0b6e3144c6..c04f039188c4 100644 --- a/test/libsolidity/semanticTests/constructor/function_usage_in_constructor_arguments.sol +++ b/test/libsolidity/semanticTests/constructor/function_usage_in_constructor_arguments.sol @@ -19,6 +19,5 @@ contract Derived is Base { return m_a; } } - // ---- // getA() -> 2 diff --git a/test/libsolidity/semanticTests/constructor/functions_called_by_constructor.sol b/test/libsolidity/semanticTests/constructor/functions_called_by_constructor.sol index 397c314a9ff6..b968a07a161d 100644 --- a/test/libsolidity/semanticTests/constructor/functions_called_by_constructor.sol +++ b/test/libsolidity/semanticTests/constructor/functions_called_by_constructor.sol @@ -14,8 +14,5 @@ contract Test { name = _name; } } - -// ==== -// compileToEwasm: also // ---- // getName() -> "abc" diff --git a/test/libsolidity/semanticTests/constructor/functions_called_by_constructor_through_dispatch.sol b/test/libsolidity/semanticTests/constructor/functions_called_by_constructor_through_dispatch.sol index 763393a998ba..0a1250a8ba62 100644 --- a/test/libsolidity/semanticTests/constructor/functions_called_by_constructor_through_dispatch.sol +++ b/test/libsolidity/semanticTests/constructor/functions_called_by_constructor_through_dispatch.sol @@ -24,8 +24,5 @@ contract Test { name = _shiftOperator(name, _bytes); } } - -// ==== -// compileToEwasm: also // ---- // getName() -> "def\x00\x00\x00" diff --git a/test/libsolidity/semanticTests/constructor/inline_member_init_inheritence_without_constructor.sol b/test/libsolidity/semanticTests/constructor/inline_member_init_inheritence_without_constructor.sol index 6e1f46f86445..320349cda9ed 100644 --- a/test/libsolidity/semanticTests/constructor/inline_member_init_inheritence_without_constructor.sol +++ b/test/libsolidity/semanticTests/constructor/inline_member_init_inheritence_without_constructor.sol @@ -14,8 +14,6 @@ contract Derived is Base { return m_derived; } } -// ==== -// compileToEwasm: also // ---- // getBMember() -> 5 // getDMember() -> 6 diff --git a/test/libsolidity/semanticTests/constructor/payable_constructor.sol b/test/libsolidity/semanticTests/constructor/payable_constructor.sol index 0f19eb7e2664..09fe0a1cc32d 100644 --- a/test/libsolidity/semanticTests/constructor/payable_constructor.sol +++ b/test/libsolidity/semanticTests/constructor/payable_constructor.sol @@ -1,8 +1,5 @@ contract C { constructor() payable {} } - -// ==== -// compileToEwasm: also // ---- // constructor(), 27 wei -> diff --git a/test/libsolidity/semanticTests/constructor/store_function_in_constructor.sol b/test/libsolidity/semanticTests/constructor/store_function_in_constructor.sol index 7f0514041e6b..dee3af35415f 100644 --- a/test/libsolidity/semanticTests/constructor/store_function_in_constructor.sol +++ b/test/libsolidity/semanticTests/constructor/store_function_in_constructor.sol @@ -15,9 +15,6 @@ contract C { return x(_arg); } } - -// ==== -// compileToEwasm: also // ---- // use(uint256): 3 -> 6 // result_in_constructor() -> 4 diff --git a/test/libsolidity/semanticTests/constructor/store_function_in_constructor_packed.sol b/test/libsolidity/semanticTests/constructor/store_function_in_constructor_packed.sol index 7fef18a1568b..07b12ad96cb7 100644 --- a/test/libsolidity/semanticTests/constructor/store_function_in_constructor_packed.sol +++ b/test/libsolidity/semanticTests/constructor/store_function_in_constructor_packed.sol @@ -16,9 +16,6 @@ contract C { return x(_arg); } } - -// ==== -// compileToEwasm: also // ---- // use(uint16): 3 -> 0xfff9 // result_in_constructor() -> 0xfffb diff --git a/test/libsolidity/semanticTests/constructor/store_internal_unused_function_in_constructor.sol b/test/libsolidity/semanticTests/constructor/store_internal_unused_function_in_constructor.sol index 6721329a12a1..cc9d8ca6a134 100644 --- a/test/libsolidity/semanticTests/constructor/store_internal_unused_function_in_constructor.sol +++ b/test/libsolidity/semanticTests/constructor/store_internal_unused_function_in_constructor.sol @@ -13,8 +13,5 @@ contract C { return x(); } } - -// ==== -// compileToEwasm: also // ---- // t() -> 7 diff --git a/test/libsolidity/semanticTests/constructor/store_internal_unused_library_function_in_constructor.sol b/test/libsolidity/semanticTests/constructor/store_internal_unused_library_function_in_constructor.sol index 7b166489fb8c..5845e9b56e15 100644 --- a/test/libsolidity/semanticTests/constructor/store_internal_unused_library_function_in_constructor.sol +++ b/test/libsolidity/semanticTests/constructor/store_internal_unused_library_function_in_constructor.sol @@ -16,6 +16,5 @@ contract C { return x(); } } - // ---- // t() -> 7 diff --git a/test/libsolidity/semanticTests/constructor_inheritance_init_order.sol b/test/libsolidity/semanticTests/constructor_inheritance_init_order.sol index 6b1b6704afa3..00dfef4abc99 100644 --- a/test/libsolidity/semanticTests/constructor_inheritance_init_order.sol +++ b/test/libsolidity/semanticTests/constructor_inheritance_init_order.sol @@ -11,7 +11,6 @@ contract B is A { uint public y = f(); } // ==== -// compileToEwasm: also // compileViaYul: true // ---- // constructor() -> diff --git a/test/libsolidity/semanticTests/constructor_inheritance_init_order_2.sol b/test/libsolidity/semanticTests/constructor_inheritance_init_order_2.sol index b60564665ded..9b982d6e9930 100644 --- a/test/libsolidity/semanticTests/constructor_inheritance_init_order_2.sol +++ b/test/libsolidity/semanticTests/constructor_inheritance_init_order_2.sol @@ -7,8 +7,6 @@ contract A { contract B is A { uint public y = f(); } -// ==== -// compileToEwasm: also // ---- // constructor() -> // gas irOptimized: 120936 diff --git a/test/libsolidity/semanticTests/deployedCodeExclusion/subassembly_deduplication.sol b/test/libsolidity/semanticTests/deployedCodeExclusion/subassembly_deduplication.sol index 2b2d694bd17a..b6ae85b838d8 100644 --- a/test/libsolidity/semanticTests/deployedCodeExclusion/subassembly_deduplication.sol +++ b/test/libsolidity/semanticTests/deployedCodeExclusion/subassembly_deduplication.sol @@ -37,6 +37,5 @@ contract C { x < 2 * type(A).creationCode.length; } } - // ---- // test() -> true diff --git a/test/libsolidity/semanticTests/dirty_calldata_bytes.sol b/test/libsolidity/semanticTests/dirty_calldata_bytes.sol index 48dc5ee2f1ad..5876b1f7c65c 100644 --- a/test/libsolidity/semanticTests/dirty_calldata_bytes.sol +++ b/test/libsolidity/semanticTests/dirty_calldata_bytes.sol @@ -8,7 +8,5 @@ contract C { correct = r == (0x64 << 248); } } -// ==== -// compileToEwasm: also // ---- // f(bytes): 0x20, 0x04, "dead" -> true diff --git a/test/libsolidity/semanticTests/empty_contract.sol b/test/libsolidity/semanticTests/empty_contract.sol index 511b72469240..7c1ae2846ea8 100644 --- a/test/libsolidity/semanticTests/empty_contract.sol +++ b/test/libsolidity/semanticTests/empty_contract.sol @@ -2,6 +2,5 @@ contract test { } // ==== // allowNonExistingFunctions: true -// compileToEwasm: also // ---- // i_am_not_there() -> FAILURE diff --git a/test/libsolidity/semanticTests/empty_for_loop.sol b/test/libsolidity/semanticTests/empty_for_loop.sol index d4ba09f1395e..450134b63901 100644 --- a/test/libsolidity/semanticTests/empty_for_loop.sol +++ b/test/libsolidity/semanticTests/empty_for_loop.sol @@ -7,7 +7,5 @@ contract test { } } } -// ==== -// compileToEwasm: also // ---- // f() -> 10 diff --git a/test/libsolidity/semanticTests/enums/constructing_enums_from_ints.sol b/test/libsolidity/semanticTests/enums/constructing_enums_from_ints.sol index ddf1a66fa1e4..beabc514315b 100644 --- a/test/libsolidity/semanticTests/enums/constructing_enums_from_ints.sol +++ b/test/libsolidity/semanticTests/enums/constructing_enums_from_ints.sol @@ -5,8 +5,5 @@ contract c { return uint256(Truth(uint8(0x1))); } } - -// ==== -// compileToEwasm: also // ---- // test() -> 1 diff --git a/test/libsolidity/semanticTests/enums/enum_explicit_overflow.sol b/test/libsolidity/semanticTests/enums/enum_explicit_overflow.sol index a538946ad582..b952524b2a22 100644 --- a/test/libsolidity/semanticTests/enums/enum_explicit_overflow.sol +++ b/test/libsolidity/semanticTests/enums/enum_explicit_overflow.sol @@ -20,9 +20,7 @@ contract test { ActionChoices choice; } - // ==== -// compileToEwasm: also // EVMVersion: >=byzantium // ---- // getChoiceExp(uint256): 2 -> 2 diff --git a/test/libsolidity/semanticTests/enums/enum_explicit_overflow_homestead.sol b/test/libsolidity/semanticTests/enums/enum_explicit_overflow_homestead.sol index 9b783b404196..60a1d64d3e34 100644 --- a/test/libsolidity/semanticTests/enums/enum_explicit_overflow_homestead.sol +++ b/test/libsolidity/semanticTests/enums/enum_explicit_overflow_homestead.sol @@ -20,7 +20,6 @@ contract test { ActionChoices choice; } - // ==== // EVMVersion: 3 diff --git a/test/libsolidity/semanticTests/enums/minmax.sol b/test/libsolidity/semanticTests/enums/minmax.sol index 4b929c36cf58..a447f64338e4 100644 --- a/test/libsolidity/semanticTests/enums/minmax.sol +++ b/test/libsolidity/semanticTests/enums/minmax.sol @@ -4,7 +4,6 @@ contract test { function min() public returns(uint) { return uint(type(MinMax).min); } function max() public returns(uint) { return uint(type(MinMax).max); } } - // ---- // min() -> 0 // max() -> 3 diff --git a/test/libsolidity/semanticTests/enums/using_contract_enums_with_explicit_contract_name.sol b/test/libsolidity/semanticTests/enums/using_contract_enums_with_explicit_contract_name.sol index cda5d06ac371..a3bce93accae 100644 --- a/test/libsolidity/semanticTests/enums/using_contract_enums_with_explicit_contract_name.sol +++ b/test/libsolidity/semanticTests/enums/using_contract_enums_with_explicit_contract_name.sol @@ -5,8 +5,5 @@ contract test { _ret = test.Choice.B; } } - -// ==== -// compileToEwasm: also // ---- // answer() -> 1 diff --git a/test/libsolidity/semanticTests/enums/using_enums.sol b/test/libsolidity/semanticTests/enums/using_enums.sol index ec014160aae6..b4d0ce8e367f 100644 --- a/test/libsolidity/semanticTests/enums/using_enums.sol +++ b/test/libsolidity/semanticTests/enums/using_enums.sol @@ -11,8 +11,5 @@ contract test { ActionChoices choices; } - -// ==== -// compileToEwasm: also // ---- // getChoice() -> 2 diff --git a/test/libsolidity/semanticTests/enums/using_inherited_enum.sol b/test/libsolidity/semanticTests/enums/using_inherited_enum.sol index 8d65aeac8e8c..9741568baaf3 100644 --- a/test/libsolidity/semanticTests/enums/using_inherited_enum.sol +++ b/test/libsolidity/semanticTests/enums/using_inherited_enum.sol @@ -8,7 +8,5 @@ contract test is base { _ret = Choice.B; } } -// ==== -// compileToEwasm: also // ---- // answer() -> 1 diff --git a/test/libsolidity/semanticTests/enums/using_inherited_enum_excplicitly.sol b/test/libsolidity/semanticTests/enums/using_inherited_enum_excplicitly.sol index cac059774c1d..eb1d63a2fd6f 100644 --- a/test/libsolidity/semanticTests/enums/using_inherited_enum_excplicitly.sol +++ b/test/libsolidity/semanticTests/enums/using_inherited_enum_excplicitly.sol @@ -8,7 +8,5 @@ contract test is base { _ret = base.Choice.B; } } -// ==== -// compileToEwasm: also // ---- // answer() -> 1 diff --git a/test/libsolidity/semanticTests/errors/named_error_args.sol b/test/libsolidity/semanticTests/errors/named_error_args.sol index 28df2c4ccb9b..04697f52192b 100644 --- a/test/libsolidity/semanticTests/errors/named_error_args.sol +++ b/test/libsolidity/semanticTests/errors/named_error_args.sol @@ -4,7 +4,5 @@ contract C { revert E({b: 7, a: 2}); } } -// ==== -// compileToEwasm: also // ---- // f() -> FAILURE, hex"85208890", hex"0000000000000000000000000000000000000000000000000000000000000002", hex"0000000000000000000000000000000000000000000000000000000000000007" diff --git a/test/libsolidity/semanticTests/errors/named_parameters_shadowing_types.sol b/test/libsolidity/semanticTests/errors/named_parameters_shadowing_types.sol index a0d43c274fd8..2f2b7c676b9b 100644 --- a/test/libsolidity/semanticTests/errors/named_parameters_shadowing_types.sol +++ b/test/libsolidity/semanticTests/errors/named_parameters_shadowing_types.sol @@ -18,8 +18,6 @@ contract C { revert E2({EnumType: StructType(42), StructType: EnumType.B}); } } -// ==== -// compileToEwasm: also // ---- // f() -> FAILURE, hex"33a54193", hex"000000000000000000000000000000000000000000000000000000000000002a" // g() -> FAILURE, hex"374b9387", hex"0000000000000000000000000000000000000000000000000000000000000001", hex"000000000000000000000000000000000000000000000000000000000000002a" diff --git a/test/libsolidity/semanticTests/errors/panic_via_import.sol b/test/libsolidity/semanticTests/errors/panic_via_import.sol index b763164c9a48..94a6a7aaaf68 100644 --- a/test/libsolidity/semanticTests/errors/panic_via_import.sol +++ b/test/libsolidity/semanticTests/errors/panic_via_import.sol @@ -11,8 +11,6 @@ contract C { revert E(1); } } -// ==== -// compileToEwasm: also // ---- // a() -> FAILURE, hex"002ff067", hex"0000000000000000000000000000000000000000000000000000000000000001" // b() -> FAILURE, hex"002ff067", hex"0000000000000000000000000000000000000000000000000000000000000001" diff --git a/test/libsolidity/semanticTests/errors/simple.sol b/test/libsolidity/semanticTests/errors/simple.sol index b8a8e0d609dd..809b10c57d0a 100644 --- a/test/libsolidity/semanticTests/errors/simple.sol +++ b/test/libsolidity/semanticTests/errors/simple.sol @@ -4,7 +4,5 @@ contract C { revert E(2, 7); } } -// ==== -// compileToEwasm: also // ---- // f() -> FAILURE, hex"85208890", 2, 7 diff --git a/test/libsolidity/semanticTests/errors/using_structs.sol b/test/libsolidity/semanticTests/errors/using_structs.sol index 47979a9552d7..e04e4b1c7a49 100644 --- a/test/libsolidity/semanticTests/errors/using_structs.sol +++ b/test/libsolidity/semanticTests/errors/using_structs.sol @@ -13,8 +13,6 @@ contract C { } } } -// ==== -// compileToEwasm: also // ---- // f(bool): true -> FAILURE, hex"e96e07f0", hex"0000000000000000000000000000000000000000000000000000000000000002", hex"0000000000000000000000000000000000000000000000000000000000000060", hex"0000000000000000000000000000000000000000000000000000000000000007", hex"0000000000000000000000000000000000000000000000000000000000000009", hex"0000000000000000000000000000000000000000000000000000000000000040", hex"0000000000000000000000000000000000000000000000000000000000000003", hex"6162630000000000000000000000000000000000000000000000000000000000" // f(bool): false -> FAILURE, hex"e96e07f0", hex"0000000000000000000000000000000000000000000000000000000000000002", hex"0000000000000000000000000000000000000000000000000000000000000060", hex"0000000000000000000000000000000000000000000000000000000000000007", hex"0000000000000000000000000000000000000000000000000000000000000009", hex"0000000000000000000000000000000000000000000000000000000000000040", hex"0000000000000000000000000000000000000000000000000000000000000003", hex"6162630000000000000000000000000000000000000000000000000000000000" diff --git a/test/libsolidity/semanticTests/errors/via_contract_type.sol b/test/libsolidity/semanticTests/errors/via_contract_type.sol index f0ea6ca3c8f8..09f60e6530d2 100644 --- a/test/libsolidity/semanticTests/errors/via_contract_type.sol +++ b/test/libsolidity/semanticTests/errors/via_contract_type.sol @@ -10,8 +10,6 @@ contract B is A { function h() public pure { revert X.E("abc"); } } -// ==== -// compileToEwasm: also // ---- // f() -> FAILURE, hex"002ff067", hex"0000000000000000000000000000000000000000000000000000000000000001" // g() -> FAILURE, hex"002ff067", hex"0000000000000000000000000000000000000000000000000000000000000001" diff --git a/test/libsolidity/semanticTests/errors/via_import.sol b/test/libsolidity/semanticTests/errors/via_import.sol index 6a6d3399edc8..eb54e5b4d71b 100644 --- a/test/libsolidity/semanticTests/errors/via_import.sol +++ b/test/libsolidity/semanticTests/errors/via_import.sol @@ -17,8 +17,6 @@ contract C { revert T.S.E(3); } } -// ==== -// compileToEwasm: also // ---- // x() -> FAILURE, hex"002ff067", hex"0000000000000000000000000000000000000000000000000000000000000001" // y() -> FAILURE, hex"002ff067", hex"0000000000000000000000000000000000000000000000000000000000000002" diff --git a/test/libsolidity/semanticTests/errors/weird_name.sol b/test/libsolidity/semanticTests/errors/weird_name.sol index d3d7545496f6..2466d6e20346 100644 --- a/test/libsolidity/semanticTests/errors/weird_name.sol +++ b/test/libsolidity/semanticTests/errors/weird_name.sol @@ -4,7 +4,5 @@ contract C { revert error(2); } } -// ==== -// compileToEwasm: also // ---- // f() -> FAILURE, hex"b48fb6cf", hex"0000000000000000000000000000000000000000000000000000000000000002" diff --git a/test/libsolidity/semanticTests/exponentiation/literal_base.sol b/test/libsolidity/semanticTests/exponentiation/literal_base.sol index f00999c97177..3dcba494abc0 100644 --- a/test/libsolidity/semanticTests/exponentiation/literal_base.sol +++ b/test/libsolidity/semanticTests/exponentiation/literal_base.sol @@ -7,8 +7,6 @@ contract test { } } } -// ==== -// compileToEwasm: also // ---- // f(uint256): 0 -> 1, 1 // f(uint256): 1 -> 2, -2 diff --git a/test/libsolidity/semanticTests/exponentiation/signed_base.sol b/test/libsolidity/semanticTests/exponentiation/signed_base.sol index 105a8ef5f723..f58c081293e6 100644 --- a/test/libsolidity/semanticTests/exponentiation/signed_base.sol +++ b/test/libsolidity/semanticTests/exponentiation/signed_base.sol @@ -10,7 +10,5 @@ contract test { return (x**y1, x**y2); } } -// ==== -// compileToEwasm: also // ---- // f() -> 9, -27 diff --git a/test/libsolidity/semanticTests/exponentiation/small_exp.sol b/test/libsolidity/semanticTests/exponentiation/small_exp.sol index 945b65c9df1c..a26675fb7f31 100644 --- a/test/libsolidity/semanticTests/exponentiation/small_exp.sol +++ b/test/libsolidity/semanticTests/exponentiation/small_exp.sol @@ -10,7 +10,5 @@ contract test { return r; } } -// ==== -// compileToEwasm: also // ---- // f() -> 4 diff --git a/test/libsolidity/semanticTests/expressions/bit_operators.sol b/test/libsolidity/semanticTests/expressions/bit_operators.sol index 733951e2c088..35887059c99e 100644 --- a/test/libsolidity/semanticTests/expressions/bit_operators.sol +++ b/test/libsolidity/semanticTests/expressions/bit_operators.sol @@ -13,7 +13,5 @@ contract test { z = a ^ b; } } -// ==== -// compileToEwasm: also // ---- // f() -> 3855, 268374015, 268370160 diff --git a/test/libsolidity/semanticTests/expressions/bytes_comparison.sol b/test/libsolidity/semanticTests/expressions/bytes_comparison.sol index 634486d915ef..b1220c510ce7 100644 --- a/test/libsolidity/semanticTests/expressions/bytes_comparison.sol +++ b/test/libsolidity/semanticTests/expressions/bytes_comparison.sol @@ -6,7 +6,5 @@ contract test { return a < x && x < b; } } -// ==== -// compileToEwasm: also // ---- // f() -> true diff --git a/test/libsolidity/semanticTests/expressions/conditional_expression_different_types.sol b/test/libsolidity/semanticTests/expressions/conditional_expression_different_types.sol index 66eb86d50523..df07364b368d 100644 --- a/test/libsolidity/semanticTests/expressions/conditional_expression_different_types.sol +++ b/test/libsolidity/semanticTests/expressions/conditional_expression_different_types.sol @@ -5,8 +5,6 @@ contract test { return cond ? x : y; } } -// ==== -// compileToEwasm: also // ---- // f(bool): true -> 0xcd // f(bool): false -> 0xabab diff --git a/test/libsolidity/semanticTests/expressions/conditional_expression_false_literal.sol b/test/libsolidity/semanticTests/expressions/conditional_expression_false_literal.sol index f8c3abf2dd9c..3915c7b8dc61 100644 --- a/test/libsolidity/semanticTests/expressions/conditional_expression_false_literal.sol +++ b/test/libsolidity/semanticTests/expressions/conditional_expression_false_literal.sol @@ -3,7 +3,5 @@ contract test { return false ? 5 : 10; } } -// ==== -// compileToEwasm: also // ---- // f() -> 10 diff --git a/test/libsolidity/semanticTests/expressions/conditional_expression_functions.sol b/test/libsolidity/semanticTests/expressions/conditional_expression_functions.sol index 5abc4e1e3371..bff9122b1ea1 100644 --- a/test/libsolidity/semanticTests/expressions/conditional_expression_functions.sol +++ b/test/libsolidity/semanticTests/expressions/conditional_expression_functions.sol @@ -7,8 +7,6 @@ contract test { return z(); } } -// ==== -// compileToEwasm: also // ---- // f(bool): true -> 1 // f(bool): false -> 2 diff --git a/test/libsolidity/semanticTests/expressions/conditional_expression_multiple.sol b/test/libsolidity/semanticTests/expressions/conditional_expression_multiple.sol index c51172b0d86b..2a9d6de8086a 100644 --- a/test/libsolidity/semanticTests/expressions/conditional_expression_multiple.sol +++ b/test/libsolidity/semanticTests/expressions/conditional_expression_multiple.sol @@ -6,8 +6,6 @@ contract test { x > 50 ? 50 : 10; } } -// ==== -// compileToEwasm: also // ---- // f(uint256): 1001 -> 1000 // f(uint256): 500 -> 100 diff --git a/test/libsolidity/semanticTests/expressions/conditional_expression_storage_memory_1.sol b/test/libsolidity/semanticTests/expressions/conditional_expression_storage_memory_1.sol index 40cfc7a9ddb7..3434cca016e8 100644 --- a/test/libsolidity/semanticTests/expressions/conditional_expression_storage_memory_1.sol +++ b/test/libsolidity/semanticTests/expressions/conditional_expression_storage_memory_1.sol @@ -22,8 +22,6 @@ contract test { return ret; } } -// ==== -// compileToEwasm: also // ---- // f(bool): true -> 1 // f(bool): false -> 2 diff --git a/test/libsolidity/semanticTests/expressions/conditional_expression_true_literal.sol b/test/libsolidity/semanticTests/expressions/conditional_expression_true_literal.sol index 968a4a02a80b..06247f0dc535 100644 --- a/test/libsolidity/semanticTests/expressions/conditional_expression_true_literal.sol +++ b/test/libsolidity/semanticTests/expressions/conditional_expression_true_literal.sol @@ -3,7 +3,5 @@ contract test { return true ? 5 : 10; } } -// ==== -// compileToEwasm: also // ---- // f() -> 5 diff --git a/test/libsolidity/semanticTests/expressions/conditional_expression_tuples.sol b/test/libsolidity/semanticTests/expressions/conditional_expression_tuples.sol index a28dd1f06d2a..d27d06bacb79 100644 --- a/test/libsolidity/semanticTests/expressions/conditional_expression_tuples.sol +++ b/test/libsolidity/semanticTests/expressions/conditional_expression_tuples.sol @@ -3,8 +3,6 @@ contract test { return cond ? (1, 2) : (3, 4); } } -// ==== -// compileToEwasm: also // ---- // f(bool): true -> 1, 2 // f(bool): false -> 3, 4 diff --git a/test/libsolidity/semanticTests/expressions/conditional_expression_with_return_values.sol b/test/libsolidity/semanticTests/expressions/conditional_expression_with_return_values.sol index fdf691ae4388..bbaf051bde11 100644 --- a/test/libsolidity/semanticTests/expressions/conditional_expression_with_return_values.sol +++ b/test/libsolidity/semanticTests/expressions/conditional_expression_with_return_values.sol @@ -3,8 +3,6 @@ contract test { cond ? a = v : b = v; } } -// ==== -// compileToEwasm: also // ---- // f(bool,uint256): true, 20 -> 20, 0 // f(bool,uint256): false, 20 -> 0, 20 diff --git a/test/libsolidity/semanticTests/expressions/exp_operator_const.sol b/test/libsolidity/semanticTests/expressions/exp_operator_const.sol index ef71a3d2b0af..e2a7ccc7355e 100644 --- a/test/libsolidity/semanticTests/expressions/exp_operator_const.sol +++ b/test/libsolidity/semanticTests/expressions/exp_operator_const.sol @@ -1,7 +1,5 @@ contract test { function f() public returns(uint d) { return 2 ** 3; } } -// ==== -// compileToEwasm: also // ---- // f() -> 8 diff --git a/test/libsolidity/semanticTests/expressions/exp_operator_const_signed.sol b/test/libsolidity/semanticTests/expressions/exp_operator_const_signed.sol index 4901f5c78f7f..b2dd001b3528 100644 --- a/test/libsolidity/semanticTests/expressions/exp_operator_const_signed.sol +++ b/test/libsolidity/semanticTests/expressions/exp_operator_const_signed.sol @@ -1,7 +1,5 @@ contract test { function f() public returns(int d) { return (-2) ** 3; } } -// ==== -// compileToEwasm: also // ---- // f() -> -8 diff --git a/test/libsolidity/semanticTests/expressions/exp_zero_literal.sol b/test/libsolidity/semanticTests/expressions/exp_zero_literal.sol index 716f72aeebb8..f7e5c6ab8107 100644 --- a/test/libsolidity/semanticTests/expressions/exp_zero_literal.sol +++ b/test/libsolidity/semanticTests/expressions/exp_zero_literal.sol @@ -1,7 +1,5 @@ contract test { function f() public returns(uint d) { return 0 ** 0; } } -// ==== -// compileToEwasm: also // ---- // f() -> 1 diff --git a/test/libsolidity/semanticTests/expressions/inc_dec_operators.sol b/test/libsolidity/semanticTests/expressions/inc_dec_operators.sol index b9eaa648033e..c6957ee9f62a 100644 --- a/test/libsolidity/semanticTests/expressions/inc_dec_operators.sol +++ b/test/libsolidity/semanticTests/expressions/inc_dec_operators.sol @@ -11,7 +11,5 @@ contract test { r += (++v) * 0x10000; } } -// ==== -// compileToEwasm: also // ---- // f() -> 0x053866 diff --git a/test/libsolidity/semanticTests/expressions/uncalled_address_transfer_send.sol b/test/libsolidity/semanticTests/expressions/uncalled_address_transfer_send.sol index 837f9f74108e..af408b3f5110 100644 --- a/test/libsolidity/semanticTests/expressions/uncalled_address_transfer_send.sol +++ b/test/libsolidity/semanticTests/expressions/uncalled_address_transfer_send.sol @@ -6,7 +6,5 @@ contract TransferTest { function f() pure public {} } -// ==== -// compileToEwasm: also // ---- // f() -> diff --git a/test/libsolidity/semanticTests/fallback/call_forward_bytes.sol b/test/libsolidity/semanticTests/fallback/call_forward_bytes.sol index 4a35fad1dbca..7bf3aee3acfe 100644 --- a/test/libsolidity/semanticTests/fallback/call_forward_bytes.sol +++ b/test/libsolidity/semanticTests/fallback/call_forward_bytes.sol @@ -14,7 +14,6 @@ contract sender { } // ==== // allowNonExistingFunctions: true -// compileToEwasm: false // ---- // recv(uint256): 7 -> // val() -> 0 diff --git a/test/libsolidity/semanticTests/fallback/falback_return.sol b/test/libsolidity/semanticTests/fallback/falback_return.sol index 55e65348b184..d59bb9d45247 100644 --- a/test/libsolidity/semanticTests/fallback/falback_return.sol +++ b/test/libsolidity/semanticTests/fallback/falback_return.sol @@ -5,8 +5,6 @@ contract A { x++; } } -// ==== -// compileToEwasm: also // ---- // () // x() -> 1 diff --git a/test/libsolidity/semanticTests/fallback/fallback_or_receive.sol b/test/libsolidity/semanticTests/fallback/fallback_or_receive.sol index 14366886cbe3..9b5319ae0013 100644 --- a/test/libsolidity/semanticTests/fallback/fallback_or_receive.sol +++ b/test/libsolidity/semanticTests/fallback/fallback_or_receive.sol @@ -5,8 +5,6 @@ contract C { receive () payable external { ++y; } function f() external returns (uint, uint) { return (x, y); } } -// ==== -// compileToEwasm: also // ---- // f() -> 0, 0 // () -> diff --git a/test/libsolidity/semanticTests/fallback/inherited.sol b/test/libsolidity/semanticTests/fallback/inherited.sol index 75ab307bfc43..55c63944508c 100644 --- a/test/libsolidity/semanticTests/fallback/inherited.sol +++ b/test/libsolidity/semanticTests/fallback/inherited.sol @@ -4,8 +4,6 @@ contract A { function getData() public returns (uint r) { return data; } } contract B is A {} -// ==== -// compileToEwasm: also // ---- // getData() -> 0 // (): 42 -> diff --git a/test/libsolidity/semanticTests/fallback/short_data_calls_fallback.sol b/test/libsolidity/semanticTests/fallback/short_data_calls_fallback.sol index cb62135edfa9..dd97f4c03488 100644 --- a/test/libsolidity/semanticTests/fallback/short_data_calls_fallback.sol +++ b/test/libsolidity/semanticTests/fallback/short_data_calls_fallback.sol @@ -4,8 +4,6 @@ contract A { function fow() public { x = 3; } fallback () external { x = 2; } } -// ==== -// compileToEwasm: also // ---- // (): hex"d88e0b" // x() -> 2 diff --git a/test/libsolidity/semanticTests/freeFunctions/easy.sol b/test/libsolidity/semanticTests/freeFunctions/easy.sol index dae3b40377ed..f73f101256c5 100644 --- a/test/libsolidity/semanticTests/freeFunctions/easy.sol +++ b/test/libsolidity/semanticTests/freeFunctions/easy.sol @@ -7,7 +7,5 @@ contract C { return add(x, 2); } } -// ==== -// compileToEwasm: also // ---- // f(uint256): 7 -> 9 diff --git a/test/libsolidity/semanticTests/freeFunctions/free_namesake_contract_function.sol b/test/libsolidity/semanticTests/freeFunctions/free_namesake_contract_function.sol index 465b80f7a921..cf4140286d7c 100644 --- a/test/libsolidity/semanticTests/freeFunctions/free_namesake_contract_function.sol +++ b/test/libsolidity/semanticTests/freeFunctions/free_namesake_contract_function.sol @@ -4,7 +4,5 @@ contract C { return f(); } } -// ==== -// compileToEwasm: also // ---- // f() -> FAILURE diff --git a/test/libsolidity/semanticTests/freeFunctions/import.sol b/test/libsolidity/semanticTests/freeFunctions/import.sol index f4ecd6bacab2..edd44de4939a 100644 --- a/test/libsolidity/semanticTests/freeFunctions/import.sol +++ b/test/libsolidity/semanticTests/freeFunctions/import.sol @@ -14,7 +14,5 @@ contract C { two = data.x; } } -// ==== -// compileToEwasm: also // ---- // f(uint256): 7 -> 7, 8 diff --git a/test/libsolidity/semanticTests/freeFunctions/overloads.sol b/test/libsolidity/semanticTests/freeFunctions/overloads.sol index 468f75be994f..6a2da653610e 100644 --- a/test/libsolidity/semanticTests/freeFunctions/overloads.sol +++ b/test/libsolidity/semanticTests/freeFunctions/overloads.sol @@ -10,7 +10,5 @@ contract C { return (f(2), f("abc")); } } -// ==== -// compileToEwasm: also // ---- // g() -> 2, 3 diff --git a/test/libsolidity/semanticTests/freeFunctions/recursion.sol b/test/libsolidity/semanticTests/freeFunctions/recursion.sol index b6a131b63bf0..894a60f3f611 100644 --- a/test/libsolidity/semanticTests/freeFunctions/recursion.sol +++ b/test/libsolidity/semanticTests/freeFunctions/recursion.sol @@ -12,8 +12,6 @@ contract C { return exp(base, exponent); } } -// ==== -// compileToEwasm: also // ---- // g(uint256,uint256): 0, 0 -> 1 // g(uint256,uint256): 0, 1 -> 0x00 diff --git a/test/libsolidity/semanticTests/functionCall/array_multiple_local_vars.sol b/test/libsolidity/semanticTests/functionCall/array_multiple_local_vars.sol index 0605888d082b..4dbfe91f107f 100644 --- a/test/libsolidity/semanticTests/functionCall/array_multiple_local_vars.sol +++ b/test/libsolidity/semanticTests/functionCall/array_multiple_local_vars.sol @@ -22,8 +22,6 @@ contract test { return sum; } } -// ==== -// compileToEwasm: also // ---- // f(uint256[]): 32, 3, 1000, 1, 2 -> 3 // f(uint256[]): 32, 3, 100, 500, 300 -> 600 diff --git a/test/libsolidity/semanticTests/functionCall/call_attached_library_function_on_function.sol b/test/libsolidity/semanticTests/functionCall/call_attached_library_function_on_function.sol index 97bc083af99e..023133a49f32 100644 --- a/test/libsolidity/semanticTests/functionCall/call_attached_library_function_on_function.sol +++ b/test/libsolidity/semanticTests/functionCall/call_attached_library_function_on_function.sol @@ -8,8 +8,6 @@ contract C { } function t() public pure returns (uint) { return 7; } } -// ==== -// compileToEwasm: false // ---- // library: L // f() -> 7 diff --git a/test/libsolidity/semanticTests/functionCall/call_attached_library_function_on_storage_variable.sol b/test/libsolidity/semanticTests/functionCall/call_attached_library_function_on_storage_variable.sol index d8d55dc9bbec..5a599c8a5707 100644 --- a/test/libsolidity/semanticTests/functionCall/call_attached_library_function_on_storage_variable.sol +++ b/test/libsolidity/semanticTests/functionCall/call_attached_library_function_on_storage_variable.sol @@ -7,8 +7,6 @@ contract C { return (x.mul)({x: a}); } } -// ==== -// compileToEwasm: false // ---- // library: D // f(uint256): 7 -> 0x2a diff --git a/test/libsolidity/semanticTests/functionCall/call_attached_library_function_on_string.sol b/test/libsolidity/semanticTests/functionCall/call_attached_library_function_on_string.sol index d374573dc977..d2d23fb626d5 100644 --- a/test/libsolidity/semanticTests/functionCall/call_attached_library_function_on_string.sol +++ b/test/libsolidity/semanticTests/functionCall/call_attached_library_function_on_string.sol @@ -11,8 +11,6 @@ contract C { return s.length(); } } -// ==== -// compileToEwasm: false // ---- // library: D // f() -> 3 diff --git a/test/libsolidity/semanticTests/functionCall/call_function_returning_function.sol b/test/libsolidity/semanticTests/functionCall/call_function_returning_function.sol index 82c38cca5a02..a00628eaf108 100644 --- a/test/libsolidity/semanticTests/functionCall/call_function_returning_function.sol +++ b/test/libsolidity/semanticTests/functionCall/call_function_returning_function.sol @@ -21,8 +21,5 @@ contract test { return x()()()(); } } - -// ==== -// compileToEwasm: also // ---- // f() -> 2 diff --git a/test/libsolidity/semanticTests/functionCall/call_function_returning_nothing_via_pointer.sol b/test/libsolidity/semanticTests/functionCall/call_function_returning_nothing_via_pointer.sol index ea5edaaef609..b43c453d2378 100644 --- a/test/libsolidity/semanticTests/functionCall/call_function_returning_nothing_via_pointer.sol +++ b/test/libsolidity/semanticTests/functionCall/call_function_returning_nothing_via_pointer.sol @@ -11,9 +11,6 @@ contract test { return flag; } } - -// ==== -// compileToEwasm: also // ---- // f() -> true // flag() -> true diff --git a/test/libsolidity/semanticTests/functionCall/call_internal_function_via_expression.sol b/test/libsolidity/semanticTests/functionCall/call_internal_function_via_expression.sol index 043ee05a82aa..0b880bfd1b8a 100644 --- a/test/libsolidity/semanticTests/functionCall/call_internal_function_via_expression.sol +++ b/test/libsolidity/semanticTests/functionCall/call_internal_function_via_expression.sol @@ -17,8 +17,6 @@ contract C { return (get_ptr(foo))(); } } -// ==== -// compileToEwasm: also // ---- // associated() -> 42 // unassociated() -> 42 diff --git a/test/libsolidity/semanticTests/functionCall/calling_nonexisting_contract_throws.sol b/test/libsolidity/semanticTests/functionCall/calling_nonexisting_contract_throws.sol index 9753015a453d..229618384d1e 100644 --- a/test/libsolidity/semanticTests/functionCall/calling_nonexisting_contract_throws.sol +++ b/test/libsolidity/semanticTests/functionCall/calling_nonexisting_contract_throws.sol @@ -21,9 +21,6 @@ contract C { return 7; } } - -// ==== -// compileToEwasm: also // ---- // f() -> FAILURE // g() -> FAILURE diff --git a/test/libsolidity/semanticTests/functionCall/calling_other_functions.sol b/test/libsolidity/semanticTests/functionCall/calling_other_functions.sol index 12139fc68453..9b008f12f2d9 100644 --- a/test/libsolidity/semanticTests/functionCall/calling_other_functions.sol +++ b/test/libsolidity/semanticTests/functionCall/calling_other_functions.sol @@ -12,8 +12,6 @@ contract collatz { return 3 * x + 1; } } -// ==== -// compileToEwasm: also // ---- // run(uint256): 0 -> 0 // run(uint256): 1 -> 1 diff --git a/test/libsolidity/semanticTests/functionCall/calling_uninitialized_function.sol b/test/libsolidity/semanticTests/functionCall/calling_uninitialized_function.sol index 2f660c24c8ac..701b1f51a3d4 100644 --- a/test/libsolidity/semanticTests/functionCall/calling_uninitialized_function.sol +++ b/test/libsolidity/semanticTests/functionCall/calling_uninitialized_function.sol @@ -11,8 +11,6 @@ contract C { return 7; } } -// ==== -// compileToEwasm: also // ---- // intern() -> FAILURE, hex"4e487b71", 0x51 # This should throw exceptions # // extern() -> FAILURE diff --git a/test/libsolidity/semanticTests/functionCall/calling_uninitialized_function_in_detail.sol b/test/libsolidity/semanticTests/functionCall/calling_uninitialized_function_in_detail.sol index a7295928aa8f..aa455afcf885 100644 --- a/test/libsolidity/semanticTests/functionCall/calling_uninitialized_function_in_detail.sol +++ b/test/libsolidity/semanticTests/functionCall/calling_uninitialized_function_in_detail.sol @@ -15,8 +15,5 @@ contract C { return 2; } } - -// ==== -// compileToEwasm: also // ---- // t() -> FAILURE, hex"4e487b71", 0x51 diff --git a/test/libsolidity/semanticTests/functionCall/calling_uninitialized_function_through_array.sol b/test/libsolidity/semanticTests/functionCall/calling_uninitialized_function_through_array.sol index f7d90c8f2dec..d83fab85222c 100644 --- a/test/libsolidity/semanticTests/functionCall/calling_uninitialized_function_through_array.sol +++ b/test/libsolidity/semanticTests/functionCall/calling_uninitialized_function_through_array.sol @@ -15,7 +15,5 @@ contract C { return 2; } } -// ==== -// compileToEwasm: also // ---- // t() -> FAILURE, hex"4e487b71", 0x51 diff --git a/test/libsolidity/semanticTests/functionCall/conditional_with_arguments.sol b/test/libsolidity/semanticTests/functionCall/conditional_with_arguments.sol index 65dbeaaeecf5..f5996d32ca9d 100644 --- a/test/libsolidity/semanticTests/functionCall/conditional_with_arguments.sol +++ b/test/libsolidity/semanticTests/functionCall/conditional_with_arguments.sol @@ -6,7 +6,5 @@ contract C { return (false ? g : h)(2, 1); } } -// ==== -// compileToEwasm: also // ---- // f() -> 1 diff --git a/test/libsolidity/semanticTests/functionCall/disordered_named_args.sol b/test/libsolidity/semanticTests/functionCall/disordered_named_args.sol index 5529b90a013a..f15d2201da31 100644 --- a/test/libsolidity/semanticTests/functionCall/disordered_named_args.sol +++ b/test/libsolidity/semanticTests/functionCall/disordered_named_args.sol @@ -2,7 +2,5 @@ contract test { function a(uint a, uint b, uint c) public returns (uint r) { r = a * 100 + b * 10 + c * 1; } function b() public returns (uint r) { r = a({c: 3, a: 1, b: 2}); } } -// ==== -// compileToEwasm: also // ---- // b() -> 123 diff --git a/test/libsolidity/semanticTests/functionCall/external_call.sol b/test/libsolidity/semanticTests/functionCall/external_call.sol index 48dddecec886..9189d5cc7872 100644 --- a/test/libsolidity/semanticTests/functionCall/external_call.sol +++ b/test/libsolidity/semanticTests/functionCall/external_call.sol @@ -9,7 +9,6 @@ contract C { return this.g(2 * n); } } - // ---- // g(uint256): 4 -> 5 // f(uint256): 2 -> 5 diff --git a/test/libsolidity/semanticTests/functionCall/external_call_at_construction_time.sol b/test/libsolidity/semanticTests/functionCall/external_call_at_construction_time.sol index 69a2193a3018..6f7f020fe678 100644 --- a/test/libsolidity/semanticTests/functionCall/external_call_at_construction_time.sol +++ b/test/libsolidity/semanticTests/functionCall/external_call_at_construction_time.sol @@ -16,7 +16,6 @@ contract C { return 1 + c; } } - // ==== // EVMVersion: >=byzantium // ---- diff --git a/test/libsolidity/semanticTests/functionCall/external_call_dynamic_returndata.sol b/test/libsolidity/semanticTests/functionCall/external_call_dynamic_returndata.sol index 56a2876ed4ef..80ca6cc41e61 100644 --- a/test/libsolidity/semanticTests/functionCall/external_call_dynamic_returndata.sol +++ b/test/libsolidity/semanticTests/functionCall/external_call_dynamic_returndata.sol @@ -16,7 +16,6 @@ contract C { return sum; } } - // ==== // EVMVersion: >=byzantium // ---- diff --git a/test/libsolidity/semanticTests/functionCall/external_call_to_nonexisting.sol b/test/libsolidity/semanticTests/functionCall/external_call_to_nonexisting.sol index e8efe09fad0d..86d3dcc8f252 100644 --- a/test/libsolidity/semanticTests/functionCall/external_call_to_nonexisting.sol +++ b/test/libsolidity/semanticTests/functionCall/external_call_to_nonexisting.sol @@ -20,7 +20,6 @@ contract C { return 1 + c; } } - // ---- // constructor(), 1 ether -> // gas irOptimized: 265110 diff --git a/test/libsolidity/semanticTests/functionCall/external_call_to_nonexisting_debugstrings.sol b/test/libsolidity/semanticTests/functionCall/external_call_to_nonexisting_debugstrings.sol index 8fe807e638fe..96f097ce7f4a 100644 --- a/test/libsolidity/semanticTests/functionCall/external_call_to_nonexisting_debugstrings.sol +++ b/test/libsolidity/semanticTests/functionCall/external_call_to_nonexisting_debugstrings.sol @@ -20,7 +20,6 @@ contract C { return 1 + c; } } - // ==== // EVMVersion: >=byzantium // revertStrings: debug diff --git a/test/libsolidity/semanticTests/functionCall/external_call_value.sol b/test/libsolidity/semanticTests/functionCall/external_call_value.sol index 5a946533d51d..9639c1119a4d 100644 --- a/test/libsolidity/semanticTests/functionCall/external_call_value.sol +++ b/test/libsolidity/semanticTests/functionCall/external_call_value.sol @@ -9,7 +9,6 @@ contract C { return this.g{value: 10}(n); } } - // ---- // g(uint256), 1 ether: 4 -> 1000000000000000000000, 4 // f(uint256), 11 ether: 2 -> 10000, 2 diff --git a/test/libsolidity/semanticTests/functionCall/external_function.sol b/test/libsolidity/semanticTests/functionCall/external_function.sol index d6c13a4ef22a..284bad09885d 100644 --- a/test/libsolidity/semanticTests/functionCall/external_function.sol +++ b/test/libsolidity/semanticTests/functionCall/external_function.sol @@ -11,8 +11,5 @@ contract c { r_b = b; } } - -// ==== -// compileToEwasm: also // ---- // test(uint256,uint256): 2, 3 -> 9, 3 diff --git a/test/libsolidity/semanticTests/functionCall/external_public_override.sol b/test/libsolidity/semanticTests/functionCall/external_public_override.sol index 31f47420562f..8e34a5b22362 100644 --- a/test/libsolidity/semanticTests/functionCall/external_public_override.sol +++ b/test/libsolidity/semanticTests/functionCall/external_public_override.sol @@ -14,9 +14,6 @@ contract B is A { return f(); } } - -// ==== -// compileToEwasm: also // ---- // f() -> 2 // g() -> 2 diff --git a/test/libsolidity/semanticTests/functionCall/file_level_call_via_module.sol b/test/libsolidity/semanticTests/functionCall/file_level_call_via_module.sol index 7db64dafcac9..7013a63527e9 100644 --- a/test/libsolidity/semanticTests/functionCall/file_level_call_via_module.sol +++ b/test/libsolidity/semanticTests/functionCall/file_level_call_via_module.sol @@ -9,7 +9,5 @@ contract C { } } -// ==== -// compileToEwasm: also // ---- // f() -> 7, 3 diff --git a/test/libsolidity/semanticTests/functionCall/gas_and_value_basic.sol b/test/libsolidity/semanticTests/functionCall/gas_and_value_basic.sol index abff2c9e7ec6..9c73e208e73e 100644 --- a/test/libsolidity/semanticTests/functionCall/gas_and_value_basic.sol +++ b/test/libsolidity/semanticTests/functionCall/gas_and_value_basic.sol @@ -36,7 +36,6 @@ contract test { myBal = address(this).balance; } } - // ---- // constructor(), 20 wei -> // gas irOptimized: 260052 diff --git a/test/libsolidity/semanticTests/functionCall/gas_and_value_brace_syntax.sol b/test/libsolidity/semanticTests/functionCall/gas_and_value_brace_syntax.sol index dd7487cdfdef..801b22d1772a 100644 --- a/test/libsolidity/semanticTests/functionCall/gas_and_value_brace_syntax.sol +++ b/test/libsolidity/semanticTests/functionCall/gas_and_value_brace_syntax.sol @@ -35,7 +35,6 @@ contract test { myBal = address(this).balance; } } - // ---- // constructor(), 20 wei -> // gas irOptimized: 260052 diff --git a/test/libsolidity/semanticTests/functionCall/inheritance/base_base_overload.sol b/test/libsolidity/semanticTests/functionCall/inheritance/base_base_overload.sol index 749e7c01bd03..adf1200eedec 100644 --- a/test/libsolidity/semanticTests/functionCall/inheritance/base_base_overload.sol +++ b/test/libsolidity/semanticTests/functionCall/inheritance/base_base_overload.sol @@ -34,8 +34,6 @@ contract Child is Base { BaseBase.init(c, d); } } -// ==== -// compileToEwasm: also // ---- // x() -> 0 // y() -> 0 diff --git a/test/libsolidity/semanticTests/functionCall/inheritance/base_overload.sol b/test/libsolidity/semanticTests/functionCall/inheritance/base_overload.sol index fa65755b850c..924431ec53f5 100644 --- a/test/libsolidity/semanticTests/functionCall/inheritance/base_overload.sol +++ b/test/libsolidity/semanticTests/functionCall/inheritance/base_overload.sol @@ -18,8 +18,6 @@ contract Child is Base { Base.init(c, d); } } -// ==== -// compileToEwasm: also // ---- // x() -> 0 // y() -> 0 diff --git a/test/libsolidity/semanticTests/functionCall/inheritance/call_base.sol b/test/libsolidity/semanticTests/functionCall/inheritance/call_base.sol index 85302de766f2..8f0e93ddbeb5 100644 --- a/test/libsolidity/semanticTests/functionCall/inheritance/call_base.sol +++ b/test/libsolidity/semanticTests/functionCall/inheritance/call_base.sol @@ -9,7 +9,5 @@ contract Child is Base { return f(n); } } -// ==== -// compileToEwasm: also // ---- // g(uint256): 4 -> 8 diff --git a/test/libsolidity/semanticTests/functionCall/inheritance/call_base_base.sol b/test/libsolidity/semanticTests/functionCall/inheritance/call_base_base.sol index 70ec4fd72901..8578a6707acc 100644 --- a/test/libsolidity/semanticTests/functionCall/inheritance/call_base_base.sol +++ b/test/libsolidity/semanticTests/functionCall/inheritance/call_base_base.sol @@ -22,8 +22,6 @@ contract Child is Base { return s(n); } } -// ==== -// compileToEwasm: also // ---- // g(uint256): 4 -> 12 // h(uint256): 4 -> 16 diff --git a/test/libsolidity/semanticTests/functionCall/inheritance/call_base_base_explicit.sol b/test/libsolidity/semanticTests/functionCall/inheritance/call_base_base_explicit.sol index 169e1a6ba7bc..f327b3f28e3a 100644 --- a/test/libsolidity/semanticTests/functionCall/inheritance/call_base_base_explicit.sol +++ b/test/libsolidity/semanticTests/functionCall/inheritance/call_base_base_explicit.sol @@ -25,8 +25,6 @@ contract Child is Base { return BaseBase.s(n); } } -// ==== -// compileToEwasm: also // ---- // g(uint256): 4 -> 8 // k(uint256): 4 -> 16 diff --git a/test/libsolidity/semanticTests/functionCall/inheritance/call_base_explicit.sol b/test/libsolidity/semanticTests/functionCall/inheritance/call_base_explicit.sol index 7ff1eae99adb..0a0cf465f03d 100644 --- a/test/libsolidity/semanticTests/functionCall/inheritance/call_base_explicit.sol +++ b/test/libsolidity/semanticTests/functionCall/inheritance/call_base_explicit.sol @@ -9,7 +9,5 @@ contract Child is Base { return Base.f(n); } } -// ==== -// compileToEwasm: also // ---- // g(uint256): 4 -> 8 diff --git a/test/libsolidity/semanticTests/functionCall/inheritance/call_unimplemented_base.sol b/test/libsolidity/semanticTests/functionCall/inheritance/call_unimplemented_base.sol index 61b428303bd7..21ab22e0bc63 100644 --- a/test/libsolidity/semanticTests/functionCall/inheritance/call_unimplemented_base.sol +++ b/test/libsolidity/semanticTests/functionCall/inheritance/call_unimplemented_base.sol @@ -14,7 +14,5 @@ contract C is V { function a() internal view override returns (uint256) { return 42; } } -// ==== -// compileToEwasm: also // ---- // b() -> 42 diff --git a/test/libsolidity/semanticTests/functionCall/inheritance/super_skip_unimplemented_in_abstract_contract.sol b/test/libsolidity/semanticTests/functionCall/inheritance/super_skip_unimplemented_in_abstract_contract.sol index 7dc726be2a62..20774d692668 100644 --- a/test/libsolidity/semanticTests/functionCall/inheritance/super_skip_unimplemented_in_abstract_contract.sol +++ b/test/libsolidity/semanticTests/functionCall/inheritance/super_skip_unimplemented_in_abstract_contract.sol @@ -15,7 +15,5 @@ contract B is A, I { return super.f(); } } -// ==== -// compileToEwasm: also // ---- // f() -> 42 diff --git a/test/libsolidity/semanticTests/functionCall/inheritance/super_skip_unimplemented_in_interface.sol b/test/libsolidity/semanticTests/functionCall/inheritance/super_skip_unimplemented_in_interface.sol index 218d1bca8edb..f5f0561334fe 100644 --- a/test/libsolidity/semanticTests/functionCall/inheritance/super_skip_unimplemented_in_interface.sol +++ b/test/libsolidity/semanticTests/functionCall/inheritance/super_skip_unimplemented_in_interface.sol @@ -15,7 +15,5 @@ contract B is A, I { return super.f(); } } -// ==== -// compileToEwasm: also // ---- // f() -> 42 diff --git a/test/libsolidity/semanticTests/functionCall/member_accessors.sol b/test/libsolidity/semanticTests/functionCall/member_accessors.sol index ad0b8a3e2e48..ae5eab6d11b3 100644 --- a/test/libsolidity/semanticTests/functionCall/member_accessors.sol +++ b/test/libsolidity/semanticTests/functionCall/member_accessors.sol @@ -14,7 +14,6 @@ contract test { } // ==== // allowNonExistingFunctions: true -// compileToEwasm: also // ---- // data() -> 8 // name() -> "Celina" diff --git a/test/libsolidity/semanticTests/functionCall/multiple_functions.sol b/test/libsolidity/semanticTests/functionCall/multiple_functions.sol index 63fac55e0924..3c60a13f11cf 100644 --- a/test/libsolidity/semanticTests/functionCall/multiple_functions.sol +++ b/test/libsolidity/semanticTests/functionCall/multiple_functions.sol @@ -6,7 +6,6 @@ contract test { } // ==== // allowNonExistingFunctions: true -// compileToEwasm: also // ---- // a() -> 0 // b() -> 1 diff --git a/test/libsolidity/semanticTests/functionCall/multiple_return_values.sol b/test/libsolidity/semanticTests/functionCall/multiple_return_values.sol index ef746eb032bf..cb2a8a0c0395 100644 --- a/test/libsolidity/semanticTests/functionCall/multiple_return_values.sol +++ b/test/libsolidity/semanticTests/functionCall/multiple_return_values.sol @@ -3,7 +3,5 @@ contract test { y1 = x2; y2 = x1; } } -// ==== -// compileToEwasm: also // ---- // run(bool,uint256): true, 0xcd -> 0xcd, true, 0 diff --git a/test/libsolidity/semanticTests/functionCall/named_args.sol b/test/libsolidity/semanticTests/functionCall/named_args.sol index 4966f51860fe..706f6d94dc6a 100644 --- a/test/libsolidity/semanticTests/functionCall/named_args.sol +++ b/test/libsolidity/semanticTests/functionCall/named_args.sol @@ -3,8 +3,6 @@ contract test { function b() public returns (uint r) { r = a({a: 1, b: 2, c: 3}); } function c() public returns (uint r) { r = a({b: 2, c: 3, a: 1}); } } -// ==== -// compileToEwasm: also // ---- // b() -> 123 // c() -> 123 diff --git a/test/libsolidity/semanticTests/functionCall/named_args_overload.sol b/test/libsolidity/semanticTests/functionCall/named_args_overload.sol index 0c31e47c5030..65f34d8ff6d7 100644 --- a/test/libsolidity/semanticTests/functionCall/named_args_overload.sol +++ b/test/libsolidity/semanticTests/functionCall/named_args_overload.sol @@ -26,8 +26,6 @@ contract C { return 500; } } -// ==== -// compileToEwasm: also // ---- // call(uint256): 0 -> 0 // call(uint256): 1 -> 1 diff --git a/test/libsolidity/semanticTests/functionCall/send_zero_ether.sol b/test/libsolidity/semanticTests/functionCall/send_zero_ether.sol index b78951c41abe..18a19979295b 100644 --- a/test/libsolidity/semanticTests/functionCall/send_zero_ether.sol +++ b/test/libsolidity/semanticTests/functionCall/send_zero_ether.sol @@ -13,9 +13,6 @@ contract Main { return payable(r).send(0); } } - -// ==== -// compileToEwasm: also // ---- // constructor(), 20 wei -> // gas irOptimized: 100264 diff --git a/test/libsolidity/semanticTests/functionCall/transaction_status.sol b/test/libsolidity/semanticTests/functionCall/transaction_status.sol index 309cb8ef1845..caa538deec4b 100644 --- a/test/libsolidity/semanticTests/functionCall/transaction_status.sol +++ b/test/libsolidity/semanticTests/functionCall/transaction_status.sol @@ -3,8 +3,6 @@ contract test { function g() public { revert(); } function h() public { assert(false); } } -// ==== -// compileToEwasm: also // ---- // f() -> // g() -> FAILURE diff --git a/test/libsolidity/semanticTests/functionCall/value_test.sol b/test/libsolidity/semanticTests/functionCall/value_test.sol index c15e6332f1ec..a6fea6a50b50 100644 --- a/test/libsolidity/semanticTests/functionCall/value_test.sol +++ b/test/libsolidity/semanticTests/functionCall/value_test.sol @@ -3,8 +3,6 @@ contract C { return msg.value; } } -// ==== -// compileToEwasm: also // ---- // f(), 1 ether -> 1000000000000000000 // f(), 1 wei -> 1 diff --git a/test/libsolidity/semanticTests/functionSelector/function_selector_via_contract_name.sol b/test/libsolidity/semanticTests/functionSelector/function_selector_via_contract_name.sol index 5052ad2b400a..0a9e6d3ffd14 100644 --- a/test/libsolidity/semanticTests/functionSelector/function_selector_via_contract_name.sol +++ b/test/libsolidity/semanticTests/functionSelector/function_selector_via_contract_name.sol @@ -15,8 +15,6 @@ contract C { return (a.f.selector, a.g.selector, b.f.selector, b.g.selector); } } -// ==== -// compileToEwasm: also // ---- // test1() -> left(0x26121ff0), left(0xe420264a), left(0x26121ff0), left(0xe420264a) // test2() -> left(0x26121ff0), left(0xe420264a), left(0x26121ff0), left(0xe420264a) diff --git a/test/libsolidity/semanticTests/functionTypes/address_member.sol b/test/libsolidity/semanticTests/functionTypes/address_member.sol index c407a3ab6337..a5f56f3dc688 100644 --- a/test/libsolidity/semanticTests/functionTypes/address_member.sol +++ b/test/libsolidity/semanticTests/functionTypes/address_member.sol @@ -6,7 +6,5 @@ contract C { a2 = [this.f.address][0]; } } -// ==== -// compileToEwasm: also // ---- // f() -> 0xc06afe3a8444fc0004668591e8306bfb9968e79e, 0xc06afe3a8444fc0004668591e8306bfb9968e79e diff --git a/test/libsolidity/semanticTests/functionTypes/function_delete_stack.sol b/test/libsolidity/semanticTests/functionTypes/function_delete_stack.sol index 409bb809eb47..67a4434dfe00 100644 --- a/test/libsolidity/semanticTests/functionTypes/function_delete_stack.sol +++ b/test/libsolidity/semanticTests/functionTypes/function_delete_stack.sol @@ -9,8 +9,5 @@ contract C { y(); } } - -// ==== -// compileToEwasm: also // ---- // test() -> FAILURE, hex"4e487b71", 0x51 diff --git a/test/libsolidity/semanticTests/functionTypes/function_delete_storage.sol b/test/libsolidity/semanticTests/functionTypes/function_delete_storage.sol index 4cf8be204029..a147b4e02587 100644 --- a/test/libsolidity/semanticTests/functionTypes/function_delete_storage.sol +++ b/test/libsolidity/semanticTests/functionTypes/function_delete_storage.sol @@ -19,9 +19,6 @@ contract C { return y(); } } - -// ==== -// compileToEwasm: also // ---- // set() -> 7 // ca() -> 7 diff --git a/test/libsolidity/semanticTests/functionTypes/function_type_library_internal.sol b/test/libsolidity/semanticTests/functionTypes/function_type_library_internal.sol index f096a4979444..587daac97894 100644 --- a/test/libsolidity/semanticTests/functionTypes/function_type_library_internal.sol +++ b/test/libsolidity/semanticTests/functionTypes/function_type_library_internal.sol @@ -21,6 +21,5 @@ contract C { return Utils.reduce(x, Utils.sum, 0); } } - // ---- // f(uint256[]): 0x20, 0x3, 0x1, 0x7, 0x3 -> 11 diff --git a/test/libsolidity/semanticTests/functionTypes/mapping_of_functions.sol b/test/libsolidity/semanticTests/functionTypes/mapping_of_functions.sol index 353844723c23..f9cd863baa7b 100644 --- a/test/libsolidity/semanticTests/functionTypes/mapping_of_functions.sol +++ b/test/libsolidity/semanticTests/functionTypes/mapping_of_functions.sol @@ -24,7 +24,6 @@ contract Flow { return 7; } } - // ---- // success() -> false // f() -> 7 diff --git a/test/libsolidity/semanticTests/functionTypes/pass_function_types_externally.sol b/test/libsolidity/semanticTests/functionTypes/pass_function_types_externally.sol index ebef9a2549a8..3f14eb594af5 100644 --- a/test/libsolidity/semanticTests/functionTypes/pass_function_types_externally.sol +++ b/test/libsolidity/semanticTests/functionTypes/pass_function_types_externally.sol @@ -15,7 +15,6 @@ contract C { return x + 1; } } - // ---- // f(uint256): 7 -> 8 // f2(uint256): 7 -> 8 diff --git a/test/libsolidity/semanticTests/functionTypes/pass_function_types_internally.sol b/test/libsolidity/semanticTests/functionTypes/pass_function_types_internally.sol index a2bab4051488..0acbcc5858d9 100644 --- a/test/libsolidity/semanticTests/functionTypes/pass_function_types_internally.sol +++ b/test/libsolidity/semanticTests/functionTypes/pass_function_types_internally.sol @@ -11,7 +11,5 @@ contract C { return x + 1; } } -// ==== -// compileToEwasm: also // ---- // f(uint256): 7 -> 8 diff --git a/test/libsolidity/semanticTests/functionTypes/same_function_in_construction_and_runtime.sol b/test/libsolidity/semanticTests/functionTypes/same_function_in_construction_and_runtime.sol index 675c2d08b078..84f6fad1c098 100644 --- a/test/libsolidity/semanticTests/functionTypes/same_function_in_construction_and_runtime.sol +++ b/test/libsolidity/semanticTests/functionTypes/same_function_in_construction_and_runtime.sol @@ -13,8 +13,6 @@ contract C { return double(_arg); } } -// ==== -// compileToEwasm: also // ---- // runtime(uint256): 3 -> 6 // initial() -> 4 diff --git a/test/libsolidity/semanticTests/functionTypes/same_function_in_construction_and_runtime_equality_check.sol b/test/libsolidity/semanticTests/functionTypes/same_function_in_construction_and_runtime_equality_check.sol index d32db4d90882..b5b24954c9f6 100644 --- a/test/libsolidity/semanticTests/functionTypes/same_function_in_construction_and_runtime_equality_check.sol +++ b/test/libsolidity/semanticTests/functionTypes/same_function_in_construction_and_runtime_equality_check.sol @@ -13,8 +13,5 @@ contract C { _ret = _arg * 2; } } - -// ==== -// compileToEwasm: also // ---- // test() -> true diff --git a/test/libsolidity/semanticTests/functionTypes/selector_1.sol b/test/libsolidity/semanticTests/functionTypes/selector_1.sol index 3d49e5b42768..397655dae54c 100644 --- a/test/libsolidity/semanticTests/functionTypes/selector_1.sol +++ b/test/libsolidity/semanticTests/functionTypes/selector_1.sol @@ -10,6 +10,5 @@ contract C is B { } // ==== // compileViaYul: true -// compileToEwasm: also // ---- // test() -> 0xcf9f23b500000000000000000000000000000000000000000000000000000000, 0x7defb41000000000000000000000000000000000000000000000000000000000, 0xcf9f23b500000000000000000000000000000000000000000000000000000000, 0x7defb41000000000000000000000000000000000000000000000000000000000 diff --git a/test/libsolidity/semanticTests/functionTypes/selector_2.sol b/test/libsolidity/semanticTests/functionTypes/selector_2.sol index 46de760551c9..248e446736bc 100644 --- a/test/libsolidity/semanticTests/functionTypes/selector_2.sol +++ b/test/libsolidity/semanticTests/functionTypes/selector_2.sol @@ -10,6 +10,5 @@ contract D { } // ==== // compileViaYul: true -// compileToEwasm: also // ---- // test() -> 0xcf9f23b500000000000000000000000000000000000000000000000000000000, 0x7defb41000000000000000000000000000000000000000000000000000000000 diff --git a/test/libsolidity/semanticTests/functionTypes/store_function.sol b/test/libsolidity/semanticTests/functionTypes/store_function.sol index b1d0fc0c3bca..132a6c95659a 100644 --- a/test/libsolidity/semanticTests/functionTypes/store_function.sol +++ b/test/libsolidity/semanticTests/functionTypes/store_function.sol @@ -23,7 +23,6 @@ contract C { return ev(x); } } - // ---- // t() -> 9 // gas irOptimized: 99064 diff --git a/test/libsolidity/semanticTests/functionTypes/struct_with_external_function.sol b/test/libsolidity/semanticTests/functionTypes/struct_with_external_function.sol index 9c7684245ed4..3de9cfa8763b 100644 --- a/test/libsolidity/semanticTests/functionTypes/struct_with_external_function.sol +++ b/test/libsolidity/semanticTests/functionTypes/struct_with_external_function.sol @@ -27,6 +27,5 @@ contract Flow { return (t[0].x(), t[1].x()); } } - // ---- // f() -> 1, 2 diff --git a/test/libsolidity/semanticTests/functionTypes/struct_with_functions.sol b/test/libsolidity/semanticTests/functionTypes/struct_with_functions.sol index 1ecd9eaf514b..fae91862957a 100644 --- a/test/libsolidity/semanticTests/functionTypes/struct_with_functions.sol +++ b/test/libsolidity/semanticTests/functionTypes/struct_with_functions.sol @@ -27,8 +27,5 @@ contract Flow { return (t[0].x(), t[1].x()); } } - -// ==== -// compileToEwasm: also // ---- // f() -> 1, 2 diff --git a/test/libsolidity/semanticTests/functionTypes/uninitialized_internal_storage_function_call.sol b/test/libsolidity/semanticTests/functionTypes/uninitialized_internal_storage_function_call.sol index fb34698bb8f5..b55de08758b8 100644 --- a/test/libsolidity/semanticTests/functionTypes/uninitialized_internal_storage_function_call.sol +++ b/test/libsolidity/semanticTests/functionTypes/uninitialized_internal_storage_function_call.sol @@ -6,8 +6,5 @@ contract Test { return 2; } } - -// ==== -// compileToEwasm: also // ---- // f() -> FAILURE, hex"4e487b71", 0x51 diff --git a/test/libsolidity/semanticTests/getters/bytes.sol b/test/libsolidity/semanticTests/getters/bytes.sol index 24f384fa5cc6..c22403c7792a 100644 --- a/test/libsolidity/semanticTests/getters/bytes.sol +++ b/test/libsolidity/semanticTests/getters/bytes.sol @@ -4,7 +4,5 @@ contract C { b = "abc"; } } -// ==== -// compileToEwasm: also // ---- // b() -> 0x20, 0x03, 0x6162630000000000000000000000000000000000000000000000000000000000 diff --git a/test/libsolidity/semanticTests/getters/string_and_bytes.sol b/test/libsolidity/semanticTests/getters/string_and_bytes.sol index 9452ff97cd39..f9cf7316f866 100644 --- a/test/libsolidity/semanticTests/getters/string_and_bytes.sol +++ b/test/libsolidity/semanticTests/getters/string_and_bytes.sol @@ -9,8 +9,6 @@ contract C { c = hex"ff077fff"; } } -// ==== -// compileToEwasm: also // ---- // a() -> 0x20, 11, "hello world" // b() -> 0x20, 4, "ABCD" diff --git a/test/libsolidity/semanticTests/getters/value_types.sol b/test/libsolidity/semanticTests/getters/value_types.sol index 3d590ded1619..a8a8759e3e33 100644 --- a/test/libsolidity/semanticTests/getters/value_types.sol +++ b/test/libsolidity/semanticTests/getters/value_types.sol @@ -20,8 +20,6 @@ contract C { i = address(type(uint160).max / 3); } } -// ==== -// compileToEwasm: also // ---- // a() -> 3 // b() -> 4 diff --git a/test/libsolidity/semanticTests/inheritance/access_base_storage.sol b/test/libsolidity/semanticTests/inheritance/access_base_storage.sol index 4b11c3598ac6..034e7c1d34c5 100644 --- a/test/libsolidity/semanticTests/inheritance/access_base_storage.sol +++ b/test/libsolidity/semanticTests/inheritance/access_base_storage.sol @@ -21,9 +21,6 @@ contract Derived is Base { derived = dataDerived; } } - -// ==== -// compileToEwasm: also // ---- // setData(uint256,uint256): 1, 2 -> true // getViaBase() -> 1 diff --git a/test/libsolidity/semanticTests/inheritance/address_overload_resolution.sol b/test/libsolidity/semanticTests/inheritance/address_overload_resolution.sol index aa9dc4b9924e..c65d1abec558 100644 --- a/test/libsolidity/semanticTests/inheritance/address_overload_resolution.sol +++ b/test/libsolidity/semanticTests/inheritance/address_overload_resolution.sol @@ -18,7 +18,6 @@ contract D { return (new C()).transfer(5); } } - // ---- // f() -> 1 // gas irOptimized: 77051 diff --git a/test/libsolidity/semanticTests/inheritance/base_access_to_function_type_variables.sol b/test/libsolidity/semanticTests/inheritance/base_access_to_function_type_variables.sol index 7b5e856d34d8..9cff3c728d5c 100644 --- a/test/libsolidity/semanticTests/inheritance/base_access_to_function_type_variables.sol +++ b/test/libsolidity/semanticTests/inheritance/base_access_to_function_type_variables.sol @@ -13,9 +13,6 @@ contract C { return C.x(); } } - -// ==== -// compileToEwasm: also // ---- // g() -> 2 // h() -> FAILURE, hex"4e487b71", 0x51 diff --git a/test/libsolidity/semanticTests/inheritance/derived_overload_base_function_direct.sol b/test/libsolidity/semanticTests/inheritance/derived_overload_base_function_direct.sol index 87571f2d022e..02e20c49d6af 100644 --- a/test/libsolidity/semanticTests/inheritance/derived_overload_base_function_direct.sol +++ b/test/libsolidity/semanticTests/inheritance/derived_overload_base_function_direct.sol @@ -14,8 +14,5 @@ contract C is B { return f(1); } } - -// ==== -// compileToEwasm: also // ---- // g() -> 2 diff --git a/test/libsolidity/semanticTests/inheritance/derived_overload_base_function_indirect.sol b/test/libsolidity/semanticTests/inheritance/derived_overload_base_function_indirect.sol index 23f01e419552..5976fee6fefc 100644 --- a/test/libsolidity/semanticTests/inheritance/derived_overload_base_function_indirect.sol +++ b/test/libsolidity/semanticTests/inheritance/derived_overload_base_function_indirect.sol @@ -21,9 +21,6 @@ contract C is A, B { return f(1); } } - -// ==== -// compileToEwasm: also // ---- // g() -> 10 // h() -> 2 diff --git a/test/libsolidity/semanticTests/inheritance/explicit_base_class.sol b/test/libsolidity/semanticTests/inheritance/explicit_base_class.sol index 4c5468f03837..78f1f186356c 100644 --- a/test/libsolidity/semanticTests/inheritance/explicit_base_class.sol +++ b/test/libsolidity/semanticTests/inheritance/explicit_base_class.sol @@ -21,8 +21,6 @@ contract Derived is Base { return 3; } } -// ==== -// compileToEwasm: also // ---- // g() -> 3 // f() -> 1 diff --git a/test/libsolidity/semanticTests/inheritance/inherited_constant_state_var.sol b/test/libsolidity/semanticTests/inheritance/inherited_constant_state_var.sol index 256367df453b..70674a6c78bf 100644 --- a/test/libsolidity/semanticTests/inheritance/inherited_constant_state_var.sol +++ b/test/libsolidity/semanticTests/inheritance/inherited_constant_state_var.sol @@ -8,8 +8,5 @@ contract B is A { return A.x; } } - -// ==== -// compileToEwasm: also // ---- // f() -> 7 diff --git a/test/libsolidity/semanticTests/inheritance/inherited_function.sol b/test/libsolidity/semanticTests/inheritance/inherited_function.sol index 471fe7943ef1..fb3f8ee8f032 100644 --- a/test/libsolidity/semanticTests/inheritance/inherited_function.sol +++ b/test/libsolidity/semanticTests/inheritance/inherited_function.sol @@ -14,7 +14,5 @@ contract B is A { return A.f(); } } -// ==== -// compileToEwasm: also // ---- // g() -> 1 diff --git a/test/libsolidity/semanticTests/inheritance/inherited_function_calldata_calldata_interface.sol b/test/libsolidity/semanticTests/inheritance/inherited_function_calldata_calldata_interface.sol index 0663ddf4cc24..3114c80f1912 100644 --- a/test/libsolidity/semanticTests/inheritance/inherited_function_calldata_calldata_interface.sol +++ b/test/libsolidity/semanticTests/inheritance/inherited_function_calldata_calldata_interface.sol @@ -20,7 +20,6 @@ contract B { return i.f(new uint256[](2)); } } - // ---- // g() -> 42 // gas irOptimized: 80813 diff --git a/test/libsolidity/semanticTests/inheritance/inherited_function_calldata_memory_interface.sol b/test/libsolidity/semanticTests/inheritance/inherited_function_calldata_memory_interface.sol index e9339e66414c..74bf42ec7e61 100644 --- a/test/libsolidity/semanticTests/inheritance/inherited_function_calldata_memory_interface.sol +++ b/test/libsolidity/semanticTests/inheritance/inherited_function_calldata_memory_interface.sol @@ -20,7 +20,6 @@ contract B { return i.f(new uint256[](2)); } } - // ---- // g() -> 42 // gas irOptimized: 100282 diff --git a/test/libsolidity/semanticTests/inheritance/inherited_function_from_a_library.sol b/test/libsolidity/semanticTests/inheritance/inherited_function_from_a_library.sol index 42d4f711c9b9..1b1092cba953 100644 --- a/test/libsolidity/semanticTests/inheritance/inherited_function_from_a_library.sol +++ b/test/libsolidity/semanticTests/inheritance/inherited_function_from_a_library.sol @@ -14,6 +14,5 @@ contract B { return A.f(); } } - // ---- // g() -> 1 diff --git a/test/libsolidity/semanticTests/inheritance/inherited_function_through_dispatch.sol b/test/libsolidity/semanticTests/inheritance/inherited_function_through_dispatch.sol index e304fc2817b5..39683079a4b5 100644 --- a/test/libsolidity/semanticTests/inheritance/inherited_function_through_dispatch.sol +++ b/test/libsolidity/semanticTests/inheritance/inherited_function_through_dispatch.sol @@ -15,7 +15,5 @@ contract B is A { return ptr(); } } -// ==== -// compileToEwasm: also // ---- // g() -> 1 diff --git a/test/libsolidity/semanticTests/inheritance/member_notation_ctor.sol b/test/libsolidity/semanticTests/inheritance/member_notation_ctor.sol index c0eef13c4b9b..33392e8d48c6 100644 --- a/test/libsolidity/semanticTests/inheritance/member_notation_ctor.sol +++ b/test/libsolidity/semanticTests/inheritance/member_notation_ctor.sol @@ -17,7 +17,6 @@ contract A { return d.getX(); } } - // ---- // g(int256): -1 -> -1 // gas legacy: 102086 diff --git a/test/libsolidity/semanticTests/inheritance/overloaded_function_call_resolve_to_first.sol b/test/libsolidity/semanticTests/inheritance/overloaded_function_call_resolve_to_first.sol index b54f9bc27e3a..d31dba485ac1 100644 --- a/test/libsolidity/semanticTests/inheritance/overloaded_function_call_resolve_to_first.sol +++ b/test/libsolidity/semanticTests/inheritance/overloaded_function_call_resolve_to_first.sol @@ -11,8 +11,5 @@ contract test { return f(3); } } - -// ==== -// compileToEwasm: also // ---- // g() -> 3 diff --git a/test/libsolidity/semanticTests/inheritance/overloaded_function_call_resolve_to_second.sol b/test/libsolidity/semanticTests/inheritance/overloaded_function_call_resolve_to_second.sol index 5479960ac079..c1f816c1f91d 100644 --- a/test/libsolidity/semanticTests/inheritance/overloaded_function_call_resolve_to_second.sol +++ b/test/libsolidity/semanticTests/inheritance/overloaded_function_call_resolve_to_second.sol @@ -11,8 +11,5 @@ contract test { return f(3, 7); } } - -// ==== -// compileToEwasm: also // ---- // g() -> 10 diff --git a/test/libsolidity/semanticTests/inheritance/overloaded_function_call_with_if_else.sol b/test/libsolidity/semanticTests/inheritance/overloaded_function_call_with_if_else.sol index 70be159e8829..c0ff8fd58062 100644 --- a/test/libsolidity/semanticTests/inheritance/overloaded_function_call_with_if_else.sol +++ b/test/libsolidity/semanticTests/inheritance/overloaded_function_call_with_if_else.sol @@ -12,9 +12,6 @@ contract test { else return f(3, 7); } } - -// ==== -// compileToEwasm: also // ---- // g(bool): true -> 3 // g(bool): false -> 10 diff --git a/test/libsolidity/semanticTests/inheritance/super_in_constructor.sol b/test/libsolidity/semanticTests/inheritance/super_in_constructor.sol index c4b6774538c5..7e0aa51d201c 100644 --- a/test/libsolidity/semanticTests/inheritance/super_in_constructor.sol +++ b/test/libsolidity/semanticTests/inheritance/super_in_constructor.sol @@ -30,7 +30,5 @@ contract D is B, C { return data; } } -// ==== -// compileToEwasm: also // ---- // f() -> 15 diff --git a/test/libsolidity/semanticTests/inheritance/super_in_constructor_assignment.sol b/test/libsolidity/semanticTests/inheritance/super_in_constructor_assignment.sol index 47978ddbc761..6b06a784bcef 100644 --- a/test/libsolidity/semanticTests/inheritance/super_in_constructor_assignment.sol +++ b/test/libsolidity/semanticTests/inheritance/super_in_constructor_assignment.sol @@ -33,7 +33,5 @@ contract D is B, C { return data; } } -// ==== -// compileToEwasm: also // ---- // f() -> 15 diff --git a/test/libsolidity/semanticTests/inheritance/super_overload.sol b/test/libsolidity/semanticTests/inheritance/super_overload.sol index 1bb36ca2abf5..7b0b1448f0db 100644 --- a/test/libsolidity/semanticTests/inheritance/super_overload.sol +++ b/test/libsolidity/semanticTests/inheritance/super_overload.sol @@ -21,9 +21,6 @@ contract C is A, B { return super.f(1); } } - -// ==== -// compileToEwasm: also // ---- // g() -> 10 // h() -> 2 diff --git a/test/libsolidity/semanticTests/inheritance/value_for_constructor.sol b/test/libsolidity/semanticTests/inheritance/value_for_constructor.sol index dce48fa28cd3..5390f64db082 100644 --- a/test/libsolidity/semanticTests/inheritance/value_for_constructor.sol +++ b/test/libsolidity/semanticTests/inheritance/value_for_constructor.sol @@ -37,7 +37,6 @@ contract Main { them = address(h).balance; } } - // ---- // constructor(), 22 wei -> // gas irOptimized: 266886 diff --git a/test/libsolidity/semanticTests/inlineAssembly/calldata_array_read.sol b/test/libsolidity/semanticTests/inlineAssembly/calldata_array_read.sol index 21b52f84eadd..572e9def0ce2 100644 --- a/test/libsolidity/semanticTests/inlineAssembly/calldata_array_read.sol +++ b/test/libsolidity/semanticTests/inlineAssembly/calldata_array_read.sol @@ -6,7 +6,5 @@ contract C { assembly { s := t } } } -// ==== -// compileToEwasm: also // ---- // f(uint256[2][]): 0x20, 2, 1, 2, 3, 4 -> 0x44, 2, 0x84 diff --git a/test/libsolidity/semanticTests/inlineAssembly/calldata_length_read.sol b/test/libsolidity/semanticTests/inlineAssembly/calldata_length_read.sol index 04ec0b614f44..d3574806a239 100644 --- a/test/libsolidity/semanticTests/inlineAssembly/calldata_length_read.sol +++ b/test/libsolidity/semanticTests/inlineAssembly/calldata_length_read.sol @@ -7,8 +7,6 @@ contract C { assembly { l := x.length } } } -// ==== -// compileToEwasm: also // ---- // lenBytesRead(bytes): 0x20, 4, "abcd" -> 4 // lenBytesRead(bytes): 0x20, 0, "abcd" -> 0x00 diff --git a/test/libsolidity/semanticTests/inlineAssembly/calldata_offset_read.sol b/test/libsolidity/semanticTests/inlineAssembly/calldata_offset_read.sol index a9b82d11e05d..0b10748c50cf 100644 --- a/test/libsolidity/semanticTests/inlineAssembly/calldata_offset_read.sol +++ b/test/libsolidity/semanticTests/inlineAssembly/calldata_offset_read.sol @@ -10,8 +10,6 @@ contract C { } } } -// ==== -// compileToEwasm: also // ---- // f(bytes): 0x20, 0, 0 -> 0x44 // f(bytes): 0x22, 0, 0, 0 -> 0x46 diff --git a/test/libsolidity/semanticTests/inlineAssembly/calldata_offset_read_write.sol b/test/libsolidity/semanticTests/inlineAssembly/calldata_offset_read_write.sol index 6375055fe2d6..bcba7169b0f0 100644 --- a/test/libsolidity/semanticTests/inlineAssembly/calldata_offset_read_write.sol +++ b/test/libsolidity/semanticTests/inlineAssembly/calldata_offset_read_write.sol @@ -10,9 +10,6 @@ contract C { } } } - -// ==== -// compileToEwasm: also // ---- // f(uint256,bytes,uint256): 7, 0x60, 8, 2, 0 -> 8, 0x14 // f(uint256,bytes,uint256): 0, 0, 0 -> 8, 0x14 diff --git a/test/libsolidity/semanticTests/inlineAssembly/constant_access.sol b/test/libsolidity/semanticTests/inlineAssembly/constant_access.sol index 130ebcd33d66..82badaca780b 100644 --- a/test/libsolidity/semanticTests/inlineAssembly/constant_access.sol +++ b/test/libsolidity/semanticTests/inlineAssembly/constant_access.sol @@ -14,7 +14,5 @@ contract C { } } } -// ==== -// compileToEwasm: also // ---- // f() -> 2, left(0xabcd), left(0x616263), true, 0x1212121212121212121212121212121212121212 diff --git a/test/libsolidity/semanticTests/inlineAssembly/constant_access_referencing.sol b/test/libsolidity/semanticTests/inlineAssembly/constant_access_referencing.sol index 91644d1ace09..d12a979c9983 100644 --- a/test/libsolidity/semanticTests/inlineAssembly/constant_access_referencing.sol +++ b/test/libsolidity/semanticTests/inlineAssembly/constant_access_referencing.sol @@ -22,7 +22,5 @@ contract C { } } } -// ==== -// compileToEwasm: also // ---- // f() -> 2, left(0xabcd), left(0x616263), true, 0x1212121212121212121212121212121212121212 diff --git a/test/libsolidity/semanticTests/inlineAssembly/difficulty.sol b/test/libsolidity/semanticTests/inlineAssembly/difficulty.sol index 7ae286110c50..ef531f78af6d 100644 --- a/test/libsolidity/semanticTests/inlineAssembly/difficulty.sol +++ b/test/libsolidity/semanticTests/inlineAssembly/difficulty.sol @@ -6,7 +6,6 @@ contract C { } } // ==== -// compileToEwasm: also // EVMVersion: 200000000 diff --git a/test/libsolidity/semanticTests/inlineAssembly/inline_assembly_embedded_function_call.sol b/test/libsolidity/semanticTests/inlineAssembly/inline_assembly_embedded_function_call.sol index 5d917437e85c..c925823d0d71 100644 --- a/test/libsolidity/semanticTests/inlineAssembly/inline_assembly_embedded_function_call.sol +++ b/test/libsolidity/semanticTests/inlineAssembly/inline_assembly_embedded_function_call.sol @@ -20,8 +20,5 @@ contract C { } } } - -// ==== -// compileToEwasm: also // ---- // f() -> 0x1, 0x4, 0x7, 0x10 diff --git a/test/libsolidity/semanticTests/inlineAssembly/inline_assembly_for.sol b/test/libsolidity/semanticTests/inlineAssembly/inline_assembly_for.sol index d074e677ff2a..848e9016c8e2 100644 --- a/test/libsolidity/semanticTests/inlineAssembly/inline_assembly_for.sol +++ b/test/libsolidity/semanticTests/inlineAssembly/inline_assembly_for.sol @@ -15,9 +15,6 @@ contract C { } } } - -// ==== -// compileToEwasm: also // ---- // f(uint256): 0 -> 1 // f(uint256): 1 -> 1 diff --git a/test/libsolidity/semanticTests/inlineAssembly/inline_assembly_for2.sol b/test/libsolidity/semanticTests/inlineAssembly/inline_assembly_for2.sol index c4af2ea5fec3..2d8179513677 100644 --- a/test/libsolidity/semanticTests/inlineAssembly/inline_assembly_for2.sol +++ b/test/libsolidity/semanticTests/inlineAssembly/inline_assembly_for2.sol @@ -20,9 +20,6 @@ contract C { c = st; } } - -// ==== -// compileToEwasm: also // ---- // f(uint256): 0 -> 0, 2, 0 // f(uint256): 1 -> 1, 4, 3 diff --git a/test/libsolidity/semanticTests/inlineAssembly/inline_assembly_function_call.sol b/test/libsolidity/semanticTests/inlineAssembly/inline_assembly_function_call.sol index 48cceeb996c0..de198dff2e45 100644 --- a/test/libsolidity/semanticTests/inlineAssembly/inline_assembly_function_call.sol +++ b/test/libsolidity/semanticTests/inlineAssembly/inline_assembly_function_call.sol @@ -14,8 +14,5 @@ contract C { } } } - -// ==== -// compileToEwasm: also // ---- // f() -> 1, 2, 7 diff --git a/test/libsolidity/semanticTests/inlineAssembly/inline_assembly_function_call2.sol b/test/libsolidity/semanticTests/inlineAssembly/inline_assembly_function_call2.sol index caf441dd4608..d21084aa7128 100644 --- a/test/libsolidity/semanticTests/inlineAssembly/inline_assembly_function_call2.sol +++ b/test/libsolidity/semanticTests/inlineAssembly/inline_assembly_function_call2.sol @@ -17,8 +17,5 @@ contract C { } } } - -// ==== -// compileToEwasm: also // ---- // f() -> 0x1, 0x2, 0x7, 0x10 diff --git a/test/libsolidity/semanticTests/inlineAssembly/inline_assembly_function_call_assignment.sol b/test/libsolidity/semanticTests/inlineAssembly/inline_assembly_function_call_assignment.sol index 675ec3b1d537..e2e07823c83e 100644 --- a/test/libsolidity/semanticTests/inlineAssembly/inline_assembly_function_call_assignment.sol +++ b/test/libsolidity/semanticTests/inlineAssembly/inline_assembly_function_call_assignment.sol @@ -16,8 +16,5 @@ contract C { } } } - -// ==== -// compileToEwasm: also // ---- // f() -> 1, 2, 7 diff --git a/test/libsolidity/semanticTests/inlineAssembly/inline_assembly_if.sol b/test/libsolidity/semanticTests/inlineAssembly/inline_assembly_if.sol index 852f10ac83bc..ebe50f516bb0 100644 --- a/test/libsolidity/semanticTests/inlineAssembly/inline_assembly_if.sol +++ b/test/libsolidity/semanticTests/inlineAssembly/inline_assembly_if.sol @@ -7,9 +7,6 @@ contract C { } } } - -// ==== -// compileToEwasm: also // ---- // f(uint256): 0 -> 0 // f(uint256): 1 -> 0 diff --git a/test/libsolidity/semanticTests/inlineAssembly/inline_assembly_in_modifiers.sol b/test/libsolidity/semanticTests/inlineAssembly/inline_assembly_in_modifiers.sol index f74fbbc6380e..e050d2b52220 100644 --- a/test/libsolidity/semanticTests/inlineAssembly/inline_assembly_in_modifiers.sol +++ b/test/libsolidity/semanticTests/inlineAssembly/inline_assembly_in_modifiers.sol @@ -27,9 +27,6 @@ contract C { return true; } } - -// ==== -// compileToEwasm: also // ---- // f() -> true // g() -> FAILURE diff --git a/test/libsolidity/semanticTests/inlineAssembly/inline_assembly_memory_access.sol b/test/libsolidity/semanticTests/inlineAssembly/inline_assembly_memory_access.sol index 448cc3991483..1f6a50d65578 100644 --- a/test/libsolidity/semanticTests/inlineAssembly/inline_assembly_memory_access.sol +++ b/test/libsolidity/semanticTests/inlineAssembly/inline_assembly_memory_access.sol @@ -8,8 +8,5 @@ contract C { return x; } } - -// ==== -// compileToEwasm: also // ---- // test() -> 0x20, 0x5, "12345" diff --git a/test/libsolidity/semanticTests/inlineAssembly/inline_assembly_read_and_write_stack.sol b/test/libsolidity/semanticTests/inlineAssembly/inline_assembly_read_and_write_stack.sol index 58c77a81d59b..ae4b94ed5989 100644 --- a/test/libsolidity/semanticTests/inlineAssembly/inline_assembly_read_and_write_stack.sol +++ b/test/libsolidity/semanticTests/inlineAssembly/inline_assembly_read_and_write_stack.sol @@ -6,8 +6,5 @@ contract C { } } } - -// ==== -// compileToEwasm: also // ---- // f() -> 45 diff --git a/test/libsolidity/semanticTests/inlineAssembly/inline_assembly_recursion.sol b/test/libsolidity/semanticTests/inlineAssembly/inline_assembly_recursion.sol index c3c9297bc05f..a509513199ff 100644 --- a/test/libsolidity/semanticTests/inlineAssembly/inline_assembly_recursion.sol +++ b/test/libsolidity/semanticTests/inlineAssembly/inline_assembly_recursion.sol @@ -17,9 +17,6 @@ contract C { } } } - -// ==== -// compileToEwasm: also // ---- // f(uint256): 0 -> 1 // f(uint256): 1 -> 1 diff --git a/test/libsolidity/semanticTests/inlineAssembly/inline_assembly_storage_access.sol b/test/libsolidity/semanticTests/inlineAssembly/inline_assembly_storage_access.sol index d81bff29e1e3..254bc7473d51 100644 --- a/test/libsolidity/semanticTests/inlineAssembly/inline_assembly_storage_access.sol +++ b/test/libsolidity/semanticTests/inlineAssembly/inline_assembly_storage_access.sol @@ -16,8 +16,6 @@ contract C { return true; } } -// ==== -// compileToEwasm: also // ---- // f() -> true // z() -> 7 diff --git a/test/libsolidity/semanticTests/inlineAssembly/inline_assembly_storage_access_inside_function.sol b/test/libsolidity/semanticTests/inlineAssembly/inline_assembly_storage_access_inside_function.sol index 039f133ecdca..80cd7e11ecfe 100644 --- a/test/libsolidity/semanticTests/inlineAssembly/inline_assembly_storage_access_inside_function.sol +++ b/test/libsolidity/semanticTests/inlineAssembly/inline_assembly_storage_access_inside_function.sol @@ -17,8 +17,6 @@ contract C { return true; } } -// ==== -// compileToEwasm: also // ---- // f() -> true // z() -> 7 diff --git a/test/libsolidity/semanticTests/inlineAssembly/inline_assembly_storage_access_local_var.sol b/test/libsolidity/semanticTests/inlineAssembly/inline_assembly_storage_access_local_var.sol index 5544d90efbc9..c7728068e46a 100644 --- a/test/libsolidity/semanticTests/inlineAssembly/inline_assembly_storage_access_local_var.sol +++ b/test/libsolidity/semanticTests/inlineAssembly/inline_assembly_storage_access_local_var.sol @@ -12,7 +12,5 @@ contract C { return a.length; } } -// ==== -// compileToEwasm: also // ---- // f() -> 7 diff --git a/test/libsolidity/semanticTests/inlineAssembly/inline_assembly_storage_access_via_pointer.sol b/test/libsolidity/semanticTests/inlineAssembly/inline_assembly_storage_access_via_pointer.sol index 687b1d914a86..6c382ef9e60b 100644 --- a/test/libsolidity/semanticTests/inlineAssembly/inline_assembly_storage_access_via_pointer.sol +++ b/test/libsolidity/semanticTests/inlineAssembly/inline_assembly_storage_access_via_pointer.sol @@ -17,9 +17,6 @@ contract C { return true; } } - -// ==== -// compileToEwasm: also // ---- // f() -> true // a() -> 7 diff --git a/test/libsolidity/semanticTests/inlineAssembly/inline_assembly_switch.sol b/test/libsolidity/semanticTests/inlineAssembly/inline_assembly_switch.sol index e4d8419b48d3..615d69594b70 100644 --- a/test/libsolidity/semanticTests/inlineAssembly/inline_assembly_switch.sol +++ b/test/libsolidity/semanticTests/inlineAssembly/inline_assembly_switch.sol @@ -14,9 +14,6 @@ contract C { } } } - -// ==== -// compileToEwasm: also // ---- // f(uint256): 0 -> 2 // f(uint256): 1 -> 8 diff --git a/test/libsolidity/semanticTests/inlineAssembly/inline_assembly_write_to_stack.sol b/test/libsolidity/semanticTests/inlineAssembly/inline_assembly_write_to_stack.sol index b181f825993e..ed20bfe2de0f 100644 --- a/test/libsolidity/semanticTests/inlineAssembly/inline_assembly_write_to_stack.sol +++ b/test/libsolidity/semanticTests/inlineAssembly/inline_assembly_write_to_stack.sol @@ -6,8 +6,5 @@ contract C { } } } - -// ==== -// compileToEwasm: also // ---- // f() -> 7, "abcdef" diff --git a/test/libsolidity/semanticTests/inlineAssembly/inlineasm_empty_let.sol b/test/libsolidity/semanticTests/inlineAssembly/inlineasm_empty_let.sol index b9aa70aeda53..17e14e8ac08e 100644 --- a/test/libsolidity/semanticTests/inlineAssembly/inlineasm_empty_let.sol +++ b/test/libsolidity/semanticTests/inlineAssembly/inlineasm_empty_let.sol @@ -8,8 +8,5 @@ contract C { } } } - -// ==== -// compileToEwasm: also // ---- // f() -> 0, 0 diff --git a/test/libsolidity/semanticTests/inlineAssembly/keccak256_assembly.sol b/test/libsolidity/semanticTests/inlineAssembly/keccak256_assembly.sol index 741d03a8b1ce..253af98902c3 100644 --- a/test/libsolidity/semanticTests/inlineAssembly/keccak256_assembly.sol +++ b/test/libsolidity/semanticTests/inlineAssembly/keccak256_assembly.sol @@ -5,6 +5,5 @@ contract C { } } } - // ---- // f() -> 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 diff --git a/test/libsolidity/semanticTests/inlineAssembly/leave.sol b/test/libsolidity/semanticTests/inlineAssembly/leave.sol index 8dff599284c3..40add273e000 100644 --- a/test/libsolidity/semanticTests/inlineAssembly/leave.sol +++ b/test/libsolidity/semanticTests/inlineAssembly/leave.sol @@ -10,7 +10,5 @@ contract C { } } } -// ==== -// compileToEwasm: also // ---- // f() -> 2 diff --git a/test/libsolidity/semanticTests/inlineAssembly/prevrandao.sol b/test/libsolidity/semanticTests/inlineAssembly/prevrandao.sol index 5a3b791feb3d..8a71c8f4e68d 100644 --- a/test/libsolidity/semanticTests/inlineAssembly/prevrandao.sol +++ b/test/libsolidity/semanticTests/inlineAssembly/prevrandao.sol @@ -6,7 +6,6 @@ contract C { } } // ==== -// compileToEwasm: also // EVMVersion: >=paris // ---- // f() -> 0xa86c2e601b6c44eb4848f7d23d9df3113fbcac42041c49cbed5000cb4f118777 diff --git a/test/libsolidity/semanticTests/inlineAssembly/shadowing_local_function_opcode.sol b/test/libsolidity/semanticTests/inlineAssembly/shadowing_local_function_opcode.sol index ea24ec6c41e4..d7e585e33e75 100644 --- a/test/libsolidity/semanticTests/inlineAssembly/shadowing_local_function_opcode.sol +++ b/test/libsolidity/semanticTests/inlineAssembly/shadowing_local_function_opcode.sol @@ -7,7 +7,5 @@ contract C { } } } -// ==== -// compileToEwasm: also // ---- // g() -> 7, 3 diff --git a/test/libsolidity/semanticTests/inlineAssembly/slot_access_via_mapping_pointer.sol b/test/libsolidity/semanticTests/inlineAssembly/slot_access_via_mapping_pointer.sol index 66f592bb67ed..e080985e36fe 100644 --- a/test/libsolidity/semanticTests/inlineAssembly/slot_access_via_mapping_pointer.sol +++ b/test/libsolidity/semanticTests/inlineAssembly/slot_access_via_mapping_pointer.sol @@ -25,7 +25,6 @@ contract C { } } } - // ---- // f(uint256): 0 -> 0, 0 // f(uint256): 1 -> 1, 0 diff --git a/test/libsolidity/semanticTests/inlineAssembly/truefalse.sol b/test/libsolidity/semanticTests/inlineAssembly/truefalse.sol index eb57b80926b1..4183642bb082 100644 --- a/test/libsolidity/semanticTests/inlineAssembly/truefalse.sol +++ b/test/libsolidity/semanticTests/inlineAssembly/truefalse.sol @@ -6,7 +6,5 @@ contract C { } } } -// ==== -// compileToEwasm: also // ---- // f() -> 1, 0 diff --git a/test/libsolidity/semanticTests/integer/basic.sol b/test/libsolidity/semanticTests/integer/basic.sol index b03cb20f2436..cea56cd7cbc0 100644 --- a/test/libsolidity/semanticTests/integer/basic.sol +++ b/test/libsolidity/semanticTests/integer/basic.sol @@ -18,7 +18,5 @@ contract C { return true; } } -// ==== -// compileToEwasm: also // ---- // basic() -> true diff --git a/test/libsolidity/semanticTests/integer/int.sol b/test/libsolidity/semanticTests/integer/int.sol index 770fa0be71df..d3681a0ee267 100644 --- a/test/libsolidity/semanticTests/integer/int.sol +++ b/test/libsolidity/semanticTests/integer/int.sol @@ -232,8 +232,6 @@ contract test { return true; } } -// ==== -// compileToEwasm: also // ---- // intMinA() -> true // intMinB() -> true diff --git a/test/libsolidity/semanticTests/integer/many_local_variables.sol b/test/libsolidity/semanticTests/integer/many_local_variables.sol index 0f3f0f642ee2..c43f92696898 100644 --- a/test/libsolidity/semanticTests/integer/many_local_variables.sol +++ b/test/libsolidity/semanticTests/integer/many_local_variables.sol @@ -5,7 +5,5 @@ contract test { y += b + x2; } } -// ==== -// compileToEwasm: also // ---- // run(uint256,uint256,uint256): 0x1000, 0x10000, 0x100000 -> 0x121121 diff --git a/test/libsolidity/semanticTests/integer/small_signed_types.sol b/test/libsolidity/semanticTests/integer/small_signed_types.sol index e1173b95557a..4c0311e50f92 100644 --- a/test/libsolidity/semanticTests/integer/small_signed_types.sol +++ b/test/libsolidity/semanticTests/integer/small_signed_types.sol @@ -3,7 +3,5 @@ contract test { return -int32(10) * -int64(20); } } -// ==== -// compileToEwasm: also // ---- // run() -> 200 diff --git a/test/libsolidity/semanticTests/integer/uint.sol b/test/libsolidity/semanticTests/integer/uint.sol index 2fa6028063fa..ccd32fab4119 100644 --- a/test/libsolidity/semanticTests/integer/uint.sol +++ b/test/libsolidity/semanticTests/integer/uint.sol @@ -231,8 +231,6 @@ contract test { return true; } } -// ==== -// compileToEwasm: also // ---- // uintMinA() -> true // uintMinB() -> true diff --git a/test/libsolidity/semanticTests/interfaceID/homer.sol b/test/libsolidity/semanticTests/interfaceID/homer.sol index 49b60b12f127..fbe6293ddb63 100644 --- a/test/libsolidity/semanticTests/interfaceID/homer.sol +++ b/test/libsolidity/semanticTests/interfaceID/homer.sol @@ -28,9 +28,6 @@ contract Homer is ERC165, Simpson { return "yellow"; } } - -// ==== -// compileToEwasm: also // ---- // supportsInterface(bytes4): left(0x01ffc9a0) -> false // supportsInterface(bytes4): left(0x01ffc9a7) -> true diff --git a/test/libsolidity/semanticTests/interfaceID/homer_interfaceId.sol b/test/libsolidity/semanticTests/interfaceID/homer_interfaceId.sol index 9bf0e3c59810..c66169cd3e2b 100644 --- a/test/libsolidity/semanticTests/interfaceID/homer_interfaceId.sol +++ b/test/libsolidity/semanticTests/interfaceID/homer_interfaceId.sol @@ -28,9 +28,6 @@ contract Homer is ERC165, Simpson { return "yellow"; } } - -// ==== -// compileToEwasm: also // ---- // supportsInterface(bytes4): left(0x01ffc9a0) -> false // supportsInterface(bytes4): left(0x01ffc9a7) -> true diff --git a/test/libsolidity/semanticTests/interfaceID/interfaceId_events.sol b/test/libsolidity/semanticTests/interfaceID/interfaceId_events.sol index 51d48f497ceb..9bbf11bedbe2 100644 --- a/test/libsolidity/semanticTests/interfaceID/interfaceId_events.sol +++ b/test/libsolidity/semanticTests/interfaceID/interfaceId_events.sol @@ -13,9 +13,6 @@ contract Test { bytes4 public hello_world = type(HelloWorld).interfaceId; bytes4 public hello_world_with_event = type(HelloWorldWithEvent).interfaceId; } - -// ==== -// compileToEwasm: also // ---- // hello_world() -> left(0xc6be8b58) // hello_world_with_event() -> left(0xc6be8b58) diff --git a/test/libsolidity/semanticTests/interfaceID/interfaces.sol b/test/libsolidity/semanticTests/interfaceID/interfaces.sol index 77cf83707242..f66d859ea347 100644 --- a/test/libsolidity/semanticTests/interfaceID/interfaces.sol +++ b/test/libsolidity/semanticTests/interfaceID/interfaces.sol @@ -50,9 +50,6 @@ contract Test { return type(HelloWorldDerived).interfaceId; } } - -// ==== -// compileToEwasm: also // ---- // hello() -> left(0x19ff1d21) // world() -> left(0xdf419679) diff --git a/test/libsolidity/semanticTests/interfaceID/lisa.sol b/test/libsolidity/semanticTests/interfaceID/lisa.sol index 885cf9b2463c..722502d86fa0 100644 --- a/test/libsolidity/semanticTests/interfaceID/lisa.sol +++ b/test/libsolidity/semanticTests/interfaceID/lisa.sol @@ -39,7 +39,6 @@ contract Lisa is ERC165MappingImplementation, Simpson { return "yellow"; } } - // ---- // supportsInterface(bytes4): left(0x01ffc9a0) -> false // supportsInterface(bytes4): left(0x01ffc9a7) -> true diff --git a/test/libsolidity/semanticTests/interfaceID/lisa_interfaceId.sol b/test/libsolidity/semanticTests/interfaceID/lisa_interfaceId.sol index c9a7c49050b2..457ac8856eb7 100644 --- a/test/libsolidity/semanticTests/interfaceID/lisa_interfaceId.sol +++ b/test/libsolidity/semanticTests/interfaceID/lisa_interfaceId.sol @@ -39,7 +39,6 @@ contract Lisa is ERC165MappingImplementation, Simpson { return "yellow"; } } - // ---- // supportsInterface(bytes4): left(0x01ffc9a0) -> false // supportsInterface(bytes4): left(0x01ffc9a7) -> true diff --git a/test/libsolidity/semanticTests/interface_inheritance_conversions.sol b/test/libsolidity/semanticTests/interface_inheritance_conversions.sol index 70c7fac4022c..62e1e4fba6dc 100644 --- a/test/libsolidity/semanticTests/interface_inheritance_conversions.sol +++ b/test/libsolidity/semanticTests/interface_inheritance_conversions.sol @@ -32,7 +32,6 @@ contract C { return (sb.parentFun(), sb.subBFun()); } } - // ---- // convertParent() -> 1 // gas irOptimized: 85524 diff --git a/test/libsolidity/semanticTests/isoltestFormatting.sol b/test/libsolidity/semanticTests/isoltestFormatting.sol index 88ec15f57250..9380dc01588e 100644 --- a/test/libsolidity/semanticTests/isoltestFormatting.sol +++ b/test/libsolidity/semanticTests/isoltestFormatting.sol @@ -8,8 +8,6 @@ contract C { return a; } } -// ==== -// compileToEwasm: also // ---- // f() -> 4, 11, 0x0111, 0x333333, 2222222222222222222 // g() -> 0x10, 0x0100, 0x0101, 0x333333, 2222222222222222222 diff --git a/test/libsolidity/semanticTests/libraries/internal_call_attached_with_parentheses.sol b/test/libsolidity/semanticTests/libraries/internal_call_attached_with_parentheses.sol index 43ce7ea66405..1fa930acc29b 100644 --- a/test/libsolidity/semanticTests/libraries/internal_call_attached_with_parentheses.sol +++ b/test/libsolidity/semanticTests/libraries/internal_call_attached_with_parentheses.sol @@ -20,6 +20,5 @@ contract C { return x.data[3]; } } - // ---- // f() -> 0x0a diff --git a/test/libsolidity/semanticTests/libraries/internal_call_unattached_with_parentheses.sol b/test/libsolidity/semanticTests/libraries/internal_call_unattached_with_parentheses.sol index 4de0f4dc969c..5a76dabdfa42 100644 --- a/test/libsolidity/semanticTests/libraries/internal_call_unattached_with_parentheses.sol +++ b/test/libsolidity/semanticTests/libraries/internal_call_unattached_with_parentheses.sol @@ -9,6 +9,5 @@ contract C { return (L.f)(); } } - // ---- // foo() -> 3 diff --git a/test/libsolidity/semanticTests/libraries/internal_library_function.sol b/test/libsolidity/semanticTests/libraries/internal_library_function.sol index a3c8a870018e..24299b6d14cd 100644 --- a/test/libsolidity/semanticTests/libraries/internal_library_function.sol +++ b/test/libsolidity/semanticTests/libraries/internal_library_function.sol @@ -16,6 +16,5 @@ contract C { return x[3]; } } - // ---- // f() -> 2 diff --git a/test/libsolidity/semanticTests/libraries/internal_library_function_attached_to_contract.sol b/test/libsolidity/semanticTests/libraries/internal_library_function_attached_to_contract.sol index afe9b0deb912..a4a25f51ebde 100644 --- a/test/libsolidity/semanticTests/libraries/internal_library_function_attached_to_contract.sol +++ b/test/libsolidity/semanticTests/libraries/internal_library_function_attached_to_contract.sol @@ -14,6 +14,5 @@ contract C { return e.foo(); } } - // ---- // test() -> 42 diff --git a/test/libsolidity/semanticTests/libraries/internal_library_function_attached_to_external_function_type.sol b/test/libsolidity/semanticTests/libraries/internal_library_function_attached_to_external_function_type.sol index 63ca1e0b7a96..a2473e7e79d7 100644 --- a/test/libsolidity/semanticTests/libraries/internal_library_function_attached_to_external_function_type.sol +++ b/test/libsolidity/semanticTests/libraries/internal_library_function_attached_to_external_function_type.sol @@ -16,6 +16,5 @@ contract C { return this.identity.double(value); } } - // ---- // test(uint256): 5 -> 10 diff --git a/test/libsolidity/semanticTests/libraries/internal_library_function_attached_to_interface.sol b/test/libsolidity/semanticTests/libraries/internal_library_function_attached_to_interface.sol index e00fd4612069..13228115a0e5 100644 --- a/test/libsolidity/semanticTests/libraries/internal_library_function_attached_to_interface.sol +++ b/test/libsolidity/semanticTests/libraries/internal_library_function_attached_to_interface.sol @@ -15,6 +15,5 @@ contract C { return I(e).foo(); } } - // ---- // test() -> 42 diff --git a/test/libsolidity/semanticTests/libraries/internal_library_function_attached_to_internal_function_type.sol b/test/libsolidity/semanticTests/libraries/internal_library_function_attached_to_internal_function_type.sol index c566da79cbc9..4397711c6f52 100644 --- a/test/libsolidity/semanticTests/libraries/internal_library_function_attached_to_internal_function_type.sol +++ b/test/libsolidity/semanticTests/libraries/internal_library_function_attached_to_internal_function_type.sol @@ -15,6 +15,5 @@ contract C { return identity.double(value); } } - // ---- // test(uint256): 5 -> 10 diff --git a/test/libsolidity/semanticTests/libraries/internal_library_function_attached_to_internal_function_type_named_selector.sol b/test/libsolidity/semanticTests/libraries/internal_library_function_attached_to_internal_function_type_named_selector.sol index d66bac750fc2..4305b6d40e11 100644 --- a/test/libsolidity/semanticTests/libraries/internal_library_function_attached_to_internal_function_type_named_selector.sol +++ b/test/libsolidity/semanticTests/libraries/internal_library_function_attached_to_internal_function_type_named_selector.sol @@ -15,6 +15,5 @@ contract C { return identity.selector(value); } } - // ---- // test(uint256): 5 -> 10 diff --git a/test/libsolidity/semanticTests/libraries/internal_library_function_attached_to_struct.sol b/test/libsolidity/semanticTests/libraries/internal_library_function_attached_to_struct.sol index f59ec9440dff..e9f95c0ac1d2 100644 --- a/test/libsolidity/semanticTests/libraries/internal_library_function_attached_to_struct.sol +++ b/test/libsolidity/semanticTests/libraries/internal_library_function_attached_to_struct.sol @@ -21,6 +21,5 @@ contract C { return x.data[3]; } } - // ---- // f() -> 2 diff --git a/test/libsolidity/semanticTests/libraries/internal_library_function_calling_private.sol b/test/libsolidity/semanticTests/libraries/internal_library_function_calling_private.sol index 2283c30ff5fc..5ef12f69b41f 100644 --- a/test/libsolidity/semanticTests/libraries/internal_library_function_calling_private.sol +++ b/test/libsolidity/semanticTests/libraries/internal_library_function_calling_private.sol @@ -21,6 +21,5 @@ contract C { return x[3]; } } - // ---- // f() -> 2 diff --git a/test/libsolidity/semanticTests/libraries/internal_library_function_return_var_size.sol b/test/libsolidity/semanticTests/libraries/internal_library_function_return_var_size.sol index 21417b599b43..d6e0e926208b 100644 --- a/test/libsolidity/semanticTests/libraries/internal_library_function_return_var_size.sol +++ b/test/libsolidity/semanticTests/libraries/internal_library_function_return_var_size.sol @@ -21,6 +21,5 @@ contract C { return x.f()[3]; } } - // ---- // f() -> 2 diff --git a/test/libsolidity/semanticTests/libraries/internal_types_in_library.sol b/test/libsolidity/semanticTests/libraries/internal_types_in_library.sol index 7b4e05b72e02..169f2e295b6b 100644 --- a/test/libsolidity/semanticTests/libraries/internal_types_in_library.sol +++ b/test/libsolidity/semanticTests/libraries/internal_types_in_library.sol @@ -19,8 +19,6 @@ contract Test { b = Lib.find(data["abc"], 3); } } -// ==== -// compileToEwasm: false // ---- // library: Lib // f() -> 4, 0x11 diff --git a/test/libsolidity/semanticTests/libraries/library_call_in_homestead.sol b/test/libsolidity/semanticTests/libraries/library_call_in_homestead.sol index a49dc602ad97..44526da68a6a 100644 --- a/test/libsolidity/semanticTests/libraries/library_call_in_homestead.sol +++ b/test/libsolidity/semanticTests/libraries/library_call_in_homestead.sol @@ -6,7 +6,6 @@ contract Test { } } // ==== -// compileToEwasm: false // EVMVersion: >=homestead // ---- // library: Lib diff --git a/test/libsolidity/semanticTests/libraries/library_enum_as_an_expression.sol b/test/libsolidity/semanticTests/libraries/library_enum_as_an_expression.sol index f24d93c2d940..a385fb29a311 100644 --- a/test/libsolidity/semanticTests/libraries/library_enum_as_an_expression.sol +++ b/test/libsolidity/semanticTests/libraries/library_enum_as_an_expression.sol @@ -9,6 +9,5 @@ contract Tsra { return 1; } } - // ---- // f() -> 1 diff --git a/test/libsolidity/semanticTests/libraries/library_references_preserve.sol b/test/libsolidity/semanticTests/libraries/library_references_preserve.sol index ce41e54e98cb..41c16d2f3a8c 100644 --- a/test/libsolidity/semanticTests/libraries/library_references_preserve.sol +++ b/test/libsolidity/semanticTests/libraries/library_references_preserve.sol @@ -40,7 +40,6 @@ contract C { return b.getSum(); } } - // ---- // library: L1 // library: L2 diff --git a/test/libsolidity/semanticTests/libraries/library_stray_values.sol b/test/libsolidity/semanticTests/libraries/library_stray_values.sol index 61f52b86c82a..3acc8557024f 100644 --- a/test/libsolidity/semanticTests/libraries/library_stray_values.sol +++ b/test/libsolidity/semanticTests/libraries/library_stray_values.sol @@ -6,8 +6,6 @@ contract Test { return x + 9; } } -// ==== -// compileToEwasm: false // ---- // library: Lib // f(uint256): 33 -> 0x2a diff --git a/test/libsolidity/semanticTests/libraries/library_struct_as_an_expression.sol b/test/libsolidity/semanticTests/libraries/library_struct_as_an_expression.sol index d7df52434136..96ee9bcffed7 100644 --- a/test/libsolidity/semanticTests/libraries/library_struct_as_an_expression.sol +++ b/test/libsolidity/semanticTests/libraries/library_struct_as_an_expression.sol @@ -12,6 +12,5 @@ contract Tsra { return 1; } } - // ---- // f() -> 1 diff --git a/test/libsolidity/semanticTests/libraries/mapping_arguments_in_library.sol b/test/libsolidity/semanticTests/libraries/mapping_arguments_in_library.sol index 8a82350dc4f8..cfbf7b0c7d15 100644 --- a/test/libsolidity/semanticTests/libraries/mapping_arguments_in_library.sol +++ b/test/libsolidity/semanticTests/libraries/mapping_arguments_in_library.sol @@ -20,8 +20,6 @@ contract Test { return Lib.get(m, key); } } -// ==== -// compileToEwasm: false // ---- // library: Lib // set(uint256,uint256): 1, 42 -> 0 diff --git a/test/libsolidity/semanticTests/libraries/mapping_returns_in_library.sol b/test/libsolidity/semanticTests/libraries/mapping_returns_in_library.sol index a8188fcc65bd..da521f6bada5 100644 --- a/test/libsolidity/semanticTests/libraries/mapping_returns_in_library.sol +++ b/test/libsolidity/semanticTests/libraries/mapping_returns_in_library.sol @@ -24,8 +24,6 @@ contract Test { return b[key]; } } -// ==== -// compileToEwasm: false // ---- // library: Lib // set(bool,uint256,uint256): true, 1, 42 -> 0 diff --git a/test/libsolidity/semanticTests/libraries/mapping_returns_in_library_named.sol b/test/libsolidity/semanticTests/libraries/mapping_returns_in_library_named.sol index 6ddad7979b82..e5963c1b3fe6 100644 --- a/test/libsolidity/semanticTests/libraries/mapping_returns_in_library_named.sol +++ b/test/libsolidity/semanticTests/libraries/mapping_returns_in_library_named.sol @@ -22,8 +22,6 @@ contract Test { return (a[0], a[1], a[2], b[0], b[1], b[2]); } } -// ==== -// compileToEwasm: false // ---- // library: Lib // f() -> 0, 0x2a, 0, 0, 0x15, 0x54 diff --git a/test/libsolidity/semanticTests/libraries/payable_function_calls_library.sol b/test/libsolidity/semanticTests/libraries/payable_function_calls_library.sol index 5e78713b7ef7..178f22b40f92 100644 --- a/test/libsolidity/semanticTests/libraries/payable_function_calls_library.sol +++ b/test/libsolidity/semanticTests/libraries/payable_function_calls_library.sol @@ -6,8 +6,6 @@ contract C { return L.f(); } } -// ==== -// compileToEwasm: false // ---- // library: L // f(): 27 -> 7 diff --git a/test/libsolidity/semanticTests/libraries/using_for_by_name.sol b/test/libsolidity/semanticTests/libraries/using_for_by_name.sol index f9add4cb837d..d6c7f313e236 100644 --- a/test/libsolidity/semanticTests/libraries/using_for_by_name.sol +++ b/test/libsolidity/semanticTests/libraries/using_for_by_name.sol @@ -7,8 +7,6 @@ contract C { return x.mul({x: a}); } } -// ==== -// compileToEwasm: false // ---- // library: D // f(uint256): 7 -> 0x2a diff --git a/test/libsolidity/semanticTests/libraries/using_for_overload.sol b/test/libsolidity/semanticTests/libraries/using_for_overload.sol index 5bc0bc948c16..5dd67fba06be 100644 --- a/test/libsolidity/semanticTests/libraries/using_for_overload.sol +++ b/test/libsolidity/semanticTests/libraries/using_for_overload.sol @@ -11,8 +11,6 @@ contract C { return x.mul(a); } } -// ==== -// compileToEwasm: false // ---- // library: D // f(uint256): 7 -> 0x2a diff --git a/test/libsolidity/semanticTests/libraries/using_library_mappings_public.sol b/test/libsolidity/semanticTests/libraries/using_library_mappings_public.sol index 41c700976c7c..b180d52e4e39 100644 --- a/test/libsolidity/semanticTests/libraries/using_library_mappings_public.sol +++ b/test/libsolidity/semanticTests/libraries/using_library_mappings_public.sol @@ -16,8 +16,6 @@ contract Test { return (m1[0], m1[1], m1[2], m2[0], m2[1], m2[2]); } } -// ==== -// compileToEwasm: false // ---- // library: Lib // f() -> 1, 0, 0x2a, 0x17, 0, 0x63 diff --git a/test/libsolidity/semanticTests/libraries/using_library_mappings_return.sol b/test/libsolidity/semanticTests/libraries/using_library_mappings_return.sol index 3ac843eedaae..d46ed0a56a38 100644 --- a/test/libsolidity/semanticTests/libraries/using_library_mappings_return.sol +++ b/test/libsolidity/semanticTests/libraries/using_library_mappings_return.sol @@ -14,8 +14,6 @@ contract Test { return (m[0][0], m[0][1], m[0][2], m[1][0], m[1][1], m[1][2]); } } -// ==== -// compileToEwasm: false // ---- // library: Lib // f() -> 1, 0, 0x2a, 0x17, 0, 0x63 diff --git a/test/libsolidity/semanticTests/libraries/using_library_structs.sol b/test/libsolidity/semanticTests/libraries/using_library_structs.sol index 465dcebb1757..e709a5b5b93c 100644 --- a/test/libsolidity/semanticTests/libraries/using_library_structs.sol +++ b/test/libsolidity/semanticTests/libraries/using_library_structs.sol @@ -17,8 +17,6 @@ contract Test { b = data["abc"].b[19]; } } -// ==== -// compileToEwasm: false // ---- // library: Lib // f() -> 7, 8 diff --git a/test/libsolidity/semanticTests/literals/denominations.sol b/test/libsolidity/semanticTests/literals/denominations.sol index 9aec493cd1b9..f423775a613a 100644 --- a/test/libsolidity/semanticTests/literals/denominations.sol +++ b/test/libsolidity/semanticTests/literals/denominations.sol @@ -3,7 +3,5 @@ contract C { function f() public view returns(uint) { return x; } } -// ==== -// compileToEwasm: also // ---- // f() -> 1000000001000000001 diff --git a/test/libsolidity/semanticTests/literals/escape.sol b/test/libsolidity/semanticTests/literals/escape.sol index c198f21dc474..96fa9b11e631 100644 --- a/test/libsolidity/semanticTests/literals/escape.sol +++ b/test/libsolidity/semanticTests/literals/escape.sol @@ -7,7 +7,5 @@ contract C return (encoded.length, encoded[0], encoded[1]); } } -// ==== -// compileToEwasm: also // ---- // f() -> 2, 0x5c00000000000000000000000000000000000000000000000000000000000000, 0x5c00000000000000000000000000000000000000000000000000000000000000 diff --git a/test/libsolidity/semanticTests/literals/ether.sol b/test/libsolidity/semanticTests/literals/ether.sol index d2942a0657ae..16cb75315233 100644 --- a/test/libsolidity/semanticTests/literals/ether.sol +++ b/test/libsolidity/semanticTests/literals/ether.sol @@ -3,7 +3,5 @@ contract C { function f() public view returns(uint) { return x; } } -// ==== -// compileToEwasm: also // ---- // f() -> 1000000000000000000 diff --git a/test/libsolidity/semanticTests/literals/gwei.sol b/test/libsolidity/semanticTests/literals/gwei.sol index 3058ee720e79..bb8cc6ab0a71 100644 --- a/test/libsolidity/semanticTests/literals/gwei.sol +++ b/test/libsolidity/semanticTests/literals/gwei.sol @@ -3,7 +3,5 @@ contract C { function f() public view returns(uint) { return x; } } -// ==== -// compileToEwasm: also // ---- // f() -> 1000000000 diff --git a/test/libsolidity/semanticTests/literals/hex_string_with_non_printable_characters.sol b/test/libsolidity/semanticTests/literals/hex_string_with_non_printable_characters.sol index d10904cfaf33..3edd6049c000 100644 --- a/test/libsolidity/semanticTests/literals/hex_string_with_non_printable_characters.sol +++ b/test/libsolidity/semanticTests/literals/hex_string_with_non_printable_characters.sol @@ -5,7 +5,5 @@ contract C { } } } -// ==== -// compileToEwasm: also // ---- // f() -> 0x000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f diff --git a/test/libsolidity/semanticTests/literals/hex_string_with_underscore.sol b/test/libsolidity/semanticTests/literals/hex_string_with_underscore.sol index b14297a94a2f..db7f70f83bdc 100644 --- a/test/libsolidity/semanticTests/literals/hex_string_with_underscore.sol +++ b/test/libsolidity/semanticTests/literals/hex_string_with_underscore.sol @@ -3,7 +3,5 @@ contract C { return hex"12_34_5678_9A"; } } -// ==== -// compileToEwasm: also // ---- // f() -> 32, 5, left(0x123456789A) diff --git a/test/libsolidity/semanticTests/literals/scientific_notation.sol b/test/libsolidity/semanticTests/literals/scientific_notation.sol index b03adee3938a..5e0d80148aec 100644 --- a/test/libsolidity/semanticTests/literals/scientific_notation.sol +++ b/test/libsolidity/semanticTests/literals/scientific_notation.sol @@ -23,9 +23,6 @@ contract C { return -2.5e1; } } - -// ==== -// compileToEwasm: also // ---- // f() -> 20000000000 // g() -> 2 diff --git a/test/libsolidity/semanticTests/literals/wei.sol b/test/libsolidity/semanticTests/literals/wei.sol index bf115f1dce27..08bba771b0de 100644 --- a/test/libsolidity/semanticTests/literals/wei.sol +++ b/test/libsolidity/semanticTests/literals/wei.sol @@ -3,7 +3,5 @@ contract C { function f() public view returns(uint) { return x; } } -// ==== -// compileToEwasm: also // ---- // f() -> 1 diff --git a/test/libsolidity/semanticTests/memoryManagement/assembly_access.sol b/test/libsolidity/semanticTests/memoryManagement/assembly_access.sol index e69c93e46ba6..d2ed3575ecec 100644 --- a/test/libsolidity/semanticTests/memoryManagement/assembly_access.sol +++ b/test/libsolidity/semanticTests/memoryManagement/assembly_access.sol @@ -10,7 +10,5 @@ contract C { assert(y != 0); } } -// ==== -// compileToEwasm: also // ---- // f() -> diff --git a/test/libsolidity/semanticTests/memoryManagement/struct_allocation.sol b/test/libsolidity/semanticTests/memoryManagement/struct_allocation.sol index f3a326534105..5b471e1a7e14 100644 --- a/test/libsolidity/semanticTests/memoryManagement/struct_allocation.sol +++ b/test/libsolidity/semanticTests/memoryManagement/struct_allocation.sol @@ -17,8 +17,6 @@ contract C { return memorySizeAfter - memorySizeBefore; } } -// ==== -// compileToEwasm: also // ---- // withValue() -> 0x00 // withoutValue() -> 0x60 diff --git a/test/libsolidity/semanticTests/metaTypes/name_other_contract.sol b/test/libsolidity/semanticTests/metaTypes/name_other_contract.sol index 4f9bfe971e81..efdaedf50257 100644 --- a/test/libsolidity/semanticTests/metaTypes/name_other_contract.sol +++ b/test/libsolidity/semanticTests/metaTypes/name_other_contract.sol @@ -22,8 +22,6 @@ contract Test is C { return type(I).name; } } -// ==== -// compileToEwasm: also // ---- // c() -> 0x20, 1, "C" // a() -> 0x20, 1, "A" diff --git a/test/libsolidity/semanticTests/modifiers/access_through_contract_name.sol b/test/libsolidity/semanticTests/modifiers/access_through_contract_name.sol index f56d611c2436..4d1538d7cfb7 100644 --- a/test/libsolidity/semanticTests/modifiers/access_through_contract_name.sol +++ b/test/libsolidity/semanticTests/modifiers/access_through_contract_name.sol @@ -12,8 +12,6 @@ contract C is A { return 10; } } -// ==== -// compileToEwasm: also // ---- // x() -> 7 // f() -> 9 diff --git a/test/libsolidity/semanticTests/modifiers/access_through_module_name.sol b/test/libsolidity/semanticTests/modifiers/access_through_module_name.sol index 925797b7ebd1..58c60014311f 100644 --- a/test/libsolidity/semanticTests/modifiers/access_through_module_name.sol +++ b/test/libsolidity/semanticTests/modifiers/access_through_module_name.sol @@ -15,8 +15,6 @@ contract C { r = 10; } } -// ==== -// compileToEwasm: also // ---- // x() -> 0x00 // f() -> 1, 9 diff --git a/test/libsolidity/semanticTests/modifiers/break_in_modifier.sol b/test/libsolidity/semanticTests/modifiers/break_in_modifier.sol index b15a80df14cd..67fc0e6be6c0 100644 --- a/test/libsolidity/semanticTests/modifiers/break_in_modifier.sol +++ b/test/libsolidity/semanticTests/modifiers/break_in_modifier.sol @@ -14,8 +14,6 @@ contract C { x = t; } } -// ==== -// compileToEwasm: also // ---- // x() -> 0 // f() -> diff --git a/test/libsolidity/semanticTests/modifiers/continue_in_modifier.sol b/test/libsolidity/semanticTests/modifiers/continue_in_modifier.sol index bc4c79739365..2879c55eaf0b 100644 --- a/test/libsolidity/semanticTests/modifiers/continue_in_modifier.sol +++ b/test/libsolidity/semanticTests/modifiers/continue_in_modifier.sol @@ -13,9 +13,6 @@ contract C { x = t; } } - -// ==== -// compileToEwasm: also // ---- // x() -> 0 // f() -> diff --git a/test/libsolidity/semanticTests/modifiers/function_modifier.sol b/test/libsolidity/semanticTests/modifiers/function_modifier.sol index cca7e04b1aeb..e1978ba871f9 100644 --- a/test/libsolidity/semanticTests/modifiers/function_modifier.sol +++ b/test/libsolidity/semanticTests/modifiers/function_modifier.sol @@ -7,9 +7,6 @@ contract C { if (msg.value > 0) _; } } - -// ==== -// compileToEwasm: also // ---- // getOne() -> 0 // getOne(), 1 wei -> 1 diff --git a/test/libsolidity/semanticTests/modifiers/function_modifier_calling_functions_in_creation_context.sol b/test/libsolidity/semanticTests/modifiers/function_modifier_calling_functions_in_creation_context.sol index 182baec8c581..bae503250173 100644 --- a/test/libsolidity/semanticTests/modifiers/function_modifier_calling_functions_in_creation_context.sol +++ b/test/libsolidity/semanticTests/modifiers/function_modifier_calling_functions_in_creation_context.sol @@ -44,8 +44,5 @@ contract C is A { data |= 0x4000; } } - -// ==== -// compileToEwasm: also // ---- // getData() -> 0x4300 diff --git a/test/libsolidity/semanticTests/modifiers/function_modifier_empty.sol b/test/libsolidity/semanticTests/modifiers/function_modifier_empty.sol index 222f87f97ee1..16cbad1a4ab9 100644 --- a/test/libsolidity/semanticTests/modifiers/function_modifier_empty.sol +++ b/test/libsolidity/semanticTests/modifiers/function_modifier_empty.sol @@ -12,8 +12,5 @@ contract C is A { if (false) _; } } - -// ==== -// compileToEwasm: also // ---- // f() -> false diff --git a/test/libsolidity/semanticTests/modifiers/function_modifier_for_constructor.sol b/test/libsolidity/semanticTests/modifiers/function_modifier_for_constructor.sol index 71cbc4203773..f32a238145db 100644 --- a/test/libsolidity/semanticTests/modifiers/function_modifier_for_constructor.sol +++ b/test/libsolidity/semanticTests/modifiers/function_modifier_for_constructor.sol @@ -22,7 +22,5 @@ contract C is A { _; } } -// ==== -// compileToEwasm: also // ---- // getData() -> 6 diff --git a/test/libsolidity/semanticTests/modifiers/function_modifier_library.sol b/test/libsolidity/semanticTests/modifiers/function_modifier_library.sol index f10ebb0e74bb..c50fb5ddec51 100644 --- a/test/libsolidity/semanticTests/modifiers/function_modifier_library.sol +++ b/test/libsolidity/semanticTests/modifiers/function_modifier_library.sol @@ -23,6 +23,5 @@ contract Test { return s.v; } } - // ---- // f() -> 0x202 diff --git a/test/libsolidity/semanticTests/modifiers/function_modifier_library_inheritance.sol b/test/libsolidity/semanticTests/modifiers/function_modifier_library_inheritance.sol index 3d5e97de00f2..e87ac7a41330 100644 --- a/test/libsolidity/semanticTests/modifiers/function_modifier_library_inheritance.sol +++ b/test/libsolidity/semanticTests/modifiers/function_modifier_library_inheritance.sol @@ -29,6 +29,5 @@ contract Test { return s.v; } } - // ---- // f() -> 0x202 diff --git a/test/libsolidity/semanticTests/modifiers/function_modifier_local_variables.sol b/test/libsolidity/semanticTests/modifiers/function_modifier_local_variables.sol index dc44d6659801..c3b10475fcca 100644 --- a/test/libsolidity/semanticTests/modifiers/function_modifier_local_variables.sol +++ b/test/libsolidity/semanticTests/modifiers/function_modifier_local_variables.sol @@ -13,9 +13,6 @@ contract C { return 3; } } - -// ==== -// compileToEwasm: also // ---- // f(bool): true -> 0 // f(bool): false -> 3 diff --git a/test/libsolidity/semanticTests/modifiers/function_modifier_loop_viair.sol b/test/libsolidity/semanticTests/modifiers/function_modifier_loop_viair.sol index 86da5500ec53..81caba767061 100644 --- a/test/libsolidity/semanticTests/modifiers/function_modifier_loop_viair.sol +++ b/test/libsolidity/semanticTests/modifiers/function_modifier_loop_viair.sol @@ -10,6 +10,5 @@ contract C { } // ==== // compileViaYul: true -// compileToEwasm: also // ---- // f() -> 1 diff --git a/test/libsolidity/semanticTests/modifiers/function_modifier_multi_invocation_viair.sol b/test/libsolidity/semanticTests/modifiers/function_modifier_multi_invocation_viair.sol index ae8431d3cc59..929b006e3f83 100644 --- a/test/libsolidity/semanticTests/modifiers/function_modifier_multi_invocation_viair.sol +++ b/test/libsolidity/semanticTests/modifiers/function_modifier_multi_invocation_viair.sol @@ -10,7 +10,6 @@ contract C { } // ==== // compileViaYul: true -// compileToEwasm: also // ---- // f(bool): false -> 1 // f(bool): true -> 1 diff --git a/test/libsolidity/semanticTests/modifiers/function_modifier_multiple_times.sol b/test/libsolidity/semanticTests/modifiers/function_modifier_multiple_times.sol index 83f855d2c7db..5cda8b6d2063 100644 --- a/test/libsolidity/semanticTests/modifiers/function_modifier_multiple_times.sol +++ b/test/libsolidity/semanticTests/modifiers/function_modifier_multiple_times.sol @@ -9,9 +9,6 @@ contract C { return a; } } - -// ==== -// compileToEwasm: also // ---- // f(uint256): 3 -> 10 // a() -> 10 diff --git a/test/libsolidity/semanticTests/modifiers/function_modifier_multiple_times_local_vars.sol b/test/libsolidity/semanticTests/modifiers/function_modifier_multiple_times_local_vars.sol index 264d256bdac3..780b5a360c8d 100644 --- a/test/libsolidity/semanticTests/modifiers/function_modifier_multiple_times_local_vars.sol +++ b/test/libsolidity/semanticTests/modifiers/function_modifier_multiple_times_local_vars.sol @@ -12,9 +12,6 @@ contract C { return a; } } - -// ==== -// compileToEwasm: also // ---- // f(uint256): 3 -> 10 // a() -> 0 diff --git a/test/libsolidity/semanticTests/modifiers/function_modifier_overriding.sol b/test/libsolidity/semanticTests/modifiers/function_modifier_overriding.sol index bef92dac2efb..16d6b821637a 100644 --- a/test/libsolidity/semanticTests/modifiers/function_modifier_overriding.sol +++ b/test/libsolidity/semanticTests/modifiers/function_modifier_overriding.sol @@ -14,8 +14,5 @@ contract C is A { if (false) _; } } - -// ==== -// compileToEwasm: also // ---- // f() -> false diff --git a/test/libsolidity/semanticTests/modifiers/function_return_parameter.sol b/test/libsolidity/semanticTests/modifiers/function_return_parameter.sol index e1a0c36d3bde..ecc7851b4ba2 100644 --- a/test/libsolidity/semanticTests/modifiers/function_return_parameter.sol +++ b/test/libsolidity/semanticTests/modifiers/function_return_parameter.sol @@ -4,7 +4,5 @@ contract B { modifier mod1(uint a, bool b) { if (b) _; } modifier mod2(bytes7 a) { while (a == "1234567") _; } } -// ==== -// compileToEwasm: also // ---- // f(uint8): 5 -> 0x00 diff --git a/test/libsolidity/semanticTests/modifiers/function_return_parameter_complex.sol b/test/libsolidity/semanticTests/modifiers/function_return_parameter_complex.sol index ab14d14c280b..530fadf63662 100644 --- a/test/libsolidity/semanticTests/modifiers/function_return_parameter_complex.sol +++ b/test/libsolidity/semanticTests/modifiers/function_return_parameter_complex.sol @@ -26,8 +26,6 @@ contract A { r = x; } } -// ==== -// compileToEwasm: also // ---- // f() -> 0x10, 0x20, 0x40 // x() -> 1 diff --git a/test/libsolidity/semanticTests/modifiers/modifer_recursive.sol b/test/libsolidity/semanticTests/modifiers/modifer_recursive.sol index 006af1c2cc12..a69a26f5ce28 100644 --- a/test/libsolidity/semanticTests/modifiers/modifer_recursive.sol +++ b/test/libsolidity/semanticTests/modifiers/modifer_recursive.sol @@ -8,9 +8,6 @@ contract C { return x == 0 ? 2 : f(x - 1)**2; } } - -// ==== -// compileToEwasm: also // ---- // called() -> 0x00 // f(uint256): 5 -> 0x0100000000 diff --git a/test/libsolidity/semanticTests/modifiers/modifier_in_constructor_ice.sol b/test/libsolidity/semanticTests/modifiers/modifier_in_constructor_ice.sol index 88a2fa1071d0..136743d53089 100644 --- a/test/libsolidity/semanticTests/modifiers/modifier_in_constructor_ice.sol +++ b/test/libsolidity/semanticTests/modifiers/modifier_in_constructor_ice.sol @@ -1,7 +1,5 @@ // The IR of this contract used to throw contract A { modifier m1{_;} } contract B is A { constructor() A() m1{} } -// ==== -// compileToEwasm: also // ---- // constructor() -> diff --git a/test/libsolidity/semanticTests/modifiers/modifier_init_return.sol b/test/libsolidity/semanticTests/modifiers/modifier_init_return.sol index df4fa914c6c4..d4c72e1632d4 100644 --- a/test/libsolidity/semanticTests/modifiers/modifier_init_return.sol +++ b/test/libsolidity/semanticTests/modifiers/modifier_init_return.sol @@ -7,9 +7,6 @@ contract C { r[2] = 3; } } - -// ==== -// compileToEwasm: also // ---- // f(uint256): 9 -> 0x00, 0x00, 0x00, 0x00, 0x00 // f(uint256): 10 -> 0x00, 0x00, 3, 0x00, 0x00 diff --git a/test/libsolidity/semanticTests/modifiers/modifiers_in_construction_context.sol b/test/libsolidity/semanticTests/modifiers/modifiers_in_construction_context.sol index 3f2b4ebea144..30cce5a79d79 100644 --- a/test/libsolidity/semanticTests/modifiers/modifiers_in_construction_context.sol +++ b/test/libsolidity/semanticTests/modifiers/modifiers_in_construction_context.sol @@ -7,7 +7,5 @@ contract B is A { modifier m2 { _; } constructor() A() m1 m2 { } } -// ==== -// compileToEwasm: also // ---- // constructor() -> diff --git a/test/libsolidity/semanticTests/modifiers/return_does_not_skip_modifier.sol b/test/libsolidity/semanticTests/modifiers/return_does_not_skip_modifier.sol index 1d71e5ac97a5..0d9bbfe32b2a 100644 --- a/test/libsolidity/semanticTests/modifiers/return_does_not_skip_modifier.sol +++ b/test/libsolidity/semanticTests/modifiers/return_does_not_skip_modifier.sol @@ -9,9 +9,6 @@ contract C { return 2; } } - -// ==== -// compileToEwasm: also // ---- // x() -> 0 // f() -> 2 diff --git a/test/libsolidity/semanticTests/modifiers/return_in_modifier.sol b/test/libsolidity/semanticTests/modifiers/return_in_modifier.sol index ffc503ae2050..00e2bb32846c 100644 --- a/test/libsolidity/semanticTests/modifiers/return_in_modifier.sol +++ b/test/libsolidity/semanticTests/modifiers/return_in_modifier.sol @@ -13,9 +13,6 @@ contract C { x = t; } } - -// ==== -// compileToEwasm: also // ---- // x() -> 0 // f() -> diff --git a/test/libsolidity/semanticTests/modifiers/stacked_return_with_modifiers.sol b/test/libsolidity/semanticTests/modifiers/stacked_return_with_modifiers.sol index a9b6bfa6c135..616a2183c02d 100644 --- a/test/libsolidity/semanticTests/modifiers/stacked_return_with_modifiers.sol +++ b/test/libsolidity/semanticTests/modifiers/stacked_return_with_modifiers.sol @@ -15,8 +15,6 @@ contract C { } } } -// ==== -// compileToEwasm: also // ---- // x() -> 0 // f() -> 42 diff --git a/test/libsolidity/semanticTests/multiSource/circular_import.sol b/test/libsolidity/semanticTests/multiSource/circular_import.sol index 15d75fde50cc..4c4ba4b28ae3 100644 --- a/test/libsolidity/semanticTests/multiSource/circular_import.sol +++ b/test/libsolidity/semanticTests/multiSource/circular_import.sol @@ -9,7 +9,5 @@ contract C { return f() - g(); } } -// ==== -// compileToEwasm: also // ---- // foo() -> 1 diff --git a/test/libsolidity/semanticTests/multiSource/circular_import_2.sol b/test/libsolidity/semanticTests/multiSource/circular_import_2.sol index de47c0380fec..639629372e93 100644 --- a/test/libsolidity/semanticTests/multiSource/circular_import_2.sol +++ b/test/libsolidity/semanticTests/multiSource/circular_import_2.sol @@ -10,7 +10,5 @@ contract C { return h() - f() - g(); } } -// ==== -// compileToEwasm: also // ---- // foo() -> 992 diff --git a/test/libsolidity/semanticTests/multiSource/circular_reimport.sol b/test/libsolidity/semanticTests/multiSource/circular_reimport.sol index 8b7fc32a594f..a866b0f547df 100644 --- a/test/libsolidity/semanticTests/multiSource/circular_reimport.sol +++ b/test/libsolidity/semanticTests/multiSource/circular_reimport.sol @@ -12,7 +12,5 @@ contract C { return f() - g() - h(); } } -// ==== -// compileToEwasm: also // ---- // foo() -> 0x60 diff --git a/test/libsolidity/semanticTests/multiSource/circular_reimport_2.sol b/test/libsolidity/semanticTests/multiSource/circular_reimport_2.sol index 3ae209daa8a4..3ff3a1a6029f 100644 --- a/test/libsolidity/semanticTests/multiSource/circular_reimport_2.sol +++ b/test/libsolidity/semanticTests/multiSource/circular_reimport_2.sol @@ -12,7 +12,5 @@ contract C { return 10000 + f() - g() - h(); } } -// ==== -// compileToEwasm: also // ---- // foo() -> 0x2324 diff --git a/test/libsolidity/semanticTests/multiSource/free_different_interger_types.sol b/test/libsolidity/semanticTests/multiSource/free_different_interger_types.sol index 5c428636681e..a103ef071afd 100644 --- a/test/libsolidity/semanticTests/multiSource/free_different_interger_types.sol +++ b/test/libsolidity/semanticTests/multiSource/free_different_interger_types.sol @@ -8,7 +8,5 @@ contract C { return (g(2), g(false)); } } -// ==== -// compileToEwasm: also // ---- // foo() -> 24, true diff --git a/test/libsolidity/semanticTests/multiSource/free_function_resolution_base_contract.sol b/test/libsolidity/semanticTests/multiSource/free_function_resolution_base_contract.sol index 4e91d42fb434..321e16ae32b1 100644 --- a/test/libsolidity/semanticTests/multiSource/free_function_resolution_base_contract.sol +++ b/test/libsolidity/semanticTests/multiSource/free_function_resolution_base_contract.sol @@ -12,7 +12,5 @@ contract D is C { return g(); } } -// ==== -// compileToEwasm: also // ---- // h() -> 1337 diff --git a/test/libsolidity/semanticTests/multiSource/free_function_resolution_override_virtual.sol b/test/libsolidity/semanticTests/multiSource/free_function_resolution_override_virtual.sol index 6df3631a769b..f111273d8f58 100644 --- a/test/libsolidity/semanticTests/multiSource/free_function_resolution_override_virtual.sol +++ b/test/libsolidity/semanticTests/multiSource/free_function_resolution_override_virtual.sol @@ -12,7 +12,5 @@ contract D is C { return f(); } } -// ==== -// compileToEwasm: also // ---- // g() -> 1337 diff --git a/test/libsolidity/semanticTests/multiSource/free_function_resolution_override_virtual_super.sol b/test/libsolidity/semanticTests/multiSource/free_function_resolution_override_virtual_super.sol index 71fed293ba6f..ae802d7c0a37 100644 --- a/test/libsolidity/semanticTests/multiSource/free_function_resolution_override_virtual_super.sol +++ b/test/libsolidity/semanticTests/multiSource/free_function_resolution_override_virtual_super.sol @@ -12,7 +12,5 @@ contract D is C { return super.g(); } } -// ==== -// compileToEwasm: also // ---- // g() -> 1337 diff --git a/test/libsolidity/semanticTests/multiSource/free_function_resolution_override_virtual_transitive.sol b/test/libsolidity/semanticTests/multiSource/free_function_resolution_override_virtual_transitive.sol index e31fdfa3db5a..71723f0fa5b3 100644 --- a/test/libsolidity/semanticTests/multiSource/free_function_resolution_override_virtual_transitive.sol +++ b/test/libsolidity/semanticTests/multiSource/free_function_resolution_override_virtual_transitive.sol @@ -19,7 +19,5 @@ contract E is D { return super.g() + 1; } } -// ==== -// compileToEwasm: also // ---- // g() -> 1339 diff --git a/test/libsolidity/semanticTests/multiSource/free_function_transitive_import.sol b/test/libsolidity/semanticTests/multiSource/free_function_transitive_import.sol index 585ef8986d9f..dec4c3f29e99 100644 --- a/test/libsolidity/semanticTests/multiSource/free_function_transitive_import.sol +++ b/test/libsolidity/semanticTests/multiSource/free_function_transitive_import.sol @@ -20,8 +20,5 @@ contract E is D { return f(); } } - -// ==== -// compileToEwasm: also // ---- // i() -> 1337 diff --git a/test/libsolidity/semanticTests/multiSource/import.sol b/test/libsolidity/semanticTests/multiSource/import.sol index bcaf6f290638..2a0f43d53978 100644 --- a/test/libsolidity/semanticTests/multiSource/import.sol +++ b/test/libsolidity/semanticTests/multiSource/import.sol @@ -7,8 +7,6 @@ import "A"; contract B is A { function f(uint256 x) public view returns(uint256) { return x; } } -// ==== -// compileToEwasm: also // ---- // f(uint256): 1337 -> 1337 // g(uint256): 1337 -> 1338 diff --git a/test/libsolidity/semanticTests/multiSource/imported_free_function_via_alias.sol b/test/libsolidity/semanticTests/multiSource/imported_free_function_via_alias.sol index f980805ed9f6..c57693674535 100644 --- a/test/libsolidity/semanticTests/multiSource/imported_free_function_via_alias.sol +++ b/test/libsolidity/semanticTests/multiSource/imported_free_function_via_alias.sol @@ -13,7 +13,5 @@ contract D is M.C { return super.g() + f() * 10000; } } -// ==== -// compileToEwasm: also // ---- // g() -> 61337 diff --git a/test/libsolidity/semanticTests/multiSource/imported_free_function_via_alias_direct_call.sol b/test/libsolidity/semanticTests/multiSource/imported_free_function_via_alias_direct_call.sol index 5188f0e4a3b6..a5f43f8b1c7a 100644 --- a/test/libsolidity/semanticTests/multiSource/imported_free_function_via_alias_direct_call.sol +++ b/test/libsolidity/semanticTests/multiSource/imported_free_function_via_alias_direct_call.sol @@ -8,7 +8,5 @@ contract D { return g() + f() * 10000; } } -// ==== -// compileToEwasm: also // ---- // h() -> 61337 diff --git a/test/libsolidity/semanticTests/multiSource/reimport_imported_function.sol b/test/libsolidity/semanticTests/multiSource/reimport_imported_function.sol index a31b438ff8ee..02b4821433f4 100644 --- a/test/libsolidity/semanticTests/multiSource/reimport_imported_function.sol +++ b/test/libsolidity/semanticTests/multiSource/reimport_imported_function.sol @@ -9,7 +9,5 @@ contract C { return h(); } } -// ==== -// compileToEwasm: also // ---- // foo() -> 1337 diff --git a/test/libsolidity/semanticTests/operators/compound_assign.sol b/test/libsolidity/semanticTests/operators/compound_assign.sol index 6ede4522d443..ed91f3b6c586 100644 --- a/test/libsolidity/semanticTests/operators/compound_assign.sol +++ b/test/libsolidity/semanticTests/operators/compound_assign.sol @@ -9,8 +9,6 @@ contract test { return value2 += 7; } } -// ==== -// compileToEwasm: also // ---- // f(uint256,uint256): 0, 6 -> 7 // f(uint256,uint256): 1, 3 -> 0x23 diff --git a/test/libsolidity/semanticTests/operators/shifts/shift_bytes_cleanup_viaYul.sol b/test/libsolidity/semanticTests/operators/shifts/shift_bytes_cleanup_viaYul.sol index 68a370454504..36b6e8b59375 100644 --- a/test/libsolidity/semanticTests/operators/shifts/shift_bytes_cleanup_viaYul.sol +++ b/test/libsolidity/semanticTests/operators/shifts/shift_bytes_cleanup_viaYul.sol @@ -13,7 +13,6 @@ contract C { } } // ==== -// compileToEwasm: also // compileViaYul: true // ---- // l(uint8): 64 -> 0x3930313233343536373839300000000000000000000000000000000000000000 diff --git a/test/libsolidity/semanticTests/operators/shifts/shift_cleanup.sol b/test/libsolidity/semanticTests/operators/shifts/shift_cleanup.sol index 9f13f4bdce84..0adc5ae55641 100644 --- a/test/libsolidity/semanticTests/operators/shifts/shift_cleanup.sol +++ b/test/libsolidity/semanticTests/operators/shifts/shift_cleanup.sol @@ -8,8 +8,5 @@ contract C { } } } - -// ==== -// compileToEwasm: also // ---- // f() -> 0x0 diff --git a/test/libsolidity/semanticTests/operators/shifts/shift_cleanup_garbled.sol b/test/libsolidity/semanticTests/operators/shifts/shift_cleanup_garbled.sol index 560def3b4e87..452884f26340 100644 --- a/test/libsolidity/semanticTests/operators/shifts/shift_cleanup_garbled.sol +++ b/test/libsolidity/semanticTests/operators/shifts/shift_cleanup_garbled.sol @@ -6,8 +6,5 @@ contract C { x >>= 8; } } - -// ==== -// compileToEwasm: also // ---- // f() -> 0x0 diff --git a/test/libsolidity/semanticTests/operators/shifts/shift_constant_left.sol b/test/libsolidity/semanticTests/operators/shifts/shift_constant_left.sol index 1af4930060f0..bc0c9f48445a 100644 --- a/test/libsolidity/semanticTests/operators/shifts/shift_constant_left.sol +++ b/test/libsolidity/semanticTests/operators/shifts/shift_constant_left.sol @@ -1,7 +1,5 @@ contract C { uint256 public a = 0x42 << 8; } -// ==== -// compileToEwasm: also // ---- // a() -> 0x4200 diff --git a/test/libsolidity/semanticTests/operators/shifts/shift_constant_left_assignment.sol b/test/libsolidity/semanticTests/operators/shifts/shift_constant_left_assignment.sol index aa75ca487882..3d245e9bf325 100644 --- a/test/libsolidity/semanticTests/operators/shifts/shift_constant_left_assignment.sol +++ b/test/libsolidity/semanticTests/operators/shifts/shift_constant_left_assignment.sol @@ -4,8 +4,5 @@ contract C { a <<= 8; } } - -// ==== -// compileToEwasm: also // ---- // f() -> 0x4200 diff --git a/test/libsolidity/semanticTests/operators/shifts/shift_constant_right.sol b/test/libsolidity/semanticTests/operators/shifts/shift_constant_right.sol index c39407215537..64403475093a 100644 --- a/test/libsolidity/semanticTests/operators/shifts/shift_constant_right.sol +++ b/test/libsolidity/semanticTests/operators/shifts/shift_constant_right.sol @@ -1,7 +1,5 @@ contract C { uint256 public a = 0x4200 >> 8; } -// ==== -// compileToEwasm: also // ---- // a() -> 0x42 diff --git a/test/libsolidity/semanticTests/operators/shifts/shift_constant_right_assignment.sol b/test/libsolidity/semanticTests/operators/shifts/shift_constant_right_assignment.sol index 0a959aa11b0c..ded331a79491 100644 --- a/test/libsolidity/semanticTests/operators/shifts/shift_constant_right_assignment.sol +++ b/test/libsolidity/semanticTests/operators/shifts/shift_constant_right_assignment.sol @@ -4,8 +4,5 @@ contract C { a >>= 8; } } - -// ==== -// compileToEwasm: also // ---- // f() -> 0x42 diff --git a/test/libsolidity/semanticTests/operators/shifts/shift_left.sol b/test/libsolidity/semanticTests/operators/shifts/shift_left.sol index 058d233e906c..47afab5ec1f8 100644 --- a/test/libsolidity/semanticTests/operators/shifts/shift_left.sol +++ b/test/libsolidity/semanticTests/operators/shifts/shift_left.sol @@ -3,9 +3,6 @@ contract C { return a << b; } } - -// ==== -// compileToEwasm: also // ---- // f(uint256,uint256): 0x4266, 0x0 -> 0x4266 // f(uint256,uint256): 0x4266, 0x8 -> 0x426600 diff --git a/test/libsolidity/semanticTests/operators/shifts/shift_left_assignment.sol b/test/libsolidity/semanticTests/operators/shifts/shift_left_assignment.sol index 55883ddaef24..afa82c6f7920 100644 --- a/test/libsolidity/semanticTests/operators/shifts/shift_left_assignment.sol +++ b/test/libsolidity/semanticTests/operators/shifts/shift_left_assignment.sol @@ -4,9 +4,6 @@ contract C { return a; } } - -// ==== -// compileToEwasm: also // ---- // f(uint256,uint256): 0x4266, 0x0 -> 0x4266 // f(uint256,uint256): 0x4266, 0x8 -> 0x426600 diff --git a/test/libsolidity/semanticTests/operators/shifts/shift_left_assignment_different_type.sol b/test/libsolidity/semanticTests/operators/shifts/shift_left_assignment_different_type.sol index 2242d2a16836..44fd4a924a1b 100644 --- a/test/libsolidity/semanticTests/operators/shifts/shift_left_assignment_different_type.sol +++ b/test/libsolidity/semanticTests/operators/shifts/shift_left_assignment_different_type.sol @@ -4,9 +4,6 @@ contract C { return a; } } - -// ==== -// compileToEwasm: also // ---- // f(uint256,uint8): 0x4266, 0x0 -> 0x4266 // f(uint256,uint8): 0x4266, 0x8 -> 0x426600 diff --git a/test/libsolidity/semanticTests/operators/shifts/shift_left_larger_type.sol b/test/libsolidity/semanticTests/operators/shifts/shift_left_larger_type.sol index a1c3fc4cfca0..3d6d7c7e2b9c 100644 --- a/test/libsolidity/semanticTests/operators/shifts/shift_left_larger_type.sol +++ b/test/libsolidity/semanticTests/operators/shifts/shift_left_larger_type.sol @@ -6,7 +6,5 @@ contract C { return y << x; } } -// ==== -// compileToEwasm: also // ---- // f() -> 0 diff --git a/test/libsolidity/semanticTests/operators/shifts/shift_left_uint32.sol b/test/libsolidity/semanticTests/operators/shifts/shift_left_uint32.sol index 6a208e9fc0e7..d66e2f4cbf74 100644 --- a/test/libsolidity/semanticTests/operators/shifts/shift_left_uint32.sol +++ b/test/libsolidity/semanticTests/operators/shifts/shift_left_uint32.sol @@ -3,9 +3,6 @@ contract C { return a << b; } } - -// ==== -// compileToEwasm: also // ---- // f(uint32,uint32): 0x4266, 0x0 -> 0x4266 // f(uint32,uint32): 0x4266, 0x8 -> 0x426600 diff --git a/test/libsolidity/semanticTests/operators/shifts/shift_left_uint8.sol b/test/libsolidity/semanticTests/operators/shifts/shift_left_uint8.sol index f9517fb618c7..d6d6d77bb163 100644 --- a/test/libsolidity/semanticTests/operators/shifts/shift_left_uint8.sol +++ b/test/libsolidity/semanticTests/operators/shifts/shift_left_uint8.sol @@ -3,9 +3,6 @@ contract C { return a << b; } } - -// ==== -// compileToEwasm: also // ---- // f(uint8,uint8): 0x66, 0x0 -> 0x66 // f(uint8,uint8): 0x66, 0x8 -> 0 diff --git a/test/libsolidity/semanticTests/operators/shifts/shift_negative_constant_left.sol b/test/libsolidity/semanticTests/operators/shifts/shift_negative_constant_left.sol index e303e73eac8d..7671ce19de6e 100644 --- a/test/libsolidity/semanticTests/operators/shifts/shift_negative_constant_left.sol +++ b/test/libsolidity/semanticTests/operators/shifts/shift_negative_constant_left.sol @@ -1,7 +1,5 @@ contract C { int256 public a = -0x42 << 8; } -// ==== -// compileToEwasm: also // ---- // a() -> -16896 diff --git a/test/libsolidity/semanticTests/operators/shifts/shift_negative_constant_right.sol b/test/libsolidity/semanticTests/operators/shifts/shift_negative_constant_right.sol index 32ae16edcd8b..e9a76d2c94ba 100644 --- a/test/libsolidity/semanticTests/operators/shifts/shift_negative_constant_right.sol +++ b/test/libsolidity/semanticTests/operators/shifts/shift_negative_constant_right.sol @@ -1,7 +1,5 @@ contract C { int256 public a = -0x4200 >> 8; } -// ==== -// compileToEwasm: also // ---- // a() -> -66 diff --git a/test/libsolidity/semanticTests/operators/shifts/shift_overflow.sol b/test/libsolidity/semanticTests/operators/shifts/shift_overflow.sol index 3e63bc8eba51..5b0491b36728 100644 --- a/test/libsolidity/semanticTests/operators/shifts/shift_overflow.sol +++ b/test/libsolidity/semanticTests/operators/shifts/shift_overflow.sol @@ -7,9 +7,6 @@ contract C { return x << y; } } - -// ==== -// compileToEwasm: also // ---- // leftU(uint8,uint8): 255, 8 -> 0 // leftU(uint8,uint8): 255, 1 -> 254 diff --git a/test/libsolidity/semanticTests/operators/shifts/shift_right.sol b/test/libsolidity/semanticTests/operators/shifts/shift_right.sol index 97ca0a5c437e..4947b21d45a6 100644 --- a/test/libsolidity/semanticTests/operators/shifts/shift_right.sol +++ b/test/libsolidity/semanticTests/operators/shifts/shift_right.sol @@ -3,9 +3,6 @@ contract C { return a >> b; } } - -// ==== -// compileToEwasm: also // ---- // f(uint256,uint256): 0x4266, 0x0 -> 0x4266 // f(uint256,uint256): 0x4266, 0x8 -> 0x42 diff --git a/test/libsolidity/semanticTests/operators/shifts/shift_right_assignment.sol b/test/libsolidity/semanticTests/operators/shifts/shift_right_assignment.sol index b427210843e8..f9206b092f4b 100644 --- a/test/libsolidity/semanticTests/operators/shifts/shift_right_assignment.sol +++ b/test/libsolidity/semanticTests/operators/shifts/shift_right_assignment.sol @@ -4,9 +4,6 @@ contract C { return a; } } - -// ==== -// compileToEwasm: also // ---- // f(uint256,uint256): 0x4266, 0x0 -> 0x4266 // f(uint256,uint256): 0x4266, 0x8 -> 0x42 diff --git a/test/libsolidity/semanticTests/operators/shifts/shift_right_garbled_signed_v2.sol b/test/libsolidity/semanticTests/operators/shifts/shift_right_garbled_signed_v2.sol index c7fa354955c6..2b1afb52be25 100644 --- a/test/libsolidity/semanticTests/operators/shifts/shift_right_garbled_signed_v2.sol +++ b/test/libsolidity/semanticTests/operators/shifts/shift_right_garbled_signed_v2.sol @@ -18,8 +18,6 @@ contract C { return a >> b; } } -// ==== -// compileToEwasm: also // ---- // f(int8,uint8): 0x00, 0x03 -> 0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe // f(int8,uint8): 0x00, 0x04 -> 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff diff --git a/test/libsolidity/semanticTests/operators/shifts/shift_right_garbled_v2.sol b/test/libsolidity/semanticTests/operators/shifts/shift_right_garbled_v2.sol index ecb51e902a9a..8cf89f4b0039 100644 --- a/test/libsolidity/semanticTests/operators/shifts/shift_right_garbled_v2.sol +++ b/test/libsolidity/semanticTests/operators/shifts/shift_right_garbled_v2.sol @@ -10,8 +10,6 @@ contract C { return a >> b; } } -// ==== -// compileToEwasm: also // ---- // f(uint8,uint8): 0x00, 0x04 -> 0x0f // f(uint8,uint8): 0x00, 0x1004 -> FAILURE diff --git a/test/libsolidity/semanticTests/operators/shifts/shift_right_negative_literal.sol b/test/libsolidity/semanticTests/operators/shifts/shift_right_negative_literal.sol index 630f4905ea24..e24118afe130 100644 --- a/test/libsolidity/semanticTests/operators/shifts/shift_right_negative_literal.sol +++ b/test/libsolidity/semanticTests/operators/shifts/shift_right_negative_literal.sol @@ -47,9 +47,6 @@ contract C { return (-4267 >> 17) == -1; } } - -// ==== -// compileToEwasm: also // ---- // f1() -> true // f2() -> true diff --git a/test/libsolidity/semanticTests/operators/shifts/shift_right_negative_lvalue.sol b/test/libsolidity/semanticTests/operators/shifts/shift_right_negative_lvalue.sol index 6d2f7ae5823b..5dcde06f2bc1 100644 --- a/test/libsolidity/semanticTests/operators/shifts/shift_right_negative_lvalue.sol +++ b/test/libsolidity/semanticTests/operators/shifts/shift_right_negative_lvalue.sol @@ -3,9 +3,6 @@ contract C { return a >> b; } } - -// ==== -// compileToEwasm: also // ---- // f(int256,uint256): -4266, 0 -> -4266 // f(int256,uint256): -4266, 1 -> -2133 diff --git a/test/libsolidity/semanticTests/operators/shifts/shift_right_negative_lvalue_assignment.sol b/test/libsolidity/semanticTests/operators/shifts/shift_right_negative_lvalue_assignment.sol index 74b704f48ec0..00ac9662e829 100644 --- a/test/libsolidity/semanticTests/operators/shifts/shift_right_negative_lvalue_assignment.sol +++ b/test/libsolidity/semanticTests/operators/shifts/shift_right_negative_lvalue_assignment.sol @@ -4,9 +4,6 @@ contract C { return a; } } - -// ==== -// compileToEwasm: also // ---- // f(int256,uint256): -4266, 0 -> -4266 // f(int256,uint256): -4266, 1 -> -2133 diff --git a/test/libsolidity/semanticTests/operators/shifts/shift_right_negative_lvalue_int16.sol b/test/libsolidity/semanticTests/operators/shifts/shift_right_negative_lvalue_int16.sol index 533c93bc9212..50612a6f306d 100644 --- a/test/libsolidity/semanticTests/operators/shifts/shift_right_negative_lvalue_int16.sol +++ b/test/libsolidity/semanticTests/operators/shifts/shift_right_negative_lvalue_int16.sol @@ -3,9 +3,6 @@ contract C { return a >> b; } } - -// ==== -// compileToEwasm: also // ---- // f(int16,uint16): -4266, 0 -> -4266 // f(int16,uint16): -4266, 1 -> -2133 diff --git a/test/libsolidity/semanticTests/operators/shifts/shift_right_negative_lvalue_int32.sol b/test/libsolidity/semanticTests/operators/shifts/shift_right_negative_lvalue_int32.sol index 3dc12b2230a9..024eb3254624 100644 --- a/test/libsolidity/semanticTests/operators/shifts/shift_right_negative_lvalue_int32.sol +++ b/test/libsolidity/semanticTests/operators/shifts/shift_right_negative_lvalue_int32.sol @@ -3,9 +3,6 @@ contract C { return a >> b; } } - -// ==== -// compileToEwasm: also // ---- // f(int32,uint32): -4266, 0 -> -4266 // f(int32,uint32): -4266, 1 -> -2133 diff --git a/test/libsolidity/semanticTests/operators/shifts/shift_right_negative_lvalue_int8.sol b/test/libsolidity/semanticTests/operators/shifts/shift_right_negative_lvalue_int8.sol index f6dda7059775..9cff6c3b5249 100644 --- a/test/libsolidity/semanticTests/operators/shifts/shift_right_negative_lvalue_int8.sol +++ b/test/libsolidity/semanticTests/operators/shifts/shift_right_negative_lvalue_int8.sol @@ -3,9 +3,6 @@ contract C { return a >> b; } } - -// ==== -// compileToEwasm: also // ---- // f(int8,uint8): -66, 0 -> -66 // f(int8,uint8): -66, 1 -> -33 diff --git a/test/libsolidity/semanticTests/operators/shifts/shift_right_negative_lvalue_signextend_int16_v2.sol b/test/libsolidity/semanticTests/operators/shifts/shift_right_negative_lvalue_signextend_int16_v2.sol index d81e00fd52da..f2c024483015 100644 --- a/test/libsolidity/semanticTests/operators/shifts/shift_right_negative_lvalue_signextend_int16_v2.sol +++ b/test/libsolidity/semanticTests/operators/shifts/shift_right_negative_lvalue_signextend_int16_v2.sol @@ -6,8 +6,6 @@ contract C { return a >> b; } } -// ==== -// compileToEwasm: also // ---- // f(int16,uint16): 0xff99, 0x00 -> FAILURE // f(int16,uint16): 0xff99, 0x01 -> FAILURE diff --git a/test/libsolidity/semanticTests/operators/shifts/shift_right_negative_lvalue_signextend_int32_v2.sol b/test/libsolidity/semanticTests/operators/shifts/shift_right_negative_lvalue_signextend_int32_v2.sol index cac3a53b6c59..9c3090a783a9 100644 --- a/test/libsolidity/semanticTests/operators/shifts/shift_right_negative_lvalue_signextend_int32_v2.sol +++ b/test/libsolidity/semanticTests/operators/shifts/shift_right_negative_lvalue_signextend_int32_v2.sol @@ -6,8 +6,6 @@ contract C { return a >> b; } } -// ==== -// compileToEwasm: also // ---- // f(int32,uint32): 0xffffff99, 0x00 -> FAILURE // f(int32,uint32): 0xffffff99, 0x01 -> FAILURE diff --git a/test/libsolidity/semanticTests/operators/shifts/shift_right_negative_lvalue_signextend_int8_v2.sol b/test/libsolidity/semanticTests/operators/shifts/shift_right_negative_lvalue_signextend_int8_v2.sol index 0fe10c9379fc..8d3cec4e31e3 100644 --- a/test/libsolidity/semanticTests/operators/shifts/shift_right_negative_lvalue_signextend_int8_v2.sol +++ b/test/libsolidity/semanticTests/operators/shifts/shift_right_negative_lvalue_signextend_int8_v2.sol @@ -6,8 +6,6 @@ contract C { return a >> b; } } -// ==== -// compileToEwasm: also // ---- // f(int8,uint8): 0x99, 0x00 -> FAILURE // f(int8,uint8): 0x99, 0x01 -> FAILURE diff --git a/test/libsolidity/semanticTests/operators/shifts/shift_right_uint32.sol b/test/libsolidity/semanticTests/operators/shifts/shift_right_uint32.sol index a5d1ed51cf8a..2619ea334d51 100644 --- a/test/libsolidity/semanticTests/operators/shifts/shift_right_uint32.sol +++ b/test/libsolidity/semanticTests/operators/shifts/shift_right_uint32.sol @@ -3,9 +3,6 @@ contract C { return a >> b; } } - -// ==== -// compileToEwasm: also // ---- // f(uint32,uint32): 0x4266, 0x0 -> 0x4266 // f(uint32,uint32): 0x4266, 0x8 -> 0x42 diff --git a/test/libsolidity/semanticTests/operators/shifts/shift_right_uint8.sol b/test/libsolidity/semanticTests/operators/shifts/shift_right_uint8.sol index 7ac59b3fc6d8..1792d8755193 100644 --- a/test/libsolidity/semanticTests/operators/shifts/shift_right_uint8.sol +++ b/test/libsolidity/semanticTests/operators/shifts/shift_right_uint8.sol @@ -3,9 +3,6 @@ contract C { return a >> b; } } - -// ==== -// compileToEwasm: also // ---- // f(uint8,uint8): 0x66, 0x0 -> 0x66 // f(uint8,uint8): 0x66, 0x8 -> 0x0 diff --git a/test/libsolidity/semanticTests/operators/shifts/shift_underflow_negative_rvalue.sol b/test/libsolidity/semanticTests/operators/shifts/shift_underflow_negative_rvalue.sol index 111357e9ee81..6f4f95e919f3 100644 --- a/test/libsolidity/semanticTests/operators/shifts/shift_underflow_negative_rvalue.sol +++ b/test/libsolidity/semanticTests/operators/shifts/shift_underflow_negative_rvalue.sol @@ -7,9 +7,6 @@ contract C { return a >> b; } } - -// ==== -// compileToEwasm: also // ---- // f(int256,uint256): 1, -1 -> 0 // g(int256,uint256): 1, -1 -> 0 diff --git a/test/libsolidity/semanticTests/operators/userDefined/unchecked_operators.sol b/test/libsolidity/semanticTests/operators/userDefined/unchecked_operators.sol index 684ea1b433ad..9f3fd5d4e4d1 100644 --- a/test/libsolidity/semanticTests/operators/userDefined/unchecked_operators.sol +++ b/test/libsolidity/semanticTests/operators/userDefined/unchecked_operators.sol @@ -19,7 +19,6 @@ contract D { } } } - // ---- // testUncheckedOperator() -> 4 // testUncheckedOperatorInUncheckedBlock() -> 4 diff --git a/test/libsolidity/semanticTests/optimizer/shift_bytes.sol b/test/libsolidity/semanticTests/optimizer/shift_bytes.sol index 49d693a777de..6c7eef895cf6 100644 --- a/test/libsolidity/semanticTests/optimizer/shift_bytes.sol +++ b/test/libsolidity/semanticTests/optimizer/shift_bytes.sol @@ -37,8 +37,6 @@ contract C { return (x, y, z); } } -// ==== -// compileToEwasm: also // ---- // f(uint256): 0x0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f -> 0x1f, 0x1f, 3 // g(uint256): 0x0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f -> 1, 3, 5 diff --git a/test/libsolidity/semanticTests/payable/no_nonpayable_circumvention_by_modifier.sol b/test/libsolidity/semanticTests/payable/no_nonpayable_circumvention_by_modifier.sol index 4c6557cd7a6f..c36095914363 100644 --- a/test/libsolidity/semanticTests/payable/no_nonpayable_circumvention_by_modifier.sol +++ b/test/libsolidity/semanticTests/payable/no_nonpayable_circumvention_by_modifier.sol @@ -9,8 +9,6 @@ contract C { return msg.value; } } -// ==== -// compileToEwasm: also // ---- // f(), 27 wei -> FAILURE // balance -> 0 diff --git a/test/libsolidity/semanticTests/receive/empty_calldata_calls_receive.sol b/test/libsolidity/semanticTests/receive/empty_calldata_calls_receive.sol index 1be435ff689f..ce04cd73745b 100644 --- a/test/libsolidity/semanticTests/receive/empty_calldata_calls_receive.sol +++ b/test/libsolidity/semanticTests/receive/empty_calldata_calls_receive.sol @@ -2,8 +2,6 @@ contract A { uint public x; receive () external payable { ++x; } } -// ==== -// compileToEwasm: also // ---- // x() -> 0 // () diff --git a/test/libsolidity/semanticTests/receive/ether_and_data.sol b/test/libsolidity/semanticTests/receive/ether_and_data.sol index df3c89884b5a..4c48df8d47ad 100644 --- a/test/libsolidity/semanticTests/receive/ether_and_data.sol +++ b/test/libsolidity/semanticTests/receive/ether_and_data.sol @@ -1,8 +1,6 @@ contract C { receive () payable external { } } -// ==== -// compileToEwasm: also // ---- // (), 1 ether // (), 1 ether: 1 -> FAILURE diff --git a/test/libsolidity/semanticTests/receive/inherited.sol b/test/libsolidity/semanticTests/receive/inherited.sol index 9ca685399fbf..36273068ac9b 100644 --- a/test/libsolidity/semanticTests/receive/inherited.sol +++ b/test/libsolidity/semanticTests/receive/inherited.sol @@ -4,8 +4,6 @@ contract A { function getData() public returns (uint r) { return data; } } contract B is A {} -// ==== -// compileToEwasm: also // ---- // getData() -> 0 // () -> diff --git a/test/libsolidity/semanticTests/reverts/assert_require.sol b/test/libsolidity/semanticTests/reverts/assert_require.sol index ee60fc192cdd..bc4db3602c72 100644 --- a/test/libsolidity/semanticTests/reverts/assert_require.sol +++ b/test/libsolidity/semanticTests/reverts/assert_require.sol @@ -13,9 +13,6 @@ contract C { return true; } } - -// ==== -// compileToEwasm: also // ---- // f() -> FAILURE, hex"4e487b71", 0x01 // g(bool): false -> FAILURE, hex"4e487b71", 0x01 diff --git a/test/libsolidity/semanticTests/reverts/error_struct.sol b/test/libsolidity/semanticTests/reverts/error_struct.sol index 4ca57bd6eeaf..d6171a416a8c 100644 --- a/test/libsolidity/semanticTests/reverts/error_struct.sol +++ b/test/libsolidity/semanticTests/reverts/error_struct.sol @@ -10,8 +10,6 @@ contract C { return _struct.error; } } -// ==== -// compileToEwasm: also // ---- // f() -> FAILURE, hex"f8a8fd6d" // g(uint256): 7 -> 7 diff --git a/test/libsolidity/semanticTests/reverts/invalid_enum_as_external_arg.sol b/test/libsolidity/semanticTests/reverts/invalid_enum_as_external_arg.sol index 1e3e34cb1a9a..28c4e01f9955 100644 --- a/test/libsolidity/semanticTests/reverts/invalid_enum_as_external_arg.sol +++ b/test/libsolidity/semanticTests/reverts/invalid_enum_as_external_arg.sol @@ -17,6 +17,5 @@ contract C { } // ==== // EVMVersion: >=byzantium -// compileToEwasm: also // ---- // test() -> FAILURE, hex"4e487b71", 0x21 # should throw # diff --git a/test/libsolidity/semanticTests/reverts/invalid_enum_as_external_ret.sol b/test/libsolidity/semanticTests/reverts/invalid_enum_as_external_ret.sol index 987931fa7d26..7416d295fc7c 100644 --- a/test/libsolidity/semanticTests/reverts/invalid_enum_as_external_ret.sol +++ b/test/libsolidity/semanticTests/reverts/invalid_enum_as_external_ret.sol @@ -23,10 +23,8 @@ contract C { _ret = tmp; } } - // ==== // EVMVersion: >=byzantium -// compileToEwasm: also // ---- // test_return() -> FAILURE, hex"4e487b71", 33 # both should throw # // test_inline_assignment() -> FAILURE, hex"4e487b71", 33 diff --git a/test/libsolidity/semanticTests/reverts/invalid_enum_compared.sol b/test/libsolidity/semanticTests/reverts/invalid_enum_compared.sol index afdbd20b6721..527a4320235d 100644 --- a/test/libsolidity/semanticTests/reverts/invalid_enum_compared.sol +++ b/test/libsolidity/semanticTests/reverts/invalid_enum_compared.sol @@ -24,7 +24,6 @@ contract C { } // ==== // EVMVersion: >=byzantium -// compileToEwasm: also // ---- // test_eq_ok() -> 1 // test_eq() -> FAILURE, hex"4e487b71", 33 # both should throw # diff --git a/test/libsolidity/semanticTests/reverts/invalid_enum_stored.sol b/test/libsolidity/semanticTests/reverts/invalid_enum_stored.sol index fdf5e6bbb17c..8049a977e746 100644 --- a/test/libsolidity/semanticTests/reverts/invalid_enum_stored.sol +++ b/test/libsolidity/semanticTests/reverts/invalid_enum_stored.sol @@ -18,7 +18,6 @@ contract C { } // ==== // EVMVersion: >=byzantium -// compileToEwasm: also // ---- // test_store_ok() -> 1 // x() -> 0 diff --git a/test/libsolidity/semanticTests/reverts/invalid_instruction.sol b/test/libsolidity/semanticTests/reverts/invalid_instruction.sol index f4f64a11e5bb..69d9a0cd3605 100644 --- a/test/libsolidity/semanticTests/reverts/invalid_instruction.sol +++ b/test/libsolidity/semanticTests/reverts/invalid_instruction.sol @@ -5,8 +5,5 @@ contract C { } } } - -// ==== -// compileToEwasm: also // ---- // f() -> FAILURE diff --git a/test/libsolidity/semanticTests/reverts/revert.sol b/test/libsolidity/semanticTests/reverts/revert.sol index cac02076d551..2d733b4e7db2 100644 --- a/test/libsolidity/semanticTests/reverts/revert.sol +++ b/test/libsolidity/semanticTests/reverts/revert.sol @@ -13,9 +13,6 @@ contract C { } } } - -// ==== -// compileToEwasm: also // ---- // f() -> FAILURE // a() -> 42 diff --git a/test/libsolidity/semanticTests/reverts/revert_return_area.sol b/test/libsolidity/semanticTests/reverts/revert_return_area.sol index fa8156b3000b..8ab4ca22722c 100644 --- a/test/libsolidity/semanticTests/reverts/revert_return_area.sol +++ b/test/libsolidity/semanticTests/reverts/revert_return_area.sol @@ -12,7 +12,6 @@ contract C { } } } - // ==== // EVMVersion: >=byzantium // ---- diff --git a/test/libsolidity/semanticTests/reverts/simple_throw.sol b/test/libsolidity/semanticTests/reverts/simple_throw.sol index 0d43c97e96f3..1c1bfee0b377 100644 --- a/test/libsolidity/semanticTests/reverts/simple_throw.sol +++ b/test/libsolidity/semanticTests/reverts/simple_throw.sol @@ -5,9 +5,6 @@ contract Test { return 2; } } - -// ==== -// compileToEwasm: also // ---- // f(uint256): 11 -> 21 // f(uint256): 1 -> FAILURE diff --git a/test/libsolidity/semanticTests/smoke/basic.sol b/test/libsolidity/semanticTests/smoke/basic.sol index 81e8bd829cb4..8f05c4262598 100644 --- a/test/libsolidity/semanticTests/smoke/basic.sol +++ b/test/libsolidity/semanticTests/smoke/basic.sol @@ -28,8 +28,6 @@ contract C { return a * 7; } } -// ==== -// compileToEwasm: also // ---- // d() -> // e(), 1 wei -> 1 diff --git a/test/libsolidity/semanticTests/smoke/failure.sol b/test/libsolidity/semanticTests/smoke/failure.sol index eeb82a3ce4da..14cf1e627304 100644 --- a/test/libsolidity/semanticTests/smoke/failure.sol +++ b/test/libsolidity/semanticTests/smoke/failure.sol @@ -16,7 +16,6 @@ contract C { // ==== // EVMVersion: >homestead // allowNonExistingFunctions: true -// compileToEwasm: also // ---- // _() -> FAILURE // e() -> FAILURE, hex"08c379a0", 0x20, 0x13, "Transaction failed." diff --git a/test/libsolidity/semanticTests/smoke/fallback.sol b/test/libsolidity/semanticTests/smoke/fallback.sol index 5a4f89d8437e..b0e515db3210 100644 --- a/test/libsolidity/semanticTests/smoke/fallback.sol +++ b/test/libsolidity/semanticTests/smoke/fallback.sol @@ -8,8 +8,6 @@ contract A { externalData = msg.data; } } -// ==== -// compileToEwasm: also // ---- // data() -> 0 // () diff --git a/test/libsolidity/semanticTests/smoke/multiline.sol b/test/libsolidity/semanticTests/smoke/multiline.sol index 97fbd5b3bee1..624b19473d36 100644 --- a/test/libsolidity/semanticTests/smoke/multiline.sol +++ b/test/libsolidity/semanticTests/smoke/multiline.sol @@ -5,7 +5,6 @@ contract C { } // ==== // allowNonExistingFunctions: true -// compileToEwasm: also // ---- // f(uint256,uint256,uint256,uint256,uint256): 1, 1, 1, 1, 1 // -> 5 diff --git a/test/libsolidity/semanticTests/smoke/multiline_comments.sol b/test/libsolidity/semanticTests/smoke/multiline_comments.sol index cdfe43f5ec23..17de40fc4dab 100644 --- a/test/libsolidity/semanticTests/smoke/multiline_comments.sol +++ b/test/libsolidity/semanticTests/smoke/multiline_comments.sol @@ -3,8 +3,6 @@ contract C { return a + b + c + d + e; } } -// ==== -// compileToEwasm: also // ---- // f(uint256,uint256,uint256,uint256,uint256): 1, 1, 1, 1, 1 // # A comment on the function parameters. # diff --git a/test/libsolidity/semanticTests/smoke/structs.sol b/test/libsolidity/semanticTests/smoke/structs.sol index 813d6954c0f2..d6df382c95b1 100644 --- a/test/libsolidity/semanticTests/smoke/structs.sol +++ b/test/libsolidity/semanticTests/smoke/structs.sol @@ -17,8 +17,6 @@ contract C { return T(23, 42, "any"); } } -// ==== -// compileToEwasm: also // ---- // s() -> 23, 42 // t() -> 0x20, 23, 42, 0x60, 3, "any" diff --git a/test/libsolidity/semanticTests/specialFunctions/abi_encode_with_signature_from_string.sol b/test/libsolidity/semanticTests/specialFunctions/abi_encode_with_signature_from_string.sol index f38eee42973c..80f734a31a1c 100644 --- a/test/libsolidity/semanticTests/specialFunctions/abi_encode_with_signature_from_string.sol +++ b/test/libsolidity/semanticTests/specialFunctions/abi_encode_with_signature_from_string.sol @@ -8,7 +8,5 @@ contract C { assert(r1[i] == r2[i]); } } -// ==== -// compileToEwasm: false // ---- // f() -> 0x40, 0xa0, 0x24, -813742827273327954027712588510533233455028711326166692885570228492575965184, 26959946667150639794667015087019630673637144422540572481103610249216, 0x24, -813742827273327954027712588510533233455028711326166692885570228492575965184, 26959946667150639794667015087019630673637144422540572481103610249216 diff --git a/test/libsolidity/semanticTests/specialFunctions/abi_functions_member_access.sol b/test/libsolidity/semanticTests/specialFunctions/abi_functions_member_access.sol index 4c46d1ea00d8..b255b1880b0e 100644 --- a/test/libsolidity/semanticTests/specialFunctions/abi_functions_member_access.sol +++ b/test/libsolidity/semanticTests/specialFunctions/abi_functions_member_access.sol @@ -7,7 +7,5 @@ contract C { abi.decode; } } -// ==== -// compileToEwasm: also // ---- // f() -> diff --git a/test/libsolidity/semanticTests/state/block_coinbase.sol b/test/libsolidity/semanticTests/state/block_coinbase.sol index 5087fe732369..e7aae2fc739a 100644 --- a/test/libsolidity/semanticTests/state/block_coinbase.sol +++ b/test/libsolidity/semanticTests/state/block_coinbase.sol @@ -3,8 +3,6 @@ contract C { return block.coinbase; } } -// ==== -// compileToEwasm: also // ---- // f() -> 0x7878787878787878787878787878787878787878 // f() -> 0x7878787878787878787878787878787878787878 diff --git a/test/libsolidity/semanticTests/state/block_difficulty.sol b/test/libsolidity/semanticTests/state/block_difficulty.sol index 4f6a6b08ff46..921200ddf26a 100644 --- a/test/libsolidity/semanticTests/state/block_difficulty.sol +++ b/test/libsolidity/semanticTests/state/block_difficulty.sol @@ -4,7 +4,6 @@ contract C { } } // ==== -// compileToEwasm: also // EVMVersion: 200000000 diff --git a/test/libsolidity/semanticTests/state/block_difficulty_post_paris.sol b/test/libsolidity/semanticTests/state/block_difficulty_post_paris.sol index 9fb467e6f5f1..226a8bbb8b4b 100644 --- a/test/libsolidity/semanticTests/state/block_difficulty_post_paris.sol +++ b/test/libsolidity/semanticTests/state/block_difficulty_post_paris.sol @@ -4,7 +4,6 @@ contract C { } } // ==== -// compileToEwasm: also // EVMVersion: >=paris // ---- // f() -> 0xa86c2e601b6c44eb4848f7d23d9df3113fbcac42041c49cbed5000cb4f118777 diff --git a/test/libsolidity/semanticTests/state/block_gaslimit.sol b/test/libsolidity/semanticTests/state/block_gaslimit.sol index 3ccc37543cb5..0201068b630b 100644 --- a/test/libsolidity/semanticTests/state/block_gaslimit.sol +++ b/test/libsolidity/semanticTests/state/block_gaslimit.sol @@ -3,8 +3,6 @@ contract C { return block.gaslimit; } } -// ==== -// compileToEwasm: also // ---- // f() -> 20000000 // f() -> 20000000 diff --git a/test/libsolidity/semanticTests/state/block_number.sol b/test/libsolidity/semanticTests/state/block_number.sol index a55c2a3cac22..01ec30966a3d 100644 --- a/test/libsolidity/semanticTests/state/block_number.sol +++ b/test/libsolidity/semanticTests/state/block_number.sol @@ -4,8 +4,6 @@ contract C { return block.number; } } -// ==== -// compileToEwasm: also // ---- // constructor() // f() -> 2 diff --git a/test/libsolidity/semanticTests/state/block_prevrandao.sol b/test/libsolidity/semanticTests/state/block_prevrandao.sol index 24d5f2af6350..590265da9fcd 100644 --- a/test/libsolidity/semanticTests/state/block_prevrandao.sol +++ b/test/libsolidity/semanticTests/state/block_prevrandao.sol @@ -4,7 +4,6 @@ contract C { } } // ==== -// compileToEwasm: also // EVMVersion: >=paris // ---- // f() -> 0xa86c2e601b6c44eb4848f7d23d9df3113fbcac42041c49cbed5000cb4f118777 diff --git a/test/libsolidity/semanticTests/state/block_prevrandao_pre_paris.sol b/test/libsolidity/semanticTests/state/block_prevrandao_pre_paris.sol index efc4d226f51d..6824cab5caff 100644 --- a/test/libsolidity/semanticTests/state/block_prevrandao_pre_paris.sol +++ b/test/libsolidity/semanticTests/state/block_prevrandao_pre_paris.sol @@ -4,7 +4,6 @@ contract C { } } // ==== -// compileToEwasm: also // EVMVersion: 200000000 diff --git a/test/libsolidity/semanticTests/state/block_timestamp.sol b/test/libsolidity/semanticTests/state/block_timestamp.sol index 84cfe3b9f461..485ae4be32cc 100644 --- a/test/libsolidity/semanticTests/state/block_timestamp.sol +++ b/test/libsolidity/semanticTests/state/block_timestamp.sol @@ -4,8 +4,6 @@ contract C { return block.timestamp; } } -// ==== -// compileToEwasm: also // ---- // constructor() # This is the 1st block # // f() -> 0x1e # This is the 2nd block (each block is "15 seconds") # diff --git a/test/libsolidity/semanticTests/state/gasleft.sol b/test/libsolidity/semanticTests/state/gasleft.sol index 9f50ef46dc3c..6ce623ce81ea 100644 --- a/test/libsolidity/semanticTests/state/gasleft.sol +++ b/test/libsolidity/semanticTests/state/gasleft.sol @@ -3,8 +3,6 @@ contract C { return gasleft() > 0; } } -// ==== -// compileToEwasm: also // ---- // f() -> true // f() -> true diff --git a/test/libsolidity/semanticTests/state/msg_sender.sol b/test/libsolidity/semanticTests/state/msg_sender.sol index eda4e5a059d0..951d1f529201 100644 --- a/test/libsolidity/semanticTests/state/msg_sender.sol +++ b/test/libsolidity/semanticTests/state/msg_sender.sol @@ -3,7 +3,5 @@ contract C { return msg.sender; } } -// ==== -// compileToEwasm: also // ---- // f() -> 0x1212121212121212121212121212120000000012 diff --git a/test/libsolidity/semanticTests/state/msg_sig.sol b/test/libsolidity/semanticTests/state/msg_sig.sol index 858ee98539ef..f2f26e24567f 100644 --- a/test/libsolidity/semanticTests/state/msg_sig.sol +++ b/test/libsolidity/semanticTests/state/msg_sig.sol @@ -6,8 +6,6 @@ contract C { return msg.sig; } } -// ==== -// compileToEwasm: also // ---- // f() -> 0x26121ff000000000000000000000000000000000000000000000000000000000 // g() -> 0xe2179b8e00000000000000000000000000000000000000000000000000000000 diff --git a/test/libsolidity/semanticTests/state/msg_value.sol b/test/libsolidity/semanticTests/state/msg_value.sol index 2d14d1d7b8a4..143183b865a3 100644 --- a/test/libsolidity/semanticTests/state/msg_value.sol +++ b/test/libsolidity/semanticTests/state/msg_value.sol @@ -3,8 +3,6 @@ contract C { return msg.value; } } -// ==== -// compileToEwasm: also // ---- // f() -> 0 // f(), 12 ether -> 12000000000000000000 diff --git a/test/libsolidity/semanticTests/state/tx_gasprice.sol b/test/libsolidity/semanticTests/state/tx_gasprice.sol index 59ddfbe5cfe4..0d6dc6ae9c42 100644 --- a/test/libsolidity/semanticTests/state/tx_gasprice.sol +++ b/test/libsolidity/semanticTests/state/tx_gasprice.sol @@ -3,8 +3,6 @@ contract C { return tx.gasprice; } } -// ==== -// compileToEwasm: also // ---- // f() -> 3000000000 // f() -> 3000000000 diff --git a/test/libsolidity/semanticTests/state/tx_origin.sol b/test/libsolidity/semanticTests/state/tx_origin.sol index 838353824384..aa726c355262 100644 --- a/test/libsolidity/semanticTests/state/tx_origin.sol +++ b/test/libsolidity/semanticTests/state/tx_origin.sol @@ -3,8 +3,6 @@ contract C { return tx.origin; } } -// ==== -// compileToEwasm: also // ---- // f() -> 0x9292929292929292929292929292929292929292 // f() -> 0x9292929292929292929292929292929292929292 diff --git a/test/libsolidity/semanticTests/state/uncalled_blockhash.sol b/test/libsolidity/semanticTests/state/uncalled_blockhash.sol index 02c55c7d332b..4e2526c72846 100644 --- a/test/libsolidity/semanticTests/state/uncalled_blockhash.sol +++ b/test/libsolidity/semanticTests/state/uncalled_blockhash.sol @@ -3,7 +3,5 @@ contract C { return (blockhash)(block.number - 1); } } -// ==== -// compileToEwasm: also // ---- // f() -> 0x3737373737373737373737373737373737373737373737373737373737373738 diff --git a/test/libsolidity/semanticTests/state_var_initialization.sol b/test/libsolidity/semanticTests/state_var_initialization.sol index 93b22bfa9137..a8b0f108a868 100644 --- a/test/libsolidity/semanticTests/state_var_initialization.sol +++ b/test/libsolidity/semanticTests/state_var_initialization.sol @@ -7,8 +7,6 @@ contract C { k = k - i; } } -// ==== -// compileToEwasm: also // ---- // i() -> 2 // k() -> 0 diff --git a/test/libsolidity/semanticTests/state_variables_init_order.sol b/test/libsolidity/semanticTests/state_variables_init_order.sol index b6ac20cd0e27..6f8a59c14d37 100644 --- a/test/libsolidity/semanticTests/state_variables_init_order.sol +++ b/test/libsolidity/semanticTests/state_variables_init_order.sol @@ -8,7 +8,5 @@ contract A { } contract B is A { } -// ==== -// compileToEwasm: also // ---- // x() -> 1 diff --git a/test/libsolidity/semanticTests/state_variables_init_order_2.sol b/test/libsolidity/semanticTests/state_variables_init_order_2.sol index 95c0b420077a..9003898e6129 100644 --- a/test/libsolidity/semanticTests/state_variables_init_order_2.sol +++ b/test/libsolidity/semanticTests/state_variables_init_order_2.sol @@ -12,7 +12,5 @@ contract B is A { z = x; } } -// ==== -// compileToEwasm: also // ---- // z() -> 1 diff --git a/test/libsolidity/semanticTests/statements/do_while_loop_continue.sol b/test/libsolidity/semanticTests/statements/do_while_loop_continue.sol index 761cc76bda2b..76f2bc4ae6e4 100644 --- a/test/libsolidity/semanticTests/statements/do_while_loop_continue.sol +++ b/test/libsolidity/semanticTests/statements/do_while_loop_continue.sol @@ -10,7 +10,5 @@ contract test { return 42; } } -// ==== -// compileToEwasm: also // ---- // f() -> 42 diff --git a/test/libsolidity/semanticTests/storage/packed_functions.sol b/test/libsolidity/semanticTests/storage/packed_functions.sol index 4a49a614f3b5..564a3fabf355 100644 --- a/test/libsolidity/semanticTests/storage/packed_functions.sol +++ b/test/libsolidity/semanticTests/storage/packed_functions.sol @@ -38,7 +38,6 @@ contract C { return 8; } } - // ---- // set() -> // t1() -> 7 diff --git a/test/libsolidity/semanticTests/storage/packed_storage_overflow.sol b/test/libsolidity/semanticTests/storage/packed_storage_overflow.sol index c10931f99ddb..af2ecc70c9d5 100644 --- a/test/libsolidity/semanticTests/storage/packed_storage_overflow.sol +++ b/test/libsolidity/semanticTests/storage/packed_storage_overflow.sol @@ -11,7 +11,5 @@ contract C { return (x, c, b, a); } } -// ==== -// compileToEwasm: also // ---- // f() -> 0x1234, 0x0, 0x0, 0xfffe diff --git a/test/libsolidity/semanticTests/storage/packed_storage_signed.sol b/test/libsolidity/semanticTests/storage/packed_storage_signed.sol index b457d0731b68..92cb82c90c6f 100644 --- a/test/libsolidity/semanticTests/storage/packed_storage_signed.sol +++ b/test/libsolidity/semanticTests/storage/packed_storage_signed.sol @@ -19,8 +19,5 @@ contract C { x4 = d; } } - -// ==== -// compileToEwasm: also // ---- // test() -> -2, 4, -112, 0 diff --git a/test/libsolidity/semanticTests/storage/packed_storage_structs_bytes.sol b/test/libsolidity/semanticTests/storage/packed_storage_structs_bytes.sol index a3131d564f2a..b1686d90748d 100644 --- a/test/libsolidity/semanticTests/storage/packed_storage_structs_bytes.sol +++ b/test/libsolidity/semanticTests/storage/packed_storage_structs_bytes.sol @@ -40,9 +40,6 @@ contract C { y == 0x07; } } - -// ==== -// compileToEwasm: also // ---- // test() -> true // gas irOptimized: 132505 diff --git a/test/libsolidity/semanticTests/storage/packed_storage_structs_enum.sol b/test/libsolidity/semanticTests/storage/packed_storage_structs_enum.sol index d9e897762d1f..cda71d33da9f 100644 --- a/test/libsolidity/semanticTests/storage/packed_storage_structs_enum.sol +++ b/test/libsolidity/semanticTests/storage/packed_storage_structs_enum.sol @@ -28,8 +28,5 @@ contract C { return 1; } } - -// ==== -// compileToEwasm: also // ---- // test() -> 1 diff --git a/test/libsolidity/semanticTests/storage/packed_storage_structs_uint.sol b/test/libsolidity/semanticTests/storage/packed_storage_structs_uint.sol index d01f07268534..ea3c03d64426 100644 --- a/test/libsolidity/semanticTests/storage/packed_storage_structs_uint.sol +++ b/test/libsolidity/semanticTests/storage/packed_storage_structs_uint.sol @@ -25,8 +25,5 @@ contract C { return 1; } } - -// ==== -// compileToEwasm: also // ---- // test() -> 1 diff --git a/test/libsolidity/semanticTests/storage/simple_accessor.sol b/test/libsolidity/semanticTests/storage/simple_accessor.sol index 72398d9abba5..7aaeb4dbb98c 100644 --- a/test/libsolidity/semanticTests/storage/simple_accessor.sol +++ b/test/libsolidity/semanticTests/storage/simple_accessor.sol @@ -4,7 +4,5 @@ contract test { data = 8; } } -// ==== -// compileToEwasm: also // ---- // data() -> 8 diff --git a/test/libsolidity/semanticTests/storage/state_smoke_test.sol b/test/libsolidity/semanticTests/storage/state_smoke_test.sol index 0bcdd1ad396d..1b464531b523 100644 --- a/test/libsolidity/semanticTests/storage/state_smoke_test.sol +++ b/test/libsolidity/semanticTests/storage/state_smoke_test.sol @@ -10,8 +10,6 @@ contract test { else value2 = value; } } -// ==== -// compileToEwasm: also // ---- // get(uint8): 0x00 -> 0 // get(uint8): 0x01 -> 0 diff --git a/test/libsolidity/semanticTests/strings/concat/string_concat_empty_argument_list.sol b/test/libsolidity/semanticTests/strings/concat/string_concat_empty_argument_list.sol index b5db79e8f245..0297bd26f125 100644 --- a/test/libsolidity/semanticTests/strings/concat/string_concat_empty_argument_list.sol +++ b/test/libsolidity/semanticTests/strings/concat/string_concat_empty_argument_list.sol @@ -3,7 +3,5 @@ contract C { return string.concat(); } } -// ==== -// compileToEwasm: also // ---- // f() -> 0x20, 0 diff --git a/test/libsolidity/semanticTests/strings/concat/string_concat_empty_strings.sol b/test/libsolidity/semanticTests/strings/concat/string_concat_empty_strings.sol index f452c3b3524e..b90235b3f83f 100644 --- a/test/libsolidity/semanticTests/strings/concat/string_concat_empty_strings.sol +++ b/test/libsolidity/semanticTests/strings/concat/string_concat_empty_strings.sol @@ -18,8 +18,6 @@ contract C { return string.concat(b, "abc", b, "abc", b); } } -// ==== -// compileToEwasm: also // ---- // f() -> 0x20, 0 // g() -> 0x20, 6, "abcabc" diff --git a/test/libsolidity/semanticTests/strings/empty_string.sol b/test/libsolidity/semanticTests/strings/empty_string.sol index d1a6fc5849e8..f023c7236913 100644 --- a/test/libsolidity/semanticTests/strings/empty_string.sol +++ b/test/libsolidity/semanticTests/strings/empty_string.sol @@ -3,7 +3,5 @@ contract C { return ""; } } -// ==== -// compileToEwasm: also // ---- // f() -> 0x20, 0 diff --git a/test/libsolidity/semanticTests/strings/return_string.sol b/test/libsolidity/semanticTests/strings/return_string.sol index 4393d7dcc788..704a7859cdd5 100644 --- a/test/libsolidity/semanticTests/strings/return_string.sol +++ b/test/libsolidity/semanticTests/strings/return_string.sol @@ -10,8 +10,6 @@ contract Main { r = s; } } -// ==== -// compileToEwasm: also // ---- // set(string): 0x20, 5, "Julia" -> // get1() -> 0x20, 5, "Julia" diff --git a/test/libsolidity/semanticTests/strings/string_escapes.sol b/test/libsolidity/semanticTests/strings/string_escapes.sol index 3ccae698f065..ea178d645e47 100644 --- a/test/libsolidity/semanticTests/strings/string_escapes.sol +++ b/test/libsolidity/semanticTests/strings/string_escapes.sol @@ -4,7 +4,5 @@ contract test { return escapeCharacters; } } -// ==== -// compileToEwasm: also // ---- // f() -> 0x090a0d27225c0000000000000000000000000000000000000000000000000000 diff --git a/test/libsolidity/semanticTests/strings/unicode_escapes.sol b/test/libsolidity/semanticTests/strings/unicode_escapes.sol index 95c322f5b28f..401d8b61e4ec 100644 --- a/test/libsolidity/semanticTests/strings/unicode_escapes.sol +++ b/test/libsolidity/semanticTests/strings/unicode_escapes.sol @@ -15,8 +15,6 @@ contract C { return "\u0024\u00A2\u20AC"; } } -// ==== -// compileToEwasm: also // ---- // oneByteUTF8() -> 0x20, 7, "aaa$aaa" // twoBytesUTF8() -> 0x20, 8, "aaa\xc2\xa2aaa" diff --git a/test/libsolidity/semanticTests/strings/unicode_string.sol b/test/libsolidity/semanticTests/strings/unicode_string.sol index 516febe6ed55..e06556fb5466 100644 --- a/test/libsolidity/semanticTests/strings/unicode_string.sol +++ b/test/libsolidity/semanticTests/strings/unicode_string.sol @@ -7,8 +7,6 @@ contract C { and 😈"; } } -// ==== -// compileToEwasm: also // ---- // f() -> 0x20, 0x14, "\xf0\x9f\x98\x83, \xf0\x9f\x98\xad, and \xf0\x9f\x98\x88" // g() -> 0x20, 0x14, "\xf0\x9f\x98\x83, \xf0\x9f\x98\xad, and \xf0\x9f\x98\x88" diff --git a/test/libsolidity/semanticTests/structs/array_of_recursive_struct.sol b/test/libsolidity/semanticTests/structs/array_of_recursive_struct.sol index f62f4c084528..f5f53cc40d06 100644 --- a/test/libsolidity/semanticTests/structs/array_of_recursive_struct.sol +++ b/test/libsolidity/semanticTests/structs/array_of_recursive_struct.sol @@ -8,7 +8,5 @@ contract Test { assert(val[0].vals.length == 42); } } -// ==== -// compileToEwasm: also // ---- // func() -> diff --git a/test/libsolidity/semanticTests/structs/calldata/calldata_struct.sol b/test/libsolidity/semanticTests/structs/calldata/calldata_struct.sol index ca635aeb4351..418f9e93a8f6 100644 --- a/test/libsolidity/semanticTests/structs/calldata/calldata_struct.sol +++ b/test/libsolidity/semanticTests/structs/calldata/calldata_struct.sol @@ -12,8 +12,5 @@ contract C { b = s.b; } } - -// ==== -// compileToEwasm: also // ---- // f((uint256,uint256)): 42, 23 -> 42, 23 diff --git a/test/libsolidity/semanticTests/structs/calldata/calldata_struct_and_ints.sol b/test/libsolidity/semanticTests/structs/calldata/calldata_struct_and_ints.sol index 144df2d61688..5bdd1b42fb94 100644 --- a/test/libsolidity/semanticTests/structs/calldata/calldata_struct_and_ints.sol +++ b/test/libsolidity/semanticTests/structs/calldata/calldata_struct_and_ints.sol @@ -15,6 +15,5 @@ contract C { return (a, s.a, s.b, b); } } - // ---- // f(uint256,(uint256,uint256),uint256): 1, 2, 3, 4 -> 1, 2, 3, 4 diff --git a/test/libsolidity/semanticTests/structs/calldata/calldata_struct_array_member_dynamic.sol b/test/libsolidity/semanticTests/structs/calldata/calldata_struct_array_member_dynamic.sol index e6972e03f34b..14f770a35070 100644 --- a/test/libsolidity/semanticTests/structs/calldata/calldata_struct_array_member_dynamic.sol +++ b/test/libsolidity/semanticTests/structs/calldata/calldata_struct_array_member_dynamic.sol @@ -18,7 +18,5 @@ contract C { c = s.c; } } -// ==== -// compileToEwasm: also // ---- // f((uint32,uint256[],uint64)): 0x20, 42, 0x60, 23, 2, 1, 2 -> 42, 1, 2, 23 diff --git a/test/libsolidity/semanticTests/structs/calldata/calldata_struct_to_memory.sol b/test/libsolidity/semanticTests/structs/calldata/calldata_struct_to_memory.sol index 76e6f7c1d880..3aeb0dcbca27 100644 --- a/test/libsolidity/semanticTests/structs/calldata/calldata_struct_to_memory.sol +++ b/test/libsolidity/semanticTests/structs/calldata/calldata_struct_to_memory.sol @@ -12,8 +12,5 @@ contract C { return (m.a, m.b, m.c[1]); } } - -// ==== -// compileToEwasm: also // ---- // f((uint256,uint256,bytes2)): 42, 23, "ab" -> 42, 23, "b" diff --git a/test/libsolidity/semanticTests/structs/calldata/calldata_struct_to_storage.sol b/test/libsolidity/semanticTests/structs/calldata/calldata_struct_to_storage.sol index 74d30f5052e3..6b56a73c2ca8 100644 --- a/test/libsolidity/semanticTests/structs/calldata/calldata_struct_to_storage.sol +++ b/test/libsolidity/semanticTests/structs/calldata/calldata_struct_to_storage.sol @@ -15,8 +15,5 @@ contract C { return (s.a, s.b, s.c[1]); } } - -// ==== -// compileToEwasm: also // ---- // f(uint32,(uint256,uint64,bytes2),uint256): 1, 42, 23, "ab", 1 -> 42, 23, "b" diff --git a/test/libsolidity/semanticTests/structs/calldata/calldata_struct_with_array_to_memory.sol b/test/libsolidity/semanticTests/structs/calldata/calldata_struct_with_array_to_memory.sol index 7ae085dbb5b3..b7b3058b4259 100644 --- a/test/libsolidity/semanticTests/structs/calldata/calldata_struct_with_array_to_memory.sol +++ b/test/libsolidity/semanticTests/structs/calldata/calldata_struct_with_array_to_memory.sol @@ -16,6 +16,5 @@ contract C { return (m.a, m.b[0], m.b[1], m.c); } } - // ---- // f((uint256,uint256[2],uint256)): 42, 1, 2, 23 -> 42, 1, 2, 23 diff --git a/test/libsolidity/semanticTests/structs/calldata/calldata_struct_with_bytes_to_memory.sol b/test/libsolidity/semanticTests/structs/calldata/calldata_struct_with_bytes_to_memory.sol index 0adc4c5a7be6..3fa7a33fda6e 100644 --- a/test/libsolidity/semanticTests/structs/calldata/calldata_struct_with_bytes_to_memory.sol +++ b/test/libsolidity/semanticTests/structs/calldata/calldata_struct_with_bytes_to_memory.sol @@ -16,6 +16,5 @@ contract C { return (m.a, m.b[0], m.b[1], m.c); } } - // ---- // f((uint256,bytes,uint256)): 0x20, 42, 0x60, 23, 2, "ab" -> 42, "a", "b", 23 diff --git a/test/libsolidity/semanticTests/structs/calldata/calldata_structs.sol b/test/libsolidity/semanticTests/structs/calldata/calldata_structs.sol index 6092b161d926..b73077131295 100644 --- a/test/libsolidity/semanticTests/structs/calldata/calldata_structs.sol +++ b/test/libsolidity/semanticTests/structs/calldata/calldata_structs.sol @@ -22,8 +22,5 @@ contract C { e = s3.b; } } - -// ==== -// compileToEwasm: also // ---- // f((uint256,uint256),(uint256),(uint256,uint256)): 1, 2, 3, 4, 5 -> 1, 2, 3, 4, 5 diff --git a/test/libsolidity/semanticTests/structs/calldata/dynamic_nested.sol b/test/libsolidity/semanticTests/structs/calldata/dynamic_nested.sol index 2b7544139403..633c4c7b321f 100644 --- a/test/libsolidity/semanticTests/structs/calldata/dynamic_nested.sol +++ b/test/libsolidity/semanticTests/structs/calldata/dynamic_nested.sol @@ -7,7 +7,5 @@ contract C { return (s.children.length, s.a, s.children[0].b, s.children[1].b); } } -// ==== -// compileToEwasm: also // ---- // f((uint256,(uint256)[])): 32, 17, 64, 2, 23, 42 -> 2, 17, 23, 42 diff --git a/test/libsolidity/semanticTests/structs/calldata/dynamically_encoded.sol b/test/libsolidity/semanticTests/structs/calldata/dynamically_encoded.sol index b4beff94169d..0dfa2cea3f53 100644 --- a/test/libsolidity/semanticTests/structs/calldata/dynamically_encoded.sol +++ b/test/libsolidity/semanticTests/structs/calldata/dynamically_encoded.sol @@ -6,7 +6,5 @@ contract C { return (s.a.length, s.a[0], s.a[1]); } } -// ==== -// compileToEwasm: also // ---- // f((uint256[])): 32, 32, 2, 42, 23 -> 2, 42, 23 diff --git a/test/libsolidity/semanticTests/structs/copy_from_mapping.sol b/test/libsolidity/semanticTests/structs/copy_from_mapping.sol index 9aa41a34255b..df118de3231d 100644 --- a/test/libsolidity/semanticTests/structs/copy_from_mapping.sol +++ b/test/libsolidity/semanticTests/structs/copy_from_mapping.sol @@ -34,7 +34,6 @@ contract C { } } - // ---- // to_state() -> 0x20, 0x60, 0xa0, 7, 3, 0x666F6F0000000000000000000000000000000000000000000000000000000000, 2, 13, 14 // gas irOptimized: 121497 diff --git a/test/libsolidity/semanticTests/structs/copy_struct_with_nested_array_from_calldata_to_memory.sol b/test/libsolidity/semanticTests/structs/copy_struct_with_nested_array_from_calldata_to_memory.sol index 8ccc30936e8f..6c22c71da8c8 100644 --- a/test/libsolidity/semanticTests/structs/copy_struct_with_nested_array_from_calldata_to_memory.sol +++ b/test/libsolidity/semanticTests/structs/copy_struct_with_nested_array_from_calldata_to_memory.sol @@ -10,7 +10,6 @@ contract C { return s; } } - // ---- // test((uint8[1],uint8[])): 0x20, 3, 0x40, 2, 7, 11 -> 0x20, 3, 0x40, 2, 7, 11 // test((uint8[1],uint8[])): 0x20, 3, 0x40, 3, 17, 19, 23 -> 0x20, 3, 0x40, 3, 17, 19, 23 diff --git a/test/libsolidity/semanticTests/structs/copy_struct_with_nested_array_from_calldata_to_storage.sol b/test/libsolidity/semanticTests/structs/copy_struct_with_nested_array_from_calldata_to_storage.sol index fa67deb2c0d1..dcf2a3a27720 100644 --- a/test/libsolidity/semanticTests/structs/copy_struct_with_nested_array_from_calldata_to_storage.sol +++ b/test/libsolidity/semanticTests/structs/copy_struct_with_nested_array_from_calldata_to_storage.sol @@ -17,6 +17,5 @@ contract C { require(s.y[1] == 11); } } - // ---- // test((uint8[1],uint8[])): 0x20, 3, 0x40, 2, 7, 11 diff --git a/test/libsolidity/semanticTests/structs/copy_struct_with_nested_array_from_memory_to_memory.sol b/test/libsolidity/semanticTests/structs/copy_struct_with_nested_array_from_memory_to_memory.sol index c340289adf44..3d132641f4f9 100644 --- a/test/libsolidity/semanticTests/structs/copy_struct_with_nested_array_from_memory_to_memory.sol +++ b/test/libsolidity/semanticTests/structs/copy_struct_with_nested_array_from_memory_to_memory.sol @@ -10,7 +10,6 @@ contract C { return r; } } - // ---- // test((uint8[1],uint8[])): 0x20, 3, 0x40, 2, 7, 11 -> 0x20, 0, 0x40, 0 // test((uint8[1],uint8[])): 0x20, 3, 0x40, 3, 17, 19, 23 -> 0x20, 0, 0x40, 0 diff --git a/test/libsolidity/semanticTests/structs/copy_struct_with_nested_array_from_storage_to_storage.sol b/test/libsolidity/semanticTests/structs/copy_struct_with_nested_array_from_storage_to_storage.sol index 3f29790d8356..880b7433dd2d 100644 --- a/test/libsolidity/semanticTests/structs/copy_struct_with_nested_array_from_storage_to_storage.sol +++ b/test/libsolidity/semanticTests/structs/copy_struct_with_nested_array_from_storage_to_storage.sol @@ -22,6 +22,5 @@ contract C { require(dst.y[1] == 11); } } - // ---- // test() diff --git a/test/libsolidity/semanticTests/structs/copy_substructures_from_mapping.sol b/test/libsolidity/semanticTests/structs/copy_substructures_from_mapping.sol index 29618bb044b6..66954a7f5c16 100644 --- a/test/libsolidity/semanticTests/structs/copy_substructures_from_mapping.sol +++ b/test/libsolidity/semanticTests/structs/copy_substructures_from_mapping.sol @@ -42,7 +42,6 @@ contract C { } } - // ---- // to_state() -> 0x20, 0x60, 0xa0, 7, 3, 0x666F6F0000000000000000000000000000000000000000000000000000000000, 2, 13, 14 // gas irOptimized: 121598 diff --git a/test/libsolidity/semanticTests/structs/copy_substructures_to_mapping.sol b/test/libsolidity/semanticTests/structs/copy_substructures_to_mapping.sol index ec989b508ef6..065187cdc348 100644 --- a/test/libsolidity/semanticTests/structs/copy_substructures_to_mapping.sol +++ b/test/libsolidity/semanticTests/structs/copy_substructures_to_mapping.sol @@ -50,7 +50,6 @@ contract C { return m[2]; } } - // ---- // from_memory() -> 0x20, 0x60, 0xa0, 0x15, 3, 0x666F6F0000000000000000000000000000000000000000000000000000000000, 2, 13, 14 // gas irOptimized: 123029 diff --git a/test/libsolidity/semanticTests/structs/copy_to_mapping.sol b/test/libsolidity/semanticTests/structs/copy_to_mapping.sol index e5c02001fe13..5b99efc6477d 100644 --- a/test/libsolidity/semanticTests/structs/copy_to_mapping.sol +++ b/test/libsolidity/semanticTests/structs/copy_to_mapping.sol @@ -43,7 +43,6 @@ contract C { return m[3]; } } - // ---- // from_state() -> 0x20, 0x60, 0xa0, 21, 3, 0x666F6F0000000000000000000000000000000000000000000000000000000000, 2, 13, 14 // gas irOptimized: 121693 diff --git a/test/libsolidity/semanticTests/structs/global.sol b/test/libsolidity/semanticTests/structs/global.sol index d51194ca0a8c..052122538eb9 100644 --- a/test/libsolidity/semanticTests/structs/global.sol +++ b/test/libsolidity/semanticTests/structs/global.sol @@ -6,7 +6,5 @@ contract C { return (s.a, s.b); } } -// ==== -// compileToEwasm: also // ---- // f((uint256,uint256)): 42, 23 -> 42, 23 diff --git a/test/libsolidity/semanticTests/structs/lone_struct_array_type.sol b/test/libsolidity/semanticTests/structs/lone_struct_array_type.sol index fe6de19f4698..9434e40454f8 100644 --- a/test/libsolidity/semanticTests/structs/lone_struct_array_type.sol +++ b/test/libsolidity/semanticTests/structs/lone_struct_array_type.sol @@ -9,8 +9,5 @@ contract C { return 3; } } - -// ==== -// compileToEwasm: also // ---- // f() -> 3 diff --git a/test/libsolidity/semanticTests/structs/memory_struct_named_constructor.sol b/test/libsolidity/semanticTests/structs/memory_struct_named_constructor.sol index 445961e2da3c..f844c08fac01 100644 --- a/test/libsolidity/semanticTests/structs/memory_struct_named_constructor.sol +++ b/test/libsolidity/semanticTests/structs/memory_struct_named_constructor.sol @@ -11,8 +11,5 @@ contract C { return S({x: true, a: 8}); } } - -// ==== -// compileToEwasm: also // ---- // s() -> 8, true diff --git a/test/libsolidity/semanticTests/structs/memory_structs_as_function_args.sol b/test/libsolidity/semanticTests/structs/memory_structs_as_function_args.sol index a76518684b5f..96b9569920ea 100644 --- a/test/libsolidity/semanticTests/structs/memory_structs_as_function_args.sol +++ b/test/libsolidity/semanticTests/structs/memory_structs_as_function_args.sol @@ -27,8 +27,5 @@ contract Test { s.z = z; } } - -// ==== -// compileToEwasm: also // ---- // test() -> 1, 2, 3 diff --git a/test/libsolidity/semanticTests/structs/memory_structs_nested.sol b/test/libsolidity/semanticTests/structs/memory_structs_nested.sol index 3fee9b210528..e541fa975733 100644 --- a/test/libsolidity/semanticTests/structs/memory_structs_nested.sol +++ b/test/libsolidity/semanticTests/structs/memory_structs_nested.sol @@ -37,8 +37,5 @@ contract Test { s.s.z = z; } } - -// ==== -// compileToEwasm: also // ---- // test() -> 1, 2, 3, 4 diff --git a/test/libsolidity/semanticTests/structs/memory_structs_nested_load.sol b/test/libsolidity/semanticTests/structs/memory_structs_nested_load.sol index 12b514a23c6a..3089f97b52ac 100644 --- a/test/libsolidity/semanticTests/structs/memory_structs_nested_load.sol +++ b/test/libsolidity/semanticTests/structs/memory_structs_nested_load.sol @@ -64,8 +64,6 @@ contract Test { a2 = m_x.a[1]; } } -// ==== -// compileToEwasm: also // ---- // load() -> 0x01, 0x02, 0x03, 0x04, 0x05, 0x06 // gas irOptimized: 110326 diff --git a/test/libsolidity/semanticTests/structs/memory_structs_read_write.sol b/test/libsolidity/semanticTests/structs/memory_structs_read_write.sol index 5cafe53232bd..fe319d19df26 100644 --- a/test/libsolidity/semanticTests/structs/memory_structs_read_write.sol +++ b/test/libsolidity/semanticTests/structs/memory_structs_read_write.sol @@ -49,9 +49,6 @@ contract Test { a = s.a[1]; } } - -// ==== -// compileToEwasm: also // ---- // testInit() -> 0, 0, 0, 0, true // testCopyRead() -> 1, 2, 3, 4 diff --git a/test/libsolidity/semanticTests/structs/multislot_struct_allocation.sol b/test/libsolidity/semanticTests/structs/multislot_struct_allocation.sol index 3336b30b1ca7..648c962cf9b8 100644 --- a/test/libsolidity/semanticTests/structs/multislot_struct_allocation.sol +++ b/test/libsolidity/semanticTests/structs/multislot_struct_allocation.sol @@ -15,8 +15,5 @@ contract C { return s.a.x(1); } } - - - // ---- // f() -> 2 diff --git a/test/libsolidity/semanticTests/structs/nested_struct_allocation.sol b/test/libsolidity/semanticTests/structs/nested_struct_allocation.sol index 64328b2dee87..0037d9573e8a 100644 --- a/test/libsolidity/semanticTests/structs/nested_struct_allocation.sol +++ b/test/libsolidity/semanticTests/structs/nested_struct_allocation.sol @@ -12,7 +12,5 @@ contract C { return s.a.b; } } -// ==== -// compileToEwasm: also // ---- // f() -> 1 diff --git a/test/libsolidity/semanticTests/structs/recursive_structs.sol b/test/libsolidity/semanticTests/structs/recursive_structs.sol index 58f178e5ec52..f8944f11f355 100644 --- a/test/libsolidity/semanticTests/structs/recursive_structs.sol +++ b/test/libsolidity/semanticTests/structs/recursive_structs.sol @@ -14,8 +14,5 @@ contract C { return 1; } } - -// ==== -// compileToEwasm: also // ---- // f() -> 1 diff --git a/test/libsolidity/semanticTests/structs/simple_struct_allocation.sol b/test/libsolidity/semanticTests/structs/simple_struct_allocation.sol index c05d87b37c54..e45626d3168c 100644 --- a/test/libsolidity/semanticTests/structs/simple_struct_allocation.sol +++ b/test/libsolidity/semanticTests/structs/simple_struct_allocation.sol @@ -8,7 +8,5 @@ contract C { return s.a; } } -// ==== -// compileToEwasm: also // ---- // f() -> 1 diff --git a/test/libsolidity/semanticTests/structs/struct_assign_reference_to_struct.sol b/test/libsolidity/semanticTests/structs/struct_assign_reference_to_struct.sol index 357863abb48d..47b9a9ece202 100644 --- a/test/libsolidity/semanticTests/structs/struct_assign_reference_to_struct.sol +++ b/test/libsolidity/semanticTests/structs/struct_assign_reference_to_struct.sol @@ -31,8 +31,5 @@ contract test { ret_global1 = data1.m_value; // = 3. Changed due to the assignment to x.m_value } } - -// ==== -// compileToEwasm: also // ---- // assign() -> 2, 2, 3, 3 diff --git a/test/libsolidity/semanticTests/structs/struct_copy.sol b/test/libsolidity/semanticTests/structs/struct_copy.sol index 956416a967e6..6da42ebec7d4 100644 --- a/test/libsolidity/semanticTests/structs/struct_copy.sol +++ b/test/libsolidity/semanticTests/structs/struct_copy.sol @@ -33,7 +33,6 @@ contract c { c = data[k].c; } } - // ---- // set(uint256): 7 -> true // gas irOptimized: 109896 diff --git a/test/libsolidity/semanticTests/structs/struct_copy_via_local.sol b/test/libsolidity/semanticTests/structs/struct_copy_via_local.sol index 53d1ca93a9d7..22d9dd29deb5 100644 --- a/test/libsolidity/semanticTests/structs/struct_copy_via_local.sol +++ b/test/libsolidity/semanticTests/structs/struct_copy_via_local.sol @@ -15,9 +15,6 @@ contract c { return data2.a == data1.a && data2.b == data1.b; } } - -// ==== -// compileToEwasm: also // ---- // test() -> true // gas irOptimized: 109713 diff --git a/test/libsolidity/semanticTests/structs/struct_delete_member.sol b/test/libsolidity/semanticTests/structs/struct_delete_member.sol index c881d8a9367c..7f991f401bc5 100644 --- a/test/libsolidity/semanticTests/structs/struct_delete_member.sol +++ b/test/libsolidity/semanticTests/structs/struct_delete_member.sol @@ -15,8 +15,5 @@ contract test { ret_value = data1.m_value; } } - -// ==== -// compileToEwasm: also // ---- // deleteMember() -> 0 diff --git a/test/libsolidity/semanticTests/structs/struct_delete_storage.sol b/test/libsolidity/semanticTests/structs/struct_delete_storage.sol index 776ceddc6e4f..31558cfbe288 100644 --- a/test/libsolidity/semanticTests/structs/struct_delete_storage.sol +++ b/test/libsolidity/semanticTests/structs/struct_delete_storage.sol @@ -17,7 +17,5 @@ contract C { assert(a == 17); } } -// ==== -// compileToEwasm: also // ---- // f() -> diff --git a/test/libsolidity/semanticTests/structs/struct_delete_storage_small.sol b/test/libsolidity/semanticTests/structs/struct_delete_storage_small.sol index 21140e45eec8..046e4ec6d6b6 100644 --- a/test/libsolidity/semanticTests/structs/struct_delete_storage_small.sol +++ b/test/libsolidity/semanticTests/structs/struct_delete_storage_small.sol @@ -19,7 +19,6 @@ contract C { } } // ==== -// compileToEwasm: also // compileViaYul: true // ---- // f() -> 0 diff --git a/test/libsolidity/semanticTests/structs/struct_delete_struct_in_mapping.sol b/test/libsolidity/semanticTests/structs/struct_delete_struct_in_mapping.sol index b5c8a2cfa622..ae21f6f865b8 100644 --- a/test/libsolidity/semanticTests/structs/struct_delete_struct_in_mapping.sol +++ b/test/libsolidity/semanticTests/structs/struct_delete_struct_in_mapping.sol @@ -13,6 +13,5 @@ contract test { return campaigns[0].m_value; } } - // ---- // deleteIt() -> 0 diff --git a/test/libsolidity/semanticTests/structs/struct_memory_to_storage.sol b/test/libsolidity/semanticTests/structs/struct_memory_to_storage.sol index 66657fc6764c..290c812ccdca 100644 --- a/test/libsolidity/semanticTests/structs/struct_memory_to_storage.sol +++ b/test/libsolidity/semanticTests/structs/struct_memory_to_storage.sol @@ -21,8 +21,5 @@ contract C { return (x.s.a, x.s.b, x.s.c); } } - -// ==== -// compileToEwasm: also // ---- // f() -> 42, 23, 34 diff --git a/test/libsolidity/semanticTests/structs/struct_memory_to_storage_function_ptr.sol b/test/libsolidity/semanticTests/structs/struct_memory_to_storage_function_ptr.sol index 46094d3766d6..c19875062f9b 100644 --- a/test/libsolidity/semanticTests/structs/struct_memory_to_storage_function_ptr.sol +++ b/test/libsolidity/semanticTests/structs/struct_memory_to_storage_function_ptr.sol @@ -26,9 +26,6 @@ contract C { return x.s.a; } } - -// ==== -// compileToEwasm: also // ---- // f() -> 42, 23, 34, 42, 42 // gas irOptimized: 110388 diff --git a/test/libsolidity/semanticTests/structs/struct_named_constructor.sol b/test/libsolidity/semanticTests/structs/struct_named_constructor.sol index 2433da86664f..f16f61e3213e 100644 --- a/test/libsolidity/semanticTests/structs/struct_named_constructor.sol +++ b/test/libsolidity/semanticTests/structs/struct_named_constructor.sol @@ -9,8 +9,5 @@ contract C { s = S({x: true, a: 1}); } } - -// ==== -// compileToEwasm: also // ---- // s() -> 1, true diff --git a/test/libsolidity/semanticTests/structs/struct_referencing.sol b/test/libsolidity/semanticTests/structs/struct_referencing.sol index cbe8a72bfc78..93fad63befcf 100644 --- a/test/libsolidity/semanticTests/structs/struct_referencing.sol +++ b/test/libsolidity/semanticTests/structs/struct_referencing.sol @@ -45,8 +45,6 @@ contract C is I { function a1() public pure returns (uint) { S memory s; return L.a(s); } function a2() public pure returns (uint) { L.S memory s; return L.a(s); } } -// ==== -// compileToEwasm: false // ---- // library: L // f() -> 1 diff --git a/test/libsolidity/semanticTests/structs/struct_storage_to_memory.sol b/test/libsolidity/semanticTests/structs/struct_storage_to_memory.sol index 8b9035d188f6..26862fd008fc 100644 --- a/test/libsolidity/semanticTests/structs/struct_storage_to_memory.sol +++ b/test/libsolidity/semanticTests/structs/struct_storage_to_memory.sol @@ -19,8 +19,5 @@ contract C { return (m.s.a, m.s.b, m.s.c); } } - -// ==== -// compileToEwasm: also // ---- // f() -> 42, 23, 34 diff --git a/test/libsolidity/semanticTests/structs/struct_storage_to_memory_function_ptr.sol b/test/libsolidity/semanticTests/structs/struct_storage_to_memory_function_ptr.sol index c3aa23c3be85..5ec25fb3632c 100644 --- a/test/libsolidity/semanticTests/structs/struct_storage_to_memory_function_ptr.sol +++ b/test/libsolidity/semanticTests/structs/struct_storage_to_memory_function_ptr.sol @@ -25,8 +25,5 @@ contract C { return x.s.a; } } - -// ==== -// compileToEwasm: also // ---- // f() -> 42, 23, 34, 42, 42 diff --git a/test/libsolidity/semanticTests/structs/using_for_function_on_struct.sol b/test/libsolidity/semanticTests/structs/using_for_function_on_struct.sol index f97935fb67e1..7b51b59fcf0a 100644 --- a/test/libsolidity/semanticTests/structs/using_for_function_on_struct.sol +++ b/test/libsolidity/semanticTests/structs/using_for_function_on_struct.sol @@ -7,8 +7,6 @@ contract C { return x.mul(a); } } -// ==== -// compileToEwasm: false // ---- // library: D // f(uint256): 7 -> 0x15 diff --git a/test/libsolidity/semanticTests/types/assign_calldata_value_type.sol b/test/libsolidity/semanticTests/types/assign_calldata_value_type.sol index 04724f4c794f..8350628e4764 100644 --- a/test/libsolidity/semanticTests/types/assign_calldata_value_type.sol +++ b/test/libsolidity/semanticTests/types/assign_calldata_value_type.sol @@ -5,7 +5,5 @@ contract C { return (x, b); } } -// ==== -// compileToEwasm: also // ---- // f(uint256): 23 -> 42, 23 diff --git a/test/libsolidity/semanticTests/types/convert_fixed_bytes_to_fixed_bytes_greater_size.sol b/test/libsolidity/semanticTests/types/convert_fixed_bytes_to_fixed_bytes_greater_size.sol index 09558a697b07..fdfafa9e2a34 100644 --- a/test/libsolidity/semanticTests/types/convert_fixed_bytes_to_fixed_bytes_greater_size.sol +++ b/test/libsolidity/semanticTests/types/convert_fixed_bytes_to_fixed_bytes_greater_size.sol @@ -3,7 +3,5 @@ contract Test { return bytes4(input); } } -// ==== -// compileToEwasm: also // ---- // bytesToBytes(bytes2): "ab" -> "ab" diff --git a/test/libsolidity/semanticTests/types/convert_fixed_bytes_to_fixed_bytes_same_size.sol b/test/libsolidity/semanticTests/types/convert_fixed_bytes_to_fixed_bytes_same_size.sol index 5417800271c3..5c9a6cdc5ac3 100644 --- a/test/libsolidity/semanticTests/types/convert_fixed_bytes_to_fixed_bytes_same_size.sol +++ b/test/libsolidity/semanticTests/types/convert_fixed_bytes_to_fixed_bytes_same_size.sol @@ -3,7 +3,5 @@ contract Test { return bytes4(input); } } -// ==== -// compileToEwasm: also // ---- // bytesToBytes(bytes4): "abcd" -> "abcd" diff --git a/test/libsolidity/semanticTests/types/convert_fixed_bytes_to_fixed_bytes_smaller_size.sol b/test/libsolidity/semanticTests/types/convert_fixed_bytes_to_fixed_bytes_smaller_size.sol index 5868492940cf..2052c9da9278 100644 --- a/test/libsolidity/semanticTests/types/convert_fixed_bytes_to_fixed_bytes_smaller_size.sol +++ b/test/libsolidity/semanticTests/types/convert_fixed_bytes_to_fixed_bytes_smaller_size.sol @@ -3,7 +3,5 @@ contract Test { return bytes2(input); } } -// ==== -// compileToEwasm: also // ---- // bytesToBytes(bytes4): "abcd" -> "ab" diff --git a/test/libsolidity/semanticTests/types/convert_fixed_bytes_to_uint_greater_size.sol b/test/libsolidity/semanticTests/types/convert_fixed_bytes_to_uint_greater_size.sol index 93906e6e0e93..b0ab07f549f2 100644 --- a/test/libsolidity/semanticTests/types/convert_fixed_bytes_to_uint_greater_size.sol +++ b/test/libsolidity/semanticTests/types/convert_fixed_bytes_to_uint_greater_size.sol @@ -3,7 +3,5 @@ contract Test { return uint64(uint32(s)); } } -// ==== -// compileToEwasm: also // ---- // bytesToUint(bytes4): "abcd" -> 0x61626364 diff --git a/test/libsolidity/semanticTests/types/convert_fixed_bytes_to_uint_same_min_size.sol b/test/libsolidity/semanticTests/types/convert_fixed_bytes_to_uint_same_min_size.sol index 52a99511d1cf..ff1dfebfd657 100644 --- a/test/libsolidity/semanticTests/types/convert_fixed_bytes_to_uint_same_min_size.sol +++ b/test/libsolidity/semanticTests/types/convert_fixed_bytes_to_uint_same_min_size.sol @@ -3,7 +3,5 @@ contract Test { return uint8(s); } } -// ==== -// compileToEwasm: also // ---- // bytesToUint(bytes1): "a" -> 0x61 diff --git a/test/libsolidity/semanticTests/types/convert_fixed_bytes_to_uint_same_type.sol b/test/libsolidity/semanticTests/types/convert_fixed_bytes_to_uint_same_type.sol index e13f99cd6016..390bf4b01d51 100644 --- a/test/libsolidity/semanticTests/types/convert_fixed_bytes_to_uint_same_type.sol +++ b/test/libsolidity/semanticTests/types/convert_fixed_bytes_to_uint_same_type.sol @@ -3,7 +3,5 @@ contract Test { return uint(s); } } -// ==== -// compileToEwasm: also // ---- // bytesToUint(bytes32): "abc2" -> left(0x61626332) diff --git a/test/libsolidity/semanticTests/types/convert_fixed_bytes_to_uint_smaller_size.sol b/test/libsolidity/semanticTests/types/convert_fixed_bytes_to_uint_smaller_size.sol index aae1576e5a69..eb450993e492 100644 --- a/test/libsolidity/semanticTests/types/convert_fixed_bytes_to_uint_smaller_size.sol +++ b/test/libsolidity/semanticTests/types/convert_fixed_bytes_to_uint_smaller_size.sol @@ -3,7 +3,5 @@ contract Test { return uint16(uint32(s)); } } -// ==== -// compileToEwasm: also // ---- // bytesToUint(bytes4): "abcd" -> 0x6364 diff --git a/test/libsolidity/semanticTests/types/convert_uint_to_fixed_bytes_greater_size.sol b/test/libsolidity/semanticTests/types/convert_uint_to_fixed_bytes_greater_size.sol index cf170a2aaf34..9949b477b290 100644 --- a/test/libsolidity/semanticTests/types/convert_uint_to_fixed_bytes_greater_size.sol +++ b/test/libsolidity/semanticTests/types/convert_uint_to_fixed_bytes_greater_size.sol @@ -3,7 +3,5 @@ contract Test { return bytes8(uint64(h)); } } -// ==== -// compileToEwasm: also // ---- // UintToBytes(uint16): 0x6162 -> "\x00\x00\x00\x00\x00\x00ab" diff --git a/test/libsolidity/semanticTests/types/convert_uint_to_fixed_bytes_same_min_size.sol b/test/libsolidity/semanticTests/types/convert_uint_to_fixed_bytes_same_min_size.sol index 18a09dfe549a..60b9a4cf0105 100644 --- a/test/libsolidity/semanticTests/types/convert_uint_to_fixed_bytes_same_min_size.sol +++ b/test/libsolidity/semanticTests/types/convert_uint_to_fixed_bytes_same_min_size.sol @@ -3,7 +3,5 @@ contract Test { return bytes1(h); } } -// ==== -// compileToEwasm: also // ---- // UintToBytes(uint8): 0x61 -> "a" diff --git a/test/libsolidity/semanticTests/types/convert_uint_to_fixed_bytes_same_size.sol b/test/libsolidity/semanticTests/types/convert_uint_to_fixed_bytes_same_size.sol index 10c3a351dec1..5662d909e6f0 100644 --- a/test/libsolidity/semanticTests/types/convert_uint_to_fixed_bytes_same_size.sol +++ b/test/libsolidity/semanticTests/types/convert_uint_to_fixed_bytes_same_size.sol @@ -3,7 +3,5 @@ contract Test { return bytes32(h); } } -// ==== -// compileToEwasm: also // ---- // uintToBytes(uint256): left(0x616263) -> left(0x616263) diff --git a/test/libsolidity/semanticTests/types/convert_uint_to_fixed_bytes_smaller_size.sol b/test/libsolidity/semanticTests/types/convert_uint_to_fixed_bytes_smaller_size.sol index 8abc70d3d313..963cbc3427fa 100644 --- a/test/libsolidity/semanticTests/types/convert_uint_to_fixed_bytes_smaller_size.sol +++ b/test/libsolidity/semanticTests/types/convert_uint_to_fixed_bytes_smaller_size.sol @@ -3,7 +3,5 @@ contract Test { return bytes2(uint16(h)); } } -// ==== -// compileToEwasm: also // ---- // uintToBytes(uint32): 0x61626364 -> "cd" diff --git a/test/libsolidity/semanticTests/types/external_function_to_address.sol b/test/libsolidity/semanticTests/types/external_function_to_address.sol index d2f5523b170f..fb938d37aaca 100644 --- a/test/libsolidity/semanticTests/types/external_function_to_address.sol +++ b/test/libsolidity/semanticTests/types/external_function_to_address.sol @@ -6,8 +6,6 @@ contract C { return cb.address; } } -// ==== -// compileToEwasm: also // ---- // f() -> true // g(function): hex"00000000000000000000000000000000000004226121ff00000000000000000" -> 0x42 diff --git a/test/libsolidity/semanticTests/types/mapping/copy_from_mapping_to_mapping.sol b/test/libsolidity/semanticTests/types/mapping/copy_from_mapping_to_mapping.sol index daf5d000c864..b17ba6d9160b 100644 --- a/test/libsolidity/semanticTests/types/mapping/copy_from_mapping_to_mapping.sol +++ b/test/libsolidity/semanticTests/types/mapping/copy_from_mapping_to_mapping.sol @@ -27,7 +27,6 @@ contract C { return dst[0]; } } - // ---- // f() -> 0x20, 7, 8, 9, 0xa0, 13, 2, 0x40, 0xa0, 2, 3, 4, 2, 3, 4 // gas irOptimized: 197082 diff --git a/test/libsolidity/semanticTests/types/mapping/copy_struct_to_array_stored_in_mapping.sol b/test/libsolidity/semanticTests/types/mapping/copy_struct_to_array_stored_in_mapping.sol index 26a33682d5c3..43f2a80fc79a 100644 --- a/test/libsolidity/semanticTests/types/mapping/copy_struct_to_array_stored_in_mapping.sol +++ b/test/libsolidity/semanticTests/types/mapping/copy_struct_to_array_stored_in_mapping.sol @@ -47,7 +47,6 @@ contract C { return m2[0]; } } - // ---- // from_storage_to_static_array() -> 0, 7 // from_storage_to_dynamic_array() -> 0x20, 1, 7 diff --git a/test/libsolidity/semanticTests/types/mapping/user_defined_types_mapping_storage.sol b/test/libsolidity/semanticTests/types/mapping/user_defined_types_mapping_storage.sol index ef092f3ea6b9..a8a8fca44cec 100644 --- a/test/libsolidity/semanticTests/types/mapping/user_defined_types_mapping_storage.sol +++ b/test/libsolidity/semanticTests/types/mapping/user_defined_types_mapping_storage.sol @@ -19,7 +19,6 @@ contract C { return uintMap[3] == 4; } } - // ---- // library: L // testAB() -> true diff --git a/test/libsolidity/semanticTests/types/nested_tuples.sol b/test/libsolidity/semanticTests/types/nested_tuples.sol index c3e96240a5cf..32203a9cbed7 100644 --- a/test/libsolidity/semanticTests/types/nested_tuples.sol +++ b/test/libsolidity/semanticTests/types/nested_tuples.sol @@ -26,8 +26,6 @@ contract test { return a; } } -// ==== -// compileToEwasm: also // ---- // f0() -> 2, true // f1() -> 1 diff --git a/test/libsolidity/semanticTests/types/packing_signed_types.sol b/test/libsolidity/semanticTests/types/packing_signed_types.sol index 392a52f2cf5f..2d2e0e16e608 100644 --- a/test/libsolidity/semanticTests/types/packing_signed_types.sol +++ b/test/libsolidity/semanticTests/types/packing_signed_types.sol @@ -4,7 +4,5 @@ contract test { return int8(x); } } -// ==== -// compileToEwasm: also // ---- // run() -> 0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa diff --git a/test/libsolidity/semanticTests/types/packing_unpacking_types.sol b/test/libsolidity/semanticTests/types/packing_unpacking_types.sol index 7d12c47a44f0..8b500cca1351 100644 --- a/test/libsolidity/semanticTests/types/packing_unpacking_types.sol +++ b/test/libsolidity/semanticTests/types/packing_unpacking_types.sol @@ -5,8 +5,6 @@ contract test { y = y * 0x10000000000000000 | ~c; } } -// ==== -// compileToEwasm: also // ---- // run(bool,uint32,uint64): true, 0x0f0f0f0f, 0xf0f0f0f0f0f0f0f0 // -> 0x0000000000000000000000000000000000000001f0f0f0f00f0f0f0f0f0f0f0f diff --git a/test/libsolidity/semanticTests/types/strings.sol b/test/libsolidity/semanticTests/types/strings.sol index 9242eca2e099..f76116bba319 100644 --- a/test/libsolidity/semanticTests/types/strings.sol +++ b/test/libsolidity/semanticTests/types/strings.sol @@ -10,9 +10,6 @@ contract test { large = small; } } - -// ==== -// compileToEwasm: also // ---- // fixedBytesHex() -> "\xaa\xbb\x00\xff" // fixedBytes() -> "abc\x00\xff__" diff --git a/test/libsolidity/semanticTests/types/tuple_assign_multi_slot_grow.sol b/test/libsolidity/semanticTests/types/tuple_assign_multi_slot_grow.sol index 5ac35853bfd1..6574dcb59771 100644 --- a/test/libsolidity/semanticTests/types/tuple_assign_multi_slot_grow.sol +++ b/test/libsolidity/semanticTests/types/tuple_assign_multi_slot_grow.sol @@ -7,7 +7,5 @@ contract C { } } -// ==== -// compileToEwasm: also // ---- // f() -> 0x30, 0x31, 0x32 diff --git a/test/libsolidity/semanticTests/types/type_conversion_cleanup.sol b/test/libsolidity/semanticTests/types/type_conversion_cleanup.sol index 320290c9f3a4..d3d2b01bbcb4 100644 --- a/test/libsolidity/semanticTests/types/type_conversion_cleanup.sol +++ b/test/libsolidity/semanticTests/types/type_conversion_cleanup.sol @@ -1,7 +1,5 @@ contract Test { function test() public returns (uint ret) { return uint(uint160(address(uint160(uint128(type(uint200).max))))); } } -// ==== -// compileToEwasm: also // ---- // test() -> 0xffffffffffffffffffffffffffffffff diff --git a/test/libsolidity/semanticTests/underscore/as_function.sol b/test/libsolidity/semanticTests/underscore/as_function.sol index 8f9fe0b5978d..be60a01bc351 100644 --- a/test/libsolidity/semanticTests/underscore/as_function.sol +++ b/test/libsolidity/semanticTests/underscore/as_function.sol @@ -12,8 +12,6 @@ contract C { return 33; } } -// ==== -// compileToEwasm: also // ---- // _() -> 88 // g() -> 88 diff --git a/test/libsolidity/semanticTests/uninitializedFunctionPointer/invalidInConstructor.sol b/test/libsolidity/semanticTests/uninitializedFunctionPointer/invalidInConstructor.sol index e2551a2a8f5b..e4e6453c5e15 100644 --- a/test/libsolidity/semanticTests/uninitializedFunctionPointer/invalidInConstructor.sol +++ b/test/libsolidity/semanticTests/uninitializedFunctionPointer/invalidInConstructor.sol @@ -19,7 +19,5 @@ contract Test { new C(); } } -// ==== -// compileToEwasm: also // ---- // f() -> FAILURE, hex"4e487b71", 0x51 diff --git a/test/libsolidity/semanticTests/uninitializedFunctionPointer/invalidStoredInConstructor.sol b/test/libsolidity/semanticTests/uninitializedFunctionPointer/invalidStoredInConstructor.sol index 209ad8bb2487..fbaca1a67a33 100644 --- a/test/libsolidity/semanticTests/uninitializedFunctionPointer/invalidStoredInConstructor.sol +++ b/test/libsolidity/semanticTests/uninitializedFunctionPointer/invalidStoredInConstructor.sol @@ -19,7 +19,5 @@ contract Test { new C(); } } -// ==== -// compileToEwasm: also // ---- // f() -> FAILURE, hex"4e487b71", 0x51 diff --git a/test/libsolidity/semanticTests/uninitializedFunctionPointer/store2.sol b/test/libsolidity/semanticTests/uninitializedFunctionPointer/store2.sol index 0f446f775b0e..1c1e596abd64 100644 --- a/test/libsolidity/semanticTests/uninitializedFunctionPointer/store2.sol +++ b/test/libsolidity/semanticTests/uninitializedFunctionPointer/store2.sol @@ -35,7 +35,5 @@ contract InvalidTest { x++; } } -// ==== -// compileToEwasm: also // ---- // run() -> FAILURE, hex"4e487b71", 0x51 diff --git a/test/libsolidity/semanticTests/uninitializedFunctionPointer/storeInConstructor.sol b/test/libsolidity/semanticTests/uninitializedFunctionPointer/storeInConstructor.sol index e534e42313b2..08a96792c2ad 100644 --- a/test/libsolidity/semanticTests/uninitializedFunctionPointer/storeInConstructor.sol +++ b/test/libsolidity/semanticTests/uninitializedFunctionPointer/storeInConstructor.sol @@ -14,8 +14,6 @@ contract InvalidTest { storedFn(); } } -// ==== -// compileToEwasm: also // ---- // f() -> FAILURE, hex"4e487b71", 0x51 // f() -> FAILURE, hex"4e487b71", 0x51 diff --git a/test/libsolidity/semanticTests/uninitializedFunctionPointer/uninitialized_internal_storage_function_via_yul.sol b/test/libsolidity/semanticTests/uninitializedFunctionPointer/uninitialized_internal_storage_function_via_yul.sol index 1c69ffef23e0..bf8eab8ced87 100644 --- a/test/libsolidity/semanticTests/uninitializedFunctionPointer/uninitialized_internal_storage_function_via_yul.sol +++ b/test/libsolidity/semanticTests/uninitializedFunctionPointer/uninitialized_internal_storage_function_via_yul.sol @@ -13,6 +13,5 @@ contract Test { } // ==== // compileViaYul: true -// compileToEwasm: also // ---- // f() -> true diff --git a/test/libsolidity/semanticTests/userDefinedValueType/cleanup.sol b/test/libsolidity/semanticTests/userDefinedValueType/cleanup.sol index cc5304ed752b..cc165e879e5b 100644 --- a/test/libsolidity/semanticTests/userDefinedValueType/cleanup.sol +++ b/test/libsolidity/semanticTests/userDefinedValueType/cleanup.sol @@ -33,7 +33,6 @@ contract C { return (a, b, c); } } - // ---- // ret() -> 0xff // f(uint8): 0x1ff -> FAILURE diff --git a/test/libsolidity/semanticTests/userDefinedValueType/cleanup_abicoderv1.sol b/test/libsolidity/semanticTests/userDefinedValueType/cleanup_abicoderv1.sol index f5de5e5010b1..727c66063333 100644 --- a/test/libsolidity/semanticTests/userDefinedValueType/cleanup_abicoderv1.sol +++ b/test/libsolidity/semanticTests/userDefinedValueType/cleanup_abicoderv1.sol @@ -33,7 +33,6 @@ contract C { return (a, b, c); } } - // ==== // compileViaYul: false // ---- diff --git a/test/libsolidity/semanticTests/userDefinedValueType/conversion.sol b/test/libsolidity/semanticTests/userDefinedValueType/conversion.sol index bcdc9440e999..24b316f9cf4a 100644 --- a/test/libsolidity/semanticTests/userDefinedValueType/conversion.sol +++ b/test/libsolidity/semanticTests/userDefinedValueType/conversion.sol @@ -27,7 +27,6 @@ contract C { return MyUInt8.wrap(uint8(MyUInt16.unwrap(a))); } } - // ---- // f(uint256): 1 -> 1 // f(uint256): 2 -> 2 diff --git a/test/libsolidity/semanticTests/userDefinedValueType/conversion_abicoderv1.sol b/test/libsolidity/semanticTests/userDefinedValueType/conversion_abicoderv1.sol index af91aab0c453..e8fbfb246036 100644 --- a/test/libsolidity/semanticTests/userDefinedValueType/conversion_abicoderv1.sol +++ b/test/libsolidity/semanticTests/userDefinedValueType/conversion_abicoderv1.sol @@ -27,7 +27,6 @@ contract C { return MyUInt8.wrap(uint8(MyUInt16.unwrap(a))); } } - // ==== // compileViaYul: false // ---- diff --git a/test/libsolidity/semanticTests/userDefinedValueType/storage_layout_struct.sol b/test/libsolidity/semanticTests/userDefinedValueType/storage_layout_struct.sol index ee63c185d334..8c51b2921b1a 100644 --- a/test/libsolidity/semanticTests/userDefinedValueType/storage_layout_struct.sol +++ b/test/libsolidity/semanticTests/userDefinedValueType/storage_layout_struct.sol @@ -150,7 +150,6 @@ contract C { } } } - // ---- // storage_a() -> 0, 0 // set_a(int64,int64): 100, 200 -> diff --git a/test/libsolidity/semanticTests/userDefinedValueType/zero_cost_abstraction_comparison_elementary.sol b/test/libsolidity/semanticTests/userDefinedValueType/zero_cost_abstraction_comparison_elementary.sol index 1c3b66b28da0..2c5a15bb93ac 100644 --- a/test/libsolidity/semanticTests/userDefinedValueType/zero_cost_abstraction_comparison_elementary.sol +++ b/test/libsolidity/semanticTests/userDefinedValueType/zero_cost_abstraction_comparison_elementary.sol @@ -15,7 +15,6 @@ contract C { return a + b; } } - // ---- // getX() -> 0 // gas irOptimized: 23379 diff --git a/test/libsolidity/semanticTests/userDefinedValueType/zero_cost_abstraction_comparison_userdefined.sol b/test/libsolidity/semanticTests/userDefinedValueType/zero_cost_abstraction_comparison_userdefined.sol index 55e38689fc37..2f275c543b11 100644 --- a/test/libsolidity/semanticTests/userDefinedValueType/zero_cost_abstraction_comparison_userdefined.sol +++ b/test/libsolidity/semanticTests/userDefinedValueType/zero_cost_abstraction_comparison_userdefined.sol @@ -16,7 +16,6 @@ contract C { return MyInt.wrap(MyInt.unwrap(a) + MyInt.unwrap(b)); } } - // ---- // getX() -> 0 // gas irOptimized: 23379 diff --git a/test/libsolidity/semanticTests/using/free_function_multi.sol b/test/libsolidity/semanticTests/using/free_function_multi.sol index feec1beb3980..31ac50bc3a94 100644 --- a/test/libsolidity/semanticTests/using/free_function_multi.sol +++ b/test/libsolidity/semanticTests/using/free_function_multi.sol @@ -17,7 +17,6 @@ function id(uint x) pure returns (uint) { function zero(uint) pure returns (uint) { return 0; } - // ---- // f(uint256): 10 -> 10 // g(uint256): 10 -> 0 diff --git a/test/libsolidity/semanticTests/using/free_functions_individual.sol b/test/libsolidity/semanticTests/using/free_functions_individual.sol index 170eae4d0f12..5a14cd7cb230 100644 --- a/test/libsolidity/semanticTests/using/free_functions_individual.sol +++ b/test/libsolidity/semanticTests/using/free_functions_individual.sol @@ -19,8 +19,6 @@ function id(uint x) pure returns (uint) { function zero(uint) pure returns (uint) { return 0; } - - // ---- // f(uint256): 10 -> 10 // g(uint256): 10 -> 0 diff --git a/test/libsolidity/semanticTests/using/using_global_for_global.sol b/test/libsolidity/semanticTests/using/using_global_for_global.sol index 77bbb896fa9d..67a31c3415cc 100644 --- a/test/libsolidity/semanticTests/using/using_global_for_global.sol +++ b/test/libsolidity/semanticTests/using/using_global_for_global.sol @@ -13,6 +13,5 @@ contract C { return r.f().g(); } } - // ---- // f(uint256): 100 -> 111 \ No newline at end of file diff --git a/test/libsolidity/semanticTests/variables/delete_local.sol b/test/libsolidity/semanticTests/variables/delete_local.sol index 21f4c8edfca5..1d00bace1f61 100644 --- a/test/libsolidity/semanticTests/variables/delete_local.sol +++ b/test/libsolidity/semanticTests/variables/delete_local.sol @@ -5,7 +5,5 @@ contract test { res = v; } } -// ==== -// compileToEwasm: also // ---- // delLocal() -> 0 diff --git a/test/libsolidity/semanticTests/variables/delete_locals.sol b/test/libsolidity/semanticTests/variables/delete_locals.sol index 8c14639d36d8..e442b8e853fa 100644 --- a/test/libsolidity/semanticTests/variables/delete_locals.sol +++ b/test/libsolidity/semanticTests/variables/delete_locals.sol @@ -8,7 +8,5 @@ contract test { res2 = x; } } -// ==== -// compileToEwasm: also // ---- // delLocal() -> 6, 7 diff --git a/test/libsolidity/semanticTests/variables/public_state_overridding.sol b/test/libsolidity/semanticTests/variables/public_state_overridding.sol index 752c429cacc1..78e0fb447833 100644 --- a/test/libsolidity/semanticTests/variables/public_state_overridding.sol +++ b/test/libsolidity/semanticTests/variables/public_state_overridding.sol @@ -11,8 +11,6 @@ contract X is A function set() public { test = 2; } } -// ==== -// compileToEwasm: also // ---- // test() -> 0 // set() -> diff --git a/test/libsolidity/semanticTests/variables/public_state_overridding_dynamic_struct.sol b/test/libsolidity/semanticTests/variables/public_state_overridding_dynamic_struct.sol index 2195c85e10c0..15226b5e0997 100644 --- a/test/libsolidity/semanticTests/variables/public_state_overridding_dynamic_struct.sol +++ b/test/libsolidity/semanticTests/variables/public_state_overridding_dynamic_struct.sol @@ -16,10 +16,6 @@ contract X is A function set() public { test.v = 2; test.s = "statevar"; } } - - -// ==== -// compileToEwasm: also // ---- // test() -> 0, 64, 0 // set() -> diff --git a/test/libsolidity/semanticTests/variables/public_state_overridding_mapping_to_dynamic_struct.sol b/test/libsolidity/semanticTests/variables/public_state_overridding_mapping_to_dynamic_struct.sol index 5a3df6d21498..62aa616e891c 100644 --- a/test/libsolidity/semanticTests/variables/public_state_overridding_mapping_to_dynamic_struct.sol +++ b/test/libsolidity/semanticTests/variables/public_state_overridding_mapping_to_dynamic_struct.sol @@ -16,8 +16,6 @@ contract X is A function set() public { test[42].v = 2; test[42].s = "statevar"; } } - - // ---- // test(uint256): 0 -> 0, 64, 0 // test(uint256): 42 -> 0, 64, 0 diff --git a/test/libsolidity/semanticTests/various/address_code.sol b/test/libsolidity/semanticTests/various/address_code.sol index b944100b96f1..2712503a45c5 100644 --- a/test/libsolidity/semanticTests/various/address_code.sol +++ b/test/libsolidity/semanticTests/various/address_code.sol @@ -12,8 +12,6 @@ contract C { function g() public view returns (uint) { return address(0).code.length; } function h() public view returns (uint) { return address(1).code.length; } } -// ==== -// compileToEwasm: also // ---- // constructor() -> // gas irOptimized: 175145 diff --git a/test/libsolidity/semanticTests/various/assignment_to_const_var_involving_expression.sol b/test/libsolidity/semanticTests/various/assignment_to_const_var_involving_expression.sol index 0aa7ceb954c9..110240ce938d 100644 --- a/test/libsolidity/semanticTests/various/assignment_to_const_var_involving_expression.sol +++ b/test/libsolidity/semanticTests/various/assignment_to_const_var_involving_expression.sol @@ -5,8 +5,5 @@ contract C { return x + 1; } } - -// ==== -// compileToEwasm: also // ---- // f() -> 0x57a diff --git a/test/libsolidity/semanticTests/various/balance.sol b/test/libsolidity/semanticTests/various/balance.sol index 916c7fbff6df..8638f409c062 100644 --- a/test/libsolidity/semanticTests/various/balance.sol +++ b/test/libsolidity/semanticTests/various/balance.sol @@ -5,9 +5,6 @@ contract test { return address(this).balance; } } - -// ==== -// compileToEwasm: also // ---- // constructor(), 23 wei -> // getBalance() -> 23 diff --git a/test/libsolidity/semanticTests/various/byte_optimization_bug.sol b/test/libsolidity/semanticTests/various/byte_optimization_bug.sol index f023e971f4d6..b850ea327e5e 100644 --- a/test/libsolidity/semanticTests/various/byte_optimization_bug.sol +++ b/test/libsolidity/semanticTests/various/byte_optimization_bug.sol @@ -11,9 +11,6 @@ contract C { } } } - -// ==== -// compileToEwasm: also // ---- // f(uint256): 2 -> 0 // g(uint256): 2 -> 2 diff --git a/test/libsolidity/semanticTests/various/code_access_create.sol b/test/libsolidity/semanticTests/various/code_access_create.sol index 839608aaf5ac..075682129cda 100644 --- a/test/libsolidity/semanticTests/various/code_access_create.sol +++ b/test/libsolidity/semanticTests/various/code_access_create.sol @@ -21,7 +21,6 @@ contract C { return d.f(); } } - // ---- // test() -> 7 // gas legacy: 100849 diff --git a/test/libsolidity/semanticTests/various/code_access_runtime.sol b/test/libsolidity/semanticTests/various/code_access_runtime.sol index d22d3e43cb35..9a9e7a80bf90 100644 --- a/test/libsolidity/semanticTests/various/code_access_runtime.sol +++ b/test/libsolidity/semanticTests/various/code_access_runtime.sol @@ -19,7 +19,6 @@ contract C { return 42; } } - // ==== // EVMVersion: >=constantinople // ---- diff --git a/test/libsolidity/semanticTests/various/code_length.sol b/test/libsolidity/semanticTests/various/code_length.sol index 84fd393bd721..97a7637976eb 100644 --- a/test/libsolidity/semanticTests/various/code_length.sol +++ b/test/libsolidity/semanticTests/various/code_length.sol @@ -57,8 +57,6 @@ contract C { } } -// ==== -// compileToEwasm: also // ---- // constructor() // gas legacy: 124168 diff --git a/test/libsolidity/semanticTests/various/code_length_contract_member.sol b/test/libsolidity/semanticTests/various/code_length_contract_member.sol index 8486671ed858..ff883139a46e 100644 --- a/test/libsolidity/semanticTests/various/code_length_contract_member.sol +++ b/test/libsolidity/semanticTests/various/code_length_contract_member.sol @@ -11,7 +11,5 @@ contract C { return (s.code.length, s.another.length, address(this).code.length > 50); } } -// ==== -// compileToEwasm: also // ---- // f() -> 0x20, 0x20, true diff --git a/test/libsolidity/semanticTests/various/codebalance_assembly.sol b/test/libsolidity/semanticTests/various/codebalance_assembly.sol index be2b89f29e63..fad0d3e5b465 100644 --- a/test/libsolidity/semanticTests/various/codebalance_assembly.sol +++ b/test/libsolidity/semanticTests/various/codebalance_assembly.sol @@ -17,7 +17,6 @@ contract C { } } } - // ==== // EVMVersion: >=constantinople // ---- diff --git a/test/libsolidity/semanticTests/various/codehash.sol b/test/libsolidity/semanticTests/various/codehash.sol index f787ca5be8aa..fa7dab9dab9f 100644 --- a/test/libsolidity/semanticTests/various/codehash.sol +++ b/test/libsolidity/semanticTests/various/codehash.sol @@ -11,7 +11,6 @@ contract C { return address(this).codehash != 0; } } - // ==== // EVMVersion: >=constantinople // ---- diff --git a/test/libsolidity/semanticTests/various/codehash_assembly.sol b/test/libsolidity/semanticTests/various/codehash_assembly.sol index 71e3a20ef52a..fe2210fa107a 100644 --- a/test/libsolidity/semanticTests/various/codehash_assembly.sol +++ b/test/libsolidity/semanticTests/various/codehash_assembly.sol @@ -15,7 +15,6 @@ contract C { } } } - // ==== // EVMVersion: >=constantinople // ---- diff --git a/test/libsolidity/semanticTests/various/contract_binary_dependencies.sol b/test/libsolidity/semanticTests/various/contract_binary_dependencies.sol index 561e316880d8..0ebf772fbad7 100644 --- a/test/libsolidity/semanticTests/various/contract_binary_dependencies.sol +++ b/test/libsolidity/semanticTests/various/contract_binary_dependencies.sol @@ -15,9 +15,6 @@ contract C { new B(); } } - -// ==== -// compileToEwasm: also // ---- // constructor() -> // gas irOptimized: 100415 diff --git a/test/libsolidity/semanticTests/various/crazy_elementary_typenames_on_stack.sol b/test/libsolidity/semanticTests/various/crazy_elementary_typenames_on_stack.sol index 135543898f32..bc16bacbb6f4 100644 --- a/test/libsolidity/semanticTests/various/crazy_elementary_typenames_on_stack.sol +++ b/test/libsolidity/semanticTests/various/crazy_elementary_typenames_on_stack.sol @@ -8,8 +8,5 @@ contract C { return uint256(x); } } - -// ==== -// compileToEwasm: also // ---- // f() -> -7 diff --git a/test/libsolidity/semanticTests/various/cross_contract_types.sol b/test/libsolidity/semanticTests/various/cross_contract_types.sol index b0cf070a7bcc..9c7728a02c25 100644 --- a/test/libsolidity/semanticTests/various/cross_contract_types.sol +++ b/test/libsolidity/semanticTests/various/cross_contract_types.sol @@ -12,8 +12,5 @@ contract Test { r = x.b; } } - -// ==== -// compileToEwasm: also // ---- // f() -> 3 diff --git a/test/libsolidity/semanticTests/various/decayed_tuple.sol b/test/libsolidity/semanticTests/various/decayed_tuple.sol index f143b98471db..799da3481791 100644 --- a/test/libsolidity/semanticTests/various/decayed_tuple.sol +++ b/test/libsolidity/semanticTests/various/decayed_tuple.sol @@ -5,7 +5,5 @@ contract C { return x; } } -// ==== -// compileToEwasm: also // ---- // f() -> 2 diff --git a/test/libsolidity/semanticTests/various/destructuring_assignment.sol b/test/libsolidity/semanticTests/various/destructuring_assignment.sol index e2c8c52638b7..1534891dc1b8 100644 --- a/test/libsolidity/semanticTests/various/destructuring_assignment.sol +++ b/test/libsolidity/semanticTests/various/destructuring_assignment.sol @@ -31,7 +31,6 @@ contract C { if (x != 456 || memBytes.length != s.length || y[2] != 789) return 11; } } - // ---- // f(bytes): 0x20, 0x5, "abcde" -> 0 // gas irOptimized: 241853 diff --git a/test/libsolidity/semanticTests/various/empty_name_return_parameter.sol b/test/libsolidity/semanticTests/various/empty_name_return_parameter.sol index 906df85cc858..71eb0077c91f 100644 --- a/test/libsolidity/semanticTests/various/empty_name_return_parameter.sol +++ b/test/libsolidity/semanticTests/various/empty_name_return_parameter.sol @@ -3,8 +3,5 @@ contract test { return k; } } - -// ==== -// compileToEwasm: also // ---- // f(uint256): 9 -> 9 diff --git a/test/libsolidity/semanticTests/various/external_types_in_calls.sol b/test/libsolidity/semanticTests/various/external_types_in_calls.sol index 6b28f542c731..e8742c2346b0 100644 --- a/test/libsolidity/semanticTests/various/external_types_in_calls.sol +++ b/test/libsolidity/semanticTests/various/external_types_in_calls.sol @@ -22,7 +22,6 @@ contract C { return C1(address(9)); } } - // ---- // test() -> 9, 7 // gas legacy: 127514 diff --git a/test/libsolidity/semanticTests/various/flipping_sign_tests.sol b/test/libsolidity/semanticTests/various/flipping_sign_tests.sol index f2f63575a10e..174fb993f7bd 100644 --- a/test/libsolidity/semanticTests/various/flipping_sign_tests.sol +++ b/test/libsolidity/semanticTests/various/flipping_sign_tests.sol @@ -5,8 +5,5 @@ contract test { return true; } } - -// ==== -// compileToEwasm: also // ---- // f() -> true diff --git a/test/libsolidity/semanticTests/various/gasleft_decrease.sol b/test/libsolidity/semanticTests/various/gasleft_decrease.sol index 22566bfb1855..ab7302743f64 100644 --- a/test/libsolidity/semanticTests/various/gasleft_decrease.sol +++ b/test/libsolidity/semanticTests/various/gasleft_decrease.sol @@ -14,9 +14,6 @@ contract C { return true; } } - -// ==== -// compileToEwasm: also // ---- // f() -> true // g() -> true diff --git a/test/libsolidity/semanticTests/various/gasleft_shadow_resolution.sol b/test/libsolidity/semanticTests/various/gasleft_shadow_resolution.sol index 3fe3ba10d3d6..280bc496095b 100644 --- a/test/libsolidity/semanticTests/various/gasleft_shadow_resolution.sol +++ b/test/libsolidity/semanticTests/various/gasleft_shadow_resolution.sol @@ -7,8 +7,5 @@ contract C { return gasleft(); } } - -// ==== -// compileToEwasm: also // ---- // f() -> 0 diff --git a/test/libsolidity/semanticTests/various/inline_member_init.sol b/test/libsolidity/semanticTests/various/inline_member_init.sol index 7d3b754928e7..5c48b5d72e2c 100644 --- a/test/libsolidity/semanticTests/various/inline_member_init.sol +++ b/test/libsolidity/semanticTests/various/inline_member_init.sol @@ -14,7 +14,5 @@ contract test { c = m_c; } } -// ==== -// compileToEwasm: also // ---- // get() -> 5, 6, 8 diff --git a/test/libsolidity/semanticTests/various/inline_member_init_inheritence.sol b/test/libsolidity/semanticTests/various/inline_member_init_inheritence.sol index 825bd6d2f9e3..b440b35a83b0 100644 --- a/test/libsolidity/semanticTests/various/inline_member_init_inheritence.sol +++ b/test/libsolidity/semanticTests/various/inline_member_init_inheritence.sol @@ -18,8 +18,6 @@ contract Derived is Base { return m_derived; } } -// ==== -// compileToEwasm: also // ---- // getBMember() -> 5 // getDMember() -> 6 diff --git a/test/libsolidity/semanticTests/various/inline_tuple_with_rational_numbers.sol b/test/libsolidity/semanticTests/various/inline_tuple_with_rational_numbers.sol index f8c396dd161b..e85a38dd6b2a 100644 --- a/test/libsolidity/semanticTests/various/inline_tuple_with_rational_numbers.sol +++ b/test/libsolidity/semanticTests/various/inline_tuple_with_rational_numbers.sol @@ -4,8 +4,5 @@ contract c { return foo3[0]; } } - -// ==== -// compileToEwasm: also // ---- // f() -> 1 diff --git a/test/libsolidity/semanticTests/various/iszero_bnot_correct.sol b/test/libsolidity/semanticTests/various/iszero_bnot_correct.sol index 5744272cee13..d797ab9cd4b8 100644 --- a/test/libsolidity/semanticTests/various/iszero_bnot_correct.sol +++ b/test/libsolidity/semanticTests/various/iszero_bnot_correct.sol @@ -14,8 +14,5 @@ contract C { return true; } } - -// ==== -// compileToEwasm: also // ---- // f() -> true diff --git a/test/libsolidity/semanticTests/various/literal_empty_string.sol b/test/libsolidity/semanticTests/various/literal_empty_string.sol index bf4da54099af..44154fa55b99 100644 --- a/test/libsolidity/semanticTests/various/literal_empty_string.sol +++ b/test/libsolidity/semanticTests/various/literal_empty_string.sol @@ -11,7 +11,6 @@ contract C { this.f("", 2); } } - // ---- // x() -> 0 // a() -> 0 diff --git a/test/libsolidity/semanticTests/various/memory_overwrite.sol b/test/libsolidity/semanticTests/various/memory_overwrite.sol index 930b06f4a0ab..3ab16a3e88f4 100644 --- a/test/libsolidity/semanticTests/various/memory_overwrite.sol +++ b/test/libsolidity/semanticTests/various/memory_overwrite.sol @@ -5,8 +5,5 @@ contract C { x[0] = 0x62; } } - -// ==== -// compileToEwasm: also // ---- // f() -> 0x20, 5, "b23a5" diff --git a/test/libsolidity/semanticTests/various/multi_modifiers.sol b/test/libsolidity/semanticTests/various/multi_modifiers.sol index b6d8dd84c9b0..07f6c038d3db 100644 --- a/test/libsolidity/semanticTests/various/multi_modifiers.sol +++ b/test/libsolidity/semanticTests/various/multi_modifiers.sol @@ -16,8 +16,6 @@ contract C { x += 3; } } -// ==== -// compileToEwasm: also // ---- // f1() -> // x() -> 0x08 diff --git a/test/libsolidity/semanticTests/various/multi_variable_declaration.sol b/test/libsolidity/semanticTests/various/multi_variable_declaration.sol index e054329c911f..de4ecdbe46bd 100644 --- a/test/libsolidity/semanticTests/various/multi_variable_declaration.sol +++ b/test/libsolidity/semanticTests/various/multi_variable_declaration.sol @@ -42,7 +42,5 @@ contract C { return f1() && f2(); } } -// ==== -// compileToEwasm: also // ---- // f() -> true diff --git a/test/libsolidity/semanticTests/various/nested_calldata_struct.sol b/test/libsolidity/semanticTests/various/nested_calldata_struct.sol index 8ba68599e93d..b11241322cec 100644 --- a/test/libsolidity/semanticTests/various/nested_calldata_struct.sol +++ b/test/libsolidity/semanticTests/various/nested_calldata_struct.sol @@ -21,8 +21,5 @@ contract C { return (s.a, s.b, s.s.a, s.s.b, s.c); } } - -// ==== -// compileToEwasm: also // ---- // f((uint256,uint256,(uint256,uint256),uint256)): 1, 2, 3, 4, 5 -> 1, 2, 3, 4, 5 diff --git a/test/libsolidity/semanticTests/various/nested_calldata_struct_to_memory.sol b/test/libsolidity/semanticTests/various/nested_calldata_struct_to_memory.sol index 595f88f54548..25cd645e45bd 100644 --- a/test/libsolidity/semanticTests/various/nested_calldata_struct_to_memory.sol +++ b/test/libsolidity/semanticTests/various/nested_calldata_struct_to_memory.sol @@ -22,6 +22,5 @@ contract C { return (m.a, m.b, m.s.a, m.s.b, m.c); } } - // ---- // f((uint256,uint256,(uint256,uint256),uint256)): 1, 2, 3, 4, 5 -> 1, 2, 3, 4, 5 diff --git a/test/libsolidity/semanticTests/various/positive_integers_to_signed.sol b/test/libsolidity/semanticTests/various/positive_integers_to_signed.sol index 4c23564995bb..4c0d7114588e 100644 --- a/test/libsolidity/semanticTests/various/positive_integers_to_signed.sol +++ b/test/libsolidity/semanticTests/various/positive_integers_to_signed.sol @@ -3,8 +3,6 @@ contract test { int8 public y = 127; int16 public q = 250; } -// ==== -// compileToEwasm: also // ---- // x() -> 2 // y() -> 127 diff --git a/test/libsolidity/semanticTests/various/senders_balance.sol b/test/libsolidity/semanticTests/various/senders_balance.sol index 9f391e2a17ea..6a8da27784f1 100644 --- a/test/libsolidity/semanticTests/various/senders_balance.sol +++ b/test/libsolidity/semanticTests/various/senders_balance.sol @@ -14,7 +14,6 @@ contract D { return c.f(); } } - // ---- // constructor(), 27 wei -> // gas irOptimized: 169377 diff --git a/test/libsolidity/semanticTests/various/single_copy_with_multiple_inheritance.sol b/test/libsolidity/semanticTests/various/single_copy_with_multiple_inheritance.sol index c1dab1895d8f..69c4c4121dee 100644 --- a/test/libsolidity/semanticTests/various/single_copy_with_multiple_inheritance.sol +++ b/test/libsolidity/semanticTests/various/single_copy_with_multiple_inheritance.sol @@ -26,9 +26,6 @@ contract B is Base { contract Derived is Base, B, A {} - -// ==== -// compileToEwasm: also // ---- // getViaB() -> 0 // setViaA(uint256): 23 -> diff --git a/test/libsolidity/semanticTests/various/skip_dynamic_types_for_structs.sol b/test/libsolidity/semanticTests/various/skip_dynamic_types_for_structs.sol index ec94f73a1f18..efff7a95073a 100644 --- a/test/libsolidity/semanticTests/various/skip_dynamic_types_for_structs.sol +++ b/test/libsolidity/semanticTests/various/skip_dynamic_types_for_structs.sol @@ -17,7 +17,6 @@ contract C { return (x, y); } } - // ---- // g() -> 2, 6 // gas irOptimized: 178542 diff --git a/test/libsolidity/semanticTests/various/state_variable_local_variable_mixture.sol b/test/libsolidity/semanticTests/various/state_variable_local_variable_mixture.sol index d3203160a620..f7add5fba191 100644 --- a/test/libsolidity/semanticTests/various/state_variable_local_variable_mixture.sol +++ b/test/libsolidity/semanticTests/various/state_variable_local_variable_mixture.sol @@ -6,7 +6,5 @@ contract A { x = A.y; } } -// ==== -// compileToEwasm: also // ---- // a() -> 2 diff --git a/test/libsolidity/semanticTests/various/state_variable_under_contract_name.sol b/test/libsolidity/semanticTests/various/state_variable_under_contract_name.sol index e71d802fbf71..1167da57e08d 100644 --- a/test/libsolidity/semanticTests/various/state_variable_under_contract_name.sol +++ b/test/libsolidity/semanticTests/various/state_variable_under_contract_name.sol @@ -5,7 +5,5 @@ contract Scope { stateVar = Scope.stateVar; } } -// ==== -// compileToEwasm: also // ---- // getStateVar() -> 42 diff --git a/test/libsolidity/semanticTests/various/string_tuples.sol b/test/libsolidity/semanticTests/various/string_tuples.sol index 935c0b3c2035..57028ae39a05 100644 --- a/test/libsolidity/semanticTests/various/string_tuples.sol +++ b/test/libsolidity/semanticTests/various/string_tuples.sol @@ -11,8 +11,6 @@ contract C { return ("abc"); } } -// ==== -// compileToEwasm: also // ---- // f() -> 0x40, 0x8, 0x3, "abc" // g() -> 0x40, 0x80, 0x3, "abc", 0x3, "def" diff --git a/test/libsolidity/semanticTests/various/super.sol b/test/libsolidity/semanticTests/various/super.sol index 9035f0ca2a80..cd1b4a71afd8 100644 --- a/test/libsolidity/semanticTests/various/super.sol +++ b/test/libsolidity/semanticTests/various/super.sol @@ -24,8 +24,5 @@ contract D is B, C { return super.f() | 8; } } - -// ==== -// compileToEwasm: also // ---- // f() -> 15 diff --git a/test/libsolidity/semanticTests/various/super_alone.sol b/test/libsolidity/semanticTests/various/super_alone.sol index 069df9a91c2b..223e31762c86 100644 --- a/test/libsolidity/semanticTests/various/super_alone.sol +++ b/test/libsolidity/semanticTests/various/super_alone.sol @@ -3,8 +3,5 @@ contract A { super; } } - -// ==== -// compileToEwasm: also // ---- // f() -> diff --git a/test/libsolidity/semanticTests/various/super_parentheses.sol b/test/libsolidity/semanticTests/various/super_parentheses.sol index 3c687d9c19ee..fd7944764dec 100644 --- a/test/libsolidity/semanticTests/various/super_parentheses.sol +++ b/test/libsolidity/semanticTests/various/super_parentheses.sol @@ -24,8 +24,5 @@ contract D is B, C { return ((super).f)() | 8; } } - -// ==== -// compileToEwasm: also // ---- // f() -> 15 diff --git a/test/libsolidity/semanticTests/various/swap_in_storage_overwrite.sol b/test/libsolidity/semanticTests/various/swap_in_storage_overwrite.sol index a21065bf7219..482847b67f64 100644 --- a/test/libsolidity/semanticTests/various/swap_in_storage_overwrite.sol +++ b/test/libsolidity/semanticTests/various/swap_in_storage_overwrite.sol @@ -22,9 +22,6 @@ contract c { (x, y) = (y, x); } } - -// ==== -// compileToEwasm: also // ---- // x() -> 0, 0 // y() -> 0, 0 diff --git a/test/libsolidity/semanticTests/various/test_underscore_in_hex.sol b/test/libsolidity/semanticTests/various/test_underscore_in_hex.sol index 76c6828cd2b6..b9503e44c667 100644 --- a/test/libsolidity/semanticTests/various/test_underscore_in_hex.sol +++ b/test/libsolidity/semanticTests/various/test_underscore_in_hex.sol @@ -5,8 +5,6 @@ contract test { return cond ? x : y; } } -// ==== -// compileToEwasm: also // ---- // f(bool): true -> 0x1234ab // f(bool): false -> 0x1234abcd1234 diff --git a/test/libsolidity/semanticTests/various/typed_multi_variable_declaration.sol b/test/libsolidity/semanticTests/various/typed_multi_variable_declaration.sol index 018ee9669874..c9f12fdaefd4 100644 --- a/test/libsolidity/semanticTests/various/typed_multi_variable_declaration.sol +++ b/test/libsolidity/semanticTests/various/typed_multi_variable_declaration.sol @@ -21,8 +21,5 @@ contract C { return true; } } - -// ==== -// compileToEwasm: also // ---- // f() -> true diff --git a/test/libsolidity/semanticTests/various/value_complex.sol b/test/libsolidity/semanticTests/various/value_complex.sol index a799b7d9bf2c..80f8bb55cc82 100644 --- a/test/libsolidity/semanticTests/various/value_complex.sol +++ b/test/libsolidity/semanticTests/various/value_complex.sol @@ -17,7 +17,6 @@ contract test { return h.getBalance{value: amount + 3, gas: 1000}(); } } - // ---- // constructor(), 20 wei -> // gas irOptimized: 174351 diff --git a/test/libsolidity/semanticTests/various/value_insane.sol b/test/libsolidity/semanticTests/various/value_insane.sol index 8718bd42249f..4a4432758458 100644 --- a/test/libsolidity/semanticTests/various/value_insane.sol +++ b/test/libsolidity/semanticTests/various/value_insane.sol @@ -16,7 +16,6 @@ contract test { return h.getBalance{value: amount + 3, gas: 1000}(); } } - // ---- // constructor(), 20 wei -> // gas irOptimized: 175215 diff --git a/test/libsolidity/semanticTests/various/write_storage_external.sol b/test/libsolidity/semanticTests/various/write_storage_external.sol index 0bbe522484da..a8959b24ea81 100644 --- a/test/libsolidity/semanticTests/various/write_storage_external.sol +++ b/test/libsolidity/semanticTests/various/write_storage_external.sol @@ -33,7 +33,6 @@ contract D { return c.x(); } } - // ---- // f() -> 3 // g() -> 8 diff --git a/test/libsolidity/semanticTests/viaYul/assert.sol b/test/libsolidity/semanticTests/viaYul/assert.sol index aa8de1c277ae..bd1cabc48be3 100644 --- a/test/libsolidity/semanticTests/viaYul/assert.sol +++ b/test/libsolidity/semanticTests/viaYul/assert.sol @@ -13,8 +13,6 @@ contract C { assert(true); } } -// ==== -// compileToEwasm: also // ---- // f(bool): true -> true // f(bool): false -> FAILURE, hex"4e487b71", 0x01 diff --git a/test/libsolidity/semanticTests/viaYul/assert_and_require.sol b/test/libsolidity/semanticTests/viaYul/assert_and_require.sol index 290ef35b31d7..a403b5d64a65 100644 --- a/test/libsolidity/semanticTests/viaYul/assert_and_require.sol +++ b/test/libsolidity/semanticTests/viaYul/assert_and_require.sol @@ -10,8 +10,6 @@ contract C { require(b); } } -// ==== -// compileToEwasm: also // ---- // f(bool): true -> true // f(bool): false -> FAILURE, hex"4e487b71", 0x01 diff --git a/test/libsolidity/semanticTests/viaYul/assign_tuple_from_function_call.sol b/test/libsolidity/semanticTests/viaYul/assign_tuple_from_function_call.sol index c36cc26dc0f0..5da58b31641d 100644 --- a/test/libsolidity/semanticTests/viaYul/assign_tuple_from_function_call.sol +++ b/test/libsolidity/semanticTests/viaYul/assign_tuple_from_function_call.sol @@ -9,8 +9,6 @@ contract C { (,,a) = f(); } } -// ==== -// compileToEwasm: also // ---- // g() -> 3, 2, 1 // h() -> 3 diff --git a/test/libsolidity/semanticTests/viaYul/cleanup/checked_arithmetic.sol b/test/libsolidity/semanticTests/viaYul/cleanup/checked_arithmetic.sol index a81ab4577a2c..19b7cb846430 100644 --- a/test/libsolidity/semanticTests/viaYul/cleanup/checked_arithmetic.sol +++ b/test/libsolidity/semanticTests/viaYul/cleanup/checked_arithmetic.sol @@ -51,7 +51,6 @@ contract C { } } // ==== -// compileToEwasm: also // compileViaYul: true // ---- // add() -> 1, 1 diff --git a/test/libsolidity/semanticTests/viaYul/cleanup/comparison.sol b/test/libsolidity/semanticTests/viaYul/cleanup/comparison.sol index ab3d92a18b3b..035c2690614a 100644 --- a/test/libsolidity/semanticTests/viaYul/cleanup/comparison.sol +++ b/test/libsolidity/semanticTests/viaYul/cleanup/comparison.sol @@ -30,8 +30,6 @@ contract C { return (x < y); } } -// ==== -// compileToEwasm: also // ---- // eq() -> true // neq() -> false diff --git a/test/libsolidity/semanticTests/viaYul/comparison.sol b/test/libsolidity/semanticTests/viaYul/comparison.sol index 0b0763b6eab7..1ac2aec17558 100644 --- a/test/libsolidity/semanticTests/viaYul/comparison.sol +++ b/test/libsolidity/semanticTests/viaYul/comparison.sol @@ -36,8 +36,6 @@ contract C { return a != b; } } -// ==== -// compileToEwasm: also // ---- // f(address): 0x1234 -> false // f(address): 0x00 -> true diff --git a/test/libsolidity/semanticTests/viaYul/comparison_functions.sol b/test/libsolidity/semanticTests/viaYul/comparison_functions.sol index 89d90e577b31..a004299b3b75 100644 --- a/test/libsolidity/semanticTests/viaYul/comparison_functions.sol +++ b/test/libsolidity/semanticTests/viaYul/comparison_functions.sol @@ -24,8 +24,6 @@ contract C { inv = internal1 != invalid; } } -// ==== -// compileToEwasm: also // ---- // equal() -> true, false, false // unequal() -> false, true, true diff --git a/test/libsolidity/semanticTests/viaYul/conditional/conditional_multiple.sol b/test/libsolidity/semanticTests/viaYul/conditional/conditional_multiple.sol index 9e1e8c77877d..828398f57b40 100644 --- a/test/libsolidity/semanticTests/viaYul/conditional/conditional_multiple.sol +++ b/test/libsolidity/semanticTests/viaYul/conditional/conditional_multiple.sol @@ -4,7 +4,5 @@ contract A { return x; } } -// ==== -// compileToEwasm: also // ---- // f() -> 7 diff --git a/test/libsolidity/semanticTests/viaYul/conditional/conditional_true_false_literal.sol b/test/libsolidity/semanticTests/viaYul/conditional/conditional_true_false_literal.sol index 3eda8bfc7681..c2bbb08d5294 100644 --- a/test/libsolidity/semanticTests/viaYul/conditional/conditional_true_false_literal.sol +++ b/test/libsolidity/semanticTests/viaYul/conditional/conditional_true_false_literal.sol @@ -5,7 +5,5 @@ contract A { return x + y; } } -// ==== -// compileToEwasm: also // ---- // f() -> 2 diff --git a/test/libsolidity/semanticTests/viaYul/conditional/conditional_tuple.sol b/test/libsolidity/semanticTests/viaYul/conditional/conditional_tuple.sol index a0b206a12833..51030f9a3a25 100644 --- a/test/libsolidity/semanticTests/viaYul/conditional/conditional_tuple.sol +++ b/test/libsolidity/semanticTests/viaYul/conditional/conditional_tuple.sol @@ -4,8 +4,6 @@ contract A { return (a, b); } } -// ==== -// compileToEwasm: also // ---- // f(bool): true -> 1, 2 // f(bool): false -> 3, 4 diff --git a/test/libsolidity/semanticTests/viaYul/conditional/conditional_with_assignment.sol b/test/libsolidity/semanticTests/viaYul/conditional/conditional_with_assignment.sol index a132e887307c..80d4dde60dc6 100644 --- a/test/libsolidity/semanticTests/viaYul/conditional/conditional_with_assignment.sol +++ b/test/libsolidity/semanticTests/viaYul/conditional/conditional_with_assignment.sol @@ -7,7 +7,5 @@ contract A { return (x, y1, y2, z); } } -// ==== -// compileToEwasm: also // ---- // f() -> 6, 1, 5, 5 diff --git a/test/libsolidity/semanticTests/viaYul/conditional/conditional_with_variables.sol b/test/libsolidity/semanticTests/viaYul/conditional/conditional_with_variables.sol index c5bf8e01851c..4de296630d46 100644 --- a/test/libsolidity/semanticTests/viaYul/conditional/conditional_with_variables.sol +++ b/test/libsolidity/semanticTests/viaYul/conditional/conditional_with_variables.sol @@ -7,7 +7,5 @@ contract A { return (x, y, z, w); } } -// ==== -// compileToEwasm: also // ---- // f() -> 3, 1, 3, 1 diff --git a/test/libsolidity/semanticTests/viaYul/conversion/explicit_cast_assignment.sol b/test/libsolidity/semanticTests/viaYul/conversion/explicit_cast_assignment.sol index 5d0d50dadd03..cc5a156e20dc 100644 --- a/test/libsolidity/semanticTests/viaYul/conversion/explicit_cast_assignment.sol +++ b/test/libsolidity/semanticTests/viaYul/conversion/explicit_cast_assignment.sol @@ -4,7 +4,5 @@ contract C { x = y; } } -// ==== -// compileToEwasm: also // ---- // f() -> 0x78 diff --git a/test/libsolidity/semanticTests/viaYul/conversion/explicit_cast_function_call.sol b/test/libsolidity/semanticTests/viaYul/conversion/explicit_cast_function_call.sol index 34cc69ffeb3d..0ab4b34a741d 100644 --- a/test/libsolidity/semanticTests/viaYul/conversion/explicit_cast_function_call.sol +++ b/test/libsolidity/semanticTests/viaYul/conversion/explicit_cast_function_call.sol @@ -6,7 +6,5 @@ contract C { x = f(bytes4(uint32(0x12345678))); } } -// ==== -// compileToEwasm: also // ---- // g() -> 0x1234567800000000000000000000000000000000000000000000000000000000 diff --git a/test/libsolidity/semanticTests/viaYul/conversion/explicit_cast_local_assignment.sol b/test/libsolidity/semanticTests/viaYul/conversion/explicit_cast_local_assignment.sol index fe07146e18fb..425c6eaedd68 100644 --- a/test/libsolidity/semanticTests/viaYul/conversion/explicit_cast_local_assignment.sol +++ b/test/libsolidity/semanticTests/viaYul/conversion/explicit_cast_local_assignment.sol @@ -4,7 +4,5 @@ contract C { x = b; } } -// ==== -// compileToEwasm: also // ---- // f(uint256): 0x12345678 -> 0x78 diff --git a/test/libsolidity/semanticTests/viaYul/conversion/implicit_cast_assignment.sol b/test/libsolidity/semanticTests/viaYul/conversion/implicit_cast_assignment.sol index 05d265343c80..e22466010c83 100644 --- a/test/libsolidity/semanticTests/viaYul/conversion/implicit_cast_assignment.sol +++ b/test/libsolidity/semanticTests/viaYul/conversion/implicit_cast_assignment.sol @@ -8,7 +8,5 @@ contract C { x = y; } } -// ==== -// compileToEwasm: also // ---- // f() -> 0x78 diff --git a/test/libsolidity/semanticTests/viaYul/conversion/implicit_cast_function_call.sol b/test/libsolidity/semanticTests/viaYul/conversion/implicit_cast_function_call.sol index a2c2d92077a6..e62d45b3576f 100644 --- a/test/libsolidity/semanticTests/viaYul/conversion/implicit_cast_function_call.sol +++ b/test/libsolidity/semanticTests/viaYul/conversion/implicit_cast_function_call.sol @@ -11,7 +11,5 @@ contract C { x = f(a); } } -// ==== -// compileToEwasm: also // ---- // g() -> 0x78 diff --git a/test/libsolidity/semanticTests/viaYul/conversion/implicit_cast_local_assignment.sol b/test/libsolidity/semanticTests/viaYul/conversion/implicit_cast_local_assignment.sol index e582ff394e2f..3793b4e0cf21 100644 --- a/test/libsolidity/semanticTests/viaYul/conversion/implicit_cast_local_assignment.sol +++ b/test/libsolidity/semanticTests/viaYul/conversion/implicit_cast_local_assignment.sol @@ -7,7 +7,5 @@ contract C { y = z; } } -// ==== -// compileToEwasm: also // ---- // f() -> 0x78 diff --git a/test/libsolidity/semanticTests/viaYul/define_tuple_from_function_call.sol b/test/libsolidity/semanticTests/viaYul/define_tuple_from_function_call.sol index 24c72943fff1..3e1559bcfa2f 100644 --- a/test/libsolidity/semanticTests/viaYul/define_tuple_from_function_call.sol +++ b/test/libsolidity/semanticTests/viaYul/define_tuple_from_function_call.sol @@ -11,8 +11,6 @@ contract C { return a; } } -// ==== -// compileToEwasm: also // ---- // g() -> 3, 2, 1 // h() -> 3 diff --git a/test/libsolidity/semanticTests/viaYul/delete.sol b/test/libsolidity/semanticTests/viaYul/delete.sol index 3439bc4df9f5..6a0f3d598618 100644 --- a/test/libsolidity/semanticTests/viaYul/delete.sol +++ b/test/libsolidity/semanticTests/viaYul/delete.sol @@ -18,8 +18,6 @@ contract C { return func() == internal_func(); } } -// ==== -// compileToEwasm: also // ---- // call_deleted_internal_func() -> FAILURE, hex"4e487b71", 0x51 // call_internal_func() -> true diff --git a/test/libsolidity/semanticTests/viaYul/detect_add_overflow.sol b/test/libsolidity/semanticTests/viaYul/detect_add_overflow.sol index 6e6f108a629b..412998b55993 100644 --- a/test/libsolidity/semanticTests/viaYul/detect_add_overflow.sol +++ b/test/libsolidity/semanticTests/viaYul/detect_add_overflow.sol @@ -6,8 +6,6 @@ contract C { x = a + b; } } -// ==== -// compileToEwasm: also // ---- // f(uint256,uint256): 5, 6 -> 11 // f(uint256,uint256): -2, 1 -> -1 diff --git a/test/libsolidity/semanticTests/viaYul/detect_add_overflow_signed.sol b/test/libsolidity/semanticTests/viaYul/detect_add_overflow_signed.sol index 0e7d2db37d15..5c721ac2f2bf 100644 --- a/test/libsolidity/semanticTests/viaYul/detect_add_overflow_signed.sol +++ b/test/libsolidity/semanticTests/viaYul/detect_add_overflow_signed.sol @@ -6,8 +6,6 @@ contract C { x = a + b; } } -// ==== -// compileToEwasm: also // ---- // f(int256,int256): 5, 6 -> 11 // f(int256,int256): -2, 1 -> -1 diff --git a/test/libsolidity/semanticTests/viaYul/detect_div_overflow.sol b/test/libsolidity/semanticTests/viaYul/detect_div_overflow.sol index ab3d97f46da7..d4cefe12f651 100644 --- a/test/libsolidity/semanticTests/viaYul/detect_div_overflow.sol +++ b/test/libsolidity/semanticTests/viaYul/detect_div_overflow.sol @@ -9,8 +9,6 @@ contract C { x = a / b; } } -// ==== -// compileToEwasm: also // ---- // f(uint256,uint256): 10, 3 -> 3 // f(uint256,uint256): 1, 0 -> FAILURE, hex"4e487b71", 0x12 diff --git a/test/libsolidity/semanticTests/viaYul/detect_mod_zero.sol b/test/libsolidity/semanticTests/viaYul/detect_mod_zero.sol index 5307f958984f..0d0432987459 100644 --- a/test/libsolidity/semanticTests/viaYul/detect_mod_zero.sol +++ b/test/libsolidity/semanticTests/viaYul/detect_mod_zero.sol @@ -6,8 +6,6 @@ contract C { x = a % b; } } -// ==== -// compileToEwasm: also // ---- // f(uint256,uint256): 10, 3 -> 1 // f(uint256,uint256): 10, 2 -> 0 diff --git a/test/libsolidity/semanticTests/viaYul/detect_mod_zero_signed.sol b/test/libsolidity/semanticTests/viaYul/detect_mod_zero_signed.sol index 102df82f3003..e97bc4cc30a2 100644 --- a/test/libsolidity/semanticTests/viaYul/detect_mod_zero_signed.sol +++ b/test/libsolidity/semanticTests/viaYul/detect_mod_zero_signed.sol @@ -6,8 +6,6 @@ contract C { x = a % b; } } -// ==== -// compileToEwasm: also // ---- // f(int256,int256): 10, 3 -> 1 // f(int256,int256): 10, 2 -> 0 diff --git a/test/libsolidity/semanticTests/viaYul/detect_mul_overflow.sol b/test/libsolidity/semanticTests/viaYul/detect_mul_overflow.sol index 8cc64ffa07dc..935d03752dc5 100644 --- a/test/libsolidity/semanticTests/viaYul/detect_mul_overflow.sol +++ b/test/libsolidity/semanticTests/viaYul/detect_mul_overflow.sol @@ -6,8 +6,6 @@ contract C { x = a * b; } } -// ==== -// compileToEwasm: also // ---- // f(uint256,uint256): 5, 6 -> 30 // f(uint256,uint256): -1, 1 -> -1 diff --git a/test/libsolidity/semanticTests/viaYul/detect_mul_overflow_signed.sol b/test/libsolidity/semanticTests/viaYul/detect_mul_overflow_signed.sol index a9581c49f721..213b1a6d3b24 100644 --- a/test/libsolidity/semanticTests/viaYul/detect_mul_overflow_signed.sol +++ b/test/libsolidity/semanticTests/viaYul/detect_mul_overflow_signed.sol @@ -9,8 +9,6 @@ contract C { x = a * b; } } -// ==== -// compileToEwasm: also // ---- // f(int256,int256): 5, 6 -> 30 // f(int256,int256): -1, 1 -> -1 diff --git a/test/libsolidity/semanticTests/viaYul/detect_sub_overflow.sol b/test/libsolidity/semanticTests/viaYul/detect_sub_overflow.sol index 1f6a0d7e5adc..ee059137a028 100644 --- a/test/libsolidity/semanticTests/viaYul/detect_sub_overflow.sol +++ b/test/libsolidity/semanticTests/viaYul/detect_sub_overflow.sol @@ -6,8 +6,6 @@ contract C { x = a - b; } } -// ==== -// compileToEwasm: also // ---- // f(uint256,uint256): 6, 5 -> 1 // f(uint256,uint256): 6, 6 -> 0 diff --git a/test/libsolidity/semanticTests/viaYul/detect_sub_overflow_signed.sol b/test/libsolidity/semanticTests/viaYul/detect_sub_overflow_signed.sol index 34992607903f..a247af68bff8 100644 --- a/test/libsolidity/semanticTests/viaYul/detect_sub_overflow_signed.sol +++ b/test/libsolidity/semanticTests/viaYul/detect_sub_overflow_signed.sol @@ -6,8 +6,6 @@ contract C { x = a - b; } } -// ==== -// compileToEwasm: also // ---- // f(int256,int256): 5, 6 -> -1 // f(int256,int256): -2, 1 -> -3 diff --git a/test/libsolidity/semanticTests/viaYul/dirty_memory_dynamic_array.sol b/test/libsolidity/semanticTests/viaYul/dirty_memory_dynamic_array.sol index 8b34fd801f85..36a253b02452 100644 --- a/test/libsolidity/semanticTests/viaYul/dirty_memory_dynamic_array.sol +++ b/test/libsolidity/semanticTests/viaYul/dirty_memory_dynamic_array.sol @@ -13,7 +13,6 @@ contract C { } } // ==== -// compileToEwasm: also // compileViaYul: true // ---- // f() -> true diff --git a/test/libsolidity/semanticTests/viaYul/dirty_memory_int32.sol b/test/libsolidity/semanticTests/viaYul/dirty_memory_int32.sol index 636572d500f3..fc2fe4251658 100644 --- a/test/libsolidity/semanticTests/viaYul/dirty_memory_int32.sol +++ b/test/libsolidity/semanticTests/viaYul/dirty_memory_int32.sol @@ -13,7 +13,6 @@ contract C { } } // ==== -// compileToEwasm: also // compileViaYul: true // ---- // f() -> true diff --git a/test/libsolidity/semanticTests/viaYul/dirty_memory_static_array.sol b/test/libsolidity/semanticTests/viaYul/dirty_memory_static_array.sol index 2e9acb27c322..4742bae2dfdf 100644 --- a/test/libsolidity/semanticTests/viaYul/dirty_memory_static_array.sol +++ b/test/libsolidity/semanticTests/viaYul/dirty_memory_static_array.sol @@ -13,7 +13,6 @@ contract C { } } // ==== -// compileToEwasm: also // compileViaYul: true // ---- // f() -> true diff --git a/test/libsolidity/semanticTests/viaYul/dirty_memory_struct.sol b/test/libsolidity/semanticTests/viaYul/dirty_memory_struct.sol index 7c14280502a9..411cbe069e6a 100644 --- a/test/libsolidity/semanticTests/viaYul/dirty_memory_struct.sol +++ b/test/libsolidity/semanticTests/viaYul/dirty_memory_struct.sol @@ -17,7 +17,6 @@ contract C { } } // ==== -// compileToEwasm: also // compileViaYul: true // ---- // f() -> true diff --git a/test/libsolidity/semanticTests/viaYul/dirty_memory_uint32.sol b/test/libsolidity/semanticTests/viaYul/dirty_memory_uint32.sol index cfd2c05af9bb..a23a566c5bbe 100644 --- a/test/libsolidity/semanticTests/viaYul/dirty_memory_uint32.sol +++ b/test/libsolidity/semanticTests/viaYul/dirty_memory_uint32.sol @@ -13,7 +13,6 @@ contract C { } } // ==== -// compileToEwasm: also // compileViaYul: true // ---- // f() -> true diff --git a/test/libsolidity/semanticTests/viaYul/exp.sol b/test/libsolidity/semanticTests/viaYul/exp.sol index 1ca5842ab078..324256b456df 100644 --- a/test/libsolidity/semanticTests/viaYul/exp.sol +++ b/test/libsolidity/semanticTests/viaYul/exp.sol @@ -3,8 +3,6 @@ contract C { return x**y; } } -// ==== -// compileToEwasm: also // ---- // f(uint256,uint256): 0, 0 -> 1 // f(uint256,uint256): 0, 1 -> 0x00 diff --git a/test/libsolidity/semanticTests/viaYul/exp_literals.sol b/test/libsolidity/semanticTests/viaYul/exp_literals.sol index 55ed66eb3fc9..382d75184ff5 100644 --- a/test/libsolidity/semanticTests/viaYul/exp_literals.sol +++ b/test/libsolidity/semanticTests/viaYul/exp_literals.sol @@ -29,7 +29,6 @@ contract C { } // ==== -// compileToEwasm: also // compileViaYul: true // ---- // exp_2(uint256): 255 -> 57896044618658097711785492504343953926634992332820282019728792003956564819968 diff --git a/test/libsolidity/semanticTests/viaYul/exp_literals_success.sol b/test/libsolidity/semanticTests/viaYul/exp_literals_success.sol index d28a56eb4f17..12ab33924293 100644 --- a/test/libsolidity/semanticTests/viaYul/exp_literals_success.sol +++ b/test/libsolidity/semanticTests/viaYul/exp_literals_success.sol @@ -28,8 +28,6 @@ contract C { } } -// ==== -// compileToEwasm: also // ---- // exp_2(uint256): 255 -> 57896044618658097711785492504343953926634992332820282019728792003956564819968 // exp_minus_2(uint256): 255 -> -57896044618658097711785492504343953926634992332820282019728792003956564819968 diff --git a/test/libsolidity/semanticTests/viaYul/exp_neg.sol b/test/libsolidity/semanticTests/viaYul/exp_neg.sol index de58d65926cd..a6ba617d7945 100644 --- a/test/libsolidity/semanticTests/viaYul/exp_neg.sol +++ b/test/libsolidity/semanticTests/viaYul/exp_neg.sol @@ -3,8 +3,6 @@ contract C { return x**y; } } -// ==== -// compileToEwasm: also // ---- // f(int256,uint256): 0, 0 -> 1 // f(int256,uint256): 0, 1 -> 0x00 diff --git a/test/libsolidity/semanticTests/viaYul/exp_neg_overflow.sol b/test/libsolidity/semanticTests/viaYul/exp_neg_overflow.sol index 9d4b59d5286b..a966e3ccdbf3 100644 --- a/test/libsolidity/semanticTests/viaYul/exp_neg_overflow.sol +++ b/test/libsolidity/semanticTests/viaYul/exp_neg_overflow.sol @@ -6,8 +6,6 @@ contract C { return x**y; } } -// ==== -// compileToEwasm: also // ---- // f(int8,uint256): 2, 6 -> 64 // f(int8,uint256): 2, 7 -> FAILURE, hex"4e487b71", 0x11 diff --git a/test/libsolidity/semanticTests/viaYul/exp_overflow.sol b/test/libsolidity/semanticTests/viaYul/exp_overflow.sol index 8ba9c1d4ad77..7a100c2be003 100644 --- a/test/libsolidity/semanticTests/viaYul/exp_overflow.sol +++ b/test/libsolidity/semanticTests/viaYul/exp_overflow.sol @@ -6,8 +6,6 @@ contract C { return x**y; } } -// ==== -// compileToEwasm: also // ---- // f(uint8,uint8): 2, 7 -> 0x80 // f(uint8,uint8): 2, 8 -> FAILURE, hex"4e487b71", 0x11 diff --git a/test/libsolidity/semanticTests/viaYul/exp_various.sol b/test/libsolidity/semanticTests/viaYul/exp_various.sol index a1a69ed03143..3e9cf9d40bb6 100644 --- a/test/libsolidity/semanticTests/viaYul/exp_various.sol +++ b/test/libsolidity/semanticTests/viaYul/exp_various.sol @@ -6,8 +6,6 @@ contract C { return x**y; } } -// ==== -// compileToEwasm: also // ---- // f(uint8,uint8): 0, 0 -> 1 // f(uint8,uint8): 0, 1 -> 0x00 diff --git a/test/libsolidity/semanticTests/viaYul/function_address.sol b/test/libsolidity/semanticTests/viaYul/function_address.sol index e7d6c49a2261..0c1c58dd821d 100644 --- a/test/libsolidity/semanticTests/viaYul/function_address.sol +++ b/test/libsolidity/semanticTests/viaYul/function_address.sol @@ -9,8 +9,6 @@ contract C { return a.address; } } -// ==== -// compileToEwasm: also // ---- // f() -> 0xc06afe3a8444fc0004668591e8306bfb9968e79e // g() -> true diff --git a/test/libsolidity/semanticTests/viaYul/function_entry_checks.sol b/test/libsolidity/semanticTests/viaYul/function_entry_checks.sol index 29812e01892a..6f5f90824f60 100644 --- a/test/libsolidity/semanticTests/viaYul/function_entry_checks.sol +++ b/test/libsolidity/semanticTests/viaYul/function_entry_checks.sol @@ -16,8 +16,6 @@ contract C { function t(uint) public pure { } } -// ==== -// compileToEwasm: also // ---- // f() -> 0 // g(uint256,uint256): 1, -2 -> 0 diff --git a/test/libsolidity/semanticTests/viaYul/function_pointers.sol b/test/libsolidity/semanticTests/viaYul/function_pointers.sol index 8bc69baa8783..b34f01981788 100644 --- a/test/libsolidity/semanticTests/viaYul/function_pointers.sol +++ b/test/libsolidity/semanticTests/viaYul/function_pointers.sol @@ -16,8 +16,6 @@ contract C { k1()(); } } -// ==== -// compileToEwasm: also // ---- // f() -> FAILURE, hex"4e487b71", 0x51 // g() -> FAILURE diff --git a/test/libsolidity/semanticTests/viaYul/function_selector.sol b/test/libsolidity/semanticTests/viaYul/function_selector.sol index d21afdcf545b..4737a36d9a94 100644 --- a/test/libsolidity/semanticTests/viaYul/function_selector.sol +++ b/test/libsolidity/semanticTests/viaYul/function_selector.sol @@ -6,8 +6,6 @@ contract C { return a.selector; } } -// ==== -// compileToEwasm: also // ---- // f() -> left(0x26121ff0) // h(function): left(0x1122334400112233445566778899AABBCCDDEEFF42424242) -> left(0x42424242) diff --git a/test/libsolidity/semanticTests/viaYul/if.sol b/test/libsolidity/semanticTests/viaYul/if.sol index d2f582bb1b56..0fe752d51020 100644 --- a/test/libsolidity/semanticTests/viaYul/if.sol +++ b/test/libsolidity/semanticTests/viaYul/if.sol @@ -59,8 +59,6 @@ contract C { } while(false); } } -// ==== -// compileToEwasm: also // ---- // f(bool): 0 -> 23 // f(bool): 1 -> 42 diff --git a/test/libsolidity/semanticTests/viaYul/local_address_assignment.sol b/test/libsolidity/semanticTests/viaYul/local_address_assignment.sol index 35a2765ff54f..529513eafff5 100644 --- a/test/libsolidity/semanticTests/viaYul/local_address_assignment.sol +++ b/test/libsolidity/semanticTests/viaYul/local_address_assignment.sol @@ -4,7 +4,5 @@ contract C { x = b; } } -// ==== -// compileToEwasm: also // ---- // f(address): 0x1234 -> 0x1234 diff --git a/test/libsolidity/semanticTests/viaYul/local_assignment.sol b/test/libsolidity/semanticTests/viaYul/local_assignment.sol index 978b905e3869..f77d25c663d4 100644 --- a/test/libsolidity/semanticTests/viaYul/local_assignment.sol +++ b/test/libsolidity/semanticTests/viaYul/local_assignment.sol @@ -4,7 +4,5 @@ contract C { x = b; } } -// ==== -// compileToEwasm: also // ---- // f(uint256): 6 -> 6 diff --git a/test/libsolidity/semanticTests/viaYul/local_bool_assignment.sol b/test/libsolidity/semanticTests/viaYul/local_bool_assignment.sol index c95cbf41aca1..d32e281dad56 100644 --- a/test/libsolidity/semanticTests/viaYul/local_bool_assignment.sol +++ b/test/libsolidity/semanticTests/viaYul/local_bool_assignment.sol @@ -4,7 +4,5 @@ contract C { x = b; } } -// ==== -// compileToEwasm: also // ---- // f(bool): true -> true diff --git a/test/libsolidity/semanticTests/viaYul/local_tuple_assignment.sol b/test/libsolidity/semanticTests/viaYul/local_tuple_assignment.sol index a6b14a9e0201..ff7f0785574e 100644 --- a/test/libsolidity/semanticTests/viaYul/local_tuple_assignment.sol +++ b/test/libsolidity/semanticTests/viaYul/local_tuple_assignment.sol @@ -21,8 +21,6 @@ contract C { (((d))) = (13); } } -// ==== -// compileToEwasm: also // ---- // x() -> 17 // f(uint256,uint256): 23, 42 -> 23, 42 diff --git a/test/libsolidity/semanticTests/viaYul/local_variable_without_init.sol b/test/libsolidity/semanticTests/viaYul/local_variable_without_init.sol index f11cd661f943..f1b2b1740bc3 100644 --- a/test/libsolidity/semanticTests/viaYul/local_variable_without_init.sol +++ b/test/libsolidity/semanticTests/viaYul/local_variable_without_init.sol @@ -4,7 +4,5 @@ contract C { return x; } } -// ==== -// compileToEwasm: also // ---- // f() -> 0 diff --git a/test/libsolidity/semanticTests/viaYul/loops/break.sol b/test/libsolidity/semanticTests/viaYul/loops/break.sol index 939cd0b7f646..77ecface7958 100644 --- a/test/libsolidity/semanticTests/viaYul/loops/break.sol +++ b/test/libsolidity/semanticTests/viaYul/loops/break.sol @@ -23,8 +23,6 @@ contract C { } while (x < 3); } } -// ==== -// compileToEwasm: also // ---- // f() -> 2 // g() -> 2 diff --git a/test/libsolidity/semanticTests/viaYul/loops/continue.sol b/test/libsolidity/semanticTests/viaYul/loops/continue.sol index 25e57dac19c5..b9c3f167d3a7 100644 --- a/test/libsolidity/semanticTests/viaYul/loops/continue.sol +++ b/test/libsolidity/semanticTests/viaYul/loops/continue.sol @@ -29,8 +29,6 @@ contract C { x = x + a; } } -// ==== -// compileToEwasm: also // ---- // f() -> 11 // g() -> 11 diff --git a/test/libsolidity/semanticTests/viaYul/loops/return.sol b/test/libsolidity/semanticTests/viaYul/loops/return.sol index 3f3b709bae3d..ee7062e70073 100644 --- a/test/libsolidity/semanticTests/viaYul/loops/return.sol +++ b/test/libsolidity/semanticTests/viaYul/loops/return.sol @@ -26,8 +26,6 @@ contract C { } while (x < 3); } } -// ==== -// compileToEwasm: also // ---- // f() -> 1 // g() -> 1 diff --git a/test/libsolidity/semanticTests/viaYul/loops/simple.sol b/test/libsolidity/semanticTests/viaYul/loops/simple.sol index 3a09098ab22a..a4d076325c39 100644 --- a/test/libsolidity/semanticTests/viaYul/loops/simple.sol +++ b/test/libsolidity/semanticTests/viaYul/loops/simple.sol @@ -29,8 +29,6 @@ contract C { for (;;) {break;} } } -// ==== -// compileToEwasm: also // ---- // f() -> 1024 // g() -> 1024 diff --git a/test/libsolidity/semanticTests/viaYul/memory_struct_allow.sol b/test/libsolidity/semanticTests/viaYul/memory_struct_allow.sol index 47213b7b4847..9f87c7b97d0f 100644 --- a/test/libsolidity/semanticTests/viaYul/memory_struct_allow.sol +++ b/test/libsolidity/semanticTests/viaYul/memory_struct_allow.sol @@ -15,7 +15,5 @@ contract C { return (s.a, s.b); } } -// ==== -// compileToEwasm: also // ---- // f() -> 0, 0 diff --git a/test/libsolidity/semanticTests/viaYul/msg_sender.sol b/test/libsolidity/semanticTests/viaYul/msg_sender.sol index 520c9be4e3e3..058f142f8694 100644 --- a/test/libsolidity/semanticTests/viaYul/msg_sender.sol +++ b/test/libsolidity/semanticTests/viaYul/msg_sender.sol @@ -5,7 +5,5 @@ contract C { return x == msg.sender; } } -// ==== -// compileToEwasm: also // ---- // test() -> true diff --git a/test/libsolidity/semanticTests/viaYul/require.sol b/test/libsolidity/semanticTests/viaYul/require.sol index 7546921f18ac..39677b4f5d3f 100644 --- a/test/libsolidity/semanticTests/viaYul/require.sol +++ b/test/libsolidity/semanticTests/viaYul/require.sol @@ -30,7 +30,6 @@ contract C { } // ==== // EVMVersion: >=byzantium -// compileToEwasm: also // ---- // f(bool): true -> true // f(bool): false -> FAILURE diff --git a/test/libsolidity/semanticTests/viaYul/return.sol b/test/libsolidity/semanticTests/viaYul/return.sol index c42353e60f36..f58632b964e8 100644 --- a/test/libsolidity/semanticTests/viaYul/return.sol +++ b/test/libsolidity/semanticTests/viaYul/return.sol @@ -4,7 +4,5 @@ contract C { x = 3; } } -// ==== -// compileToEwasm: also // ---- // f() -> 7 diff --git a/test/libsolidity/semanticTests/viaYul/return_and_convert.sol b/test/libsolidity/semanticTests/viaYul/return_and_convert.sol index 547838371eb7..78e9e3bea0c0 100644 --- a/test/libsolidity/semanticTests/viaYul/return_and_convert.sol +++ b/test/libsolidity/semanticTests/viaYul/return_and_convert.sol @@ -5,7 +5,5 @@ contract C { return b; } } -// ==== -// compileToEwasm: also // ---- // f() -> 255 diff --git a/test/libsolidity/semanticTests/viaYul/return_storage_pointers.sol b/test/libsolidity/semanticTests/viaYul/return_storage_pointers.sol index fd886596fda4..936058124b48 100644 --- a/test/libsolidity/semanticTests/viaYul/return_storage_pointers.sol +++ b/test/libsolidity/semanticTests/viaYul/return_storage_pointers.sol @@ -10,7 +10,5 @@ contract C { } } -// ==== -// compileToEwasm: also // ---- // g() -> 0, 0 diff --git a/test/libsolidity/semanticTests/viaYul/short_circuit.sol b/test/libsolidity/semanticTests/viaYul/short_circuit.sol index 5823f7734061..b160bbd77e94 100644 --- a/test/libsolidity/semanticTests/viaYul/short_circuit.sol +++ b/test/libsolidity/semanticTests/viaYul/short_circuit.sol @@ -8,8 +8,6 @@ contract C { y = x; } } -// ==== -// compileToEwasm: also // ---- // or(uint256): 0 -> true, 0 // and(uint256): 0 -> true, 8 diff --git a/test/libsolidity/semanticTests/viaYul/simple_assignment.sol b/test/libsolidity/semanticTests/viaYul/simple_assignment.sol index 016f7438dfb3..ed0ba28784dd 100644 --- a/test/libsolidity/semanticTests/viaYul/simple_assignment.sol +++ b/test/libsolidity/semanticTests/viaYul/simple_assignment.sol @@ -4,7 +4,5 @@ contract C { y = b; } } -// ==== -// compileToEwasm: also // ---- // f(uint256,uint256): 5, 6 -> 5, 6 diff --git a/test/libsolidity/semanticTests/viaYul/simple_inline_asm.sol b/test/libsolidity/semanticTests/viaYul/simple_inline_asm.sol index 99e0cbcdfa65..8e8cd78e87f2 100644 --- a/test/libsolidity/semanticTests/viaYul/simple_inline_asm.sol +++ b/test/libsolidity/semanticTests/viaYul/simple_inline_asm.sol @@ -11,7 +11,5 @@ contract C { x = a + b + c; } } -// ==== -// compileToEwasm: also // ---- // f() -> 6 diff --git a/test/libsolidity/semanticTests/viaYul/smoke_test.sol b/test/libsolidity/semanticTests/viaYul/smoke_test.sol index 6460ad90f31f..53a11869fefd 100644 --- a/test/libsolidity/semanticTests/viaYul/smoke_test.sol +++ b/test/libsolidity/semanticTests/viaYul/smoke_test.sol @@ -2,6 +2,5 @@ contract C { } // ==== // allowNonExistingFunctions: true -// compileToEwasm: also // ---- // f() -> FAILURE diff --git a/test/libsolidity/semanticTests/viaYul/storage/dirty_storage_bytes.sol b/test/libsolidity/semanticTests/viaYul/storage/dirty_storage_bytes.sol index f61808084b75..d1ec20db09b5 100644 --- a/test/libsolidity/semanticTests/viaYul/storage/dirty_storage_bytes.sol +++ b/test/libsolidity/semanticTests/viaYul/storage/dirty_storage_bytes.sol @@ -12,7 +12,5 @@ contract C { correct = r == (0x64 << 248); } } -// ==== -// compileToEwasm: also // ---- // f() -> true diff --git a/test/libsolidity/semanticTests/viaYul/storage/dirty_storage_static_array.sol b/test/libsolidity/semanticTests/viaYul/storage/dirty_storage_static_array.sol index 59b63ddf2f83..7c035f05362a 100644 --- a/test/libsolidity/semanticTests/viaYul/storage/dirty_storage_static_array.sol +++ b/test/libsolidity/semanticTests/viaYul/storage/dirty_storage_static_array.sol @@ -12,7 +12,5 @@ contract C { correct = (s[0] == 0x01) && (r == 0x01); } } -// ==== -// compileToEwasm: also // ---- // f() -> true diff --git a/test/libsolidity/semanticTests/viaYul/storage/packed_storage.sol b/test/libsolidity/semanticTests/viaYul/storage/packed_storage.sol index a39c0797dece..5253a6a1ab16 100644 --- a/test/libsolidity/semanticTests/viaYul/storage/packed_storage.sol +++ b/test/libsolidity/semanticTests/viaYul/storage/packed_storage.sol @@ -10,7 +10,5 @@ contract C { _x = x; } } -// ==== -// compileToEwasm: also // ---- // f(uint8): 6 -> 9 diff --git a/test/libsolidity/semanticTests/viaYul/storage/simple_storage.sol b/test/libsolidity/semanticTests/viaYul/storage/simple_storage.sol index df2575a8877d..03d7ed92051c 100644 --- a/test/libsolidity/semanticTests/viaYul/storage/simple_storage.sol +++ b/test/libsolidity/semanticTests/viaYul/storage/simple_storage.sol @@ -10,8 +10,6 @@ contract C { _y = y; } } -// ==== -// compileToEwasm: also // ---- // setX(uint256): 6 -> 6 // setY(uint256): 2 -> 2 diff --git a/test/libsolidity/semanticTests/viaYul/string_format.sol b/test/libsolidity/semanticTests/viaYul/string_format.sol index 49746adb4616..5869ea2e76fb 100644 --- a/test/libsolidity/semanticTests/viaYul/string_format.sol +++ b/test/libsolidity/semanticTests/viaYul/string_format.sol @@ -4,8 +4,6 @@ contract C { function g() external pure returns (bytes32) { return "abcabc"; } function h() external pure returns (bytes4) { return 0xcafecafe; } } -// ==== -// compileToEwasm: also // ---- // f1() -> 0x20, 6, left(0x616263616263) // f2() -> 32, 47, 44048183223289766195424279195050628400112610419087780792899004030957505095210, 18165586057823232067963737336409268114628061002662705707816940456850361417728 diff --git a/test/libsolidity/semanticTests/viaYul/string_literals.sol b/test/libsolidity/semanticTests/viaYul/string_literals.sol index f1140ffb4d7a..985d26354253 100644 --- a/test/libsolidity/semanticTests/viaYul/string_literals.sol +++ b/test/libsolidity/semanticTests/viaYul/string_literals.sol @@ -18,8 +18,6 @@ contract C { x = "abc"; } } -// ==== -// compileToEwasm: also // ---- // short_dyn() -> 0x20, 3, "abc" // long_dyn() -> 0x20, 80, "12345678901234567890123456789012", "34567890123456789012345678901234", "5678901234567890" diff --git a/test/libsolidity/semanticTests/viaYul/tuple_evaluation_order.sol b/test/libsolidity/semanticTests/viaYul/tuple_evaluation_order.sol index edde645880fb..e1a1689b7fc0 100644 --- a/test/libsolidity/semanticTests/viaYul/tuple_evaluation_order.sol +++ b/test/libsolidity/semanticTests/viaYul/tuple_evaluation_order.sol @@ -8,7 +8,5 @@ contract C { return (x, y); } } -// ==== -// compileToEwasm: also // ---- // f() -> 3, 1 diff --git a/test/libsolidity/semanticTests/viaYul/unary_fixedbytes.sol b/test/libsolidity/semanticTests/viaYul/unary_fixedbytes.sol index f0e811ac237c..d8e640713a05 100644 --- a/test/libsolidity/semanticTests/viaYul/unary_fixedbytes.sol +++ b/test/libsolidity/semanticTests/viaYul/unary_fixedbytes.sol @@ -58,8 +58,6 @@ contract C { return r; } } -// ==== -// compileToEwasm: also // ---- // conv(bytes25): left(0xff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff) -> 0xff00ff00ff00ff00ff00ff00ff00ff00ffffffffffffffffffffffffffffffff // upcast(bytes25): left(0xff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff) -> 0xff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff0000000000000000 diff --git a/test/libsolidity/semanticTests/viaYul/unary_operations.sol b/test/libsolidity/semanticTests/viaYul/unary_operations.sol index 37a6e90d8447..17d8dad03472 100644 --- a/test/libsolidity/semanticTests/viaYul/unary_operations.sol +++ b/test/libsolidity/semanticTests/viaYul/unary_operations.sol @@ -84,7 +84,6 @@ contract C { } // ==== // compileViaYul: true -// compileToEwasm: also // ---- // preincr_s8(int8): 128 -> FAILURE // postincr_s8(int8): 128 -> FAILURE diff --git a/test/libsolidity/semanticTests/viaYul/various_inline_asm.sol b/test/libsolidity/semanticTests/viaYul/various_inline_asm.sol index dc9057121d06..b440d8e136c6 100644 --- a/test/libsolidity/semanticTests/viaYul/various_inline_asm.sol +++ b/test/libsolidity/semanticTests/viaYul/various_inline_asm.sol @@ -17,7 +17,5 @@ contract C { x = a + b + c; } } -// ==== -// compileToEwasm: also // ---- // f() -> 70 diff --git a/test/libsolidity/semanticTests/viaYul/virtual_functions.sol b/test/libsolidity/semanticTests/viaYul/virtual_functions.sol index ea43914b73c6..798f90ffd431 100644 --- a/test/libsolidity/semanticTests/viaYul/virtual_functions.sol +++ b/test/libsolidity/semanticTests/viaYul/virtual_functions.sol @@ -23,8 +23,6 @@ contract C is X { x = 3; } } -// ==== -// compileToEwasm: also // ---- // f() -> 3 // f1() -> 3 diff --git a/test/libsolidity/semanticTests/virtualFunctions/internal_virtual_function_calls.sol b/test/libsolidity/semanticTests/virtualFunctions/internal_virtual_function_calls.sol index 7c5658ae2b60..28705ee40ee8 100644 --- a/test/libsolidity/semanticTests/virtualFunctions/internal_virtual_function_calls.sol +++ b/test/libsolidity/semanticTests/virtualFunctions/internal_virtual_function_calls.sol @@ -14,8 +14,5 @@ contract Derived is Base { return 2; } } - -// ==== -// compileToEwasm: also // ---- // f() -> 2 diff --git a/test/libsolidity/semanticTests/virtualFunctions/internal_virtual_function_calls_through_dispatch.sol b/test/libsolidity/semanticTests/virtualFunctions/internal_virtual_function_calls_through_dispatch.sol index f74a2df7a9be..d83343048399 100644 --- a/test/libsolidity/semanticTests/virtualFunctions/internal_virtual_function_calls_through_dispatch.sol +++ b/test/libsolidity/semanticTests/virtualFunctions/internal_virtual_function_calls_through_dispatch.sol @@ -19,8 +19,5 @@ contract Derived is Base { return f(); } } - -// ==== -// compileToEwasm: also // ---- // h() -> 2 diff --git a/test/libsolidity/semanticTests/virtualFunctions/virtual_function_calls.sol b/test/libsolidity/semanticTests/virtualFunctions/virtual_function_calls.sol index d277712f0d3d..ea543a786fdc 100644 --- a/test/libsolidity/semanticTests/virtualFunctions/virtual_function_calls.sol +++ b/test/libsolidity/semanticTests/virtualFunctions/virtual_function_calls.sol @@ -14,9 +14,6 @@ contract Derived is Base { return 2; } } - -// ==== -// compileToEwasm: also // ---- // g() -> 2 // f() -> 2 diff --git a/test/libsolidity/semanticTests/virtualFunctions/virtual_function_usage_in_constructor_arguments.sol b/test/libsolidity/semanticTests/virtualFunctions/virtual_function_usage_in_constructor_arguments.sol index d8417e3e266a..55a50a5c91cb 100644 --- a/test/libsolidity/semanticTests/virtualFunctions/virtual_function_usage_in_constructor_arguments.sol +++ b/test/libsolidity/semanticTests/virtualFunctions/virtual_function_usage_in_constructor_arguments.sol @@ -27,6 +27,5 @@ contract Derived is Base { return 2; } } - // ---- // getA() -> 2 diff --git a/test/libsolidity/smtCheckerTests/array_members/push_overflow_2_safe.sol b/test/libsolidity/smtCheckerTests/array_members/push_overflow_2_safe.sol index 5c0466ace414..798f8fce7bfd 100644 --- a/test/libsolidity/smtCheckerTests/array_members/push_overflow_2_safe.sol +++ b/test/libsolidity/smtCheckerTests/array_members/push_overflow_2_safe.sol @@ -9,7 +9,6 @@ contract C { assert(x[0] == 42 || x[0] == 23); } } - // ==== // SMTEngine: all // ---- diff --git a/test/libsolidity/smtCheckerTests/array_members/push_struct_member_1.sol b/test/libsolidity/smtCheckerTests/array_members/push_struct_member_1.sol index 15330f39b0fe..bb69ec9eeceb 100644 --- a/test/libsolidity/smtCheckerTests/array_members/push_struct_member_1.sol +++ b/test/libsolidity/smtCheckerTests/array_members/push_struct_member_1.sol @@ -12,7 +12,6 @@ contract C { t.s.b.push(); } } - // ==== // SMTEngine: all // ---- diff --git a/test/libsolidity/smtCheckerTests/array_members/push_struct_member_2.sol b/test/libsolidity/smtCheckerTests/array_members/push_struct_member_2.sol index 091ec74af698..ad7a675b0b0d 100644 --- a/test/libsolidity/smtCheckerTests/array_members/push_struct_member_2.sol +++ b/test/libsolidity/smtCheckerTests/array_members/push_struct_member_2.sol @@ -13,7 +13,6 @@ contract C { t.s[0].b.push(); } } - // ==== // SMTEngine: all // ---- diff --git a/test/libsolidity/smtCheckerTests/complex/MerkleProof.sol b/test/libsolidity/smtCheckerTests/complex/MerkleProof.sol index 606625d3fe22..ac268409d8ac 100644 --- a/test/libsolidity/smtCheckerTests/complex/MerkleProof.sol +++ b/test/libsolidity/smtCheckerTests/complex/MerkleProof.sol @@ -30,7 +30,6 @@ library MerkleProof { return computedHash == root; } } - // ==== // SMTEngine: all // ---- diff --git a/test/libsolidity/smtCheckerTests/function_selector/homer.sol b/test/libsolidity/smtCheckerTests/function_selector/homer.sol index f4536e5bf0eb..a3bb0c64ba1a 100644 --- a/test/libsolidity/smtCheckerTests/function_selector/homer.sol +++ b/test/libsolidity/smtCheckerTests/function_selector/homer.sol @@ -38,8 +38,6 @@ contract Homer is ERC165, Simpson { assert(supportsInterface(type(PeaceMaker).interfaceId)); } } - - // ==== // SMTEngine: all // ---- diff --git a/test/libsolidity/smtCheckerTests/functions/functions_identity_1.sol b/test/libsolidity/smtCheckerTests/functions/functions_identity_1.sol index 5bf37f0815cd..40a023bb47e3 100644 --- a/test/libsolidity/smtCheckerTests/functions/functions_identity_1.sol +++ b/test/libsolidity/smtCheckerTests/functions/functions_identity_1.sol @@ -9,7 +9,6 @@ contract C assert(x > 0); } } - // ==== // SMTEngine: all // ---- diff --git a/test/libsolidity/smtCheckerTests/functions/functions_identity_1_fail.sol b/test/libsolidity/smtCheckerTests/functions/functions_identity_1_fail.sol index c77359fd424a..ceb42881ff3b 100644 --- a/test/libsolidity/smtCheckerTests/functions/functions_identity_1_fail.sol +++ b/test/libsolidity/smtCheckerTests/functions/functions_identity_1_fail.sol @@ -9,7 +9,6 @@ contract C assert(x > 0); } } - // ==== // SMTEngine: all // ---- diff --git a/test/libsolidity/smtCheckerTests/functions/functions_identity_2.sol b/test/libsolidity/smtCheckerTests/functions/functions_identity_2.sol index 1ecdd5c8b87d..54d0abaf7543 100644 --- a/test/libsolidity/smtCheckerTests/functions/functions_identity_2.sol +++ b/test/libsolidity/smtCheckerTests/functions/functions_identity_2.sol @@ -13,7 +13,6 @@ contract C assert(x > 0); } } - // ==== // SMTEngine: all // ---- diff --git a/test/libsolidity/smtCheckerTests/functions/functions_identity_2_fail.sol b/test/libsolidity/smtCheckerTests/functions/functions_identity_2_fail.sol index 33f37ffcc9c5..4d6ff0a64711 100644 --- a/test/libsolidity/smtCheckerTests/functions/functions_identity_2_fail.sol +++ b/test/libsolidity/smtCheckerTests/functions/functions_identity_2_fail.sol @@ -13,7 +13,6 @@ contract C assert(x > 0); } } - // ==== // SMTEngine: all // ---- diff --git a/test/libsolidity/smtCheckerTests/functions/functions_identity_as_tuple.sol b/test/libsolidity/smtCheckerTests/functions/functions_identity_as_tuple.sol index 4c9885ff6e34..e140fdedce29 100644 --- a/test/libsolidity/smtCheckerTests/functions/functions_identity_as_tuple.sol +++ b/test/libsolidity/smtCheckerTests/functions/functions_identity_as_tuple.sol @@ -9,7 +9,6 @@ contract C assert(x > 0); } } - // ==== // SMTEngine: all // ---- diff --git a/test/libsolidity/smtCheckerTests/functions/functions_identity_as_tuple_fail.sol b/test/libsolidity/smtCheckerTests/functions/functions_identity_as_tuple_fail.sol index 9da6fd551ec1..b511dc63bc02 100644 --- a/test/libsolidity/smtCheckerTests/functions/functions_identity_as_tuple_fail.sol +++ b/test/libsolidity/smtCheckerTests/functions/functions_identity_as_tuple_fail.sol @@ -9,7 +9,6 @@ contract C assert(x > 0); } } - // ==== // SMTEngine: all // ---- diff --git a/test/libsolidity/smtCheckerTests/functions/functions_recursive.sol b/test/libsolidity/smtCheckerTests/functions/functions_recursive.sol index 4f664fb04102..0e3699e6be72 100644 --- a/test/libsolidity/smtCheckerTests/functions/functions_recursive.sol +++ b/test/libsolidity/smtCheckerTests/functions/functions_recursive.sol @@ -11,7 +11,6 @@ contract C assert(a == 0); } } - // ==== // SMTEngine: all // ---- diff --git a/test/libsolidity/smtCheckerTests/functions/functions_storage_var_1.sol b/test/libsolidity/smtCheckerTests/functions/functions_storage_var_1.sol index b7148bc7305b..2b6289b95fa9 100644 --- a/test/libsolidity/smtCheckerTests/functions/functions_storage_var_1.sol +++ b/test/libsolidity/smtCheckerTests/functions/functions_storage_var_1.sol @@ -10,7 +10,6 @@ contract C assert(a > 0); } } - // ==== // SMTEngine: all // ---- diff --git a/test/libsolidity/smtCheckerTests/functions/functions_storage_var_1_fail.sol b/test/libsolidity/smtCheckerTests/functions/functions_storage_var_1_fail.sol index e775c97a9a0a..3e045cee7036 100644 --- a/test/libsolidity/smtCheckerTests/functions/functions_storage_var_1_fail.sol +++ b/test/libsolidity/smtCheckerTests/functions/functions_storage_var_1_fail.sol @@ -10,7 +10,6 @@ contract C assert(a > 0); } } - // ==== // SMTEngine: all // SMTIgnoreOS: macos diff --git a/test/libsolidity/smtCheckerTests/functions/functions_storage_var_2.sol b/test/libsolidity/smtCheckerTests/functions/functions_storage_var_2.sol index 5bfb5dcc8e71..001067a28ad3 100644 --- a/test/libsolidity/smtCheckerTests/functions/functions_storage_var_2.sol +++ b/test/libsolidity/smtCheckerTests/functions/functions_storage_var_2.sol @@ -11,7 +11,6 @@ contract C assert(a > 1); } } - // ==== // SMTEngine: all // ---- diff --git a/test/libsolidity/smtCheckerTests/functions/functions_storage_var_2_fail.sol b/test/libsolidity/smtCheckerTests/functions/functions_storage_var_2_fail.sol index 29fd5aefbce5..35906db3b991 100644 --- a/test/libsolidity/smtCheckerTests/functions/functions_storage_var_2_fail.sol +++ b/test/libsolidity/smtCheckerTests/functions/functions_storage_var_2_fail.sol @@ -11,7 +11,6 @@ contract C assert(a > 0); } } - // ==== // SMTEngine: all // ---- diff --git a/test/libsolidity/smtCheckerTests/functions/library_after_contract.sol b/test/libsolidity/smtCheckerTests/functions/library_after_contract.sol index e98556f99455..7fe00f5724cc 100644 --- a/test/libsolidity/smtCheckerTests/functions/library_after_contract.sol +++ b/test/libsolidity/smtCheckerTests/functions/library_after_contract.sol @@ -10,7 +10,6 @@ library L { return x; } } - // ==== // SMTEngine: all // ---- diff --git a/test/libsolidity/smtCheckerTests/operators/assignment_contract_member_variable_array_2.sol b/test/libsolidity/smtCheckerTests/operators/assignment_contract_member_variable_array_2.sol index 694d110e195e..15bb168a72a0 100644 --- a/test/libsolidity/smtCheckerTests/operators/assignment_contract_member_variable_array_2.sol +++ b/test/libsolidity/smtCheckerTests/operators/assignment_contract_member_variable_array_2.sol @@ -5,7 +5,6 @@ contract A { A.a[0] = 2; } } - // ==== // SMTEngine: all // ---- diff --git a/test/libsolidity/smtCheckerTests/special/msg_value_inheritance_3.sol b/test/libsolidity/smtCheckerTests/special/msg_value_inheritance_3.sol index b2f083e025e4..fc8d6e08f300 100644 --- a/test/libsolidity/smtCheckerTests/special/msg_value_inheritance_3.sol +++ b/test/libsolidity/smtCheckerTests/special/msg_value_inheritance_3.sol @@ -15,7 +15,6 @@ contract C is A, B { assert(msg.value >= 0); // should hold } } - // ==== // SMTEngine: all // ---- diff --git a/test/libsolidity/smtCheckerTests/special/range_check.sol b/test/libsolidity/smtCheckerTests/special/range_check.sol index 210aed4daea4..8880a68a7a0f 100644 --- a/test/libsolidity/smtCheckerTests/special/range_check.sol +++ b/test/libsolidity/smtCheckerTests/special/range_check.sol @@ -55,7 +55,6 @@ contract D { } } } - // ==== // SMTEngine: all // ---- diff --git a/test/libsolidity/smtCheckerTests/try_catch/try_inside_if.sol b/test/libsolidity/smtCheckerTests/try_catch/try_inside_if.sol index 4c82cebd99fb..4a65bd9a3003 100644 --- a/test/libsolidity/smtCheckerTests/try_catch/try_inside_if.sol +++ b/test/libsolidity/smtCheckerTests/try_catch/try_inside_if.sol @@ -8,7 +8,6 @@ contract C { } } } - // ==== // SMTEngine: all // ---- diff --git a/test/libsolidity/smtCheckerTests/types/static_array_implicit_push_3.sol b/test/libsolidity/smtCheckerTests/types/static_array_implicit_push_3.sol index 6b5d727caaef..37ef3158e1e8 100644 --- a/test/libsolidity/smtCheckerTests/types/static_array_implicit_push_3.sol +++ b/test/libsolidity/smtCheckerTests/types/static_array_implicit_push_3.sol @@ -5,7 +5,6 @@ contract D { data.push(inner); } } - // ==== // SMTEngine: all // ---- diff --git a/test/libsolidity/smtCheckerTests/types/static_array_implicit_push_4.sol b/test/libsolidity/smtCheckerTests/types/static_array_implicit_push_4.sol index 7173d57ba45c..f0049b3f3dce 100644 --- a/test/libsolidity/smtCheckerTests/types/static_array_implicit_push_4.sol +++ b/test/libsolidity/smtCheckerTests/types/static_array_implicit_push_4.sol @@ -5,7 +5,6 @@ contract D { data.push(inner); } } - // ==== // SMTEngine: all // ---- diff --git a/test/libsolidity/smtCheckerTests/unchecked/unchecked_double_with_modifier.sol b/test/libsolidity/smtCheckerTests/unchecked/unchecked_double_with_modifier.sol index 55931bfa98b4..5db44309d1d1 100644 --- a/test/libsolidity/smtCheckerTests/unchecked/unchecked_double_with_modifier.sol +++ b/test/libsolidity/smtCheckerTests/unchecked/unchecked_double_with_modifier.sol @@ -11,8 +11,6 @@ contract C { unchecked { t(); } } } - - // ==== // SMTEngine: all // ---- diff --git a/test/libyul/Common.cpp b/test/libyul/Common.cpp index 11896d2f910f..800684f35376 100644 --- a/test/libyul/Common.cpp +++ b/test/libyul/Common.cpp @@ -29,7 +29,6 @@ #include #include #include -#include #include #include @@ -119,11 +118,6 @@ std::map const vali "yul", [](langutil::EVMVersion) -> yul::Dialect const& { return yul::Dialect::yulDeprecated(); } - }, - { - "ewasm", - [](langutil::EVMVersion) -> yul::Dialect const& - { return yul::WasmDialect::instance(); } } }; diff --git a/test/libyul/EwasmTranslationTest.cpp b/test/libyul/EwasmTranslationTest.cpp deleted file mode 100644 index f40bc2e42042..000000000000 --- a/test/libyul/EwasmTranslationTest.cpp +++ /dev/null @@ -1,127 +0,0 @@ -/* - This file is part of solidity. - - solidity is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - solidity is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with solidity. If not, see . -*/ -// SPDX-License-Identifier: GPL-3.0 - -#include - -#include - -#include - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include - -#include -#include - -#include - -using namespace solidity; -using namespace solidity::util; -using namespace solidity::langutil; -using namespace solidity::yul; -using namespace solidity::yul::test; -using namespace solidity::frontend; -using namespace solidity::frontend::test; -using namespace std; - - -EwasmTranslationTest::EwasmTranslationTest(string const& _filename): - EVMVersionRestrictedTestCase(_filename) -{ - m_source = m_reader.source(); - m_expectation = m_reader.simpleExpectations(); -} - -TestCase::TestResult EwasmTranslationTest::run(ostream& _stream, string const& _linePrefix, bool const _formatted) -{ - if (!parse(_stream, _linePrefix, _formatted)) - return TestResult::FatalError; - - *m_object = EVMToEwasmTranslator( - EVMDialect::strictAssemblyForEVMObjects(solidity::test::CommonOptions::get().evmVersion()), - m_stack - ).run(*m_object); - - // Add call to "main()". - m_object->code->statements.emplace_back( - ExpressionStatement{{}, FunctionCall{{}, Identifier{{}, "main"_yulstring}, {}}} - ); - - m_obtainedResult = interpret(); - - return checkResult(_stream, _linePrefix, _formatted); -} - -bool EwasmTranslationTest::parse(ostream& _stream, string const& _linePrefix, bool const _formatted) -{ - m_stack = YulStack( - solidity::test::CommonOptions::get().evmVersion(), - solidity::test::CommonOptions::get().eofVersion(), - YulStack::Language::StrictAssembly, - solidity::frontend::OptimiserSettings::none(), - DebugInfoSelection::All() - ); - if (m_stack.parseAndAnalyze("", m_source)) - { - m_object = m_stack.parserResult(); - return true; - } - else - { - AnsiColorized(_stream, _formatted, {formatting::BOLD, formatting::RED}) << _linePrefix << "Error parsing source." << endl; - SourceReferenceFormatter{_stream, m_stack, true, false} - .printErrorInformation(m_stack.errors()); - return false; - } -} - -string EwasmTranslationTest::interpret() -{ - InterpreterState state; - state.maxTraceSize = 10000; - state.maxSteps = 1000000; - state.maxExprNesting = 64; - try - { - Interpreter::run( - state, - WasmDialect{}, - *m_object->code, - /*disableExternalCalls=*/true, - /*disableMemoryTracing=*/false - ); - } - catch (InterpreterTerminatedGeneric const&) - { - } - - stringstream result; - state.dumpTraceAndState(result, false); - return result.str(); -} diff --git a/test/libyul/EwasmTranslationTest.h b/test/libyul/EwasmTranslationTest.h deleted file mode 100644 index d54b8732a0ed..000000000000 --- a/test/libyul/EwasmTranslationTest.h +++ /dev/null @@ -1,54 +0,0 @@ -/* - This file is part of solidity. - - solidity is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - solidity is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with solidity. If not, see . -*/ -// SPDX-License-Identifier: GPL-3.0 - -#pragma once - -#include - -#include - -namespace solidity::yul -{ -struct Object; -class YulStack; -} - -namespace solidity::yul::test -{ - -class EwasmTranslationTest: public solidity::frontend::test::EVMVersionRestrictedTestCase -{ -public: - static std::unique_ptr create(Config const& _config) - { - return std::make_unique(_config.filename); - } - - explicit EwasmTranslationTest(std::string const& _filename); - - TestResult run(std::ostream& _stream, std::string const& _linePrefix = "", bool const _formatted = false) override; - -private: - bool parse(std::ostream& _stream, std::string const& _linePrefix, bool const _formatted); - std::string interpret(); - - std::shared_ptr m_object; - YulStack m_stack; -}; - -} diff --git a/test/libyul/ObjectCompilerTest.cpp b/test/libyul/ObjectCompilerTest.cpp index 3a8d966922cb..74a680b9b7c0 100644 --- a/test/libyul/ObjectCompilerTest.cpp +++ b/test/libyul/ObjectCompilerTest.cpp @@ -59,7 +59,6 @@ ObjectCompilerTest::ObjectCompilerTest(string const& _filename): }, "minimal" ); - m_wasm = m_reader.boolSetting("wasm", false); m_expectation = m_reader.simpleExpectations(); } @@ -68,7 +67,7 @@ TestCase::TestResult ObjectCompilerTest::run(ostream& _stream, string const& _li YulStack stack( EVMVersion(), nullopt, - m_wasm ? YulStack::Language::Ewasm : YulStack::Language::StrictAssembly, + YulStack::Language::StrictAssembly, OptimiserSettings::preset(m_optimisationPreset), DebugInfoSelection::All() ); @@ -81,33 +80,22 @@ TestCase::TestResult ObjectCompilerTest::run(ostream& _stream, string const& _li } stack.optimize(); - if (m_wasm) - { - MachineAssemblyObject obj = stack.assemble(YulStack::Machine::Ewasm); - solAssert(obj.bytecode, ""); + MachineAssemblyObject obj = stack.assemble(YulStack::Machine::EVM); + solAssert(obj.bytecode, ""); + solAssert(obj.sourceMappings, ""); - m_obtainedResult = "Text:\n" + obj.assembly + "\n"; - m_obtainedResult += "Binary:\n" + util::toHex(obj.bytecode->bytecode) + "\n"; - } + m_obtainedResult = "Assembly:\n" + obj.assembly; + if (obj.bytecode->bytecode.empty()) + m_obtainedResult += "-- empty bytecode --\n"; else - { - MachineAssemblyObject obj = stack.assemble(YulStack::Machine::EVM); - solAssert(obj.bytecode, ""); - solAssert(obj.sourceMappings, ""); - - m_obtainedResult = "Assembly:\n" + obj.assembly; - if (obj.bytecode->bytecode.empty()) - m_obtainedResult += "-- empty bytecode --\n"; - else - m_obtainedResult += - "Bytecode: " + - util::toHex(obj.bytecode->bytecode) + - "\nOpcodes: " + - boost::trim_copy(evmasm::disassemble(obj.bytecode->bytecode, solidity::test::CommonOptions::get().evmVersion())) + - "\nSourceMappings:" + - (obj.sourceMappings->empty() ? "" : " " + *obj.sourceMappings) + - "\n"; - } + m_obtainedResult += + "Bytecode: " + + util::toHex(obj.bytecode->bytecode) + + "\nOpcodes: " + + boost::trim_copy(evmasm::disassemble(obj.bytecode->bytecode, solidity::test::CommonOptions::get().evmVersion())) + + "\nSourceMappings:" + + (obj.sourceMappings->empty() ? "" : " " + *obj.sourceMappings) + + "\n"; return checkResult(_stream, _linePrefix, _formatted); } diff --git a/test/libyul/ObjectCompilerTest.h b/test/libyul/ObjectCompilerTest.h index c7880fe55637..fe899870022e 100644 --- a/test/libyul/ObjectCompilerTest.h +++ b/test/libyul/ObjectCompilerTest.h @@ -55,7 +55,6 @@ class ObjectCompilerTest: public solidity::frontend::test::TestCase void disambiguate(); frontend::OptimisationPreset m_optimisationPreset; - bool m_wasm = false; }; } diff --git a/test/libyul/YulOptimizerTestCommon.cpp b/test/libyul/YulOptimizerTestCommon.cpp index 7623efc12cad..7e5f324305ed 100644 --- a/test/libyul/YulOptimizerTestCommon.cpp +++ b/test/libyul/YulOptimizerTestCommon.cpp @@ -61,8 +61,6 @@ #include #include #include -#include -#include #include #include @@ -326,11 +324,6 @@ YulOptimizerTestCommon::YulOptimizerTestCommon( StackCompressor::run(*m_dialect, *m_object, true, maxIterations); BlockFlattener::run(*m_context, *m_ast); }}, - {"wordSizeTransform", [&]() { - disambiguate(); - ExpressionSplitter::run(*m_context, *m_ast); - WordSizeTransform::run(*m_dialect, *m_dialect, *m_ast, *m_nameDispenser); - }}, {"fullSuite", [&]() { GasMeter meter(dynamic_cast(*m_dialect), false, 200); OptimiserSuite::run( diff --git a/test/libyul/ewasmTranslationTests/address.yul b/test/libyul/ewasmTranslationTests/address.yul deleted file mode 100644 index 0290bad4d487..000000000000 --- a/test/libyul/ewasmTranslationTests/address.yul +++ /dev/null @@ -1,9 +0,0 @@ -{ - sstore(0, address()) -} -// ---- -// Trace: -// Memory dump: -// 20: 0000000000000000000000000000000000000000000000000000000011111111 -// Storage dump: -// 0000000000000000000000000000000000000000000000000000000000000000: 0000000000000000000000000000000000000000000000000000000011111111 diff --git a/test/libyul/ewasmTranslationTests/arithmetic_add.yul b/test/libyul/ewasmTranslationTests/arithmetic_add.yul deleted file mode 100644 index b2203070fcf4..000000000000 --- a/test/libyul/ewasmTranslationTests/arithmetic_add.yul +++ /dev/null @@ -1,35 +0,0 @@ -{ - sstore(0, add(0, 1)) - sstore(1, add(1, not(0))) - sstore(2, add(0, 0)) - sstore(3, add(1, 2)) - sstore(4, add(0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe, 1)) - sstore(5, add( - 0x8000000000000000000000000000000000000000000000000000000000000000, 1 - )) - sstore(6, add(not(0), 1)) - sstore(7, add(0xffffffffffffffffffffffffffffffff, 1)) - sstore(8, add(0xffffffffffffffff, 1)) - sstore(9, add(0xffffffffffffffffffffffffffffffff0000000000000000, 1)) - sstore(10, add(0xffffffffffffffffffffffffffffffffffffffffffffffff, 3)) - sstore(11, add(0xffffffffffffffffffffffffffffffff, 3)) - sstore(12, add(0xffffffffffffffff, 3)) - sstore(13, add(0xffffffffffffffffffffffffffffffff0000000000000000, 3)) -} -// ---- -// Trace: -// Memory dump: -// 0: 000000000000000000000000000000000000000000000000000000000000000d -// 20: 0000000000000000ffffffffffffffffffffffffffffffff0000000000000003 -// Storage dump: -// 0000000000000000000000000000000000000000000000000000000000000000: 0000000000000000000000000000000000000000000000000000000000000001 -// 0000000000000000000000000000000000000000000000000000000000000003: 0000000000000000000000000000000000000000000000000000000000000003 -// 0000000000000000000000000000000000000000000000000000000000000004: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff -// 0000000000000000000000000000000000000000000000000000000000000005: 8000000000000000000000000000000000000000000000000000000000000001 -// 0000000000000000000000000000000000000000000000000000000000000007: 0000000000000000000000000000000100000000000000000000000000000000 -// 0000000000000000000000000000000000000000000000000000000000000008: 0000000000000000000000000000000000000000000000010000000000000000 -// 0000000000000000000000000000000000000000000000000000000000000009: 0000000000000000ffffffffffffffffffffffffffffffff0000000000000001 -// 000000000000000000000000000000000000000000000000000000000000000a: 0000000000000001000000000000000000000000000000000000000000000002 -// 000000000000000000000000000000000000000000000000000000000000000b: 0000000000000000000000000000000100000000000000000000000000000002 -// 000000000000000000000000000000000000000000000000000000000000000c: 0000000000000000000000000000000000000000000000010000000000000002 -// 000000000000000000000000000000000000000000000000000000000000000d: 0000000000000000ffffffffffffffffffffffffffffffff0000000000000003 diff --git a/test/libyul/ewasmTranslationTests/arithmetic_addmod.yul b/test/libyul/ewasmTranslationTests/arithmetic_addmod.yul deleted file mode 100644 index 40b84764ede8..000000000000 --- a/test/libyul/ewasmTranslationTests/arithmetic_addmod.yul +++ /dev/null @@ -1,25 +0,0 @@ -{ - sstore(0, addmod(0, 1, 1)) - sstore(1, addmod(0, 1, 2)) - sstore(2, addmod(3, 1, 2)) - sstore(3, addmod(1, not(0), 5)) - sstore(4, addmod(0, 0, 0)) - sstore(5, addmod(0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe, 1, 1)) - sstore(6, addmod(0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe, 1, 0)) - sstore(7, addmod(0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd, 1, 5)) - sstore(8, addmod( - 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff, - 0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe, - 5 - )) -} -// ---- -// Trace: -// Memory dump: -// 0: 0000000000000000000000000000000000000000000000000000000000000008 -// 20: 0000000000000000000000000000000000000000000000000000000000000004 -// Storage dump: -// 0000000000000000000000000000000000000000000000000000000000000001: 0000000000000000000000000000000000000000000000000000000000000001 -// 0000000000000000000000000000000000000000000000000000000000000003: 0000000000000000000000000000000000000000000000000000000000000001 -// 0000000000000000000000000000000000000000000000000000000000000007: 0000000000000000000000000000000000000000000000000000000000000004 -// 0000000000000000000000000000000000000000000000000000000000000008: 0000000000000000000000000000000000000000000000000000000000000004 diff --git a/test/libyul/ewasmTranslationTests/arithmetic_div.yul b/test/libyul/ewasmTranslationTests/arithmetic_div.yul deleted file mode 100644 index f32c244a9f03..000000000000 --- a/test/libyul/ewasmTranslationTests/arithmetic_div.yul +++ /dev/null @@ -1,34 +0,0 @@ -{ - sstore(0, div(0, 1)) - sstore(1, div(1, not(0))) - sstore(2, div(0, 0)) - sstore(3, div(1, 2)) - sstore(4, div(0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe, 1)) - sstore(5, div( - 0x8000000000000000000000000000000000000000000000000000000000000000, 1 - )) - sstore(6, div(not(0), 1)) - sstore(7, div(0xffffffffffffffffffffffffffffffff, 1)) - sstore(8, div(0xffffffffffffffff, 1)) - sstore(9, div(0xffffffffffffffffffffffffffffffff0000000000000000, 1)) - sstore(10, div(0xffffffffffffffffffffffffffffffffffffffffffffffff, 3)) - sstore(11, div(0xffffffffffffffffffffffffffffffff, 3)) - sstore(12, div(0xffffffffffffffff, 3)) - sstore(13, div(0xffffffffffffffffffffffffffffffff0000000000000000, 3)) -} -// ---- -// Trace: -// Memory dump: -// 0: 000000000000000000000000000000000000000000000000000000000000000d -// 20: 0000000000000000555555555555555555555555555555550000000000000000 -// Storage dump: -// 0000000000000000000000000000000000000000000000000000000000000004: fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe -// 0000000000000000000000000000000000000000000000000000000000000005: 8000000000000000000000000000000000000000000000000000000000000000 -// 0000000000000000000000000000000000000000000000000000000000000006: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff -// 0000000000000000000000000000000000000000000000000000000000000007: 00000000000000000000000000000000ffffffffffffffffffffffffffffffff -// 0000000000000000000000000000000000000000000000000000000000000008: 000000000000000000000000000000000000000000000000ffffffffffffffff -// 0000000000000000000000000000000000000000000000000000000000000009: 0000000000000000ffffffffffffffffffffffffffffffff0000000000000000 -// 000000000000000000000000000000000000000000000000000000000000000a: 0000000000000000555555555555555555555555555555555555555555555555 -// 000000000000000000000000000000000000000000000000000000000000000b: 0000000000000000000000000000000055555555555555555555555555555555 -// 000000000000000000000000000000000000000000000000000000000000000c: 0000000000000000000000000000000000000000000000005555555555555555 -// 000000000000000000000000000000000000000000000000000000000000000d: 0000000000000000555555555555555555555555555555550000000000000000 diff --git a/test/libyul/ewasmTranslationTests/arithmetic_exp.yul b/test/libyul/ewasmTranslationTests/arithmetic_exp.yul deleted file mode 100644 index 6428e73437bf..000000000000 --- a/test/libyul/ewasmTranslationTests/arithmetic_exp.yul +++ /dev/null @@ -1,40 +0,0 @@ -{ - sstore(0, exp(0, 1)) - sstore(1, exp(1, not(0))) - sstore(2, exp(0, 0)) - sstore(3, exp(1, 2)) - sstore(4, exp(0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe, 1)) - sstore(5, exp( - 0x8000000000000000000000000000000000000000000000000000000000000000, 1 - )) - sstore(6, exp(not(0), 1)) - sstore(7, exp(0xffffffffffffffffffffffffffffffff, 2)) - sstore(8, exp(0xffffffffffffffff, 2)) - sstore(9, exp(0xffffffffffffffffffffffffffffffff0000000000000000, 2)) - sstore(10, exp(0xffffffffffffffffffffffffffffffffffffffffffffffff, 3)) - sstore(11, exp(0xffffffffffffffffffffffffffffffff, 3)) - sstore(12, exp(0xffffffffffffffff, 3)) - sstore(13, exp(0xffffffffffffffffffffffffffffffff0000000000000000, 3)) - sstore(14, exp(2, 256)) - sstore(15, exp(2, 255)) -} -// ---- -// Trace: -// Memory dump: -// 0: 000000000000000000000000000000000000000000000000000000000000000f -// 20: 8000000000000000000000000000000000000000000000000000000000000000 -// Storage dump: -// 0000000000000000000000000000000000000000000000000000000000000001: 0000000000000000000000000000000000000000000000000000000000000001 -// 0000000000000000000000000000000000000000000000000000000000000002: 0000000000000000000000000000000000000000000000000000000000000001 -// 0000000000000000000000000000000000000000000000000000000000000003: 0000000000000000000000000000000000000000000000000000000000000001 -// 0000000000000000000000000000000000000000000000000000000000000004: fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe -// 0000000000000000000000000000000000000000000000000000000000000005: 8000000000000000000000000000000000000000000000000000000000000000 -// 0000000000000000000000000000000000000000000000000000000000000006: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff -// 0000000000000000000000000000000000000000000000000000000000000007: fffffffffffffffffffffffffffffffe00000000000000000000000000000001 -// 0000000000000000000000000000000000000000000000000000000000000008: 00000000000000000000000000000000fffffffffffffffe0000000000000001 -// 0000000000000000000000000000000000000000000000000000000000000009: 0000000000000000000000000000000100000000000000000000000000000000 -// 000000000000000000000000000000000000000000000000000000000000000a: 0000000000000002ffffffffffffffffffffffffffffffffffffffffffffffff -// 000000000000000000000000000000000000000000000000000000000000000b: 00000000000000000000000000000002ffffffffffffffffffffffffffffffff -// 000000000000000000000000000000000000000000000000000000000000000c: 0000000000000000fffffffffffffffd0000000000000002ffffffffffffffff -// 000000000000000000000000000000000000000000000000000000000000000d: ffffffffffffffff000000000000000000000000000000000000000000000000 -// 000000000000000000000000000000000000000000000000000000000000000f: 8000000000000000000000000000000000000000000000000000000000000000 diff --git a/test/libyul/ewasmTranslationTests/arithmetic_mod.yul b/test/libyul/ewasmTranslationTests/arithmetic_mod.yul deleted file mode 100644 index 38cc808bf4a2..000000000000 --- a/test/libyul/ewasmTranslationTests/arithmetic_mod.yul +++ /dev/null @@ -1,29 +0,0 @@ -{ - sstore(0, mod(0, 1)) - sstore(1, mod(1, not(0))) - sstore(2, mod(0, 0)) - sstore(3, mod(1, 2)) - sstore(4, mod(not(0), 1)) - sstore(5, mod( - 0x8000000000000000000000000000000000000000000000000000000000000000, 1 - )) - sstore(6, mod(not(0), 1)) - sstore(7, mod(0xffffffffffffffffffffffffffffffff, 1)) - sstore(8, mod(0xffffffffffffffffffffffffffffffffffffffffffffffff, 0xfffffffffffffffffffffffffffffffe)) - sstore(9, mod(0xffffffffffffffffffffffffffffffffffffffffffffffff, 5)) - sstore(10, mod(0xffffffffffffffffffffffffffffffffffffffffffffffff, 4)) - sstore(11, mod(0xffffffffffffffffffffffffffffffff, 3)) - sstore(12, mod(0xffffffffffffffff, 3)) - sstore(13, mod(0xffffffffffffffffffffffffffffffff0000000000000000, 0xffffffffffffffff43342553000)) -} -// ---- -// Trace: -// Memory dump: -// 0: 000000000000000000000000000000000000000000000000000000000000000d -// 20: 0000000000000000000000000000000000000aacffffffff8b3c03a314db9000 -// Storage dump: -// 0000000000000000000000000000000000000000000000000000000000000001: 0000000000000000000000000000000000000000000000000000000000000001 -// 0000000000000000000000000000000000000000000000000000000000000003: 0000000000000000000000000000000000000000000000000000000000000001 -// 0000000000000000000000000000000000000000000000000000000000000008: 000000000000000000000000000000000000000000000001ffffffffffffffff -// 000000000000000000000000000000000000000000000000000000000000000a: 0000000000000000000000000000000000000000000000000000000000000003 -// 000000000000000000000000000000000000000000000000000000000000000d: 0000000000000000000000000000000000000aacffffffff8b3c03a314db9000 diff --git a/test/libyul/ewasmTranslationTests/arithmetic_mul.yul b/test/libyul/ewasmTranslationTests/arithmetic_mul.yul deleted file mode 100644 index 73e1bf3d86ba..000000000000 --- a/test/libyul/ewasmTranslationTests/arithmetic_mul.yul +++ /dev/null @@ -1,36 +0,0 @@ -{ - sstore(0, mul(0, 1)) - sstore(1, mul(1, not(0))) - sstore(2, mul(0, 0)) - sstore(3, mul(1, 2)) - sstore(4, mul(0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe, 1)) - sstore(5, mul( - 0x8000000000000000000000000000000000000000000000000000000000000000, 1 - )) - sstore(6, mul(not(0), 1)) - sstore(7, mul(0xffffffffffffffffffffffffffffffff, 1)) - sstore(8, mul(0xffffffffffffffff, 1)) - sstore(9, mul(0xffffffffffffffffffffffffffffffff0000000000000000, 1)) - sstore(10, mul(0xffffffffffffffffffffffffffffffffffffffffffffffff, 3)) - sstore(11, mul(0xffffffffffffffffffffffffffffffff, 3)) - sstore(12, mul(0xffffffffffffffff, 3)) - sstore(13, mul(0xffffffffffffffffffffffffffffffff0000000000000000, 3)) -} -// ---- -// Trace: -// Memory dump: -// 0: 000000000000000000000000000000000000000000000000000000000000000d -// 20: 0000000000000002fffffffffffffffffffffffffffffffd0000000000000000 -// Storage dump: -// 0000000000000000000000000000000000000000000000000000000000000001: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff -// 0000000000000000000000000000000000000000000000000000000000000003: 0000000000000000000000000000000000000000000000000000000000000002 -// 0000000000000000000000000000000000000000000000000000000000000004: fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe -// 0000000000000000000000000000000000000000000000000000000000000005: 8000000000000000000000000000000000000000000000000000000000000000 -// 0000000000000000000000000000000000000000000000000000000000000006: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff -// 0000000000000000000000000000000000000000000000000000000000000007: 00000000000000000000000000000000ffffffffffffffffffffffffffffffff -// 0000000000000000000000000000000000000000000000000000000000000008: 000000000000000000000000000000000000000000000000ffffffffffffffff -// 0000000000000000000000000000000000000000000000000000000000000009: 0000000000000000ffffffffffffffffffffffffffffffff0000000000000000 -// 000000000000000000000000000000000000000000000000000000000000000a: 0000000000000002fffffffffffffffffffffffffffffffffffffffffffffffd -// 000000000000000000000000000000000000000000000000000000000000000b: 00000000000000000000000000000002fffffffffffffffffffffffffffffffd -// 000000000000000000000000000000000000000000000000000000000000000c: 000000000000000000000000000000000000000000000002fffffffffffffffd -// 000000000000000000000000000000000000000000000000000000000000000d: 0000000000000002fffffffffffffffffffffffffffffffd0000000000000000 diff --git a/test/libyul/ewasmTranslationTests/arithmetic_mulmod.yul b/test/libyul/ewasmTranslationTests/arithmetic_mulmod.yul deleted file mode 100644 index ef6efafd4214..000000000000 --- a/test/libyul/ewasmTranslationTests/arithmetic_mulmod.yul +++ /dev/null @@ -1,27 +0,0 @@ -{ - sstore(0, mulmod(0, 1, 2)) - sstore(1, mulmod(1, not(0), 5)) - sstore(2, mulmod(0, 0, 5)) - sstore(3, mulmod(1, 3, 2)) - sstore(4, mulmod(0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe, - 1, - 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)) - sstore(5, mulmod(0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe, 1, 1)) - sstore(6, mulmod(0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe, 1, 0)) - sstore(7, mulmod(0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd, 1, 5)) - sstore(8, mulmod( - not(0), - 0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe, - 25 - )) -} -// ---- -// Trace: -// Memory dump: -// 0: 0000000000000000000000000000000000000000000000000000000000000008 -// 20: 000000000000000000000000000000000000000000000000000000000000000f -// Storage dump: -// 0000000000000000000000000000000000000000000000000000000000000003: 0000000000000000000000000000000000000000000000000000000000000001 -// 0000000000000000000000000000000000000000000000000000000000000004: fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe -// 0000000000000000000000000000000000000000000000000000000000000007: 0000000000000000000000000000000000000000000000000000000000000003 -// 0000000000000000000000000000000000000000000000000000000000000008: 000000000000000000000000000000000000000000000000000000000000000f diff --git a/test/libyul/ewasmTranslationTests/arithmetic_sdiv.yul b/test/libyul/ewasmTranslationTests/arithmetic_sdiv.yul deleted file mode 100644 index 0cefb340586c..000000000000 --- a/test/libyul/ewasmTranslationTests/arithmetic_sdiv.yul +++ /dev/null @@ -1,33 +0,0 @@ -{ - sstore(0, sdiv(0, 1)) - sstore(1, sdiv(0, not(0))) - sstore(2, sdiv(0, 0)) - sstore(3, sdiv(1, 2)) - sstore(4, sdiv(not(0), 0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe)) - sstore(5, sdiv(0x8000000000000000000000000000000000000000000000000000000000000000, not(0))) - sstore(6, sdiv(not(0), 0x8000000000000000000000000000000000000000000000000000000000000000)) - sstore(7, sdiv(0x7000000000000000000000000000000000000000000000000000000000000000, 1)) - sstore(8, sdiv(1, 0x7000000000000000000000000000000000000000000000000000000000000000)) - sstore(9, sdiv(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff, not(0))) - sstore(10, sdiv(not(0), 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)) - sstore(11, sdiv(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff, 1)) - sstore(12, sdiv(not(0), not(0))) - sstore(13, sdiv( - 0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe, - 0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe - )) - sstore(14, sdiv(0x8000000000000000000000000000000000000000000000000000000000000001, not(0))) -} -// ---- -// Trace: -// Memory dump: -// 0: 000000000000000000000000000000000000000000000000000000000000000e -// 20: 7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff -// Storage dump: -// 0000000000000000000000000000000000000000000000000000000000000005: 8000000000000000000000000000000000000000000000000000000000000000 -// 0000000000000000000000000000000000000000000000000000000000000007: 7000000000000000000000000000000000000000000000000000000000000000 -// 0000000000000000000000000000000000000000000000000000000000000009: 8000000000000000000000000000000000000000000000000000000000000001 -// 000000000000000000000000000000000000000000000000000000000000000b: 7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff -// 000000000000000000000000000000000000000000000000000000000000000c: 0000000000000000000000000000000000000000000000000000000000000001 -// 000000000000000000000000000000000000000000000000000000000000000d: 0000000000000000000000000000000000000000000000000000000000000001 -// 000000000000000000000000000000000000000000000000000000000000000e: 7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff diff --git a/test/libyul/ewasmTranslationTests/arithmetic_smod.yul b/test/libyul/ewasmTranslationTests/arithmetic_smod.yul deleted file mode 100644 index cffb8f73d3c7..000000000000 --- a/test/libyul/ewasmTranslationTests/arithmetic_smod.yul +++ /dev/null @@ -1,33 +0,0 @@ -{ - sstore(0, smod(0, 1)) - sstore(1, smod(1, not(0))) - sstore(2, smod(0, 0)) - sstore(3, smod(1, 2)) - sstore(4, smod(not(0), 1)) - sstore(5, smod( - 0x8000000000000000000000000000000000000000000000000000000000000000, 1 - )) - sstore(6, smod(not(0), 1)) - sstore(7, smod(0xffffffffffffffffffffffffffffffff, 1)) - sstore(8, smod(0xffffffffffffffffffffffffffffffffffffffffffffffff, 0xfffffffffffffffffffffffffffffffe)) - sstore(9, smod(0xffffffffffffffffffffffffffffffffffffffffffffffff, 5)) - sstore(10, smod(0xffffffffffffffffffffffffffffffffffffffffffffffff, 4)) - sstore(11, smod(0xffffffffffffffffffffffffffffffff, 3)) - sstore(12, smod(0xffffffffffffffff, 3)) - sstore(13, smod(0xffffffffffffffffffffffffffffffff0000000000000000, 0xffffffffffffffff43342553000)) - sstore(14, smod( - 0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd, - 0xffffffffffffffff43342553000 - )) -} -// ---- -// Trace: -// Memory dump: -// 0: 000000000000000000000000000000000000000000000000000000000000000e -// 20: fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd -// Storage dump: -// 0000000000000000000000000000000000000000000000000000000000000003: 0000000000000000000000000000000000000000000000000000000000000001 -// 0000000000000000000000000000000000000000000000000000000000000008: 000000000000000000000000000000000000000000000001ffffffffffffffff -// 000000000000000000000000000000000000000000000000000000000000000a: 0000000000000000000000000000000000000000000000000000000000000003 -// 000000000000000000000000000000000000000000000000000000000000000d: 0000000000000000000000000000000000000aacffffffff8b3c03a314db9000 -// 000000000000000000000000000000000000000000000000000000000000000e: fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd diff --git a/test/libyul/ewasmTranslationTests/arithmetic_sub.yul b/test/libyul/ewasmTranslationTests/arithmetic_sub.yul deleted file mode 100644 index fefb5d682439..000000000000 --- a/test/libyul/ewasmTranslationTests/arithmetic_sub.yul +++ /dev/null @@ -1,36 +0,0 @@ -{ - sstore(0, sub(0, 1)) - sstore(1, sub(1, not(0))) - sstore(2, sub(0, 0)) - sstore(3, sub(1, 2)) - sstore(4, sub(0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff, 1)) - sstore(5, sub( - 0x8000000000000000000000000000000000000000000000000000000000000000, 1 - )) - sstore(6, sub(not(0), 1)) - sstore(7, sub(not(0), not(0))) - sstore(8, sub(0x1000000000000000000000000000000000000000000000000, 1)) - sstore(9, sub(0x100000000000000000000000000000000, 1)) - sstore(10, sub(0x10000000000000000, 1)) - sstore(11, sub(0x1000000000000000000000000000000000000000000000000, 3)) - sstore(12, sub(0x100000000000000000000000000000000, 3)) - sstore(13, sub(0x10000000000000000, 3)) -} -// ---- -// Trace: -// Memory dump: -// 0: 000000000000000000000000000000000000000000000000000000000000000d -// 20: 000000000000000000000000000000000000000000000000fffffffffffffffd -// Storage dump: -// 0000000000000000000000000000000000000000000000000000000000000000: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff -// 0000000000000000000000000000000000000000000000000000000000000001: 0000000000000000000000000000000000000000000000000000000000000002 -// 0000000000000000000000000000000000000000000000000000000000000003: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff -// 0000000000000000000000000000000000000000000000000000000000000004: fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe -// 0000000000000000000000000000000000000000000000000000000000000005: 7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff -// 0000000000000000000000000000000000000000000000000000000000000006: fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe -// 0000000000000000000000000000000000000000000000000000000000000008: 0000000000000000ffffffffffffffffffffffffffffffffffffffffffffffff -// 0000000000000000000000000000000000000000000000000000000000000009: 00000000000000000000000000000000ffffffffffffffffffffffffffffffff -// 000000000000000000000000000000000000000000000000000000000000000a: 000000000000000000000000000000000000000000000000ffffffffffffffff -// 000000000000000000000000000000000000000000000000000000000000000b: 0000000000000000fffffffffffffffffffffffffffffffffffffffffffffffd -// 000000000000000000000000000000000000000000000000000000000000000c: 00000000000000000000000000000000fffffffffffffffffffffffffffffffd -// 000000000000000000000000000000000000000000000000000000000000000d: 000000000000000000000000000000000000000000000000fffffffffffffffd diff --git a/test/libyul/ewasmTranslationTests/balance.yul b/test/libyul/ewasmTranslationTests/balance.yul deleted file mode 100644 index f8bb5017aed1..000000000000 --- a/test/libyul/ewasmTranslationTests/balance.yul +++ /dev/null @@ -1,12 +0,0 @@ -{ - sstore(0, balance(address())) - sstore(1, balance(0)) -} -// ---- -// Trace: -// Memory dump: -// 0: 0000000000000000000000000000000000000000000000000000000000000001 -// 20: 0000000000000000000000000000000000000000000000000000000022222222 -// Storage dump: -// 0000000000000000000000000000000000000000000000000000000000000000: 0000000000000000000000000000000000000000000000000000000022222222 -// 0000000000000000000000000000000000000000000000000000000000000001: 0000000000000000000000000000000000000000000000000000000022222222 diff --git a/test/libyul/ewasmTranslationTests/bitwise_and.yul b/test/libyul/ewasmTranslationTests/bitwise_and.yul deleted file mode 100644 index 6d5bfbb237d3..000000000000 --- a/test/libyul/ewasmTranslationTests/bitwise_and.yul +++ /dev/null @@ -1,24 +0,0 @@ -{ - sstore(0, and(not(0), 0)) - sstore(1, and(not(0), not(0))) - sstore(2, and(not(0), 0xffffffffffffffff)) - sstore(3, and(not(0), 0xffffffffffffffffff00000000000000)) - sstore(4, and(not(0), 0xffffffffffffffffff00000000000000ffffffffffffffff)) - sstore(5, and(not(0), 0xffffffffffffffffff00000000000000ffffffffffffffff0000000000000000)) - sstore(6, and(not(0), 0xaaaaaaaaaaaaaa555555555555555555aa5555555555555aa555555555555555)) - sstore(7, and( - 0x5555555555550000aaaaaaaaaaaaaa000000aaaaaaaaa000000aaaaaaaaaaaaa, - 0xaaaaaaaaaaaaaa555555555555555555aa5555555555555aa555555555555555 - )) -} -// ---- -// Trace: -// Memory dump: -// 0: 0000000000000000000000000000000000000000000000000000000000000007 -// Storage dump: -// 0000000000000000000000000000000000000000000000000000000000000001: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff -// 0000000000000000000000000000000000000000000000000000000000000002: 000000000000000000000000000000000000000000000000ffffffffffffffff -// 0000000000000000000000000000000000000000000000000000000000000003: 00000000000000000000000000000000ffffffffffffffffff00000000000000 -// 0000000000000000000000000000000000000000000000000000000000000004: 0000000000000000ffffffffffffffffff00000000000000ffffffffffffffff -// 0000000000000000000000000000000000000000000000000000000000000005: ffffffffffffffffff00000000000000ffffffffffffffff0000000000000000 -// 0000000000000000000000000000000000000000000000000000000000000006: aaaaaaaaaaaaaa555555555555555555aa5555555555555aa555555555555555 diff --git a/test/libyul/ewasmTranslationTests/bitwise_not.yul b/test/libyul/ewasmTranslationTests/bitwise_not.yul deleted file mode 100644 index 706d810b4aed..000000000000 --- a/test/libyul/ewasmTranslationTests/bitwise_not.yul +++ /dev/null @@ -1,25 +0,0 @@ -{ - sstore(0, not(0)) - sstore(1, not(not(0))) - sstore(2, not(0xffffffffffffffff)) - sstore(3, not(0xffffffffffffffffff00000000000000)) - sstore(4, not(0xffffffffffffffffff00000000000000ffffffffffffffff)) - sstore(5, not(0xffffffffffffffffff00000000000000ffffffffffffffff0000000000000000)) - sstore(6, not(0xaaaaaaaaaaaaaa555555555555555555aa5555555555555aa555555555555555)) - sstore(7, not(0x5555555555550000aaaaaaaaaaaaaa000000aaaaaaaaa000000aaaaaaaaaaaaa)) - sstore(8, not(0xaaaaaaaaaaaaaa555555555555555555aa5555555555555aa555555555555555)) -} -// ---- -// Trace: -// Memory dump: -// 0: 0000000000000000000000000000000000000000000000000000000000000008 -// 20: 55555555555555aaaaaaaaaaaaaaaaaa55aaaaaaaaaaaaa55aaaaaaaaaaaaaaa -// Storage dump: -// 0000000000000000000000000000000000000000000000000000000000000000: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff -// 0000000000000000000000000000000000000000000000000000000000000002: ffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000 -// 0000000000000000000000000000000000000000000000000000000000000003: ffffffffffffffffffffffffffffffff000000000000000000ffffffffffffff -// 0000000000000000000000000000000000000000000000000000000000000004: ffffffffffffffff000000000000000000ffffffffffffff0000000000000000 -// 0000000000000000000000000000000000000000000000000000000000000005: 000000000000000000ffffffffffffff0000000000000000ffffffffffffffff -// 0000000000000000000000000000000000000000000000000000000000000006: 55555555555555aaaaaaaaaaaaaaaaaa55aaaaaaaaaaaaa55aaaaaaaaaaaaaaa -// 0000000000000000000000000000000000000000000000000000000000000007: aaaaaaaaaaaaffff55555555555555ffffff555555555ffffff5555555555555 -// 0000000000000000000000000000000000000000000000000000000000000008: 55555555555555aaaaaaaaaaaaaaaaaa55aaaaaaaaaaaaa55aaaaaaaaaaaaaaa diff --git a/test/libyul/ewasmTranslationTests/bitwise_or.yul b/test/libyul/ewasmTranslationTests/bitwise_or.yul deleted file mode 100644 index d9d645d86a6c..000000000000 --- a/test/libyul/ewasmTranslationTests/bitwise_or.yul +++ /dev/null @@ -1,26 +0,0 @@ -{ - sstore(0, or(0, 0)) - sstore(1, or(0, not(0))) - sstore(2, or(0, 0xffffffffffffffff)) - sstore(3, or(0, 0xffffffffffffffffff00000000000000)) - sstore(4, or(0, 0xffffffffffffffffff00000000000000ffffffffffffffff)) - sstore(5, or(0, 0xffffffffffffffffff00000000000000ffffffffffffffff0000000000000000)) - sstore(6, or(0, 0xaaaaaaaaaaaaaa555555555555555555aa5555555555555aa555555555555555)) - sstore(7, or( - 0x5555555555550000aaaaaaaaaaaaaa000000aaaaaaaaa000000aaaaaaaaaaaaa, - 0xaaaaaaaaaaaaaa555555555555555555aa5555555555555aa555555555555555 - )) -} -// ---- -// Trace: -// Memory dump: -// 0: 0000000000000000000000000000000000000000000000000000000000000007 -// 20: ffffffffffffaa55ffffffffffffff55aa55fffffffff55aa55fffffffffffff -// Storage dump: -// 0000000000000000000000000000000000000000000000000000000000000001: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff -// 0000000000000000000000000000000000000000000000000000000000000002: 000000000000000000000000000000000000000000000000ffffffffffffffff -// 0000000000000000000000000000000000000000000000000000000000000003: 00000000000000000000000000000000ffffffffffffffffff00000000000000 -// 0000000000000000000000000000000000000000000000000000000000000004: 0000000000000000ffffffffffffffffff00000000000000ffffffffffffffff -// 0000000000000000000000000000000000000000000000000000000000000005: ffffffffffffffffff00000000000000ffffffffffffffff0000000000000000 -// 0000000000000000000000000000000000000000000000000000000000000006: aaaaaaaaaaaaaa555555555555555555aa5555555555555aa555555555555555 -// 0000000000000000000000000000000000000000000000000000000000000007: ffffffffffffaa55ffffffffffffff55aa55fffffffff55aa55fffffffffffff diff --git a/test/libyul/ewasmTranslationTests/bitwise_xor.yul b/test/libyul/ewasmTranslationTests/bitwise_xor.yul deleted file mode 100644 index b358bacb5f20..000000000000 --- a/test/libyul/ewasmTranslationTests/bitwise_xor.yul +++ /dev/null @@ -1,27 +0,0 @@ -{ - sstore(0, xor(0xffff, 0)) - sstore(1, xor(0xffff, not(0))) - sstore(2, xor(0xffff, 0xffffffffffffffff)) - sstore(3, xor(0xffff, 0xffffffffffffffffff00000000000000)) - sstore(4, xor(0xffff, 0xffffffffffffffffff00000000000000ffffffffffffffff)) - sstore(5, xor(0xffff, 0xffffffffffffffffff00000000000000ffffffffffffffff0000000000000000)) - sstore(6, xor(0xffff, 0xaaaaaaaaaaaaaa555555555555555555aa5555555555555aa555555555555555)) - sstore(7, xor( - 0x5555555555550000aaaaaaaaaaaaaa000000aaaaaaaaa000000aaaaaaaaaaaaa, - 0xaaaaaaaaaaaaaa555555555555555555aa5555555555555aa555555555555555 - )) -} -// ---- -// Trace: -// Memory dump: -// 0: 0000000000000000000000000000000000000000000000000000000000000007 -// 20: ffffffffffffaa55ffffffffffffff55aa55fffffffff55aa55fffffffffffff -// Storage dump: -// 0000000000000000000000000000000000000000000000000000000000000000: 000000000000000000000000000000000000000000000000000000000000ffff -// 0000000000000000000000000000000000000000000000000000000000000001: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000 -// 0000000000000000000000000000000000000000000000000000000000000002: 000000000000000000000000000000000000000000000000ffffffffffff0000 -// 0000000000000000000000000000000000000000000000000000000000000003: 00000000000000000000000000000000ffffffffffffffffff0000000000ffff -// 0000000000000000000000000000000000000000000000000000000000000004: 0000000000000000ffffffffffffffffff00000000000000ffffffffffff0000 -// 0000000000000000000000000000000000000000000000000000000000000005: ffffffffffffffffff00000000000000ffffffffffffffff000000000000ffff -// 0000000000000000000000000000000000000000000000000000000000000006: aaaaaaaaaaaaaa555555555555555555aa5555555555555aa55555555555aaaa -// 0000000000000000000000000000000000000000000000000000000000000007: ffffffffffffaa55ffffffffffffff55aa55fffffffff55aa55fffffffffffff diff --git a/test/libyul/ewasmTranslationTests/blockhash.yul b/test/libyul/ewasmTranslationTests/blockhash.yul deleted file mode 100644 index 8b906232f2c0..000000000000 --- a/test/libyul/ewasmTranslationTests/blockhash.yul +++ /dev/null @@ -1,9 +0,0 @@ -{ - sstore(0, blockhash(1023)) -} -// ---- -// Trace: -// Memory dump: -// 20: 00000000000000000000000000000000000000000000000000000000aaaaa9a9 -// Storage dump: -// 0000000000000000000000000000000000000000000000000000000000000000: 00000000000000000000000000000000000000000000000000000000aaaaa9a9 diff --git a/test/libyul/ewasmTranslationTests/calldatacopy.yul b/test/libyul/ewasmTranslationTests/calldatacopy.yul deleted file mode 100644 index 0d7d57af0da0..000000000000 --- a/test/libyul/ewasmTranslationTests/calldatacopy.yul +++ /dev/null @@ -1,8 +0,0 @@ -{ - calldatacopy(0, 0, 32) - sstore(0, mload(0)) -} -// ---- -// Trace: -// Memory dump: -// Storage dump: diff --git a/test/libyul/ewasmTranslationTests/calldataload.yul b/test/libyul/ewasmTranslationTests/calldataload.yul deleted file mode 100644 index f0b4008f6b15..000000000000 --- a/test/libyul/ewasmTranslationTests/calldataload.yul +++ /dev/null @@ -1,7 +0,0 @@ -{ - sstore(0, calldataload(0)) -} -// ---- -// Trace: -// Memory dump: -// Storage dump: diff --git a/test/libyul/ewasmTranslationTests/calldatasize.yul b/test/libyul/ewasmTranslationTests/calldatasize.yul deleted file mode 100644 index 229f6b461468..000000000000 --- a/test/libyul/ewasmTranslationTests/calldatasize.yul +++ /dev/null @@ -1,7 +0,0 @@ -{ - sstore(0, calldatasize()) -} -// ---- -// Trace: -// Memory dump: -// Storage dump: diff --git a/test/libyul/ewasmTranslationTests/caller.yul b/test/libyul/ewasmTranslationTests/caller.yul deleted file mode 100644 index 1abb288d507e..000000000000 --- a/test/libyul/ewasmTranslationTests/caller.yul +++ /dev/null @@ -1,9 +0,0 @@ -{ - sstore(0, caller()) -} -// ---- -// Trace: -// Memory dump: -// 20: 0000000000000000000000000000000000000000000000000000000044444444 -// Storage dump: -// 0000000000000000000000000000000000000000000000000000000000000000: 0000000000000000000000000000000000000000000000000000000044444444 diff --git a/test/libyul/ewasmTranslationTests/callvalue.yul b/test/libyul/ewasmTranslationTests/callvalue.yul deleted file mode 100644 index 5d34b58b6718..000000000000 --- a/test/libyul/ewasmTranslationTests/callvalue.yul +++ /dev/null @@ -1,9 +0,0 @@ -{ - sstore(0, callvalue()) -} -// ---- -// Trace: -// Memory dump: -// 20: 0000000000000000000000000000000000000000000000000000000055555555 -// Storage dump: -// 0000000000000000000000000000000000000000000000000000000000000000: 0000000000000000000000000000000000000000000000000000000055555555 diff --git a/test/libyul/ewasmTranslationTests/chainid.yul b/test/libyul/ewasmTranslationTests/chainid.yul deleted file mode 100644 index 73a82f44231a..000000000000 --- a/test/libyul/ewasmTranslationTests/chainid.yul +++ /dev/null @@ -1,10 +0,0 @@ -{ - sstore(0, chainid()) -} -// ==== -// EVMVersion: >=istanbul -// ---- -// Trace: -// INVALID() -// Memory dump: -// Storage dump: diff --git a/test/libyul/ewasmTranslationTests/codecopy.yul b/test/libyul/ewasmTranslationTests/codecopy.yul deleted file mode 100644 index 5b980c6b1cda..000000000000 --- a/test/libyul/ewasmTranslationTests/codecopy.yul +++ /dev/null @@ -1,11 +0,0 @@ -{ - codecopy(0x100, 0, codesize()) - sstore(0, mload(0x100)) -} -// ---- -// Trace: -// Memory dump: -// 20: 636f6465636f6465636f6465636f6465636f6465000000000000000000000000 -// 140: 636f6465636f6465636f6465636f6465636f6465000000000000000000000000 -// Storage dump: -// 0000000000000000000000000000000000000000000000000000000000000000: 636f6465636f6465636f6465636f6465636f6465000000000000000000000000 diff --git a/test/libyul/ewasmTranslationTests/codesize.yul b/test/libyul/ewasmTranslationTests/codesize.yul deleted file mode 100644 index ae96335fab21..000000000000 --- a/test/libyul/ewasmTranslationTests/codesize.yul +++ /dev/null @@ -1,9 +0,0 @@ -{ - sstore(0, codesize()) -} -// ---- -// Trace: -// Memory dump: -// 20: 0000000000000000000000000000000000000000000000000000000000000014 -// Storage dump: -// 0000000000000000000000000000000000000000000000000000000000000000: 0000000000000000000000000000000000000000000000000000000000000014 diff --git a/test/libyul/ewasmTranslationTests/coinbase.yul b/test/libyul/ewasmTranslationTests/coinbase.yul deleted file mode 100644 index b83e298f545e..000000000000 --- a/test/libyul/ewasmTranslationTests/coinbase.yul +++ /dev/null @@ -1,9 +0,0 @@ -{ - sstore(0, coinbase()) -} -// ---- -// Trace: -// Memory dump: -// 20: 0000000000000000000000000000000000000000000000000000000077777777 -// Storage dump: -// 0000000000000000000000000000000000000000000000000000000000000000: 0000000000000000000000000000000000000000000000000000000077777777 diff --git a/test/libyul/ewasmTranslationTests/comparison_eq.yul b/test/libyul/ewasmTranslationTests/comparison_eq.yul deleted file mode 100644 index d65d49cf900d..000000000000 --- a/test/libyul/ewasmTranslationTests/comparison_eq.yul +++ /dev/null @@ -1,28 +0,0 @@ -{ - sstore(0, eq(0, 0)) - sstore(1, eq(not(0), not(0))) - sstore(2, eq(0, not(0))) - sstore(3, eq(not(0), 0xffffffffffffffff)) - sstore(4, eq(0xfffffffffffffff000000000000000, 0xfffffffffffffff000000000000000)) - sstore(5, eq(0x000000000000000fffffffffffffff, 0xfffffffffffffff000000000000000)) - sstore(6, eq(0xfffffffffffffff000000000000000fffffffffffffff, 0xfffffffffffffff000000000000000fffffffffffffff)) - sstore(7, eq(0xfffffffffffffff000000000000000fffffffffffffff, 0x000000000000000ffffffffffffffffffffffffffffff)) - sstore(8, eq( - 0xaaaaaaaaaaaaaaaa5555555555555555ffffffffffffffff0000000000000000, - 0xaaaaaaaaaaaaaaaa5555555555555555ffffffffffffffff0000000000000000 - )) - sstore(9, eq( - 0xaaaaaaaaaaaaaaaa6666666666666666ffffffffffffffff0000000000000000, - 0xaaaaaaaaaaaaaaaa5555555555555555ffffffffffffffff0000000000000000 - )) -} -// ---- -// Trace: -// Memory dump: -// 0: 0000000000000000000000000000000000000000000000000000000000000009 -// Storage dump: -// 0000000000000000000000000000000000000000000000000000000000000000: 0000000000000000000000000000000000000000000000000000000000000001 -// 0000000000000000000000000000000000000000000000000000000000000001: 0000000000000000000000000000000000000000000000000000000000000001 -// 0000000000000000000000000000000000000000000000000000000000000004: 0000000000000000000000000000000000000000000000000000000000000001 -// 0000000000000000000000000000000000000000000000000000000000000006: 0000000000000000000000000000000000000000000000000000000000000001 -// 0000000000000000000000000000000000000000000000000000000000000008: 0000000000000000000000000000000000000000000000000000000000000001 diff --git a/test/libyul/ewasmTranslationTests/comparison_gt.yul b/test/libyul/ewasmTranslationTests/comparison_gt.yul deleted file mode 100644 index bda8b94e1485..000000000000 --- a/test/libyul/ewasmTranslationTests/comparison_gt.yul +++ /dev/null @@ -1,36 +0,0 @@ -{ - sstore(0, gt(1, 0)) - sstore(1, gt(0, 1)) - sstore(2, gt(0, 0)) - sstore(3, gt(not(0), 0xffffffffffffffff)) - sstore(4, gt(0xffffffffffffffff, not(0))) - sstore(5, gt(not(0), not(0))) - sstore(6, gt(not(0), 0xffffffffffffffff0000000000000000)) - sstore(7, gt(0xffffffffffffffff0000000000000000, not(0))) - sstore(8, gt(0xffffffffffffffff0000000000000000, 0xffffffffffffffff0000000000000000)) - sstore(9, gt(not(0), 0xffffffffffffffff0000000000000000ffffffffffffffff)) - sstore(10, gt(0xffffffffffffffff0000000000000000ffffffffffffffff, not(0))) - sstore(11, gt(0xffffffffffffffff0000000000000000ffffffffffffffff, 0xffffffffffffffff0000000000000000ffffffffffffffff)) - sstore(12, gt(not(0), 0xffffffffffffffff0000000000000000ffffffffffffffff0000000000000000)) - sstore(13, gt(0xffffffffffffffff0000000000000000ffffffffffffffff0000000000000000, not(0))) - sstore(14, gt( - 0xffffffffffffffff0000000000000000ffffffffffffffff0000000000000000, - 0xffffffffffffffff0000000000000000ffffffffffffffff0000000000000000) - ) - sstore(15, gt( - 0xffffffffffffffff0000000000000000ffffffffffffffff0000000000000001, - 0xffffffffffffffff0000000000000000ffffffffffffffff0000000000000000) - ) -} -// ---- -// Trace: -// Memory dump: -// 0: 000000000000000000000000000000000000000000000000000000000000000f -// 20: 0000000000000000000000000000000000000000000000000000000000000001 -// Storage dump: -// 0000000000000000000000000000000000000000000000000000000000000000: 0000000000000000000000000000000000000000000000000000000000000001 -// 0000000000000000000000000000000000000000000000000000000000000003: 0000000000000000000000000000000000000000000000000000000000000001 -// 0000000000000000000000000000000000000000000000000000000000000006: 0000000000000000000000000000000000000000000000000000000000000001 -// 0000000000000000000000000000000000000000000000000000000000000009: 0000000000000000000000000000000000000000000000000000000000000001 -// 000000000000000000000000000000000000000000000000000000000000000c: 0000000000000000000000000000000000000000000000000000000000000001 -// 000000000000000000000000000000000000000000000000000000000000000f: 0000000000000000000000000000000000000000000000000000000000000001 diff --git a/test/libyul/ewasmTranslationTests/comparison_lt.yul b/test/libyul/ewasmTranslationTests/comparison_lt.yul deleted file mode 100644 index be57da46e3fe..000000000000 --- a/test/libyul/ewasmTranslationTests/comparison_lt.yul +++ /dev/null @@ -1,36 +0,0 @@ -{ - sstore(0, lt(1, 0)) - sstore(1, lt(0, 1)) - sstore(2, lt(0, 0)) - sstore(3, lt(not(0), 0xffffffffffffffff)) - sstore(4, lt(0xffffffffffffffff, not(0))) - sstore(5, lt(not(0), not(0))) - sstore(6, lt(not(0), 0xffffffffffffffff0000000000000000)) - sstore(7, lt(0xffffffffffffffff0000000000000000, not(0))) - sstore(8, lt(0xffffffffffffffff0000000000000000, 0xffffffffffffffff0000000000000000)) - sstore(9, lt(not(0), 0xffffffffffffffff0000000000000000ffffffffffffffff)) - sstore(10, lt(0xffffffffffffffff0000000000000000ffffffffffffffff, not(0))) - sstore(11, lt(0xffffffffffffffff0000000000000000ffffffffffffffff, 0xffffffffffffffff0000000000000000ffffffffffffffff)) - sstore(12, lt(not(0), 0xffffffffffffffff0000000000000000ffffffffffffffff0000000000000000)) - sstore(13, lt(0xffffffffffffffff0000000000000000ffffffffffffffff0000000000000000, not(0))) - sstore(14, lt( - 0xffffffffffffffff0000000000000000ffffffffffffffff0000000000000000, - 0xffffffffffffffff0000000000000000ffffffffffffffff0000000000000000) - ) - sstore(15, lt( - 0xffffffffffffffff0000000000000000ffffffffffffffff0000000000000000, - 0xffffffffffffffff0000000000000000ffffffffffffffff0000000000000001) - ) -} -// ---- -// Trace: -// Memory dump: -// 0: 000000000000000000000000000000000000000000000000000000000000000f -// 20: 0000000000000000000000000000000000000000000000000000000000000001 -// Storage dump: -// 0000000000000000000000000000000000000000000000000000000000000001: 0000000000000000000000000000000000000000000000000000000000000001 -// 0000000000000000000000000000000000000000000000000000000000000004: 0000000000000000000000000000000000000000000000000000000000000001 -// 0000000000000000000000000000000000000000000000000000000000000007: 0000000000000000000000000000000000000000000000000000000000000001 -// 000000000000000000000000000000000000000000000000000000000000000a: 0000000000000000000000000000000000000000000000000000000000000001 -// 000000000000000000000000000000000000000000000000000000000000000d: 0000000000000000000000000000000000000000000000000000000000000001 -// 000000000000000000000000000000000000000000000000000000000000000f: 0000000000000000000000000000000000000000000000000000000000000001 diff --git a/test/libyul/ewasmTranslationTests/comparison_sgt.yul b/test/libyul/ewasmTranslationTests/comparison_sgt.yul deleted file mode 100644 index 60def7e31e4e..000000000000 --- a/test/libyul/ewasmTranslationTests/comparison_sgt.yul +++ /dev/null @@ -1,54 +0,0 @@ -{ - sstore(0, sgt(0, 1)) - sstore(1, sgt(0, not(0))) - sstore(2, sgt(0, 0)) - sstore(3, sgt(1, 2)) - sstore(4, sgt(not(0), 0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe)) - sstore(5, sgt(0x8000000000000000000000000000000000000000000000000000000000000000, not(0))) - sstore(6, sgt(not(0), 0x8000000000000000000000000000000000000000000000000000000000000000)) - sstore(7, sgt(0x7000000000000000000000000000000000000000000000000000000000000000, 1)) - sstore(8, sgt(1, 0x7000000000000000000000000000000000000000000000000000000000000000)) - sstore(9, sgt(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff, not(0))) - sstore(10, sgt(not(0), 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)) - sstore(11, sgt(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff, 1)) - sstore(12, sgt(1, 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)) - sstore(13, sgt( - 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff, - 0x8fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff - )) - sstore(14, sgt( - 0x8fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff, - 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff - )) - sstore(15, sgt( - 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff, - not(0) - )) - sstore(16, sgt( - not(0), - 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff - )) - sstore(17, sgt( - not(0), - 0x8fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff - )) - sstore(18, sgt( - 0x8fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff, - not(0) - )) - -} -// ---- -// Trace: -// Memory dump: -// 0: 0000000000000000000000000000000000000000000000000000000000000012 -// Storage dump: -// 0000000000000000000000000000000000000000000000000000000000000001: 0000000000000000000000000000000000000000000000000000000000000001 -// 0000000000000000000000000000000000000000000000000000000000000004: 0000000000000000000000000000000000000000000000000000000000000001 -// 0000000000000000000000000000000000000000000000000000000000000006: 0000000000000000000000000000000000000000000000000000000000000001 -// 0000000000000000000000000000000000000000000000000000000000000007: 0000000000000000000000000000000000000000000000000000000000000001 -// 0000000000000000000000000000000000000000000000000000000000000009: 0000000000000000000000000000000000000000000000000000000000000001 -// 000000000000000000000000000000000000000000000000000000000000000b: 0000000000000000000000000000000000000000000000000000000000000001 -// 000000000000000000000000000000000000000000000000000000000000000d: 0000000000000000000000000000000000000000000000000000000000000001 -// 000000000000000000000000000000000000000000000000000000000000000f: 0000000000000000000000000000000000000000000000000000000000000001 -// 0000000000000000000000000000000000000000000000000000000000000011: 0000000000000000000000000000000000000000000000000000000000000001 diff --git a/test/libyul/ewasmTranslationTests/comparison_slt.yul b/test/libyul/ewasmTranslationTests/comparison_slt.yul deleted file mode 100644 index 577f6e9f1f77..000000000000 --- a/test/libyul/ewasmTranslationTests/comparison_slt.yul +++ /dev/null @@ -1,55 +0,0 @@ -{ - sstore(0, slt(0, 1)) - sstore(1, slt(0, not(0))) - sstore(2, slt(0, 0)) - sstore(3, slt(1, 2)) - sstore(4, slt(not(0), 0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe)) - sstore(5, slt(0x8000000000000000000000000000000000000000000000000000000000000000, not(0))) - sstore(6, slt(not(0), 0x8000000000000000000000000000000000000000000000000000000000000000)) - sstore(7, slt(0x7000000000000000000000000000000000000000000000000000000000000000, 1)) - sstore(8, slt(1, 0x7000000000000000000000000000000000000000000000000000000000000000)) - sstore(9, slt(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff, not(0))) - sstore(10, slt(not(0), 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)) - sstore(11, slt(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff, 1)) - sstore(12, slt(1, 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)) - sstore(13, slt( - 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff, - 0x8fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff - )) - sstore(14, slt( - 0x8fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff, - 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff - )) - sstore(15, slt( - 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff, - not(0) - )) - sstore(16, slt( - not(0), - 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff - )) - sstore(17, slt( - not(0), - 0x8fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff - )) - sstore(18, slt( - 0x8fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff, - not(0) - )) - -} -// ---- -// Trace: -// Memory dump: -// 0: 0000000000000000000000000000000000000000000000000000000000000012 -// 20: 0000000000000000000000000000000000000000000000000000000000000001 -// Storage dump: -// 0000000000000000000000000000000000000000000000000000000000000000: 0000000000000000000000000000000000000000000000000000000000000001 -// 0000000000000000000000000000000000000000000000000000000000000003: 0000000000000000000000000000000000000000000000000000000000000001 -// 0000000000000000000000000000000000000000000000000000000000000005: 0000000000000000000000000000000000000000000000000000000000000001 -// 0000000000000000000000000000000000000000000000000000000000000008: 0000000000000000000000000000000000000000000000000000000000000001 -// 000000000000000000000000000000000000000000000000000000000000000a: 0000000000000000000000000000000000000000000000000000000000000001 -// 000000000000000000000000000000000000000000000000000000000000000c: 0000000000000000000000000000000000000000000000000000000000000001 -// 000000000000000000000000000000000000000000000000000000000000000e: 0000000000000000000000000000000000000000000000000000000000000001 -// 0000000000000000000000000000000000000000000000000000000000000010: 0000000000000000000000000000000000000000000000000000000000000001 -// 0000000000000000000000000000000000000000000000000000000000000012: 0000000000000000000000000000000000000000000000000000000000000001 diff --git a/test/libyul/ewasmTranslationTests/datacopy.yul b/test/libyul/ewasmTranslationTests/datacopy.yul deleted file mode 100644 index 8812e7c9bec3..000000000000 --- a/test/libyul/ewasmTranslationTests/datacopy.yul +++ /dev/null @@ -1,20 +0,0 @@ -object "main" -{ - code { - datacopy(0, and(dataoffset("main"), 15), and(datasize("main"), 15)) - datacopy(32, and(dataoffset("sub"), 15), and(datasize("sub"), 15)) - sstore(0, mload(0)) - sstore(1, mload(32)) - } - object "sub" { code { sstore(0, 1) } } -} -// ---- -// Trace: -// Memory dump: -// 0: 0000000000000000000000000000000000000000000000000000000000000001 -// 20: 636f6465636f6465000000000000000000000000000000000000000000000000 -// 40: 6465636f00000000000000000000000000000000000000000000000000000000 -// 60: 636f6465636f6465000000000000000000000000000000000000000000000000 -// Storage dump: -// 0000000000000000000000000000000000000000000000000000000000000000: 6465636f00000000000000000000000000000000000000000000000000000000 -// 0000000000000000000000000000000000000000000000000000000000000001: 636f6465636f6465000000000000000000000000000000000000000000000000 diff --git a/test/libyul/ewasmTranslationTests/dataoffset.yul b/test/libyul/ewasmTranslationTests/dataoffset.yul deleted file mode 100644 index d9dc12c9cd52..000000000000 --- a/test/libyul/ewasmTranslationTests/dataoffset.yul +++ /dev/null @@ -1,16 +0,0 @@ -object "main" -{ - code { - sstore(0, dataoffset("main")) - sstore(1, dataoffset("sub")) - } - object "sub" { code { sstore(0, 1) } } -} -// ---- -// Trace: -// Memory dump: -// 0: 0000000000000000000000000000000000000000000000000000000000000001 -// 20: 000000000000000000000000000000000000000000000000000000000000070c -// Storage dump: -// 0000000000000000000000000000000000000000000000000000000000000000: 000000000000000000000000000000000000000000000000000000000000006e -// 0000000000000000000000000000000000000000000000000000000000000001: 000000000000000000000000000000000000000000000000000000000000070c diff --git a/test/libyul/ewasmTranslationTests/datasize.yul b/test/libyul/ewasmTranslationTests/datasize.yul deleted file mode 100644 index 637c2c36de1f..000000000000 --- a/test/libyul/ewasmTranslationTests/datasize.yul +++ /dev/null @@ -1,16 +0,0 @@ -object "main" -{ - code { - sstore(0, datasize("main")) - sstore(1, datasize("sub")) - } - object "sub" { code { sstore(0, 1) } } -} -// ---- -// Trace: -// Memory dump: -// 0: 0000000000000000000000000000000000000000000000000000000000000001 -// 20: 0000000000000000000000000000000000000000000000000000000000000109 -// Storage dump: -// 0000000000000000000000000000000000000000000000000000000000000000: 0000000000000000000000000000000000000000000000000000000000000b64 -// 0000000000000000000000000000000000000000000000000000000000000001: 0000000000000000000000000000000000000000000000000000000000000109 diff --git a/test/libyul/ewasmTranslationTests/difficulty.yul b/test/libyul/ewasmTranslationTests/difficulty.yul deleted file mode 100644 index 52e4275b43f2..000000000000 --- a/test/libyul/ewasmTranslationTests/difficulty.yul +++ /dev/null @@ -1,11 +0,0 @@ -{ - sstore(0, difficulty()) -} -// ==== -// EVMVersion: =constantinople -// ---- -// Trace: -// INVALID() -// Memory dump: -// 0: 0000000000000000000000000000000000000000000000000000000011111111 -// Storage dump: diff --git a/test/libyul/ewasmTranslationTests/extcodesize.yul b/test/libyul/ewasmTranslationTests/extcodesize.yul deleted file mode 100644 index fb12db5ea70a..000000000000 --- a/test/libyul/ewasmTranslationTests/extcodesize.yul +++ /dev/null @@ -1,9 +0,0 @@ -{ - sstore(0, extcodesize(address())) -} -// ---- -// Trace: -// Memory dump: -// 20: 000000000000000000000000000000000000000000000000000000000000077b -// Storage dump: -// 0000000000000000000000000000000000000000000000000000000000000000: 000000000000000000000000000000000000000000000000000000000000077b diff --git a/test/libyul/ewasmTranslationTests/gas.yul b/test/libyul/ewasmTranslationTests/gas.yul deleted file mode 100644 index ef7125b26265..000000000000 --- a/test/libyul/ewasmTranslationTests/gas.yul +++ /dev/null @@ -1,9 +0,0 @@ -{ - sstore(0, gas()) -} -// ---- -// Trace: -// Memory dump: -// 20: 0000000000000000000000000000000000000000000000000000000000000099 -// Storage dump: -// 0000000000000000000000000000000000000000000000000000000000000000: 0000000000000000000000000000000000000000000000000000000000000099 diff --git a/test/libyul/ewasmTranslationTests/gaslimit.yul b/test/libyul/ewasmTranslationTests/gaslimit.yul deleted file mode 100644 index d1d0cc2a8338..000000000000 --- a/test/libyul/ewasmTranslationTests/gaslimit.yul +++ /dev/null @@ -1,9 +0,0 @@ -{ - sstore(0, gaslimit()) -} -// ---- -// Trace: -// Memory dump: -// 20: 00000000000000000000000000000000000000000000000000000000003d0900 -// Storage dump: -// 0000000000000000000000000000000000000000000000000000000000000000: 00000000000000000000000000000000000000000000000000000000003d0900 diff --git a/test/libyul/ewasmTranslationTests/gasprice.yul b/test/libyul/ewasmTranslationTests/gasprice.yul deleted file mode 100644 index 2c9d80452071..000000000000 --- a/test/libyul/ewasmTranslationTests/gasprice.yul +++ /dev/null @@ -1,9 +0,0 @@ -{ - sstore(0, gasprice()) -} -// ---- -// Trace: -// Memory dump: -// 20: 0000000000000000000000000000000000000000000000000000000066666666 -// Storage dump: -// 0000000000000000000000000000000000000000000000000000000000000000: 0000000000000000000000000000000000000000000000000000000066666666 diff --git a/test/libyul/ewasmTranslationTests/invalid.yul b/test/libyul/ewasmTranslationTests/invalid.yul deleted file mode 100644 index c9844978aba5..000000000000 --- a/test/libyul/ewasmTranslationTests/invalid.yul +++ /dev/null @@ -1,14 +0,0 @@ -{ - sstore(0, 0x1234) - mstore(1, 0) - invalid() - sstore(0, 0x5678) - mstore(1, 0xff) -} -// ---- -// Trace: -// INVALID() -// Memory dump: -// 20: 0000000000000000000000000000000000000000000000000000000000001234 -// Storage dump: -// 0000000000000000000000000000000000000000000000000000000000000000: 0000000000000000000000000000000000000000000000000000000000001234 diff --git a/test/libyul/ewasmTranslationTests/iszero.yul b/test/libyul/ewasmTranslationTests/iszero.yul deleted file mode 100644 index 5175e22451c9..000000000000 --- a/test/libyul/ewasmTranslationTests/iszero.yul +++ /dev/null @@ -1,14 +0,0 @@ -{ - let x := 0 - let y := 0x0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20 - let z := 0x0000000000000000000111111111111111111111100000000000000000000000 - sstore(0, iszero(x)) - sstore(1, iszero(y)) - sstore(2, iszero(z)) -} -// ---- -// Trace: -// Memory dump: -// 0: 0000000000000000000000000000000000000000000000000000000000000002 -// Storage dump: -// 0000000000000000000000000000000000000000000000000000000000000000: 0000000000000000000000000000000000000000000000000000000000000001 diff --git a/test/libyul/ewasmTranslationTests/keccak256.yul b/test/libyul/ewasmTranslationTests/keccak256.yul deleted file mode 100644 index 81a650345c78..000000000000 --- a/test/libyul/ewasmTranslationTests/keccak256.yul +++ /dev/null @@ -1,9 +0,0 @@ -{ - sstore(0, keccak256(0, 0)) - sstore(0, keccak256(0, 0x20)) -} -// ---- -// Trace: -// INVALID() -// Memory dump: -// Storage dump: diff --git a/test/libyul/ewasmTranslationTests/log0.yul b/test/libyul/ewasmTranslationTests/log0.yul deleted file mode 100644 index 6b02e598ba3a..000000000000 --- a/test/libyul/ewasmTranslationTests/log0.yul +++ /dev/null @@ -1,8 +0,0 @@ -{ - log0(0x20, 0x40) -} -// ---- -// Trace: -// LOG0() -// Memory dump: -// Storage dump: diff --git a/test/libyul/ewasmTranslationTests/log1.yul b/test/libyul/ewasmTranslationTests/log1.yul deleted file mode 100644 index 296484bd7548..000000000000 --- a/test/libyul/ewasmTranslationTests/log1.yul +++ /dev/null @@ -1,8 +0,0 @@ -{ - log1(0x20, 0x40, 0x60) -} -// ---- -// Trace: -// LOG1() -// Memory dump: -// Storage dump: diff --git a/test/libyul/ewasmTranslationTests/log2.yul b/test/libyul/ewasmTranslationTests/log2.yul deleted file mode 100644 index 887fef66f73f..000000000000 --- a/test/libyul/ewasmTranslationTests/log2.yul +++ /dev/null @@ -1,8 +0,0 @@ -{ - log2(0x20, 0x40, 0x60, 0x80) -} -// ---- -// Trace: -// LOG2() -// Memory dump: -// Storage dump: diff --git a/test/libyul/ewasmTranslationTests/log3.yul b/test/libyul/ewasmTranslationTests/log3.yul deleted file mode 100644 index 8ff23e2bdbd5..000000000000 --- a/test/libyul/ewasmTranslationTests/log3.yul +++ /dev/null @@ -1,8 +0,0 @@ -{ - log3(0x20, 0x40, 0x60, 0x80, 0xa0) -} -// ---- -// Trace: -// LOG3() -// Memory dump: -// Storage dump: diff --git a/test/libyul/ewasmTranslationTests/log4.yul b/test/libyul/ewasmTranslationTests/log4.yul deleted file mode 100644 index 152595e288bc..000000000000 --- a/test/libyul/ewasmTranslationTests/log4.yul +++ /dev/null @@ -1,8 +0,0 @@ -{ - log4(0x20, 0x40, 0x60, 0x80, 0xa0, 0xb0) -} -// ---- -// Trace: -// LOG4() -// Memory dump: -// Storage dump: diff --git a/test/libyul/ewasmTranslationTests/loop_break.yul b/test/libyul/ewasmTranslationTests/loop_break.yul deleted file mode 100644 index b473988d5fbb..000000000000 --- a/test/libyul/ewasmTranslationTests/loop_break.yul +++ /dev/null @@ -1,13 +0,0 @@ -{ - let i := 0 - for { } lt(i, 10) { i := add(i, 1) } { - if eq(i, 3) { break } - } - sstore(0, i) -} -// ---- -// Trace: -// Memory dump: -// 20: 0000000000000000000000000000000000000000000000000000000000000003 -// Storage dump: -// 0000000000000000000000000000000000000000000000000000000000000000: 0000000000000000000000000000000000000000000000000000000000000003 diff --git a/test/libyul/ewasmTranslationTests/loop_continue.yul b/test/libyul/ewasmTranslationTests/loop_continue.yul deleted file mode 100644 index 31200c2fe240..000000000000 --- a/test/libyul/ewasmTranslationTests/loop_continue.yul +++ /dev/null @@ -1,22 +0,0 @@ -{ - let i := 0 - for { } lt(i, 10) { i := add(i, 1) } { - if eq(i, 3) { continue } - sstore(add(i, 0x10), i) - } - sstore(0, i) -} -// ---- -// Trace: -// Memory dump: -// 20: 000000000000000000000000000000000000000000000000000000000000000a -// Storage dump: -// 0000000000000000000000000000000000000000000000000000000000000000: 000000000000000000000000000000000000000000000000000000000000000a -// 0000000000000000000000000000000000000000000000000000000000000011: 0000000000000000000000000000000000000000000000000000000000000001 -// 0000000000000000000000000000000000000000000000000000000000000012: 0000000000000000000000000000000000000000000000000000000000000002 -// 0000000000000000000000000000000000000000000000000000000000000014: 0000000000000000000000000000000000000000000000000000000000000004 -// 0000000000000000000000000000000000000000000000000000000000000015: 0000000000000000000000000000000000000000000000000000000000000005 -// 0000000000000000000000000000000000000000000000000000000000000016: 0000000000000000000000000000000000000000000000000000000000000006 -// 0000000000000000000000000000000000000000000000000000000000000017: 0000000000000000000000000000000000000000000000000000000000000007 -// 0000000000000000000000000000000000000000000000000000000000000018: 0000000000000000000000000000000000000000000000000000000000000008 -// 0000000000000000000000000000000000000000000000000000000000000019: 0000000000000000000000000000000000000000000000000000000000000009 diff --git a/test/libyul/ewasmTranslationTests/memoryguard.yul b/test/libyul/ewasmTranslationTests/memoryguard.yul deleted file mode 100644 index 5aafc88d23b5..000000000000 --- a/test/libyul/ewasmTranslationTests/memoryguard.yul +++ /dev/null @@ -1,12 +0,0 @@ -{ - mstore(0x40, memoryguard(0x0102030405060708)) - sstore(1, mload(0x40)) -} -// ---- -// Trace: -// Memory dump: -// 0: 0000000000000000000000000000000000000000000000000000000000000001 -// 20: 0000000000000000000000000000000000000000000000000102030405060708 -// 80: 0000000000000000000000000000000000000000000000000102030405060708 -// Storage dump: -// 0000000000000000000000000000000000000000000000000000000000000001: 0000000000000000000000000000000000000000000000000102030405060708 diff --git a/test/libyul/ewasmTranslationTests/msize.yul b/test/libyul/ewasmTranslationTests/msize.yul deleted file mode 100644 index b45b2aae07ea..000000000000 --- a/test/libyul/ewasmTranslationTests/msize.yul +++ /dev/null @@ -1,12 +0,0 @@ -{ - sstore(0, msize()) - mstore(0x20, 0x0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20) - mstore(0x40, mload(0x20)) - sstore(1, mload(0x40)) - sstore(2, msize()) -} -// ---- -// Trace: -// INVALID() -// Memory dump: -// Storage dump: diff --git a/test/libyul/ewasmTranslationTests/mstore8.yul b/test/libyul/ewasmTranslationTests/mstore8.yul deleted file mode 100644 index 78d10180003f..000000000000 --- a/test/libyul/ewasmTranslationTests/mstore8.yul +++ /dev/null @@ -1,15 +0,0 @@ -{ - mstore(0x30, not(0)) - mstore8(0x20, 0xaa) - mstore8(0x26, 0xcc) - mstore8(0x3b, 0x11) - sstore(0, mload(0x20)) -} -// ---- -// Trace: -// Memory dump: -// 20: aa0000000000cc000000000000000000ffffffffffffffffffffff11ffffffff -// 60: aa0000000000cc000000000000000000ffffffffffffffffffffff11ffffffff -// 80: ffffffffffffffffffffffffffffffff00000000000000000000000000000000 -// Storage dump: -// 0000000000000000000000000000000000000000000000000000000000000000: aa0000000000cc000000000000000000ffffffffffffffffffffff11ffffffff diff --git a/test/libyul/ewasmTranslationTests/mstore_mload.yul b/test/libyul/ewasmTranslationTests/mstore_mload.yul deleted file mode 100644 index 95646abe252f..000000000000 --- a/test/libyul/ewasmTranslationTests/mstore_mload.yul +++ /dev/null @@ -1,14 +0,0 @@ -{ - mstore(0x20, 0x0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20) - mstore(0x40, mload(0x20)) - sstore(1, mload(0x40)) -} -// ---- -// Trace: -// Memory dump: -// 0: 0000000000000000000000000000000000000000000000000000000000000001 -// 20: 0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20 -// 60: 0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20 -// 80: 0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20 -// Storage dump: -// 0000000000000000000000000000000000000000000000000000000000000001: 0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20 diff --git a/test/libyul/ewasmTranslationTests/number.yul b/test/libyul/ewasmTranslationTests/number.yul deleted file mode 100644 index 83250247aa74..000000000000 --- a/test/libyul/ewasmTranslationTests/number.yul +++ /dev/null @@ -1,9 +0,0 @@ -{ - sstore(0, number()) -} -// ---- -// Trace: -// Memory dump: -// 20: 0000000000000000000000000000000000000000000000000000000000000400 -// Storage dump: -// 0000000000000000000000000000000000000000000000000000000000000000: 0000000000000000000000000000000000000000000000000000000000000400 diff --git a/test/libyul/ewasmTranslationTests/origin.yul b/test/libyul/ewasmTranslationTests/origin.yul deleted file mode 100644 index 16fe9181f268..000000000000 --- a/test/libyul/ewasmTranslationTests/origin.yul +++ /dev/null @@ -1,9 +0,0 @@ -{ - sstore(0, origin()) -} -// ---- -// Trace: -// Memory dump: -// 20: 0000000000000000000000000000000000000000000000000000000033333333 -// Storage dump: -// 0000000000000000000000000000000000000000000000000000000000000000: 0000000000000000000000000000000000000000000000000000000033333333 diff --git a/test/libyul/ewasmTranslationTests/return.yul b/test/libyul/ewasmTranslationTests/return.yul deleted file mode 100644 index bb8b141708a5..000000000000 --- a/test/libyul/ewasmTranslationTests/return.yul +++ /dev/null @@ -1,11 +0,0 @@ -{ - mstore(0x20, 0x1234556677889900aa) - return(0x20, 30) - invalid() -} -// ---- -// Trace: -// RETURN() [000000000000000000000000000000000000000000000012345566778899] -// Memory dump: -// 60: 00000000000000000000000000000000000000000000001234556677889900aa -// Storage dump: diff --git a/test/libyul/ewasmTranslationTests/returndatacopy.yul b/test/libyul/ewasmTranslationTests/returndatacopy.yul deleted file mode 100644 index c90b16f13c82..000000000000 --- a/test/libyul/ewasmTranslationTests/returndatacopy.yul +++ /dev/null @@ -1,10 +0,0 @@ -{ - returndatacopy(0x100, 0, returndatasize()) - sstore(0, mload(0x100)) -} -// ==== -// EVMVersion: >=byzantium -// ---- -// Trace: -// Memory dump: -// Storage dump: diff --git a/test/libyul/ewasmTranslationTests/returndatasize.yul b/test/libyul/ewasmTranslationTests/returndatasize.yul deleted file mode 100644 index b6aea851d662..000000000000 --- a/test/libyul/ewasmTranslationTests/returndatasize.yul +++ /dev/null @@ -1,9 +0,0 @@ -{ - sstore(0, returndatasize()) -} -// ==== -// EVMVersion: >=byzantium -// ---- -// Trace: -// Memory dump: -// Storage dump: diff --git a/test/libyul/ewasmTranslationTests/revert.yul b/test/libyul/ewasmTranslationTests/revert.yul deleted file mode 100644 index fbb5fc272002..000000000000 --- a/test/libyul/ewasmTranslationTests/revert.yul +++ /dev/null @@ -1,13 +0,0 @@ -{ - mstore(0x20, 0x1234556677889900aa) - revert(0x20, 30) - invalid() -} -// ==== -// EVMVersion: >=byzantium -// ---- -// Trace: -// REVERT() [000000000000000000000000000000000000000000000012345566778899] -// Memory dump: -// 60: 00000000000000000000000000000000000000000000001234556677889900aa -// Storage dump: diff --git a/test/libyul/ewasmTranslationTests/selfbalance.yul b/test/libyul/ewasmTranslationTests/selfbalance.yul deleted file mode 100644 index 32037fb5ac25..000000000000 --- a/test/libyul/ewasmTranslationTests/selfbalance.yul +++ /dev/null @@ -1,10 +0,0 @@ -{ - sstore(0, selfbalance()) -} -// ==== -// EVMVersion: >=istanbul -// ---- -// Trace: -// INVALID() -// Memory dump: -// Storage dump: diff --git a/test/libyul/ewasmTranslationTests/selfdestruct.yul b/test/libyul/ewasmTranslationTests/selfdestruct.yul deleted file mode 100644 index c000393fb7c5..000000000000 --- a/test/libyul/ewasmTranslationTests/selfdestruct.yul +++ /dev/null @@ -1,10 +0,0 @@ -{ - selfdestruct(0xffffffffffffffffffffffffffffffffffffffff) - invalid() -} -// ---- -// Trace: -// SELFDESTRUCT() -// Memory dump: -// 0: 000000000000000000000000ffffffffffffffffffffffffffffffffffffffff -// Storage dump: diff --git a/test/libyul/ewasmTranslationTests/shifts.yul b/test/libyul/ewasmTranslationTests/shifts.yul deleted file mode 100644 index cf900dae2350..000000000000 --- a/test/libyul/ewasmTranslationTests/shifts.yul +++ /dev/null @@ -1,23 +0,0 @@ -{ - let x := 0x0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20 - let y := shl(120, x) - let z := shr(136, y) - sstore(0, y) - sstore(1, z) - sstore(2, sar(136, 0x801112131415161718191a1b1c1d1e1f20000000000000000000000000000000)) - sstore(3, sar(256, 0x801112131415161718191a1b1c1d1e1f20000000000000000000000000000000)) - sstore(4, sar(136, 0x701112131415161718191a1b1c1d1e1f20000000000000000000000000000000)) - sstore(5, sar(256, 0x701112131415161718191a1b1c1d1e1f20000000000000000000000000000000)) -} -// ==== -// EVMVersion: >=constantinople -// ---- -// Trace: -// Memory dump: -// 0: 0000000000000000000000000000000000000000000000000000000000000005 -// Storage dump: -// 0000000000000000000000000000000000000000000000000000000000000000: 101112131415161718191a1b1c1d1e1f20000000000000000000000000000000 -// 0000000000000000000000000000000000000000000000000000000000000001: 0000000000000000000000000000000000101112131415161718191a1b1c1d1e -// 0000000000000000000000000000000000000000000000000000000000000002: ffffffffffffffffffffffffffffffffff801112131415161718191a1b1c1d1e -// 0000000000000000000000000000000000000000000000000000000000000003: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff -// 0000000000000000000000000000000000000000000000000000000000000004: 0000000000000000000000000000000000701112131415161718191a1b1c1d1e diff --git a/test/libyul/ewasmTranslationTests/signextend.yul b/test/libyul/ewasmTranslationTests/signextend.yul deleted file mode 100644 index f39d5926b943..000000000000 --- a/test/libyul/ewasmTranslationTests/signextend.yul +++ /dev/null @@ -1,16 +0,0 @@ -{ - sstore(0, signextend(0, 0x86)) - sstore(1, signextend(0, 0x76)) - sstore(2, signextend(32, not(0))) - sstore(3, signextend(5, 0xff8844553322)) -} -// ---- -// Trace: -// Memory dump: -// 0: 0000000000000000000000000000000000000000000000000000000000000003 -// 20: ffffffffffffffffffffffffffffffffffffffffffffffffffffff8844553322 -// Storage dump: -// 0000000000000000000000000000000000000000000000000000000000000000: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff86 -// 0000000000000000000000000000000000000000000000000000000000000001: 0000000000000000000000000000000000000000000000000000000000000076 -// 0000000000000000000000000000000000000000000000000000000000000002: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff -// 0000000000000000000000000000000000000000000000000000000000000003: ffffffffffffffffffffffffffffffffffffffffffffffffffffff8844553322 diff --git a/test/libyul/ewasmTranslationTests/simple_mstore.yul b/test/libyul/ewasmTranslationTests/simple_mstore.yul deleted file mode 100644 index dd9ac1d5eda6..000000000000 --- a/test/libyul/ewasmTranslationTests/simple_mstore.yul +++ /dev/null @@ -1,8 +0,0 @@ -{ - mstore(0x20, 0x0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20) -} -// ---- -// Trace: -// Memory dump: -// 60: 0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20 -// Storage dump: diff --git a/test/libyul/ewasmTranslationTests/simple_sload.yul b/test/libyul/ewasmTranslationTests/simple_sload.yul deleted file mode 100644 index 6d4131a99e95..000000000000 --- a/test/libyul/ewasmTranslationTests/simple_sload.yul +++ /dev/null @@ -1,16 +0,0 @@ -{ - sstore(1, 7) - sstore(2, sub(0, 1)) - sstore(3, sload(1)) - sstore(4, sload(2)) -} -// ---- -// Trace: -// Memory dump: -// 0: 0000000000000000000000000000000000000000000000000000000000000004 -// 20: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff -// Storage dump: -// 0000000000000000000000000000000000000000000000000000000000000001: 0000000000000000000000000000000000000000000000000000000000000007 -// 0000000000000000000000000000000000000000000000000000000000000002: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff -// 0000000000000000000000000000000000000000000000000000000000000003: 0000000000000000000000000000000000000000000000000000000000000007 -// 0000000000000000000000000000000000000000000000000000000000000004: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff diff --git a/test/libyul/ewasmTranslationTests/simple_sstore.yul b/test/libyul/ewasmTranslationTests/simple_sstore.yul deleted file mode 100644 index 8fbb4923ae2b..000000000000 --- a/test/libyul/ewasmTranslationTests/simple_sstore.yul +++ /dev/null @@ -1,12 +0,0 @@ -{ - sstore(1, 7) - sstore(2, sub(0, 1)) -} -// ---- -// Trace: -// Memory dump: -// 0: 0000000000000000000000000000000000000000000000000000000000000002 -// 20: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff -// Storage dump: -// 0000000000000000000000000000000000000000000000000000000000000001: 0000000000000000000000000000000000000000000000000000000000000007 -// 0000000000000000000000000000000000000000000000000000000000000002: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff diff --git a/test/libyul/ewasmTranslationTests/smoke.yul b/test/libyul/ewasmTranslationTests/smoke.yul deleted file mode 100644 index f7f1a1aefb8a..000000000000 --- a/test/libyul/ewasmTranslationTests/smoke.yul +++ /dev/null @@ -1,5 +0,0 @@ -{} -// ---- -// Trace: -// Memory dump: -// Storage dump: diff --git a/test/libyul/ewasmTranslationTests/smoke_call.yul b/test/libyul/ewasmTranslationTests/smoke_call.yul deleted file mode 100644 index 6d93770161e1..000000000000 --- a/test/libyul/ewasmTranslationTests/smoke_call.yul +++ /dev/null @@ -1,10 +0,0 @@ -{ - sstore(0, call(gas(), address(), 42, 0, 0x20, 0x20, 0x20)) -} -// ---- -// Trace: -// CALL() -// Memory dump: -// 20: 0000000000000000000000000000000000000000000000000000000000000001 -// Storage dump: -// 0000000000000000000000000000000000000000000000000000000000000000: 0000000000000000000000000000000000000000000000000000000000000001 diff --git a/test/libyul/ewasmTranslationTests/smoke_callcode.yul b/test/libyul/ewasmTranslationTests/smoke_callcode.yul deleted file mode 100644 index dd22ef261178..000000000000 --- a/test/libyul/ewasmTranslationTests/smoke_callcode.yul +++ /dev/null @@ -1,10 +0,0 @@ -{ - sstore(0, callcode(gas(), address(), 42, 0, 0x20, 0x20, 0x20)) -} -// ---- -// Trace: -// CALLCODE() -// Memory dump: -// 20: 0000000000000000000000000000000000000000000000000000000000000001 -// Storage dump: -// 0000000000000000000000000000000000000000000000000000000000000000: 0000000000000000000000000000000000000000000000000000000000000001 diff --git a/test/libyul/ewasmTranslationTests/smoke_create.yul b/test/libyul/ewasmTranslationTests/smoke_create.yul deleted file mode 100644 index 7650e9e6c140..000000000000 --- a/test/libyul/ewasmTranslationTests/smoke_create.yul +++ /dev/null @@ -1,11 +0,0 @@ -{ - let size := codesize() - codecopy(0, 0, size) - sstore(0, create(42, 0, size)) -} -// ---- -// Trace: -// CREATE() -// Memory dump: -// 40: 636f6465636f6465636f6465636f6465636f6465000000000000000000000000 -// Storage dump: diff --git a/test/libyul/ewasmTranslationTests/smoke_create2.yul b/test/libyul/ewasmTranslationTests/smoke_create2.yul deleted file mode 100644 index 32d789ea9abb..000000000000 --- a/test/libyul/ewasmTranslationTests/smoke_create2.yul +++ /dev/null @@ -1,13 +0,0 @@ -{ - let size := codesize() - codecopy(0x40, 0, size) - sstore(0, create2(42, 0, size, 0x20)) -} -// ==== -// EVMVersion: >=constantinople -// ---- -// Trace: -// INVALID() -// Memory dump: -// 80: 636f6465636f6465636f6465636f6465636f6465000000000000000000000000 -// Storage dump: diff --git a/test/libyul/ewasmTranslationTests/smoke_delegatecall.yul b/test/libyul/ewasmTranslationTests/smoke_delegatecall.yul deleted file mode 100644 index 30ad4b96d220..000000000000 --- a/test/libyul/ewasmTranslationTests/smoke_delegatecall.yul +++ /dev/null @@ -1,10 +0,0 @@ -{ - sstore(0, delegatecall(gas(), address(), 0, 0x20, 0x20, 0x20)) -} -// ---- -// Trace: -// DELEGATECALL() -// Memory dump: -// 20: 0000000000000000000000000000000000000000000000000000000000000001 -// Storage dump: -// 0000000000000000000000000000000000000000000000000000000000000000: 0000000000000000000000000000000000000000000000000000000000000001 diff --git a/test/libyul/ewasmTranslationTests/smoke_staticcall.yul b/test/libyul/ewasmTranslationTests/smoke_staticcall.yul deleted file mode 100644 index 25faaa9ee93c..000000000000 --- a/test/libyul/ewasmTranslationTests/smoke_staticcall.yul +++ /dev/null @@ -1,12 +0,0 @@ -{ - sstore(0, staticcall(gas(), address(), 0, 0x20, 0x20, 0x20)) -} -// ==== -// EVMVersion: >=byzantium -// ---- -// Trace: -// STATICCALL() -// Memory dump: -// 20: 0000000000000000000000000000000000000000000000000000000000000001 -// Storage dump: -// 0000000000000000000000000000000000000000000000000000000000000000: 0000000000000000000000000000000000000000000000000000000000000001 diff --git a/test/libyul/ewasmTranslationTests/timestamp.yul b/test/libyul/ewasmTranslationTests/timestamp.yul deleted file mode 100644 index 9982590dfdc0..000000000000 --- a/test/libyul/ewasmTranslationTests/timestamp.yul +++ /dev/null @@ -1,9 +0,0 @@ -{ - sstore(0, timestamp()) -} -// ---- -// Trace: -// Memory dump: -// 20: 0000000000000000000000000000000000000000000000000000000088888888 -// Storage dump: -// 0000000000000000000000000000000000000000000000000000000000000000: 0000000000000000000000000000000000000000000000000000000088888888 diff --git a/test/libyul/objectCompiler/wasm/no_main_function.yul b/test/libyul/objectCompiler/wasm/no_main_function.yul deleted file mode 100644 index 2dd91a166236..000000000000 --- a/test/libyul/objectCompiler/wasm/no_main_function.yul +++ /dev/null @@ -1,22 +0,0 @@ -{ - function not_main() { - i64.drop(i64.add(0, 1)) - } -} -// ==== -// wasm: true -// ---- -// Text: -// (module -// (memory $memory (export "memory") 1) -// -// (func $not_main -// (block $label_ -// (drop (i64.add (i64.const 0) (i64.const 1))) -// ) -// ) -// -// ) -// -// Binary: -// 0061736d01000000010401600000020100030201000503010001060100070a01066d656d6f727902000a0d010b000240420042017c1a0b0b diff --git a/test/libyul/objectCompiler/wasm/simple.yul b/test/libyul/objectCompiler/wasm/simple.yul deleted file mode 100644 index b158aea52bf0..000000000000 --- a/test/libyul/objectCompiler/wasm/simple.yul +++ /dev/null @@ -1,23 +0,0 @@ -{ - function main() { - i64.drop(i64.add(0, 1)) - } -} -// ==== -// wasm: true -// ---- -// Text: -// (module -// (memory $memory (export "memory") 1) -// (export "main" (func $main)) -// -// (func $main -// (block $label_ -// (drop (i64.add (i64.const 0) (i64.const 1))) -// ) -// ) -// -// ) -// -// Binary: -// 0061736d01000000010401600000020100030201000503010001060100071102066d656d6f72790200046d61696e00000a0d010b000240420042017c1a0b0b diff --git a/test/libyul/objectCompiler/wasm/subObject.yul b/test/libyul/objectCompiler/wasm/subObject.yul deleted file mode 100644 index 683e64be1e98..000000000000 --- a/test/libyul/objectCompiler/wasm/subObject.yul +++ /dev/null @@ -1,22 +0,0 @@ -object "a" { - code {} - // Unreferenced data is not added to the assembled bytecode. - data "str" "Hello, World!" - object "sub" { code { function main() { i64.drop(11) } } } -} -// ==== -// wasm: true -// ---- -// Text: -// (module -// ;; custom section for sub-module -// ;; The Keccak-256 hash of the text representation of "sub": 78ac3419d75c8d6f42f663717b8e964eeb994d77ff175145133084422dbd23d7 -// ;; (@custom "sub" "0061736d01000000010401600000020100030201000503010001060100071102066d656d6f72790200046d61696e00000a0a0108000240420b1a0b0b") -// ;; custom section for data -// ;; (@custom "str" "48656c6c6f2c20576f726c6421") -// (memory $memory (export "memory") 1) -// -// ) -// -// Binary: -// 0061736d010000000101000201000301000503010001060100070a01066d656d6f727902000040037375620061736d01000000010401600000020100030201000503010001060100071102066d656d6f72790200046d61696e00000a0a0108000240420b1a0b0b00110373747248656c6c6f2c20576f726c64210a0100 diff --git a/test/libyul/objectCompiler/wasm/subObjectAccess.yul b/test/libyul/objectCompiler/wasm/subObjectAccess.yul deleted file mode 100644 index 8acced97f69d..000000000000 --- a/test/libyul/objectCompiler/wasm/subObjectAccess.yul +++ /dev/null @@ -1,79 +0,0 @@ -object "A" { - code { - function main() { - // TODO: support this - // i64.drop(dataoffset("A")) - // i64.drop(datasize("A")) - i64.drop(dataoffset("B")) - i64.drop(datasize("B")) - // TODO: support sub-subobjects - // i64.drop(dataoffset("B.C")) - // i64.drop(datasize("B.C")) - // i64.drop(dataoffset("B.E")) - // i64.drop(datasize("B.E")) - // i64.drop(dataoffset("B.C.D")) - // i64.drop(datasize("B.C.D")) - } - } - - data "data1" "Hello, World!" - - object "B" { - code { - function main() { - i64.drop(dataoffset("C")) - i64.drop(datasize("C")) - i64.drop(dataoffset("E")) - i64.drop(datasize("E")) - // i64.drop(dataoffset("C.D")) - // i64.drop(datasize("C.D")) - } - } - object "C" { - code { - function main() { - i64.drop(dataoffset("D")) - i64.drop(datasize("D")) - } - } - object "D" { - code { - function main() { - unreachable() - } - } - } - } - object "E" { - code { - function main() { - unreachable() - } - } - } - } -} -// ==== -// wasm: true -// ---- -// Text: -// (module -// ;; custom section for sub-module -// ;; The Keccak-256 hash of the text representation of "B": ccfc48ce1c0d0542ffd25ae6858777b2f7b8a6d2b6608f679458182e719f5434 -// ;; (@custom "B" "0061736d01000000010401600000020100030201000503010001060100071102066d656d6f72790200046d61696e0000007f01430061736d01000000010401600000020100030201000503010001060100071102066d656d6f72790200046d61696e0000003c01440061736d01000000010401600000020100030201000503010001060100071102066d656d6f72790200046d61696e00000a080106000240000b0b0a0d010b00024042341a423a1a0b0b003c01450061736d01000000010401600000020100030201000503010001060100071102066d656d6f72790200046d61696e00000a080106000240000b0b0a15011300024042341a42fd001a42b5011a423a1a0b0b") -// ;; custom section for data -// ;; (@custom "data1" "48656c6c6f2c20576f726c6421") -// (memory $memory (export "memory") 1) -// (export "main" (func $main)) -// -// (func $main -// (block $label_ -// (drop (dataoffset "B")) -// (drop (datasize "B")) -// ) -// ) -// -// ) -// -// Binary: -// 0061736d01000000010401600000020100030201000503010001060100071102066d656d6f72790200046d61696e000000880201420061736d01000000010401600000020100030201000503010001060100071102066d656d6f72790200046d61696e0000007f01430061736d01000000010401600000020100030201000503010001060100071102066d656d6f72790200046d61696e0000003c01440061736d01000000010401600000020100030201000503010001060100071102066d656d6f72790200046d61696e00000a080106000240000b0b0a0d010b00024042341a423a1a0b0b003c01450061736d01000000010401600000020100030201000503010001060100071102066d656d6f72790200046d61696e00000a080106000240000b0b0a15011300024042341a42fd001a42b5011a423a1a0b0b001305646174613148656c6c6f2c20576f726c64210a0e010c00024042351a4286021a0b0b diff --git a/test/libyul/yulOptimizerTests/conditionalSimplifier/add_correct_type_wasm.yul b/test/libyul/yulOptimizerTests/conditionalSimplifier/add_correct_type_wasm.yul deleted file mode 100644 index de92aad7aefa..000000000000 --- a/test/libyul/yulOptimizerTests/conditionalSimplifier/add_correct_type_wasm.yul +++ /dev/null @@ -1,19 +0,0 @@ -{ - let y:i32 := 0:i32 - for {} true { } { - if y { break } - } -} -// ==== -// dialect: ewasm -// ---- -// step: conditionalSimplifier -// -// { -// let y:i32 := 0:i32 -// for { } true { } -// { -// if y { break } -// y := false -// } -// } diff --git a/test/libyul/yulOptimizerTests/expressionSplitter/typed.yul b/test/libyul/yulOptimizerTests/expressionSplitter/typed.yul deleted file mode 100644 index 4bae497d6392..000000000000 --- a/test/libyul/yulOptimizerTests/expressionSplitter/typed.yul +++ /dev/null @@ -1,43 +0,0 @@ -{ - function fun(x: i32, y) -> t: i32, z: i32 { - z := i32.add(x, i32.add(z, z)) - - } - i64.store(i32.load(5:i32), i64.load(8:i32)) - let i := 0 - for {} i32.eqz(i32.load(9:i32)) { i := i64.add(i, 1) } { - let f: i32, g: i32 := fun(i32.load(1:i32), i64.load(i32.load(0: i32))) - } -} -// ==== -// dialect: ewasm -// ---- -// step: expressionSplitter -// -// { -// function fun(x:i32, y) -> t:i32, z:i32 -// { -// let _1:i32 := i32.add(z, z) -// z := i32.add(x, _1) -// } -// let _2:i32 := 8:i32 -// let _3 := i64.load(_2) -// let _4:i32 := 5:i32 -// let _5:i32 := i32.load(_4) -// i64.store(_5, _3) -// let i := 0 -// for { } -// i32.eqz(i32.load(9:i32)) -// { -// let _6 := 1 -// i := i64.add(i, _6) -// } -// { -// let _7:i32 := 0:i32 -// let _8:i32 := i32.load(_7) -// let _9 := i64.load(_8) -// let _10:i32 := 1:i32 -// let _11:i32 := i32.load(_10) -// let f:i32, g:i32 := fun(_11, _9) -// } -// } diff --git a/test/libyul/yulOptimizerTests/wordSizeTransform/constant_assignment.yul b/test/libyul/yulOptimizerTests/wordSizeTransform/constant_assignment.yul deleted file mode 100644 index 10f8814a66ed..000000000000 --- a/test/libyul/yulOptimizerTests/wordSizeTransform/constant_assignment.yul +++ /dev/null @@ -1,18 +0,0 @@ -{ - let val := 1234567890123456789012345678901234567890123456789012345678901234567890 - val := 9876543219876543219876543219876543219876543219876543219876543219876543210 -} - -// ---- -// step: wordSizeTransform -// -// { -// let val_0 := 196678011949 -// let val_1 := 17592899865401375162 -// let val_2 := 3392951883154430155 -// let val_3 := 12452437124710337234 -// val_0 := 1573424111353538 -// val_1 := 11180339179422519519 -// val_2 := 5225342777609112214 -// val_3 := 12264064093151869674 -// } diff --git a/test/libyul/yulOptimizerTests/wordSizeTransform/function_call.yul b/test/libyul/yulOptimizerTests/wordSizeTransform/function_call.yul deleted file mode 100644 index 3aef8c99ceea..000000000000 --- a/test/libyul/yulOptimizerTests/wordSizeTransform/function_call.yul +++ /dev/null @@ -1,43 +0,0 @@ -{ - function swap(x, y) -> a, b - { - a := y - b := x - } - function main(v1, v2) -> r1, r2 - { - let tmp := 11111111111111111111111111111111111111111111111111111111111111111111111111111 - r1, r2 := swap(v1, tmp) - r1, r2 := swap(2222222222222222222222222222222222222222222222222222222222222222222, r2) - } -} - -// ---- -// step: wordSizeTransform -// -// { -// function swap(x_0, x_1, x_2, x_3, y_0, y_1, y_2, y_3) -> a_0, a_1, a_2, a_3, b_0, b_1, b_2, b_3 -// { -// a_0 := y_0 -// a_1 := y_1 -// a_2 := y_2 -// a_3 := y_3 -// b_0 := x_0 -// b_1 := x_1 -// b_2 := x_2 -// b_3 := x_3 -// } -// function main(v1_0, v1_1, v1_2, v1_3, v2_0, v2_1, v2_2, v2_3) -> r1_0, r1_1, r1_2, r1_3, r2_0, r2_1, r2_2, r2_3 -// { -// let tmp_0 := 1770102123480502530 -// let tmp_1 := 591943673742124792 -// let tmp_2 := 13663686148824196892 -// let tmp_3 := 8198552921648689607 -// r1_0, r1_1, r1_2, r1_3, r2_0, r2_1, r2_2, r2_3 := swap(v1_0, v1_1, v1_2, v1_3, tmp_0, tmp_1, tmp_2, tmp_3) -// let _1_0 := 354020424 -// let _1_1 := 12840787883880108911 -// let _1_2 := 12527970737989311368 -// let _1_3 := 16397105843297379214 -// r1_0, r1_1, r1_2, r1_3, r2_0, r2_1, r2_2, r2_3 := swap(_1_0, _1_1, _1_2, _1_3, r2_0, r2_1, r2_2, r2_3) -// } -// } diff --git a/test/libyul/yulOptimizerTests/wordSizeTransform/functional_instruction.yul b/test/libyul/yulOptimizerTests/wordSizeTransform/functional_instruction.yul deleted file mode 100644 index 5ac0bfc00a8d..000000000000 --- a/test/libyul/yulOptimizerTests/wordSizeTransform/functional_instruction.yul +++ /dev/null @@ -1,17 +0,0 @@ -{ - let x := add(999999999999999999999999999999999999999999999999999999999999999, 77777777777777777777777777777777777777777777777777777777777777) -} -// ---- -// step: wordSizeTransform -// -// { -// let _1_0 := 12390 -// let _1_1 := 13186919961226471680 -// let _1_2 := 18324050535993369984 -// let _1_3 := 15884696285694336113 -// let _2_0 := 159309 -// let _2_1 := 3525417123811528497 -// let _2_2 := 6328259118096044006 -// let _2_3 := 9223372036854775807 -// let x_0, x_1, x_2, x_3 := add(_2_0, _2_1, _2_2, _2_3, _1_0, _1_1, _1_2, _1_3) -// } diff --git a/test/libyul/yulOptimizerTests/wordSizeTransform/if.yul b/test/libyul/yulOptimizerTests/wordSizeTransform/if.yul deleted file mode 100644 index b799760f839f..000000000000 --- a/test/libyul/yulOptimizerTests/wordSizeTransform/if.yul +++ /dev/null @@ -1,49 +0,0 @@ -{ - if calldataload(0) { sstore(0, 1) } - if add(calldataload(0), calldataload(1)) { sstore(0, 2) } -} -// ---- -// step: wordSizeTransform -// -// { -// let _1_0 := 0 -// let _1_1 := 0 -// let _1_2 := 0 -// let _1_3 := 0 -// let _2_0, _2_1, _2_2, _2_3 := calldataload(_1_0, _1_1, _1_2, _1_3) -// if or_bool(_2_0, _2_1, _2_2, _2_3) -// { -// let _3_0 := 0 -// let _3_1 := 0 -// let _3_2 := 0 -// let _3_3 := 1 -// let _4_0 := 0 -// let _4_1 := 0 -// let _4_2 := 0 -// let _4_3 := 0 -// sstore(_4_0, _4_1, _4_2, _4_3, _3_0, _3_1, _3_2, _3_3) -// } -// let _5_0 := 0 -// let _5_1 := 0 -// let _5_2 := 0 -// let _5_3 := 1 -// let _6_0, _6_1, _6_2, _6_3 := calldataload(_5_0, _5_1, _5_2, _5_3) -// let _7_0 := 0 -// let _7_1 := 0 -// let _7_2 := 0 -// let _7_3 := 0 -// let _8_0, _8_1, _8_2, _8_3 := calldataload(_7_0, _7_1, _7_2, _7_3) -// let _9_0, _9_1, _9_2, _9_3 := add(_8_0, _8_1, _8_2, _8_3, _6_0, _6_1, _6_2, _6_3) -// if or_bool(_9_0, _9_1, _9_2, _9_3) -// { -// let _10_0 := 0 -// let _10_1 := 0 -// let _10_2 := 0 -// let _10_3 := 2 -// let _11_0 := 0 -// let _11_1 := 0 -// let _11_2 := 0 -// let _11_3 := 0 -// sstore(_11_0, _11_1, _11_2, _11_3, _10_0, _10_1, _10_2, _10_3) -// } -// } diff --git a/test/libyul/yulOptimizerTests/wordSizeTransform/or_bool_renamed.yul b/test/libyul/yulOptimizerTests/wordSizeTransform/or_bool_renamed.yul deleted file mode 100644 index 803b289708f7..000000000000 --- a/test/libyul/yulOptimizerTests/wordSizeTransform/or_bool_renamed.yul +++ /dev/null @@ -1,25 +0,0 @@ -{ - let or_bool := 2 - if or_bool { sstore(0, 1) } -} -// ---- -// step: wordSizeTransform -// -// { -// let or_bool_3_0 := 0 -// let or_bool_3_1 := 0 -// let or_bool_3_2 := 0 -// let or_bool_3_3 := 2 -// if or_bool(or_bool_3_0, or_bool_3_1, or_bool_3_2, or_bool_3_3) -// { -// let _1_0 := 0 -// let _1_1 := 0 -// let _1_2 := 0 -// let _1_3 := 1 -// let _2_0 := 0 -// let _2_1 := 0 -// let _2_2 := 0 -// let _2_3 := 0 -// sstore(_2_0, _2_1, _2_2, _2_3, _1_0, _1_1, _1_2, _1_3) -// } -// } diff --git a/test/libyul/yulOptimizerTests/wordSizeTransform/switch_1.yul b/test/libyul/yulOptimizerTests/wordSizeTransform/switch_1.yul deleted file mode 100644 index d40e2283fc12..000000000000 --- a/test/libyul/yulOptimizerTests/wordSizeTransform/switch_1.yul +++ /dev/null @@ -1,71 +0,0 @@ -{ - switch calldataload(0) - case 0 { sstore(0, 1) } - case 1 { sstore(1, 1) } - case 2 { sstore(2, 1) } - case 3 { sstore(3, 1) } -} -// ---- -// step: wordSizeTransform -// -// { -// let _1_0 := 0 -// let _1_1 := 0 -// let _1_2 := 0 -// let _1_3 := 0 -// let _2_0, _2_1, _2_2, _2_3 := calldataload(_1_0, _1_1, _1_2, _1_3) -// switch _2_0 -// case 0 { -// switch _2_1 -// case 0 { -// switch _2_2 -// case 0 { -// switch _2_3 -// case 0 { -// let _3_0 := 0 -// let _3_1 := 0 -// let _3_2 := 0 -// let _3_3 := 1 -// let _4_0 := 0 -// let _4_1 := 0 -// let _4_2 := 0 -// let _4_3 := 0 -// sstore(_4_0, _4_1, _4_2, _4_3, _3_0, _3_1, _3_2, _3_3) -// } -// case 1 { -// let _5_0 := 0 -// let _5_1 := 0 -// let _5_2 := 0 -// let _5_3 := 1 -// let _6_0 := 0 -// let _6_1 := 0 -// let _6_2 := 0 -// let _6_3 := 1 -// sstore(_6_0, _6_1, _6_2, _6_3, _5_0, _5_1, _5_2, _5_3) -// } -// case 2 { -// let _7_0 := 0 -// let _7_1 := 0 -// let _7_2 := 0 -// let _7_3 := 1 -// let _8_0 := 0 -// let _8_1 := 0 -// let _8_2 := 0 -// let _8_3 := 2 -// sstore(_8_0, _8_1, _8_2, _8_3, _7_0, _7_1, _7_2, _7_3) -// } -// case 3 { -// let _9_0 := 0 -// let _9_1 := 0 -// let _9_2 := 0 -// let _9_3 := 1 -// let _10_0 := 0 -// let _10_1 := 0 -// let _10_2 := 0 -// let _10_3 := 3 -// sstore(_10_0, _10_1, _10_2, _10_3, _9_0, _9_1, _9_2, _9_3) -// } -// } -// } -// } -// } diff --git a/test/libyul/yulOptimizerTests/wordSizeTransform/switch_2.yul b/test/libyul/yulOptimizerTests/wordSizeTransform/switch_2.yul deleted file mode 100644 index a9612a392776..000000000000 --- a/test/libyul/yulOptimizerTests/wordSizeTransform/switch_2.yul +++ /dev/null @@ -1,77 +0,0 @@ -{ - switch calldataload(0) - case 0x01000000000000000000000000000000000000010 { sstore(0, 1) } - case 0x02000000000000000000000000000000000000010 { sstore(1, 1) } - case 0x01000000000000000000000000000000000000020 { sstore(2, 1) } - case 0x02000000000000000000000000000000000000020 { sstore(3, 1) } -} -// ---- -// step: wordSizeTransform -// -// { -// let _1_0 := 0 -// let _1_1 := 0 -// let _1_2 := 0 -// let _1_3 := 0 -// let _2_0, _2_1, _2_2, _2_3 := calldataload(_1_0, _1_1, _1_2, _1_3) -// switch _2_0 -// case 0 { -// switch _2_1 -// case 268435456 { -// switch _2_2 -// case 0 { -// switch _2_3 -// case 16 { -// let _3_0 := 0 -// let _3_1 := 0 -// let _3_2 := 0 -// let _3_3 := 1 -// let _4_0 := 0 -// let _4_1 := 0 -// let _4_2 := 0 -// let _4_3 := 0 -// sstore(_4_0, _4_1, _4_2, _4_3, _3_0, _3_1, _3_2, _3_3) -// } -// case 32 { -// let _7_0 := 0 -// let _7_1 := 0 -// let _7_2 := 0 -// let _7_3 := 1 -// let _8_0 := 0 -// let _8_1 := 0 -// let _8_2 := 0 -// let _8_3 := 2 -// sstore(_8_0, _8_1, _8_2, _8_3, _7_0, _7_1, _7_2, _7_3) -// } -// } -// } -// case 536870912 { -// switch _2_2 -// case 0 { -// switch _2_3 -// case 16 { -// let _5_0 := 0 -// let _5_1 := 0 -// let _5_2 := 0 -// let _5_3 := 1 -// let _6_0 := 0 -// let _6_1 := 0 -// let _6_2 := 0 -// let _6_3 := 1 -// sstore(_6_0, _6_1, _6_2, _6_3, _5_0, _5_1, _5_2, _5_3) -// } -// case 32 { -// let _9_0 := 0 -// let _9_1 := 0 -// let _9_2 := 0 -// let _9_3 := 1 -// let _10_0 := 0 -// let _10_1 := 0 -// let _10_2 := 0 -// let _10_3 := 3 -// sstore(_10_0, _10_1, _10_2, _10_3, _9_0, _9_1, _9_2, _9_3) -// } -// } -// } -// } -// } diff --git a/test/libyul/yulOptimizerTests/wordSizeTransform/switch_3.yul b/test/libyul/yulOptimizerTests/wordSizeTransform/switch_3.yul deleted file mode 100644 index 403c579623ac..000000000000 --- a/test/libyul/yulOptimizerTests/wordSizeTransform/switch_3.yul +++ /dev/null @@ -1,89 +0,0 @@ -{ - switch calldataload(0) - case 0 { sstore(0, 1) } - case 1 { sstore(1, 1) } - case 2 { sstore(2, 1) } - case 3 { sstore(3, 1) } - default { sstore(8, 9) } -} -// ---- -// step: wordSizeTransform -// -// { -// let _1_0 := 0 -// let _1_1 := 0 -// let _1_2 := 0 -// let _1_3 := 0 -// let _2_0, _2_1, _2_2, _2_3 := calldataload(_1_0, _1_1, _1_2, _1_3) -// let run_default -// switch _2_0 -// case 0 { -// switch _2_1 -// case 0 { -// switch _2_2 -// case 0 { -// switch _2_3 -// case 0 { -// let _3_0 := 0 -// let _3_1 := 0 -// let _3_2 := 0 -// let _3_3 := 1 -// let _4_0 := 0 -// let _4_1 := 0 -// let _4_2 := 0 -// let _4_3 := 0 -// sstore(_4_0, _4_1, _4_2, _4_3, _3_0, _3_1, _3_2, _3_3) -// } -// case 1 { -// let _5_0 := 0 -// let _5_1 := 0 -// let _5_2 := 0 -// let _5_3 := 1 -// let _6_0 := 0 -// let _6_1 := 0 -// let _6_2 := 0 -// let _6_3 := 1 -// sstore(_6_0, _6_1, _6_2, _6_3, _5_0, _5_1, _5_2, _5_3) -// } -// case 2 { -// let _7_0 := 0 -// let _7_1 := 0 -// let _7_2 := 0 -// let _7_3 := 1 -// let _8_0 := 0 -// let _8_1 := 0 -// let _8_2 := 0 -// let _8_3 := 2 -// sstore(_8_0, _8_1, _8_2, _8_3, _7_0, _7_1, _7_2, _7_3) -// } -// case 3 { -// let _9_0 := 0 -// let _9_1 := 0 -// let _9_2 := 0 -// let _9_3 := 1 -// let _10_0 := 0 -// let _10_1 := 0 -// let _10_2 := 0 -// let _10_3 := 3 -// sstore(_10_0, _10_1, _10_2, _10_3, _9_0, _9_1, _9_2, _9_3) -// } -// default { run_default := true } -// } -// default { run_default := true } -// } -// default { run_default := true } -// } -// default { run_default := true } -// if run_default -// { -// let _11_0 := 0 -// let _11_1 := 0 -// let _11_2 := 0 -// let _11_3 := 9 -// let _12_0 := 0 -// let _12_1 := 0 -// let _12_2 := 0 -// let _12_3 := 8 -// sstore(_12_0, _12_1, _12_2, _12_3, _11_0, _11_1, _11_2, _11_3) -// } -// } diff --git a/test/libyul/yulOptimizerTests/wordSizeTransform/switch_4.yul b/test/libyul/yulOptimizerTests/wordSizeTransform/switch_4.yul deleted file mode 100644 index d1f45a6231fd..000000000000 --- a/test/libyul/yulOptimizerTests/wordSizeTransform/switch_4.yul +++ /dev/null @@ -1,97 +0,0 @@ -{ - switch calldataload(0) - case 0x01000000000000000000000000000000000000010 { sstore(0, 1) } - case 0x02000000000000000000000000000000000000010 { sstore(1, 1) } - case 0x01000000000000000000000000000000000000020 { sstore(2, 1) } - case 0x02000000000000000000000000000000000000020 { sstore(3, 1) } - default { sstore(8, 9) } -} -// ---- -// step: wordSizeTransform -// -// { -// let _1_0 := 0 -// let _1_1 := 0 -// let _1_2 := 0 -// let _1_3 := 0 -// let _2_0, _2_1, _2_2, _2_3 := calldataload(_1_0, _1_1, _1_2, _1_3) -// let run_default -// switch _2_0 -// case 0 { -// switch _2_1 -// case 268435456 { -// switch _2_2 -// case 0 { -// switch _2_3 -// case 16 { -// let _3_0 := 0 -// let _3_1 := 0 -// let _3_2 := 0 -// let _3_3 := 1 -// let _4_0 := 0 -// let _4_1 := 0 -// let _4_2 := 0 -// let _4_3 := 0 -// sstore(_4_0, _4_1, _4_2, _4_3, _3_0, _3_1, _3_2, _3_3) -// } -// case 32 { -// let _7_0 := 0 -// let _7_1 := 0 -// let _7_2 := 0 -// let _7_3 := 1 -// let _8_0 := 0 -// let _8_1 := 0 -// let _8_2 := 0 -// let _8_3 := 2 -// sstore(_8_0, _8_1, _8_2, _8_3, _7_0, _7_1, _7_2, _7_3) -// } -// default { run_default := true } -// } -// default { run_default := true } -// } -// case 536870912 { -// switch _2_2 -// case 0 { -// switch _2_3 -// case 16 { -// let _5_0 := 0 -// let _5_1 := 0 -// let _5_2 := 0 -// let _5_3 := 1 -// let _6_0 := 0 -// let _6_1 := 0 -// let _6_2 := 0 -// let _6_3 := 1 -// sstore(_6_0, _6_1, _6_2, _6_3, _5_0, _5_1, _5_2, _5_3) -// } -// case 32 { -// let _9_0 := 0 -// let _9_1 := 0 -// let _9_2 := 0 -// let _9_3 := 1 -// let _10_0 := 0 -// let _10_1 := 0 -// let _10_2 := 0 -// let _10_3 := 3 -// sstore(_10_0, _10_1, _10_2, _10_3, _9_0, _9_1, _9_2, _9_3) -// } -// default { run_default := true } -// } -// default { run_default := true } -// } -// default { run_default := true } -// } -// default { run_default := true } -// if run_default -// { -// let _11_0 := 0 -// let _11_1 := 0 -// let _11_2 := 0 -// let _11_3 := 9 -// let _12_0 := 0 -// let _12_1 := 0 -// let _12_2 := 0 -// let _12_3 := 8 -// sstore(_12_0, _12_1, _12_2, _12_3, _11_0, _11_1, _11_2, _11_3) -// } -// } diff --git a/test/libyul/yulOptimizerTests/wordSizeTransform/switch_5.yul b/test/libyul/yulOptimizerTests/wordSizeTransform/switch_5.yul deleted file mode 100644 index a02243a25a10..000000000000 --- a/test/libyul/yulOptimizerTests/wordSizeTransform/switch_5.yul +++ /dev/null @@ -1,29 +0,0 @@ -{ - switch calldataload(0) - default { sstore(8, 9) } -} -// ---- -// step: wordSizeTransform -// -// { -// let _1_0 := 0 -// let _1_1 := 0 -// let _1_2 := 0 -// let _1_3 := 0 -// let _2_0, _2_1, _2_2, _2_3 := calldataload(_1_0, _1_1, _1_2, _1_3) -// let run_default -// switch _2_0 -// default { run_default := true } -// if run_default -// { -// let _3_0 := 0 -// let _3_1 := 0 -// let _3_2 := 0 -// let _3_3 := 9 -// let _4_0 := 0 -// let _4_1 := 0 -// let _4_2 := 0 -// let _4_3 := 8 -// sstore(_4_0, _4_1, _4_2, _4_3, _3_0, _3_1, _3_2, _3_3) -// } -// } diff --git a/test/libyul/yulSyntaxTests/for_loop_condition_fail_ewasm.yul b/test/libyul/yulSyntaxTests/for_loop_condition_fail_ewasm.yul deleted file mode 100644 index ec7a162dc15a..000000000000 --- a/test/libyul/yulSyntaxTests/for_loop_condition_fail_ewasm.yul +++ /dev/null @@ -1,8 +0,0 @@ -{ - let x - for {} x {} {} -} -// ==== -// dialect: ewasm -// ---- -// TypeError 1733: (23-24): Expected a value of boolean type "i32" but got "i64" diff --git a/test/libyul/yulSyntaxTests/linkersymbol_ewasm.yul b/test/libyul/yulSyntaxTests/linkersymbol_ewasm.yul deleted file mode 100644 index 051359c07582..000000000000 --- a/test/libyul/yulSyntaxTests/linkersymbol_ewasm.yul +++ /dev/null @@ -1,7 +0,0 @@ -{ - linkersymbol("contract/library.sol:L") -} -// ==== -// dialect: ewasm -// ---- -// DeclarationError 4619: (6-18): Function "linkersymbol" not found. diff --git a/test/libyul/yulSyntaxTests/type_check_cases.yul b/test/libyul/yulSyntaxTests/type_check_cases.yul deleted file mode 100644 index 4e09457c89f5..000000000000 --- a/test/libyul/yulSyntaxTests/type_check_cases.yul +++ /dev/null @@ -1,8 +0,0 @@ -{ - switch 7:i64 - case 0:i64 {} - case 2:i64 {} -} -// ==== -// dialect: ewasm -// ---- diff --git a/test/libyul/yulSyntaxTests/type_check_cases_fail.yul b/test/libyul/yulSyntaxTests/type_check_cases_fail.yul deleted file mode 100644 index d9b4c0204a66..000000000000 --- a/test/libyul/yulSyntaxTests/type_check_cases_fail.yul +++ /dev/null @@ -1,10 +0,0 @@ -{ - switch 7:i32 - case 0:i64 {} - case 2:i64 {} -} -// ==== -// dialect: ewasm -// ---- -// TypeError 3781: (28-33): Expected a value of type "i32" but got "i64". -// TypeError 3781: (46-51): Expected a value of type "i32" but got "i64". diff --git a/test/libyul/yulSyntaxTests/type_check_if_condition.yul b/test/libyul/yulSyntaxTests/type_check_if_condition.yul deleted file mode 100644 index eaccf63f6408..000000000000 --- a/test/libyul/yulSyntaxTests/type_check_if_condition.yul +++ /dev/null @@ -1,7 +0,0 @@ -{ - let x:i32 - if x {} -} -// ==== -// dialect: ewasm -// ---- diff --git a/test/libyul/yulSyntaxTests/type_check_if_condition_fail.yul b/test/libyul/yulSyntaxTests/type_check_if_condition_fail.yul deleted file mode 100644 index c8711338ff6a..000000000000 --- a/test/libyul/yulSyntaxTests/type_check_if_condition_fail.yul +++ /dev/null @@ -1,8 +0,0 @@ -{ - let x:i64 - if x {} -} -// ==== -// dialect: ewasm -// ---- -// TypeError 1733: (23-24): Expected a value of boolean type "i32" but got "i64" diff --git a/test/solc/CommandLineParser.cpp b/test/solc/CommandLineParser.cpp index 6fdecd7faee3..2883f5c51f09 100644 --- a/test/solc/CommandLineParser.cpp +++ b/test/solc/CommandLineParser.cpp @@ -132,7 +132,7 @@ BOOST_AUTO_TEST_CASE(cli_mode_options) "dir1/file1.sol:L=0x1234567890123456789012345678901234567890," "dir2/file2.sol:L=0x1111122222333334444455555666667777788888", "--ast-compact-json", "--asm", "--asm-json", "--opcodes", "--bin", "--bin-runtime", "--abi", - "--ir", "--ir-optimized", "--ewasm", "--hashes", "--userdoc", "--devdoc", "--metadata", "--storage-layout", + "--ir", "--ir-optimized", "--hashes", "--userdoc", "--devdoc", "--metadata", "--storage-layout", "--gas", "--combined-json=" "abi,metadata,bin,bin-runtime,opcodes,asm,storage-layout,generated-sources,generated-sources-runtime," @@ -192,10 +192,8 @@ BOOST_AUTO_TEST_CASE(cli_mode_options) expectedOptions.compiler.outputs = { true, true, true, true, true, true, true, true, true, true, - true, true, true, true, true, - true, + true, true, true, true, }; - expectedOptions.compiler.outputs.ewasmIR = false; expectedOptions.compiler.estimateGas = true; expectedOptions.compiler.combinedJsonRequests = { true, true, true, true, true, @@ -249,13 +247,6 @@ BOOST_AUTO_TEST_CASE(via_ir_options) BOOST_AUTO_TEST_CASE(assembly_mode_options) { static vector, YulStack::Machine, YulStack::Language>> const allowedCombinations = { - {{"--machine=ewasm", "--yul-dialect=ewasm", "--assemble"}, YulStack::Machine::Ewasm, YulStack::Language::Ewasm}, - {{"--machine=ewasm", "--yul-dialect=ewasm", "--yul"}, YulStack::Machine::Ewasm, YulStack::Language::Ewasm}, - {{"--machine=ewasm", "--yul-dialect=ewasm", "--strict-assembly"}, YulStack::Machine::Ewasm, YulStack::Language::Ewasm}, - {{"--machine=ewasm", "--yul-dialect=evm", "--assemble"}, YulStack::Machine::Ewasm, YulStack::Language::StrictAssembly}, - {{"--machine=ewasm", "--yul-dialect=evm", "--yul"}, YulStack::Machine::Ewasm, YulStack::Language::StrictAssembly}, - {{"--machine=ewasm", "--yul-dialect=evm", "--strict-assembly"}, YulStack::Machine::Ewasm, YulStack::Language::StrictAssembly}, - {{"--machine=ewasm", "--strict-assembly"}, YulStack::Machine::Ewasm, YulStack::Language::Ewasm}, {{"--machine=evm", "--yul-dialect=evm", "--assemble"}, YulStack::Machine::EVM, YulStack::Language::StrictAssembly}, {{"--machine=evm", "--yul-dialect=evm", "--yul"}, YulStack::Machine::EVM, YulStack::Language::StrictAssembly}, {{"--machine=evm", "--yul-dialect=evm", "--strict-assembly"}, YulStack::Machine::EVM, YulStack::Language::StrictAssembly}, @@ -299,11 +290,9 @@ BOOST_AUTO_TEST_CASE(assembly_mode_options) "--asm", "--bin", "--ir-optimized", - "--ewasm", - "--ewasm-ir", }; commandLine += assemblyOptions; - if (expectedLanguage == YulStack::Language::StrictAssembly || expectedLanguage == YulStack::Language::Ewasm) + if (expectedLanguage == YulStack::Language::StrictAssembly) commandLine += vector{ "--optimize", "--optimize-runs=1000", @@ -340,9 +329,7 @@ BOOST_AUTO_TEST_CASE(assembly_mode_options) expectedOptions.compiler.outputs.asm_ = true; expectedOptions.compiler.outputs.binary = true; expectedOptions.compiler.outputs.irOptimized = true; - expectedOptions.compiler.outputs.ewasm = true; - expectedOptions.compiler.outputs.ewasmIR = true; - if (expectedLanguage == YulStack::Language::StrictAssembly || expectedLanguage == YulStack::Language::Ewasm) + if (expectedLanguage == YulStack::Language::StrictAssembly) { expectedOptions.optimizer.enabled = true; expectedOptions.optimizer.yulSteps = "agf"; diff --git a/test/soltest.cpp b/test/soltest.cpp index 2120acc2dfce..6aa100248875 100644 --- a/test/soltest.cpp +++ b/test/soltest.cpp @@ -133,7 +133,6 @@ int registerTests( boost::unit_test::test_suite& _suite, boost::filesystem::path const& _basepath, boost::filesystem::path const& _path, - bool _enforceCompileToEwasm, vector const& _labels, TestCase::TestCaseCreator _testCaseCreator, solidity::test::Batcher& _batcher @@ -146,7 +145,6 @@ int registerTests( solidity::test::CommonOptions::get().evmVersion(), solidity::test::CommonOptions::get().eofVersion(), solidity::test::CommonOptions::get().vmPaths, - _enforceCompileToEwasm, solidity::test::CommonOptions::get().enforceGasTest, solidity::test::CommonOptions::get().enforceGasTestMinValue, }; @@ -164,7 +162,6 @@ int registerTests( numTestsAdded += registerTests( *sub_suite, _basepath, _path / entry.path().filename(), - _enforceCompileToEwasm, _labels, _testCaseCreator, _batcher @@ -269,7 +266,6 @@ test_suite* init_unit_test_suite(int /*argc*/, char* /*argv*/[]) master, options.testPath / ts.path, ts.subpath, - options.enforceCompileToEwasm, ts.labels, ts.testCaseCreator, batcher diff --git a/test/tools/CMakeLists.txt b/test/tools/CMakeLists.txt index 0bb8896cd8e0..5a2ba8da3f95 100644 --- a/test/tools/CMakeLists.txt +++ b/test/tools/CMakeLists.txt @@ -36,7 +36,6 @@ add_executable(isoltest ../libyul/ControlFlowGraphTest.cpp ../libyul/ControlFlowSideEffectsTest.cpp ../libyul/EVMCodeTransformTest.cpp - ../libyul/EwasmTranslationTest.cpp ../libyul/FunctionSideEffects.cpp ../libyul/ObjectCompilerTest.cpp ../libyul/SyntaxTest.cpp diff --git a/test/tools/isoltest.cpp b/test/tools/isoltest.cpp index 4739a54e9c3b..2d93bdbc2b9a 100644 --- a/test/tools/isoltest.cpp +++ b/test/tools/isoltest.cpp @@ -161,7 +161,6 @@ TestTool::Result TestTool::process() m_options.evmVersion(), m_options.eofVersion(), m_options.vmPaths, - m_options.enforceCompileToEwasm, m_options.enforceGasTest, m_options.enforceGasTestMinValue }); diff --git a/test/tools/yulInterpreter/CMakeLists.txt b/test/tools/yulInterpreter/CMakeLists.txt index cc1b40f074f6..235e8fac10a6 100644 --- a/test/tools/yulInterpreter/CMakeLists.txt +++ b/test/tools/yulInterpreter/CMakeLists.txt @@ -1,8 +1,6 @@ set(sources EVMInstructionInterpreter.h EVMInstructionInterpreter.cpp - EwasmBuiltinInterpreter.h - EwasmBuiltinInterpreter.cpp Interpreter.h Interpreter.cpp Inspector.h diff --git a/test/tools/yulInterpreter/EwasmBuiltinInterpreter.cpp b/test/tools/yulInterpreter/EwasmBuiltinInterpreter.cpp deleted file mode 100644 index fdba09aa46d4..000000000000 --- a/test/tools/yulInterpreter/EwasmBuiltinInterpreter.cpp +++ /dev/null @@ -1,617 +0,0 @@ -/* - This file is part of solidity. - - solidity is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - solidity is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with solidity. If not, see . -*/ -// SPDX-License-Identifier: GPL-3.0 -/** - * Yul interpreter module that evaluates Ewasm builtins. - */ - -#include - -#include - -#include -#include - -#include - -#include -#include - -#include - -using namespace std; -using namespace solidity; -using namespace solidity::yul; -using namespace solidity::yul::test; - -using solidity::util::h160; -using solidity::util::h256; - -namespace -{ - -/// Copy @a _size bytes of @a _source at offset @a _sourceOffset to -/// @a _target at offset @a _targetOffset. Behaves as if @a _source would -/// continue with an infinite sequence of zero bytes beyond its end. -void copyZeroExtended( - map& _target, bytes const& _source, - size_t _targetOffset, size_t _sourceOffset, size_t _size -) -{ - for (size_t i = 0; i < _size; ++i) - _target[_targetOffset + i] = _sourceOffset + i < _source.size() ? _source[_sourceOffset + i] : 0; -} - -/// Count leading zeros for uint64. Following WebAssembly rules, it returns 64 for @a _v being zero. -/// NOTE: the clz builtin of the compiler may or may not do this -uint64_t clz64(uint64_t _v) -{ - if (_v == 0) - return 64; - - uint64_t r = 0; - while (!(_v & 0x8000000000000000)) - { - r += 1; - _v = _v << 1; - } - return r; -} - -/// Count trailing zeros for uint32. Following WebAssembly rules, it returns 32 for @a _v being zero. -/// NOTE: the ctz builtin of the compiler may or may not do this -uint32_t ctz32(uint32_t _v) -{ - if (_v == 0) - return 32; - - uint32_t r = 0; - while (!(_v & 1)) - { - r++; - _v >>= 1; - } - return r; -} - -/// Count trailing zeros for uint64. Following WebAssembly rules, it returns 64 for @a _v being zero. -/// NOTE: the ctz builtin of the compiler may or may not do this -uint64_t ctz64(uint64_t _v) -{ - if (_v == 0) - return 64; - - uint64_t r = 0; - while (!(_v & 1)) - { - r++; - _v >>= 1; - } - return r; -} - -/// Count number of bits set for uint64 -uint64_t popcnt(uint64_t _v) -{ - uint64_t r = 0; - while (_v) - { - r += (_v & 1); - _v >>= 1; - } - return r; -} - -} - -u256 EwasmBuiltinInterpreter::evalBuiltin( - YulString _functionName, - vector const& _arguments, - vector const& _evaluatedArguments -) -{ - vector arg; - for (u256 const& a: _evaluatedArguments) - arg.emplace_back(uint64_t(a & uint64_t(-1))); - - string const fun = _functionName.str(); - if (fun == "datasize" || fun == "dataoffset") - { - string arg = std::get(_arguments.at(0)).value.str(); - if (arg.length() < 32) - arg.resize(32, 0); - if (fun == "datasize") - return u256(util::keccak256(arg)) & 0xfff; - else if (fun == "dataoffset") - { - // Force different value than for datasize - arg[31]++; - arg[31]++; - return u256(util::keccak256(arg)) & 0xfff; - } - } - else if (fun == "datacopy") - { - // This is identical to codecopy. - accessMemory(_evaluatedArguments.at(0), _evaluatedArguments.at(2)); - copyZeroExtended( - m_state.memory, - m_state.code, - static_cast(_evaluatedArguments.at(0)), - static_cast(_evaluatedArguments.at(1) & numeric_limits::max()), - static_cast(_evaluatedArguments.at(2)) - ); - return 0; - } - else if (fun == "i32.drop" || fun == "i64.drop" || fun == "nop") - return {}; - else if (fun == "i32.select") - { - if ((arg.at(2) & 0xffffffff) == 0) - return arg.at(1); - else - return arg.at(0); - } - else if (fun == "i64.select") - { - if ((arg.at(2) & 0xffffffffffffffff) == 0) - return arg.at(1); - else - return arg.at(0); - } - else if (fun == "i32.wrap_i64") - return arg.at(0) & uint32_t(-1); - else if (fun == "i64.extend_i32_u") - // Return the same as above because everything is u256 anyway. - return arg.at(0) & uint32_t(-1); - else if (fun == "unreachable") - { - logTrace(evmasm::Instruction::INVALID, {}); - BOOST_THROW_EXCEPTION(ExplicitlyTerminated()); - } - else if (fun == "i64.store") - { - accessMemory(arg[0], 8); - writeMemoryWord(arg[0], arg[1]); - return 0; - } - else if (fun == "i64.store8" || fun == "i32.store8") - { - accessMemory(arg[0], 1); - writeMemoryByte(arg[0], static_cast(arg[1] & 0xff)); - return 0; - } - else if (fun == "i64.load") - { - accessMemory(arg[0], 8); - return readMemoryWord(arg[0]); - } - else if (fun == "i32.store") - { - accessMemory(arg[0], 4); - writeMemoryHalfWord(arg[0], static_cast(arg[1])); - return 0; - } - else if (fun == "i32.load") - { - accessMemory(arg[0], 4); - return readMemoryHalfWord(arg[0]); - } - else if (fun == "i32.clz") - // NOTE: the clz implementation assumes 64-bit inputs, hence the adjustment - return clz64(arg[0] & uint32_t(-1)) - 32; - else if (fun == "i64.clz") - return clz64(arg[0]); - else if (fun == "i32.ctz") - return ctz32(uint32_t(arg[0] & uint32_t(-1))); - else if (fun == "i64.ctz") - return ctz64(arg[0]); - - string prefix = fun; - string suffix; - auto dot = prefix.find("."); - if (dot != string::npos) - { - suffix = prefix.substr(dot + 1); - prefix.resize(dot); - } - - if (prefix == "i32") - { - vector halfWordArgs; - for (uint64_t a: arg) - halfWordArgs.push_back(uint32_t(a & uint32_t(-1))); - return evalWasmBuiltin(suffix, halfWordArgs); - } - else if (prefix == "i64") - return evalWasmBuiltin(suffix, arg); - else if (prefix == "eth") - return evalEthBuiltin(suffix, arg); - - yulAssert(false, "Unknown builtin: " + fun + " (or implementation did not return)"); - - return 0; -} - -template -u256 EwasmBuiltinInterpreter::evalWasmBuiltin(string const& _fun, vector const& _arguments) -{ - vector const& arg = _arguments; - - if (_fun == "add") - return arg[0] + arg[1]; - else if (_fun == "sub") - return arg[0] - arg[1]; - else if (_fun == "mul") - return arg[0] * arg[1]; - else if (_fun == "div_u") - { - if (arg[1] == 0) - BOOST_THROW_EXCEPTION(ExplicitlyTerminated()); - else - return arg[0] / arg[1]; - } - else if (_fun == "rem_u") - { - if (arg[1] == 0) - BOOST_THROW_EXCEPTION(ExplicitlyTerminated()); - else - return arg[0] % arg[1]; - } - else if (_fun == "and") - return arg[0] & arg[1]; - else if (_fun == "or") - return arg[0] | arg[1]; - else if (_fun == "xor") - return arg[0] ^ arg[1]; - else if (_fun == "shl") - return arg[0] << arg[1]; - else if (_fun == "shr_u") - return arg[0] >> arg[1]; - else if (_fun == "eq") - return arg[0] == arg[1] ? 1 : 0; - else if (_fun == "ne") - return arg[0] != arg[1] ? 1 : 0; - else if (_fun == "eqz") - return arg[0] == 0 ? 1 : 0; - else if (_fun == "popcnt") - return popcnt(arg[0]); - else if (_fun == "lt_u") - return arg[0] < arg[1] ? 1 : 0; - else if (_fun == "gt_u") - return arg[0] > arg[1] ? 1 : 0; - else if (_fun == "le_u") - return arg[0] <= arg[1] ? 1 : 0; - else if (_fun == "ge_u") - return arg[0] >= arg[1] ? 1 : 0; - - yulAssert(false, "Unknown builtin: " + _fun + " (or implementation did not return)"); - - return 0; -} - -u256 EwasmBuiltinInterpreter::evalEthBuiltin(string const& _fun, vector const& _arguments) -{ - vector const& arg = _arguments; - - if (_fun == "getAddress") - { - writeAddress(arg[0], m_state.address); - return 0; - } - else if (_fun == "getExternalBalance") - { - readAddress(arg[0]); - writeU128(arg[1], m_state.balance); - return 0; - } - else if (_fun == "getBlockHash") - { - if (arg[0] >= m_state.blockNumber || arg[0] + 256 < m_state.blockNumber) - return 1; - else - { - writeBytes32(arg[1], h256(0xaaaaaaaa + u256(arg[0] - m_state.blockNumber - 256))); - return 0; - } - } - else if (_fun == "call") - { - readAddress(arg[1]); - readU128(arg[2]); - accessMemory(arg[3], arg[4]); - logTrace(evmasm::Instruction::CALL, {}); - return arg[0] & 1; - } - else if (_fun == "callDataCopy") - { - if (arg[1] + arg[2] < arg[1] || arg[1] + arg[2] > m_state.calldata.size()) - BOOST_THROW_EXCEPTION(ExplicitlyTerminated()); - accessMemory(arg[0], arg[2]); - copyZeroExtended( - m_state.memory, m_state.calldata, - size_t(arg[0]), size_t(arg[1]), size_t(arg[2]) - ); - return {}; - } - else if (_fun == "getCallDataSize") - return m_state.calldata.size(); - else if (_fun == "callCode") - { - readAddress(arg[1]); - readU128(arg[2]); - accessMemory(arg[3], arg[4]); - logTrace(evmasm::Instruction::CALLCODE, {}); - return arg[0] & 1; - } - else if (_fun == "callDelegate") - { - readAddress(arg[1]); - accessMemory(arg[2], arg[3]); - logTrace(evmasm::Instruction::DELEGATECALL, {}); - return arg[0] & 1; - } - else if (_fun == "callStatic") - { - readAddress(arg[1]); - accessMemory(arg[2], arg[3]); - logTrace(evmasm::Instruction::STATICCALL, {}); - return arg[0] & 1; - } - else if (_fun == "storageStore") - { - m_state.storage[readBytes32(arg[0])] = readBytes32(arg[1]); - return 0; - } - else if (_fun == "storageLoad") - { - writeBytes32(arg[1], m_state.storage[readBytes32(arg[0])]); - return 0; - } - else if (_fun == "getCaller") - { - writeAddress(arg[0], m_state.caller); - return 0; - } - else if (_fun == "getCallValue") - { - writeU128(arg[0], m_state.callvalue); - return 0; - } - else if (_fun == "codeCopy") - { - accessMemory(arg[0], arg[2]); - copyZeroExtended( - m_state.memory, m_state.code, - size_t(arg[0]), size_t(arg[1]), size_t(arg[2]) - ); - return 0; - } - else if (_fun == "getCodeSize") - return m_state.code.size(); - else if (_fun == "getBlockCoinbase") - { - writeAddress(arg[0], m_state.coinbase); - return 0; - } - else if (_fun == "create") - { - readU128(arg[0]); - accessMemory(arg[1], arg[2]); - logTrace(evmasm::Instruction::CREATE, {}); - writeAddress(arg[3], h160(0xcccccc + arg[1])); - return 1; - } - else if (_fun == "getBlockBaseFee") - { - writeU128(arg[0], m_state.basefee); - return 0; - } - else if (_fun == "getBlockDifficulty") - { - writeU256(arg[0], m_state.difficulty); - return 0; - } - else if (_fun == "externalCodeCopy") - { - readAddress(arg[0]); - accessMemory(arg[1], arg[3]); - // TODO this way extcodecopy and codecopy do the same thing. - copyZeroExtended( - m_state.memory, m_state.code, - size_t(arg[1]), size_t(arg[2]), size_t(arg[3]) - ); - return 0; - } - else if (_fun == "getExternalCodeSize") - // Generate "random" code length. - return uint32_t(u256(keccak256(h256(readAddress(arg[0]), h256::AlignLeft))) & 0xfff); - else if (_fun == "getGasLeft") - return 0x99; - else if (_fun == "getBlockGasLimit") - return uint64_t(m_state.gaslimit); - else if (_fun == "getTxGasPrice") - { - writeU128(arg[0], m_state.gasprice); - return 0; - } - else if (_fun == "log") - { - accessMemory(arg[0], arg[1]); - uint64_t numberOfTopics = arg[2]; - if (numberOfTopics > 4) - BOOST_THROW_EXCEPTION(ExplicitlyTerminated()); - if (numberOfTopics > 0) - readBytes32(arg[3]); - if (numberOfTopics > 1) - readBytes32(arg[4]); - if (numberOfTopics > 2) - readBytes32(arg[5]); - if (numberOfTopics > 3) - readBytes32(arg[6]); - logTrace(evmasm::logInstruction(static_cast(numberOfTopics)), {}); - return 0; - } - else if (_fun == "getBlockNumber") - return m_state.blockNumber; - else if (_fun == "getTxOrigin") - { - writeAddress(arg[0], m_state.origin); - return 0; - } - else if (_fun == "finish") - { - bytes data; - accessMemory(arg[0], arg[1]); - data = readMemory(arg[0], arg[1]); - logTrace(evmasm::Instruction::RETURN, {}, data); - BOOST_THROW_EXCEPTION(ExplicitlyTerminated()); - } - else if (_fun == "revert") - { - bytes data; - accessMemory(arg[0], arg[1]); - data = readMemory(arg[0], arg[1]); - logTrace(evmasm::Instruction::REVERT, {}, data); - BOOST_THROW_EXCEPTION(ExplicitlyTerminated()); - } - else if (_fun == "getReturnDataSize") - return m_state.returndata.size(); - else if (_fun == "returnDataCopy") - { - if (arg[1] + arg[2] < arg[1] || arg[1] + arg[2] > m_state.returndata.size()) - BOOST_THROW_EXCEPTION(ExplicitlyTerminated()); - accessMemory(arg[0], arg[2]); - copyZeroExtended( - m_state.memory, m_state.calldata, - size_t(arg[0]), size_t(arg[1]), size_t(arg[2]) - ); - return {}; - } - else if (_fun == "selfDestruct") - { - readAddress(arg[0]); - logTrace(evmasm::Instruction::SELFDESTRUCT, {}); - BOOST_THROW_EXCEPTION(ExplicitlyTerminated()); - } - else if (_fun == "getBlockTimestamp") - return m_state.timestamp; - - yulAssert(false, "Unknown builtin: " + _fun + " (or implementation did not return)"); - - return 0; -} - -void EwasmBuiltinInterpreter::accessMemory(u256 const& _offset, u256 const& _size) -{ - // Single WebAssembly page. - // TODO: Support expansion in this interpreter. - m_state.msize = 65536; - - if (((_offset + _size) < _offset) || ((_offset + _size) > m_state.msize)) - // Ewasm throws out of bounds exception as opposed to the EVM. - BOOST_THROW_EXCEPTION(ExplicitlyTerminated()); -} - -bytes EwasmBuiltinInterpreter::readMemory(uint64_t _offset, uint64_t _size) -{ - yulAssert(_size <= 0xffff, "Too large read."); - bytes data(size_t(_size), uint8_t(0)); - for (size_t i = 0; i < data.size(); ++i) - data[i] = m_state.memory[_offset + i]; - return data; -} - -uint64_t EwasmBuiltinInterpreter::readMemoryWord(uint64_t _offset) -{ - uint64_t r = 0; - for (size_t i = 0; i < 8; i++) - r |= uint64_t(m_state.memory[_offset + i]) << (i * 8); - return r; -} - -uint32_t EwasmBuiltinInterpreter::readMemoryHalfWord(uint64_t _offset) -{ - uint32_t r = 0; - for (size_t i = 0; i < 4; i++) - r |= uint32_t(m_state.memory[_offset + i]) << (i * 8); - return r; -} - -void EwasmBuiltinInterpreter::writeMemory(uint64_t _offset, bytes const& _value) -{ - for (size_t i = 0; i < _value.size(); i++) - m_state.memory[_offset + i] = _value[i]; -} - -void EwasmBuiltinInterpreter::writeMemoryWord(uint64_t _offset, uint64_t _value) -{ - for (size_t i = 0; i < 8; i++) - m_state.memory[_offset + i] = uint8_t((_value >> (i * 8)) & 0xff); -} - -void EwasmBuiltinInterpreter::writeMemoryHalfWord(uint64_t _offset, uint32_t _value) -{ - for (size_t i = 0; i < 4; i++) - m_state.memory[_offset + i] = uint8_t((_value >> (i * 8)) & 0xff); -} - -void EwasmBuiltinInterpreter::writeMemoryByte(uint64_t _offset, uint8_t _value) -{ - m_state.memory[_offset] = _value; -} - -void EwasmBuiltinInterpreter::writeU256(uint64_t _offset, u256 _value, size_t _croppedTo) -{ - accessMemory(_offset, _croppedTo); - for (size_t i = 0; i < _croppedTo; i++) - { - m_state.memory[_offset + i] = uint8_t(_value & 0xff); - _value >>= 8; - } -} - -u256 EwasmBuiltinInterpreter::readU256(uint64_t _offset, size_t _croppedTo) -{ - accessMemory(_offset, _croppedTo); - u256 value{0}; - for (size_t i = 0; i < _croppedTo; i++) - value = (value << 8) | m_state.memory[_offset + _croppedTo - 1 - i]; - - return value; -} - -void EwasmBuiltinInterpreter::logTrace(evmasm::Instruction _instruction, std::vector const& _arguments, bytes const& _data) -{ - logTrace(evmasm::instructionInfo(_instruction, langutil::EVMVersion()).name, _arguments, _data); -} - -void EwasmBuiltinInterpreter::logTrace(std::string const& _pseudoInstruction, std::vector const& _arguments, bytes const& _data) -{ - string message = _pseudoInstruction + "("; - for (size_t i = 0; i < _arguments.size(); ++i) - message += (i > 0 ? ", " : "") + formatNumber(_arguments[i]); - message += ")"; - if (!_data.empty()) - message += " [" + util::toHex(_data) + "]"; - m_state.trace.emplace_back(std::move(message)); - if (m_state.maxTraceSize > 0 && m_state.trace.size() >= m_state.maxTraceSize) - { - m_state.trace.emplace_back("Trace size limit reached."); - BOOST_THROW_EXCEPTION(TraceLimitReached()); - } -} diff --git a/test/tools/yulInterpreter/EwasmBuiltinInterpreter.h b/test/tools/yulInterpreter/EwasmBuiltinInterpreter.h deleted file mode 100644 index 1837f7509eb1..000000000000 --- a/test/tools/yulInterpreter/EwasmBuiltinInterpreter.h +++ /dev/null @@ -1,138 +0,0 @@ -/* - This file is part of solidity. - - solidity is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - solidity is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with solidity. If not, see . -*/ -// SPDX-License-Identifier: GPL-3.0 -/** - * Yul interpreter module that evaluates Ewasm builtins. - */ - -#pragma once - -#include - -#include -#include - -#include - -namespace solidity::evmasm -{ -enum class Instruction: uint8_t; -} - -namespace solidity::yul -{ -class YulString; -struct BuiltinFunctionForEVM; -} - -namespace solidity::yul::test -{ - -struct InterpreterState; - -/** - * Interprets Ewasm builtins based on the current state and logs instructions with - * side-effects. - * - * Since this is mainly meant to be used for differential fuzz testing, it is focused - * on a single contract only, does not do any gas counting and differs from the correct - * implementation in many ways: - * - * - If memory access to a "large" memory position is performed, a deterministic - * value is returned. Data that is stored in a "large" memory position is not - * retained. - * - The blockhash instruction returns a fixed value if the argument is in range. - * - Extcodesize returns a deterministic value depending on the address. - * - Extcodecopy copies a deterministic value depending on the address. - * - And many other things - * - * The main focus is that the generated execution trace is the same for equivalent executions - * and likely to be different for non-equivalent executions. - * - * The type names are following the Ewasm specification (https://github.com/ewasm/design/blob/master/eth_interface.md). - */ -class EwasmBuiltinInterpreter -{ -public: - explicit EwasmBuiltinInterpreter(InterpreterState& _state): - m_state(_state) - {} - /// Evaluate builtin function - u256 evalBuiltin( - YulString _functionName, - std::vector const& _arguments, - std::vector const& _evaluatedArguments - ); - -private: - template - u256 evalWasmBuiltin( - std::string const& _fun, - std::vector const& _arguments - ); - u256 evalEthBuiltin( - std::string const& _fun, - std::vector const& _arguments - ); - - /// Checks if the memory access is not too large for the interpreter and adjusts - /// msize accordingly. - void accessMemory(u256 const& _offset, u256 const& _size = 32); - /// @returns the memory contents at the provided address. - /// Does not adjust msize, use @a accessMemory for that - bytes readMemory(uint64_t _offset, uint64_t _size = 32); - /// @returns the memory contents (8 bytes) at the provided address (little-endian). - /// Does not adjust msize, use @a accessMemory for that - uint64_t readMemoryWord(uint64_t _offset); - /// @returns the memory contents (4 bytes) at the provided address (little-endian). - /// Does not adjust msize, use @a accessMemory for that - uint32_t readMemoryHalfWord(uint64_t _offset); - /// Writes bytes to memory. - /// Does not adjust msize, use @a accessMemory for that - void writeMemory(uint64_t _offset, bytes const& _value); - /// Writes a word to memory (little-endian) - /// Does not adjust msize, use @a accessMemory for that - void writeMemoryWord(uint64_t _offset, uint64_t _value); - /// Writes a 4-byte value to memory (little-endian) - /// Does not adjust msize, use @a accessMemory for that - void writeMemoryHalfWord(uint64_t _offset, uint32_t _value); - /// Writes a byte to memory - /// Does not adjust msize, use @a accessMemory for that - void writeMemoryByte(uint64_t _offset, uint8_t _value); - - /// Helper for eth.* builtins. Writes to memory (little-endian) and always returns zero. - void writeU256(uint64_t _offset, u256 _value, size_t _croppedTo = 32); - void writeU128(uint64_t _offset, u256 _value) { writeU256(_offset, std::move(_value), 16); } - /// Helper for eth.* builtins. Writes to memory (as a byte string). - void writeBytes32(uint64_t _offset, util::h256 _value) { accessMemory(_offset, 32); writeMemory(_offset, _value.asBytes()); } - void writeAddress(uint64_t _offset, util::h160 _value) { accessMemory(_offset, 20); writeMemory(_offset, _value.asBytes()); } - /// Helper for eth.* builtins. Reads from memory (little-endian) and returns the value. - u256 readU256(uint64_t _offset, size_t _croppedTo = 32); - u256 readU128(uint64_t _offset) { return readU256(_offset, 16); } - /// Helper for eth.* builtins. Reads from memory (as a byte string). - util::h256 readBytes32(uint64_t _offset) { accessMemory(_offset, 32); return util::h256(readMemory(_offset, 32)); } - util::h160 readAddress(uint64_t _offset) { accessMemory(_offset, 20); return util::h160(readMemory(_offset, 20)); } - - void logTrace(evmasm::Instruction _instruction, std::vector const& _arguments = {}, bytes const& _data = {}); - /// Appends a log to the trace representing an instruction or similar operation by string, - /// with arguments and auxiliary data (if nonempty). - void logTrace(std::string const& _pseudoInstruction, std::vector const& _arguments = {}, bytes const& _data = {}); - - InterpreterState& m_state; -}; - -} diff --git a/test/tools/yulInterpreter/Interpreter.cpp b/test/tools/yulInterpreter/Interpreter.cpp index b66967e26fb8..aadd22b4db77 100644 --- a/test/tools/yulInterpreter/Interpreter.cpp +++ b/test/tools/yulInterpreter/Interpreter.cpp @@ -22,13 +22,11 @@ #include #include -#include #include #include #include #include -#include #include @@ -329,13 +327,6 @@ void ExpressionEvaluator::operator()(FunctionCall const& _funCall) return; } } - else if (WasmDialect const* dialect = dynamic_cast(&m_dialect)) - if (dialect->builtin(_funCall.functionName.name)) - { - EwasmBuiltinInterpreter interpreter(m_state); - setValue(interpreter.evalBuiltin(_funCall.functionName.name, _funCall.arguments, values())); - return; - } Scope* scope = &m_scope; for (; scope; scope = scope->parent)