diff --git a/Changelog.md b/Changelog.md index 164d998c2..c0f773908 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 8ac364280..000000000 --- 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 d74612417..52a99ec4f 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 fa1a4ec32..57f0fab6c 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 2cea0260b..8a500c614 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 fa1e8ab3e..b18834a97 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 36e462330..ae11e233b 100644 --- a/libsolidity/interface/CompilerStack.h +++ b/libsolidity/interface/CompilerStack.h @@ -203,9 +203,6 @@ public: /// 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 @@ public: /// @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 @@ private: 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 @@ private: /// 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 @@ private: 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 dbcbe798a..28a564a4c 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 cc7033a0b..2cf02f838 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 f258de6a8..9ac90c395 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 5c57b56fa..bd38cd602 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 @@ public: /// 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 03f385d80..000000000 --- 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 d164c11bf..000000000 --- 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 d36b1cda3..000000000 --- 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 7f95f8d13..000000000 --- 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 62596ba6e..000000000 --- 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 eb14da65d..000000000 --- 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 67b642ec9..000000000 --- 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 2d895d3fe..000000000 --- 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 1026f17c6..000000000 --- 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 b724ba69e..000000000 --- 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 2776c14e7..000000000 --- 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 bdd109d31..000000000 --- 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 52e48a9d5..000000000 --- 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 ad723717b..000000000 --- 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 faa7806a5..000000000 --- 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 7a4a80f5f..000000000 --- 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 3efa07bf5..000000000 --- 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 dc052a145..000000000 --- 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 17d205ddd..000000000 --- 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 a840e3bb0..000000000 --- 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 2dae23394..000000000 --- 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 8d297d354..000000000 --- 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 410c42d8f..000000000 --- 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 0641328f1..e29112b01 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 7da0d3bf1..0f45f5196 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 80b4bee6f..b6d7f92a8 100644 --- a/solc/CommandLineInterface.h +++ b/solc/CommandLineInterface.h @@ -102,7 +102,6 @@ private: 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 a3e782966..1f11fc57c 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 51efc9e40..9bfae0346 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 9a2c78fd8..9a3fa84b4 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 3af23c782..72e4d13e8 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 468e5af64..d82ff9c6b 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 132ce2beb..81005547d 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 61b4c3c71..967adc248 100644 --- a/test/EVMHost.h +++ b/test/EVMHost.h @@ -65,16 +65,15 @@ public: // 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 0b7c6ea80..a18a73de0 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 b39751142..27ceb4f28 100644 --- a/test/ExecutionFramework.h +++ b/test/ExecutionFramework.h @@ -295,7 +295,6 @@ protected: 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 e58beabbf..9e054c109 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 7a5c75c50..f631bea8d 100644 --- a/test/TestCase.h +++ b/test/TestCase.h @@ -41,7 +41,6 @@ public: 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 ce9af142f..c492f5290 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 099ebdc3a..000000000 --- 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 f21cd2b7e..000000000 --- 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 fa454f80f..000000000 --- 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 099ebdc3a..000000000 --- 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 a625eea08..000000000 --- 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 01a4cbb41..000000000 --- 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 f39038498..000000000 --- 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 4fa5ef66f..000000000 --- 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 d0cb60f39..000000000 --- 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 7c6526b56..000000000 --- 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 4fa5ef66f..000000000 --- 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 3124db17d..000000000 --- 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 48a844213..000000000 --- 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 4fa5ef66f..000000000 --- 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 e8b306260..000000000 --- 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 cc6c07083..000000000 --- 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 5ef050f64..000000000 --- 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 d00491fd7..000000000 --- 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 f21cd2b7e..000000000 --- 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 8b1378917..000000000 --- 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 ded0d6efc..6c5b1680b 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 c84a12d97..614ade61f 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 bccff6085..000000000 --- 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 52dd265b5..000000000 --- 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 d00491fd7..000000000 --- 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 9755e16e7..000000000 --- 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 538c87097..691b7fa54 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 e9d24e61d..ead982255 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 53dcc68ee..000000000 --- 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 1db94af7d..000000000 --- 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 2ee666fe2..000000000 --- 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 14a4ef2df..000000000 --- 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 6f9a273ab..9efe91f61 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 647c63654..000000000 --- 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 4fa5ef66f..000000000 --- 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 8026a6e83..000000000 --- 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 bb147ae33..000000000 --- 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 4fa5ef66f..000000000 --- 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 f90f049aa..000000000 --- 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 85814eb29..daeb64aae 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 04cd5f05b..000000000 --- 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 2b1a6d960..000000000 --- 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 4a3ef4eba..000000000 --- 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 04cd5f05b..000000000 --- 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 731e6c9bb..000000000 --- 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 e0cc44e57..000000000 --- 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 254a1883c..000000000 --- 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 89e060931..000000000 --- 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 29ff631aa..000000000 --- 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 bddbc1779..3ef96612f 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 28c9c8a20..f9ebb124e 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 09d1ce184..1735fd7f7 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 23c2babbe..33bb796ea 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 6020f1f51..1edf2f2de 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 5ae4a9e0d..39f1cafed 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 bba8d282f..baa45e62c 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 396efa0bf..42479fa94 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 d3c8f7554..0cc2b07c1 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 e382095ad..6f5278ac1 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 c04d311b0..a7a23d26a 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 1f61896fe..0760bb7df 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 768f38c33..e4b7423fd 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 b2b1c6460..b48aa1be3 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 4d354dd26..6bbf4042a 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 b21602d92..a593e0194 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 235fa3d20..9506bb05c 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 578933d9c..5b14e58f6 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 a22910570..6fe58c39c 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 b3b53a7c1..882b4c950 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 219d85db5..170e77958 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 89acccf5a..7eb712582 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 d66d378af..7eff747af 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 05912d21f..5412ca601 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 7688186e7..3f67c29e0 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 7251a02b8..ad3c100c4 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 1aaa58c60..a03244985 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 f75a43b2d..1e59dc131 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 89c8e207a..0a00bcc14 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 24c03982f..97f7a27f4 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 f1124f8cd..d5ef2e00b 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 df5d0ed32..bfbdf7b9b 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 f441866c1..c3b57a8fe 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 4746999a3..1d8a9c9c0 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 c5abb93e2..b5b7be83a 100644 --- a/test/libsolidity/SemanticTest.h +++ b/test/libsolidity/SemanticTest.h @@ -53,7 +53,6 @@ public: _options.evmVersion, _options.eofVersion, _options.vmPaths, - _options.enforceCompileToEwasm, _options.enforceGasCost, _options.enforceGasCostMinValue ); @@ -64,7 +63,6 @@ public: langutil::EVMVersion _evmVersion, std::optional _eofVersion, std::vector const& _vmPaths, - bool _enforceCompileToEwasm = false, bool _enforceGasCost = false, u256 _enforceGasCostMinValue = 100000 ); @@ -85,7 +83,7 @@ public: 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 @@ private: 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 268861fd2..b174419d2 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 3e8372ef7..7d18e1bb4 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 4865c68a2..c2cea6600 100644 --- a/test/libsolidity/SolidityExecutionFramework.h +++ b/test/libsolidity/SolidityExecutionFramework.h @@ -87,7 +87,6 @@ protected: 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 980c2beab..082d91be6 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 6ecc6d9d6..5d0989860 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 ffd8f6b58..852086c2c 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 a6b596866..70d86f5d0 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 39c23bcd7..a3c08f320 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 ea1655e1e..848c08e7f 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 fee9af788..a7a53495f 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 180d89ec1..4d6b92073 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 270a5abc0..fd0a59abb 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 5e4d03a7e..e228099c4 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 7b873951f..c1b91815a 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 eb4bd70fb..782971c59 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 ddfe34329..8bbb77b9a 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 61360868b..c13f004fb 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 773b7d2c6..1e654d281 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 d73db5da6..e34d46b74 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 fb093b41a..627f0b0c6 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 7497d3c35..601fb3cbe 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 c5ba49368..44cf1ab5b 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 b372a4c47..49bee94ea 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 11e79dec0..35cb15077 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 126c6c950..ef2b07cb5 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 3b2b90c6c..f828ab41e 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 8db4674c2..849c24a91 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 106c26ea9..edd319d45 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 a0b732cae..cdf2d3087 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 1a6856ff4..e47125707 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 9fab29f9f..2d8095704 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 f044d6f05..1fca188a6 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 1b1f360f4..796488a9f 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 f7ed9daf4..d5a3266f0 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 d456cdfcc..347710a30 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 a97c4f6d8..745bebe72 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 b12692854..58f68b8cc 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 b680e9cd2..4286f8f07 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 285bf334f..1e3234728 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 07d035080..3fe54eff5 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 a8f4f5554..a734103f1 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 73fa9b415..ce6550d31 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 80fe3149b..cf631b8ae 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 3e2664102..57e218f7d 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 b1151c2fa..8a22b037f 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 3bab26b83..6b6e55e02 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 2703f25e9..9ae6602f3 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 93fe74c99..03084f0a3 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 ab7a94372..1edede787 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 863996141..752298fbb 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 2e2420af3..5f67174cf 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 45c71e4d8..f72de4379 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 a4f24a963..b23e2dd27 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 736794dc4..02937aced 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 fe956322f..0a874914a 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 8a7e572cc..a20e9ae49 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 1d6346259..b8def5889 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 16b534585..51cb8e5e2 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 034abce94..e6f703bd7 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 cfcd9463f..cd32ceffa 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 b62628910..7a8504d53 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 4fc0ff189..420a52cde 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 267489b41..42658f83a 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 d996409ca..517c4966e 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 730209fb5..0ec9f2c79 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 0239810ab..306256206 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 f7859e6c1..140506279 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 6e9cc90ae..ae91ea278 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 cdb1c9b6d..c524d06e0 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 99bd31c57..d21c40cae 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 190d73d79..dc1d1c31a 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 c31ffcb53..006bf2521 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 b8eb63829..76af2214f 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 0485012e3..7041ff851 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 a83e5462b..10d31162c 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 ffd4b5403..fe6f07a40 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 55e20f917..6f616f4b5 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 03f58e119..7b5b30b79 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 0e225f1e5..335afd0ac 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 113269ea2..4ab3d0bd8 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 1582b7118..fcdcf9c2d 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 8b750efa7..943a5206e 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 00c69b7de..2fccff774 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 f7f056065..3b0a229c9 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 a3f800b08..31addad5e 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 0e0a26fc9..0a2bcffce 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 160697c6b..0a306cade 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 c2ab09c64..de100d096 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 e139e200f..53ca44cdc 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 40990ba81..ebaada764 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 cbb87a278..e335d8684 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 5c36ed3f3..9fcbbffce 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 6cdd48bf1..d1202e27e 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 e996714ce..84e11c138 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 25a2c05f1..fcf4aca21 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 fbc1d03d9..ace6550bb 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 90b5b85d6..26f3d587f 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 57f6b3a3e..2409893e3 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 28eecc4f2..db6625c8e 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 d4d535950..18795ff79 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 20b894082..95ba9d8ed 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 ca6362b5c..8277df30a 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 2af927062..3704e3682 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 f435d9136..eb0eb108f 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 3a52e0a58..9dbc64f73 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 ee715b5b6..e3843537f 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 93c458341..5040a72ca 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 ab3d472d6..3058df842 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 2dd2e7aa3..2f4b4ca7c 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 2f78042a4..e30ca769b 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 c402c14b2..c962d815f 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 159486eda..3d424a7c5 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 60d65cb59..fe60365e4 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 55a4d6aed..6c8da98dd 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 13b350262..ccf2f2a20 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 64c7f06a5..fb06b3188 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 58240492c..3a5e44a5d 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 5b7205553..6e44ed268 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 b1410f7e2..f49b4923b 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 3856e23dc..9d2dbd8c2 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 ed6a37403..1d886a8c0 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 ad5c39279..2396e3179 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 77096a645..b735d182d 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 54abc495c..53a66af34 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 316b8d9ef..2c1421eee 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 0bb429674..413645668 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 d6e7160be..bce78baa4 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 844324f32..5cf35ef3e 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 53cc75772..da6664f9e 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 51f93db7a..337946a20 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 519a11131..9d8dc0bc7 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 eb167ee0c..b65a3d254 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 e22b56cfc..d641cd83f 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 d82ef152c..1b3b64080 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 8bb4545b2..7e29d82a8 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 322eed73e..bdd23c675 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 b90bbb12e..c618ae8e4 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 c1481fc99..0525f6f28 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 b826dc13d..bf6c0b0ee 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 ff83a4310..7a8a18670 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 d6673882f..25302dcbf 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 870c853e1..b14ade6e4 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 18626b055..e145d281c 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 2b456ca9a..7dfe6e642 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 23f2d89c7..9cb16349a 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 6bde7c26c..88c18d494 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 1750711e1..6130130da 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 ce41673e0..43d7c3a98 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 81e1eb020..8f0152180 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 3528e4c81..c64d93c12 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 5d573a096..d860275e4 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 519b0c5ab..f74221712 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 6416afb2d..623b58739 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 4b2e88ffa..a89f8a2ac 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 434168119..e7a3bdbd1 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 28afd9f89..2e0288d24 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 6fada19c5..8288e1e86 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 282ccba09..c9c489a8f 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 0a896fed4..37292ae87 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 bc974a438..d6dadb78a 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 1cc6b5a93..bacf8dec7 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 c0c580072..d74db942c 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 4be20d6ba..f25a3c06a 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 620f2c3ba..3a13e9f0e 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 2e8a66363..2fc479d0e 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 dc6e26f14..008a0467d 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 fa1d01d40..0b532da0e 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 9a8132950..2e771032b 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 1898f0311..f75c569e7 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 725d984d8..1904e8140 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 21c5ed76d..f28658fe7 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 a50521610..7ff53efaa 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 c79625d3c..330fafc4d 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 394b211d6..6edf9db47 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 610135968..634e35693 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 826c5f723..42c360be0 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 e41b75c2d..1b6e7379b 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 3ebb4787a..5803ef6e8 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 e43b17561..a5158dad6 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 493b1ef0b..45b323b3d 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 8df274158..3dd93c12e 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 821da2dac..003cdb0ec 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 916f2e5aa..8718cb2e6 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 d6157ab23..73db35c32 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 a99b82a08..b26ba5640 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 f481ffed6..8a95f10c0 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 51815f5e9..e0e62971c 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 a5145bceb..746f21ef5 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 663716a12..62f927b5b 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 12c3afba4..de55afa9c 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 b282948cb..7b81d0a1c 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 0385a4c30..4426f0c0c 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 a7c1b4b45..837e87dc8 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 3da3ff646..ae405d8f3 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 89d2e250d..4f9076463 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 638b24382..3b53102ba 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 a8822176d..0ff332c4f 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 4ae4edb97..2ecd6e76a 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 a1ae3911f..764ffc245 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 bdf95a9b9..91e929834 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 2b80c440f..d7578fece 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 5a85c5fd7..3a819befb 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 ea35262ef..ed0e919fc 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 d6d76adc5..55daf6d3d 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 bb7e7e596..bf3f0c0c9 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 b6242379e..dd91c86a2 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 92633cdda..43d1fdab8 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 0c0b6e314..c04f03918 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 397c314a9..b968a07a1 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 763393a99..0a1250a8b 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 6e1f46f86..320349cda 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 0f19eb7e2..09fe0a1cc 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 7f0514041..dee3af354 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 7fef18a15..07b12ad96 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 6721329a1..cc9d8ca6a 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 7b166489f..5845e9b56 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 6b1b6704a..00dfef4ab 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 b60564665..9b982d6e9 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 2b2d694bd..b6ae85b83 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 48dc5ee2f..5876b1f7c 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 511b72469..7c1ae2846 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 d4ba09f13..450134b63 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 ddf1a66fa..beabc5143 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 a538946ad..b952524b2 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 9b783b404..60a1d64d3 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 4b929c36c..a447f6433 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 cda5d06ac..a3bce93ac 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 ec014160a..b4d0ce8e3 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 8d65aeac8..9741568ba 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 cac059774..eb1d63a2f 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 28df2c4cc..04697f521 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 a0d43c274..2f2b7c676 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 b763164c9..94a6a7aaa 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 b8a8e0d60..809b10c57 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 47979a955..e04e4b1c7 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 f0ea6ca3c..09f60e653 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 6a6d3399e..eb54e5b4d 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 d3d754549..2466d6e20 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 f00999c97..3dcba494a 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 105a8ef5f..f58c08129 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 945b65c9d..a26675fb7 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 733951e2c..35887059c 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 634486d91..b1220c510 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 66eb86d50..df07364b3 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 f8c3abf2d..3915c7b8d 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 5abc4e1e3..bff9122b1 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 c51172b0d..2a9d6de80 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 40cfc7a9d..3434cca01 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 968a4a02a..06247f0dc 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 a28dd1f06..d27d06bac 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 fdf691ae4..bbaf051bd 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 ef71a3d2b..e2a7ccc73 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 4901f5c78..b2dd001b3 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 716f72aee..f7e5c6ab8 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 b9eaa6480..c6957ee9f 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 837f9f741..af408b3f5 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 4a35fad1d..7bf3aee3a 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 55e65348b..d59bb9d45 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 14366886c..9b5319ae0 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 75ab307bf..55c639445 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 cb62135ed..dd97f4c03 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 dae3b4037..f73f10125 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 465b80f7a..cf4140286 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 f4ecd6bac..edd44de49 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 468f75be9..6a2da6536 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 b6a131b63..894a60f3f 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 0605888d0..4dbfe91f1 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 97bc083af..023133a49 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 d8d55dc9b..5a599c8a5 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 d374573dc..d2d23fb62 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 82c38cca5..a00628eaf 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 ea5edaaef..b43c453d2 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 043ee05a8..0b880bfd1 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 9753015a4..229618384 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 12139fc68..9b008f12f 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 2f660c24c..701b1f51a 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 a7295928a..aa455afcf 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 f7d90c8f2..d83fab852 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 65dbeaaee..f5996d32c 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 5529b90a0..f15d2201d 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 48dddecec..9189d5cc7 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 69a2193a3..6f7f020fe 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 56a2876ed..80ca6cc41 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 e8efe09fa..86d3dcc8f 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 8fe807e63..96f097ce7 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 5a946533d..9639c1119 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 d6c13a4ef..284bad098 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 31f474205..8e34a5b22 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 7db64dafc..7013a6352 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 abff2c9e7..9c73e208e 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 dd7487cdf..801b22d17 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 749e7c01b..adf1200ee 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 fa65755b8..924431ec5 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 85302de76..8f0e93ddb 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 70ec4fd72..8578a6707 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 169e1a6ba..f327b3f28 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 7ff1eae99..0a0cf465f 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 61b428303..21ab22e0b 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 7dc726be2..20774d692 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 218d1bca8..f5f056133 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 ad0b8a3e2..ae5eab6d1 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 63fac55e0..3c60a13f1 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 ef746eb03..cb2a8a0c0 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 4966f5186..706f6d94d 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 0c31e47c5..65f34d8ff 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 b78951c41..18a199792 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 309cb8ef1..caa538dee 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 c15e6332f..a6fea6a50 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 5052ad2b4..0a9e6d3ff 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 c407a3ab6..a5f56f3dc 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 409bb809e..67a4434df 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 4cf8be204..a147b4e02 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 f096a4979..587daac97 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 353844723..f9cd863ba 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 ebef9a254..3f14eb594 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 a2bab4051..0acbcc585 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 675c2d08b..84f6fad1c 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 d32db4d90..b5b24954c 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 3d49e5b42..397655dae 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 46de76055..248e44673 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 b1d0fc0c3..132a6c956 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 9c7684245..3de9cfa87 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 1ecd9eaf5..fae918629 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 fb34698bb..b55de0875 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 24f384fa5..c22403c77 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 9452ff97c..f9cf7316f 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 3d590ded1..a8a8759e3 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 4b11c3598..034e7c1d3 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 aa9dc4b99..c65d1abec 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 7b5e856d3..9cff3c728 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 87571f2d0..02e20c49d 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 23f01e419..5976fee6f 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 4c5468f03..78f1f1863 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 256367df4..70674a6c7 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 471fe7943..fb3f8ee8f 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 0663ddf4c..3114c80f1 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 e9339e664..74bf42ec7 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 42d4f711c..1b1092cba 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 e304fc281..39683079a 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 c0eef13c4..33392e8d4 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 b54f9bc27..d31dba485 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 5479960ac..c1f816c1f 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 70be159e8..c0ff8fd58 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 c4b677453..7e0aa51d2 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 47978ddbc..6b06a784b 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 1bb36ca2a..7b0b1448f 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 dce48fa28..5390f64db 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 21b52f84e..572e9def0 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 04ec0b614..d3574806a 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 a9b82d11e..0b10748c5 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 6375055fe..bcba7169b 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 130ebcd33..82badaca7 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 91644d1ac..d12a979c9 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 7ae286110..ef531f78a 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 5d917437e..c925823d0 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 d074e677f..848e9016c 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 c4af2ea5f..2d8179513 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 48cceeb99..de198dff2 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 caf441dd4..d21084aa7 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 675ec3b1d..e2e07823c 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 852f10ac8..ebe50f516 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 f74fbbc63..e050d2b52 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 448cc3991..1f6a50d65 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 58c77a81d..ae4b94ed5 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 c3c9297bc..a50951319 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 d81bff29e..254bc7473 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 039f133ec..80cd7e11e 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 5544d90ef..c7728068e 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 687b1d914..6c382ef9e 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 e4d8419b4..615d69594 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 b181f8259..ed20bfe2d 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 b9aa70aed..17e14e8ac 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 741d03a8b..253af9890 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 8dff59928..40add273e 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 5a3b791fe..8a71c8f4e 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 ea24ec6c4..d7e585e33 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 66f592bb6..e080985e3 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 eb57b8092..4183642bb 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 b03cb20f2..cea56cd7c 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 770fa0be7..d3681a0ee 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 0f3f0f642..c43f92696 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 e1173b955..4c0311e50 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 2fa602806..ccd32fab4 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 49b60b12f..fbe6293dd 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 9bf0e3c59..c66169cd3 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 51d48f497..9bbf11bed 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 77cf83707..f66d859ea 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 885cf9b24..722502d86 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 c9a7c4905..457ac8856 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 70c7fac40..62e1e4fba 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 88ec15f57..9380dc015 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 43ce7ea66..1fa930acc 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 4de0f4dc9..5a76dabdf 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 a3c8a8700..24299b6d1 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 afe9b0deb..a4a25f51e 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 63ca1e0b7..a2473e7e7 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 e00fd4612..13228115a 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 c566da79c..4397711c6 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 d66bac750..4305b6d40 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 f59ec9440..e9f95c0ac 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 2283c30ff..5ef12f69b 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 21417b599..d6e0e9262 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 7b4e05b72..169f2e295 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 a49dc602a..44526da68 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 f24d93c2d..a385fb29a 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 ce41e54e9..41c16d2f3 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 61f52b86c..3acc85570 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 d7df52434..96ee9bcff 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 8a82350dc..cfbf7b0c7 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 a8188fcc6..da521f6ba 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 6ddad7979..e5963c1b3 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 5e78713b7..178f22b40 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 f9add4cb8..d6c7f313e 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 5bc0bc948..5dd67fba0 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 41c700976..b180d52e4 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 3ac843eed..d46ed0a56 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 465dcebb1..e709a5b5b 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 9aec493cd..f423775a6 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 c198f21dc..96fa9b11e 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 d2942a065..16cb75315 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 3058ee720..bb8cc6ab0 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 d10904cfa..3edd6049c 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 b14297a94..db7f70f83 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 b03adee39..5e0d80148 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 bf115f1dc..08bba771b 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 e69c93e46..d2ed3575e 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 f3a326534..5b471e1a7 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 4f9bfe971..efdaedf50 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 f56d611c2..4d1538d7c 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 925797b7e..58c600143 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 b15a80df1..67fc0e6be 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 bc4c79739..2879c55ea 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 cca7e04b1..e1978ba87 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 182baec8c..bae503250 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 222f87f97..16cbad1a4 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 71cbc4203..f32a23814 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 f10ebb0e7..c50fb5dde 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 3d5e97de0..e87ac7a41 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 dc44d6659..c3b10475f 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 86da5500e..81caba767 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 ae8431d3c..929b006e3 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 83f855d2c..5cda8b6d2 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 264d256bd..780b5a360 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 bef92dac2..16d6b8216 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 e1a0c36d3..ecc7851b4 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 ab14d14c2..530fadf63 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 006af1c2c..a69a26f5c 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 88a2fa107..136743d53 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 df4fa914c..d4c72e163 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 3f2b4ebea..30cce5a79 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 1d71e5ac9..0d9bbfe32 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 ffc503ae2..00e2bb328 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 a9b6bfa6c..616a2183c 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 15d75fde5..4c4ba4b28 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 de47c0380..639629372 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 8b7fc32a5..a866b0f54 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 3ae209daa..3ff3a1a60 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 5c4286366..a103ef071 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 4e91d42fb..321e16ae3 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 6df3631a7..f111273d8 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 71fed293b..ae802d7c0 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 e31fdfa3d..71723f0fa 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 585ef8986..dec4c3f29 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 bcaf6f290..2a0f43d53 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 f980805ed..c57693674 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 5188f0e4a..a5f43f8b1 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 a31b438ff..02b482143 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 6ede4522d..ed91f3b6c 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 68a370454..36b6e8b59 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 9f13f4bdc..0adc5ae55 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 560def3b4..452884f26 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 1af493006..bc0c9f484 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 aa75ca487..3d245e9bf 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 c39407215..644034750 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 0a959aa11..ded331a79 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 058d233e9..47afab5ec 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 55883ddae..afa82c6f7 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 2242d2a16..44fd4a924 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 a1c3fc4cf..3d6d7c7e2 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 6a208e9fc..d66e2f4cb 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 f9517fb61..d6d6d77bb 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 e303e73ea..7671ce19d 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 32ae16edc..e9a76d2c9 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 3e63bc8eb..5b0491b36 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 97ca0a5c4..4947b21d4 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 b42721084..f9206b092 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 c7fa35495..2b1afb52b 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 ecb51e902..8cf89f4b0 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 630f4905e..e24118afe 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 6d2f7ae58..5dcde06f2 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 74b704f48..00ac9662e 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 533c93bc9..50612a6f3 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 3dc12b223..024eb3254 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 f6dda7059..9cff6c3b5 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 d81e00fd5..f2c024483 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 cac3a53b6..9c3090a78 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 0fe10c937..8d3cec4e3 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 a5d1ed51c..2619ea334 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 7ac59b3fc..1792d8755 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 111357e9e..6f4f95e91 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 684ea1b43..9f3fd5d4e 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 49d693a77..6c7eef895 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 4c6557cd7..c36095914 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 1be435ff6..ce04cd737 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 df3c89884..4c48df8d4 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 9ca685399..36273068a 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 ee60fc192..bc4db3602 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 4ca57bd6e..d6171a416 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 1e3e34cb1..28c4e01f9 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 987931fa7..7416d295f 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 afdbd20b6..527a43202 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 fdf5e6bbb..8049a977e 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 f4f64a11e..69d9a0cd3 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 cac02076d..2d733b4e7 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 fa8156b30..8ab4ca227 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 0d43c97e9..1c1bfee0b 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 81e8bd829..8f05c4262 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 eeb82a3ce..14cf1e627 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 5a4f89d84..b0e515db3 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 97fbd5b3b..624b19473 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 cdfe43f5e..17de40fc4 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 813d6954c..d6df382c9 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 f38eee429..80f734a31 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 4c46d1ea0..b255b1880 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 5087fe732..e7aae2fc7 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 4f6a6b08f..921200ddf 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 9fb467e6f..226a8bbb8 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 3ccc37543..0201068b6 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 a55c2a3ca..01ec30966 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 24d5f2af6..590265da9 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 efc4d226f..6824cab5c 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 84cfe3b9f..485ae4be3 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 9f50ef46d..6ce623ce8 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 eda4e5a05..951d1f529 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 858ee9853..f2f26e245 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 2d14d1d7b..143183b86 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 59ddfbe5c..0d6dc6ae9 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 838353824..aa726c355 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 02c55c7d3..4e2526c72 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 93b22bfa9..a8b0f108a 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 b6ac20cd0..6f8a59c14 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 95c0b4200..9003898e6 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 761cc76bd..76f2bc4ae 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 4a49a614f..564a3fabf 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 c10931f99..af2ecc70c 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 b457d0731..92cb82c90 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 a3131d564..b1686d907 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 d9e897762..cda71d33d 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 d01f07268..ea3c03d64 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 72398d9ab..7aaeb4dbb 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 0bcdd1ad3..1b464531b 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 b5db79e8f..0297bd26f 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 f452c3b35..b90235b3f 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 d1a6fc584..f023c7236 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 4393d7dcc..704a7859c 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 3ccae698f..ea178d645 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 95c322f5b..401d8b61e 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 516febe6e..e06556fb5 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 f62f4c084..f5f53cc40 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 ca635aeb4..418f9e93a 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 144df2d61..5bdd1b42f 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 e6972e03f..14f770a35 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 76e6f7c1d..3aeb0dcbc 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 74d30f505..6b56a73c2 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 7ae085dbb..b7b3058b4 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 0adc4c5a7..3fa7a33fd 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 6092b161d..b73077131 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 2b7544139..633c4c7b3 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 b4beff941..0dfa2cea3 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 9aa41a342..df118de32 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 8ccc30936..6c22c71da 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 fa67deb2c..dcf2a3a27 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 c340289ad..3d132641f 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 3f29790d8..880b7433d 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 29618bb04..66954a7f5 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 ec989b508..065187cdc 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 e5c02001f..5b99efc64 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 d51194ca0..052122538 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 fe6de19f4..9434e4045 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 445961e2d..f844c08fa 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 a76518684..96b956992 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 3fee9b210..e541fa975 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 12b514a23..3089f97b5 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 5cafe5323..fe319d19d 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 3336b30b1..648c962cf 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 64328b2de..0037d9573 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 58f178e5e..f8944f11f 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 c05d87b37..e45626d31 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 357863abb..47b9a9ece 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 956416a96..6da42ebec 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 53d1ca93a..22d9dd29d 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 c881d8a93..7f991f401 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 776ceddc6..31558cfbe 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 21140e45e..046e4ec6d 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 b5c8a2cfa..ae21f6f86 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 66657fc67..290c812cc 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 46094d376..c19875062 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 2433da866..f16f61e32 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 cbe8a72bf..93fad63be 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 8b9035d18..26862fd00 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 c3aa23c3b..5ec25fb36 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 f97935fb6..7b51b59fc 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 04724f4c7..8350628e4 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 09558a697..fdfafa9e2 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 541780027..5c9a6cdc5 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 586849294..2052c9da9 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 93906e6e0..b0ab07f54 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 52a99511d..ff1dfebfd 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 e13f99cd6..390bf4b01 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 aae1576e5..eb450993e 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 cf170a2aa..9949b477b 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 18a09dfe5..60b9a4cf0 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 10c3a351d..5662d909e 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 8abc70d3d..963cbc342 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 d2f5523b1..fb938d37a 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 daf5d000c..b17ba6d91 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 26a33682d..43f2a80fc 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 ef092f3ea..a8a8fca44 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 c3e96240a..32203a9cb 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 392a52f2c..2d2e0e16e 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 7d12c47a4..8b500cca1 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 9242eca2e..f76116bba 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 5ac35853b..6574dcb59 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 320290c9f..d3d2b01bb 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 8f9fe0b59..be60a01bc 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 e2551a2a8..e4e6453c5 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 209ad8bb2..fbaca1a67 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 0f446f775..1c1e596ab 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 e534e4231..08a96792c 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 1c69ffef2..bf8eab8ce 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 cc5304ed7..cc165e879 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 f5de5e501..727c66063 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 bcdc9440e..24b316f9c 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 af91aab0c..e8fbfb246 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 ee63c185d..8c51b2921 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 1c3b66b28..2c5a15bb9 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 55e38689f..2f275c543 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 feec1beb3..31ac50bc3 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 170eae4d0..5a14cd7cb 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 77bbb896f..67a31c341 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 21f4c8edf..1d00bace1 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 8c14639d3..e442b8e85 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 752c429ca..78e0fb447 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 2195c85e1..15226b5e0 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 5a3df6d21..62aa616e8 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 b944100b9..2712503a4 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 0aa7ceb95..110240ce9 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 916c7fbff..8638f409c 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 f023e971f..b850ea327 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 839608aaf..075682129 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 d22d3e43c..9a9e7a80b 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 84fd393bd..97a763797 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 8486671ed..ff883139a 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 be2b89f29..fad0d3e5b 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 f787ca5be..fa7dab9da 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 71e3a20ef..fe2210fa1 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 561e31688..0ebf772fb 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 135543898..bc16bacbb 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 b0cf070a7..9c7728a02 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 f143b9847..799da3481 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 e2c8c5263..1534891dc 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 906df85cc..71eb0077c 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 6b28f542c..e8742c234 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 f2f63575a..174fb993f 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 22566bfb1..ab7302743 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 3fe3ba10d..280bc4960 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 7d3b75492..5c48b5d72 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 825bd6d2f..b440b35a8 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 f8c396dd1..e85a38dd6 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 5744272ce..d797ab9cd 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 bf4da5409..44154fa55 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 930b06f4a..3ab16a3e8 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 b6d8dd84c..07f6c038d 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 e054329c9..de4ecdbe4 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 8ba68599e..b11241322 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 595f88f54..25cd645e4 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 4c2356499..4c0d71145 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 9f391e2a1..6a8da2778 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 c1dab1895..69c4c4121 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 ec94f73a1..efff7a950 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 d3203160a..f7add5fba 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 e71d802fb..1167da57e 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 935c0b3c2..57028ae39 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 9035f0ca2..cd1b4a71a 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 069df9a91..223e31762 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 3c687d9c1..fd7944764 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 a21065bf7..482847b67 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 76c6828cd..b9503e44c 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 018ee9669..c9f12fdae 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 a799b7d9b..80f8bb55c 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 8718bd422..4a4432758 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 0bbe52248..a8959b24e 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 aa8de1c27..bd1cabc48 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 290ef35b3..a403b5d64 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 c36cc26dc..5da58b316 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 a81ab4577..19b7cb846 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 ab3d92a18..035c26906 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 0b0763b6e..1ac2aec17 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 89d90e577..a004299b3 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 9e1e8c778..828398f57 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 3eda8bfc7..c2bbb08d5 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 a0b206a12..51030f9a3 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 a132e8873..80d4dde60 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 c5bf8e018..4de296630 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 5d0d50dad..cc5a156e2 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 34cc69ffe..0ab4b34a7 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 fe07146e1..425c6eaed 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 05d265343..e22466010 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 a2c2d9207..e62d45b35 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 e582ff394..3793b4e0c 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 24c72943f..3e1559bcf 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 3439bc4df..6a0f3d598 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 6e6f108a6..412998b55 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 0e7d2db37..5c721ac2f 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 ab3d97f46..d4cefe12f 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 5307f9589..0d0432987 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 102df82f3..e97bc4cc3 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 8cc64ffa0..935d03752 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 a9581c49f..213b1a6d3 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 1f6a0d7e5..ee059137a 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 349926079..a247af68b 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 8b34fd801..36a253b02 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 636572d50..fc2fe4251 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 2e9acb27c..4742bae2d 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 7c1428050..411cbe069 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 cfd2c05af..a23a566c5 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 1ca5842ab..324256b45 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 55ed66eb3..382d75184 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 d28a56eb4..12ab33924 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 de58d6592..a6ba617d7 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 9d4b59d52..a966e3ccd 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 8ba9c1d4a..7a100c2be 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 a1a69ed03..3e9cf9d40 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 e7d6c49a2..0c1c58dd8 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 29812e018..6f5f90824 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 8bc69baa8..b34f01981 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 d21afdcf5..4737a36d9 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 d2f582bb1..0fe752d51 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 35a2765ff..529513eaf 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 978b905e3..f77d25c66 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 c95cbf41a..d32e281da 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 a6b14a9e0..ff7f07855 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 f11cd661f..f1b2b1740 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 939cd0b7f..77ecface7 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 25e57dac1..b9c3f167d 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 3f3b709ba..ee7062e70 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 3a09098ab..a4d076325 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 47213b7b4..9f87c7b97 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 520c9be4e..058f142f8 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 7546921f1..39677b4f5 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 c42353e60..f58632b96 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 547838371..78e9e3bea 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 fd886596f..936058124 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 5823f7734..b160bbd77 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 016f7438d..ed0ba2878 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 99e0cbcdf..8e8cd78e8 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 6460ad90f..53a11869f 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 f61808084..d1ec20db0 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 59b63ddf2..7c035f053 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 a39c0797d..5253a6a1a 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 df2575a88..03d7ed920 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 49746adb4..5869ea2e7 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 f1140ffb4..985d26354 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 edde64588..e1a1689b7 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 f0e811ac2..d8e640713 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 37a6e90d8..17d8dad03 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 dc9057121..b440d8e13 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 ea43914b7..798f90ffd 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 7c5658ae2..28705ee40 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 f74a2df7a..d83343048 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 d277712f0..ea543a786 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 d8417e3e2..55a50a5c9 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 5c0466ace..798f8fce7 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 15330f39b..bb69ec9ee 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 091ec74af..ad7a675b0 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 606625d3f..ac268409d 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 f4536e5bf..a3bb0c64b 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 5bf37f081..40a023bb4 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 c77359fd4..ceb42881f 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 1ecdd5c8b..54d0abaf7 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 33f37ffcc..4d6ff0a64 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 4c9885ff6..e140fdedc 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 9da6fd551..b511dc63b 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 4f664fb04..0e3699e6b 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 b7148bc73..2b6289b95 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 e775c97a9..3e045cee7 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 5bfb5dcc8..001067a28 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 29fd5aefb..35906db3b 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 e98556f99..7fe00f572 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 694d110e1..15bb168a7 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 b2f083e02..fc8d6e08f 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 210aed4da..8880a68a7 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 4c82cebd9..4a65bd9a3 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 6b5d727ca..37ef3158e 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 7173d57ba..f0049b3f3 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 55931bfa9..5db44309d 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 11896d2f9..800684f35 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 f40bc2e42..000000000 --- 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 d54b8732a..000000000 --- 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 3a8d96692..74a680b9b 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 c7880fe55..fe8998700 100644 --- a/test/libyul/ObjectCompilerTest.h +++ b/test/libyul/ObjectCompilerTest.h @@ -55,7 +55,6 @@ private: void disambiguate(); frontend::OptimisationPreset m_optimisationPreset; - bool m_wasm = false; }; } diff --git a/test/libyul/YulOptimizerTestCommon.cpp b/test/libyul/YulOptimizerTestCommon.cpp index 7623efc12..7e5f32430 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 0290bad4d..000000000 --- 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 b2203070f..000000000 --- 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 40b84764e..000000000 --- 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 f32c244a9..000000000 --- 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 6428e7343..000000000 --- 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 38cc808bf..000000000 --- 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 73e1bf3d8..000000000 --- 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 ef6efafd4..000000000 --- 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 0cefb3405..000000000 --- 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 cffb8f73d..000000000 --- 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 fefb5d682..000000000 --- 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 f8bb5017a..000000000 --- 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 6d5bfbb23..000000000 --- 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 706d810b4..000000000 --- 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 d9d645d86..000000000 --- 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 b358bacb5..000000000 --- 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 8b906232f..000000000 --- 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 0d7d57af0..000000000 --- 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 f0b4008f6..000000000 --- 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 229f6b461..000000000 --- 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 1abb288d5..000000000 --- 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 5d34b58b6..000000000 --- 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 73a82f442..000000000 --- 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 5b980c6b1..000000000 --- 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 ae96335fa..000000000 --- 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 b83e298f5..000000000 --- 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 d65d49cf9..000000000 --- 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 bda8b94e1..000000000 --- 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 be57da46e..000000000 --- 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 60def7e31..000000000 --- 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 577f6e9f1..000000000 --- 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 8812e7c9b..000000000 --- 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 d9dc12c9c..000000000 --- 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 637c2c36d..000000000 --- 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 52e4275b4..000000000 --- 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 fb12db5ea..000000000 --- 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 ef7125b26..000000000 --- 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 d1d0cc2a8..000000000 --- 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 2c9d80452..000000000 --- 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 c9844978a..000000000 --- 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 5175e2245..000000000 --- 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 81a650345..000000000 --- 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 6b02e598b..000000000 --- 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 296484bd7..000000000 --- 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 887fef66f..000000000 --- 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 8ff23e2bd..000000000 --- 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 152595e28..000000000 --- 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 b473988d5..000000000 --- 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 31200c2fe..000000000 --- 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 5aafc88d2..000000000 --- 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 b45b2aae0..000000000 --- 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 78d101800..000000000 --- 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 95646abe2..000000000 --- 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 83250247a..000000000 --- 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 16fe9181f..000000000 --- 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 bb8b14170..000000000 --- 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 c90b16f13..000000000 --- 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 b6aea851d..000000000 --- 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 fbb5fc272..000000000 --- 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 32037fb5a..000000000 --- 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 c000393fb..000000000 --- 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 cf900dae2..000000000 --- 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 f39d5926b..000000000 --- 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 dd9ac1d5e..000000000 --- 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 6d4131a99..000000000 --- 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 8fbb4923a..000000000 --- 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 f7f1a1aef..000000000 --- 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 6d9377016..000000000 --- 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 dd22ef261..000000000 --- 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 7650e9e6c..000000000 --- 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 32d789ea9..000000000 --- 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 30ad4b96d..000000000 --- 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 25faaa9ee..000000000 --- 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 9982590df..000000000 --- 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 2dd91a166..000000000 --- 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 b158aea52..000000000 --- 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 683e64be1..000000000 --- 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 8acced97f..000000000 --- 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 de92aad7a..000000000 --- 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 4bae497d6..000000000 --- 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 10f8814a6..000000000 --- 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 3aef8c99c..000000000 --- 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 5ac0bfc00..000000000 --- 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 b799760f8..000000000 --- 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 803b28970..000000000 --- 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 d40e2283f..000000000 --- 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 a9612a392..000000000 --- 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 403c57962..000000000 --- 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 d1f45a623..000000000 --- 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 a02243a25..000000000 --- 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 ec7a162dc..000000000 --- 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 051359c07..000000000 --- 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 4e09457c8..000000000 --- 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 d9b4c0204..000000000 --- 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 eaccf63f6..000000000 --- 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 c8711338f..000000000 --- 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 6fdecd7fa..2883f5c51 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 2120acc2d..6aa100248 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 0bb8896cd..5a2ba8da3 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 4739a54e9..2d93bdbc2 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 cc1b40f07..235e8fac1 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 fdba09aa4..000000000 --- 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 1837f7509..000000000 --- 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 b66967e26..aadd22b4d 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)