Merge pull request #13019 from ethereum/enforceViaYulNoSmtTests

Remove enforce-via-yul CI run and instead always force via yul in regular test runs.
This commit is contained in:
Daniel Kirchner 2022-05-20 10:42:28 +02:00 committed by GitHub
commit f617d27f2b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1297 changed files with 38 additions and 1912 deletions

View File

@ -1035,16 +1035,6 @@ jobs:
condition: true
<<: *steps_soltest
t_ubu_soltest_enforce_yul: &t_ubu_soltest_enforce_yul
<<: *base_ubuntu2004
parallelism: 20
environment:
EVM: << pipeline.parameters.evm-version >>
SOLTEST_FLAGS: --enforce-via-yul
OPTIMIZE: 0
TERM: xterm
<<: *steps_soltest
t_ubu_clang_soltest: &t_ubu_clang_soltest
<<: *base_ubuntu2004_clang
parallelism: 20
@ -1515,7 +1505,6 @@ workflows:
- t_ubu_cli: *workflow_ubuntu2004
- t_ubu_locale: *workflow_ubuntu2004
- t_ubu_soltest_all: *workflow_ubuntu2004
- t_ubu_soltest_enforce_yul: *workflow_ubuntu2004
- b_ubu_clang: *workflow_trigger_on_tags
- t_ubu_clang_soltest: *workflow_ubuntu2004_clang
- t_ubu_lsp: *workflow_ubuntu2004

View File

@ -107,7 +107,6 @@ void CommonOptions::addOptions()
("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-via-yul", po::value<bool>(&enforceViaYul)->default_value(enforceViaYul)->implicit_value(true), "Enforce compiling all tests via yul to see if additional tests can be activated.")
("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<bool>(&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.")

View File

@ -60,7 +60,6 @@ struct CommonOptions
boost::filesystem::path testPath;
bool ewasm = false;
bool optimize = false;
bool enforceViaYul = false;
bool enforceCompileToEwasm = false;
bool enforceGasTest = false;
u256 enforceGasTestMinValue = 100000;

View File

@ -40,7 +40,6 @@ public:
std::string filename;
langutil::EVMVersion evmVersion;
std::vector<boost::filesystem::path> vmPaths;
bool enforceCompileViaYul = false;
bool enforceCompileToEwasm = false;
bool enforceGasCost = false;
u256 enforceGasCostMinValue;

View File

@ -133,7 +133,6 @@ int registerTests(
boost::unit_test::test_suite& _suite,
boost::filesystem::path const& _basepath,
boost::filesystem::path const& _path,
bool _enforceViaYul,
bool _enforceCompileToEwasm,
vector<string> const& _labels,
TestCase::TestCaseCreator _testCaseCreator,
@ -146,7 +145,6 @@ int registerTests(
fullpath.string(),
solidity::test::CommonOptions::get().evmVersion(),
solidity::test::CommonOptions::get().vmPaths,
_enforceViaYul,
_enforceCompileToEwasm,
solidity::test::CommonOptions::get().enforceGasTest,
solidity::test::CommonOptions::get().enforceGasTestMinValue,
@ -165,7 +163,6 @@ int registerTests(
numTestsAdded += registerTests(
*sub_suite,
_basepath, _path / entry.path().filename(),
_enforceViaYul,
_enforceCompileToEwasm,
_labels,
_testCaseCreator,
@ -271,7 +268,6 @@ test_suite* init_unit_test_suite(int /*argc*/, char* /*argv*/[])
master,
options.testPath / ts.path,
ts.subpath,
options.enforceViaYul,
options.enforceCompileToEwasm,
ts.labels,
ts.testCaseCreator,

View File

@ -49,7 +49,6 @@ SemanticTest::SemanticTest(
string const& _filename,
langutil::EVMVersion _evmVersion,
vector<boost::filesystem::path> const& _vmPaths,
bool _enforceViaYul,
bool _enforceCompileToEwasm,
bool _enforceGasCost,
u256 _enforceGasCostMinValue
@ -60,27 +59,32 @@ SemanticTest::SemanticTest(
m_lineOffset(m_reader.lineNumber()),
m_builtins(makeBuiltins()),
m_sideEffectHooks(makeSideEffectHooks()),
m_enforceViaYul(_enforceViaYul),
m_enforceCompileToEwasm(_enforceCompileToEwasm),
m_enforceGasCost(_enforceGasCost),
m_enforceGasCostMinValue(move(_enforceGasCostMinValue))
{
static set<string> const compileViaYulAllowedValues{"also", "true", "false", "default"};
static set<string> const compileViaYulAllowedValues{"also", "true", "false"};
static set<string> const yulRunTriggers{"also", "true"};
static set<string> const legacyRunTriggers{"also", "false", "default"};
string compileViaYul = m_reader.stringSetting("compileViaYul", "default");
m_runWithABIEncoderV1Only = m_reader.boolSetting("ABIEncoderV1Only", false);
if (m_runWithABIEncoderV1Only && !solidity::test::CommonOptions::get().useABIEncoderV1)
m_shouldRun = false;
string compileViaYul = m_reader.stringSetting("compileViaYul", "also");
if (m_runWithABIEncoderV1Only && compileViaYul != "false")
BOOST_THROW_EXCEPTION(runtime_error(
"ABIEncoderV1Only tests cannot be run via yul, "
"so they need to also specify ``compileViaYul: false``"
));
if (!util::contains(compileViaYulAllowedValues, compileViaYul))
BOOST_THROW_EXCEPTION(runtime_error("Invalid compileViaYul value: " + compileViaYul + "."));
m_testCaseWantsYulRun = util::contains(yulRunTriggers, compileViaYul);
m_testCaseWantsLegacyRun = util::contains(legacyRunTriggers, compileViaYul);
// Do not enforce via yul and ewasm, if via yul was explicitly denied.
// Do not enforce ewasm, if via yul was explicitly denied.
if (compileViaYul == "false")
{
m_enforceViaYul = false;
m_enforceCompileToEwasm = false;
}
string compileToEwasm = m_reader.stringSetting("compileToEwasm", "false");
if (compileToEwasm == "also")
@ -97,18 +101,6 @@ SemanticTest::SemanticTest(
if (m_testCaseWantsEwasmRun && !m_supportsEwasm)
m_testCaseWantsEwasmRun = false;
m_runWithABIEncoderV1Only = m_reader.boolSetting("ABIEncoderV1Only", false);
if (m_runWithABIEncoderV1Only && !solidity::test::CommonOptions::get().useABIEncoderV1)
m_shouldRun = false;
// Sanity check
if (m_runWithABIEncoderV1Only && (compileViaYul == "true" || compileViaYul == "also"))
BOOST_THROW_EXCEPTION(runtime_error(
"ABIEncoderV1Only can not be used with compileViaYul=" + compileViaYul +
", set it to false or omit the flag. The compileViaYul setting ignores the abicoder pragma"
" and runs everything with ABICoder V2."
));
auto revertStrings = revertStringsFromString(m_reader.stringSetting("revertStrings", "default"));
soltestAssert(revertStrings, "Invalid revertStrings setting.");
m_revertStrings = revertStrings.value();
@ -307,7 +299,7 @@ TestCase::TestResult SemanticTest::run(ostream& _stream, string const& _linePref
if (m_testCaseWantsLegacyRun)
result = runTest(_stream, _linePrefix, _formatted, false, false);
if ((m_testCaseWantsYulRun || m_enforceViaYul) && result == TestResult::Success)
if (m_testCaseWantsYulRun && result == TestResult::Success)
result = runTest(_stream, _linePrefix, _formatted, true, false);
if ((m_testCaseWantsEwasmRun || m_enforceCompileToEwasm) && result == TestResult::Success)
@ -353,7 +345,6 @@ TestCase::TestResult SemanticTest::runTest(
m_compileToEwasm = _isEwasmRun;
}
m_canEnableYulRun = false;
m_canEnableEwasmRun = false;
if (_isYulRun)
@ -473,18 +464,6 @@ TestCase::TestResult SemanticTest::runTest(
success &= test.call().expectedSideEffects == test.call().actualSideEffects;
}
if (!m_testCaseWantsYulRun && _isYulRun)
{
m_canEnableYulRun = success;
string message = success ?
"Test can pass via Yul, but marked with \"compileViaYul: false.\"" :
"Test compiles via Yul, but it gives different test results.";
AnsiColorized(_stream, _formatted, {BOLD, success ? YELLOW : MAGENTA}) <<
_linePrefix << endl <<
_linePrefix << message << endl;
return TestResult::Failure;
}
// 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.
@ -662,25 +641,19 @@ 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_canEnableYulRun)
if (settings.empty() && !m_canEnableEwasmRun)
return;
_stream << _linePrefix << "// ====" << endl;
if (m_canEnableEwasmRun)
{
soltestAssert(m_canEnableYulRun || m_testCaseWantsYulRun, "");
string compileViaYul = m_reader.stringSetting("compileViaYul", "");
if (!compileViaYul.empty())
_stream << _linePrefix << "// compileViaYul: " << compileViaYul << "\n";
soltestAssert(m_testCaseWantsYulRun, "");
_stream << _linePrefix << "// compileToEwasm: also\n";
}
else if (m_canEnableYulRun)
_stream << _linePrefix << "// compileViaYul: also\n";
for (auto const& [settingName, settingValue]: settings)
if (
!(settingName == "compileToEwasm" && m_canEnableEwasmRun) &&
!(settingName == "compileViaYul" && (m_canEnableYulRun || m_canEnableEwasmRun))
!(settingName == "compileToEwasm" && m_canEnableEwasmRun)
)
_stream << _linePrefix << "// " << settingName << ": " << settingValue<< endl;
}

View File

@ -52,7 +52,6 @@ public:
_options.filename,
_options.evmVersion,
_options.vmPaths,
_options.enforceCompileViaYul,
_options.enforceCompileToEwasm,
_options.enforceGasCost,
_options.enforceGasCostMinValue
@ -63,7 +62,6 @@ public:
std::string const& _filename,
langutil::EVMVersion _evmVersion,
std::vector<boost::filesystem::path> const& _vmPaths,
bool _enforceViaYul = false,
bool _enforceCompileToEwasm = false,
bool _enforceGasCost = false,
u256 _enforceGasCostMinValue = 100000
@ -97,14 +95,12 @@ private:
std::vector<TestFunctionCall> m_tests;
std::map<std::string, Builtin> const m_builtins;
std::vector<SideEffectHook> const m_sideEffectHooks;
bool m_testCaseWantsYulRun = false;
bool m_testCaseWantsYulRun = true;
bool m_testCaseWantsEwasmRun = false;
bool m_testCaseWantsLegacyRun = true;
bool m_enforceViaYul = false;
bool m_enforceCompileToEwasm = false;
bool m_runWithABIEncoderV1Only = false;
bool m_allowNonExistingFunctions = false;
bool m_canEnableYulRun = false;
bool m_canEnableEwasmRun = false;
bool m_gasCostFailure = false;
bool m_enforceGasCost = false;

View File

@ -4,7 +4,5 @@ contract C {
}
}
// ====
// compileViaYul: also
// ----
// f(bytes): 0x20, 0xc0, 0x20, 0x4, 0x3, 0x4, 0x5, 0x6 -> 0x20, 0x4, 0x3, 0x4, 0x5, 0x6

View File

@ -4,7 +4,5 @@ contract C {
return (a[i], b[j][k]);
}
}
// ====
// compileViaYul: also
// ----
// f(uint16[3],uint16[2][3],uint256,uint256,uint256): 1, 2, 3, 11, 12, 21, 22, 31, 32, 1, 2, 1 -> 2, 32

View File

@ -8,7 +8,5 @@ contract C {
}
}
// ====
// compileViaYul: also
// ----
// f(bytes): 0x20, 0xc0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6 -> 1, 2, 3, 4, 5, 6

View File

@ -11,7 +11,5 @@ contract C {
}
}
// ====
// compileViaYul: also
// ----
// f(bytes): 0x20, 0xc0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6 -> 1, 2, 3, 4, 5, 6

View File

@ -4,7 +4,5 @@ contract C {
}
}
// ====
// compileViaYul: also
// ----
// f(bytes): 0x20, 0x20, 0x21 -> 33

View File

@ -18,7 +18,5 @@ contract C {
}
}
// ====
// compileViaYul: also
// ----
// f() -> 0x20, 0x8, 0x40, 0x3, 0x9, 0xa, 0xb

View File

@ -12,7 +12,5 @@ contract C {
}
}
// ====
// compileViaYul: also
// ----
// f(bytes): 0x20, 0xe0, 0x20, 0x21, 0x40, 0x3, 0xa, 0xb, 0xc -> 0x20, 0x21, 0x40, 0x3, 0xa, 0xb, 0xc

View File

@ -20,8 +20,6 @@ contract C {
}
}
// ====
// compileViaYul: also
// ----
// f() -> 0x20, 0x8, 0x40, 0x3, 0x9, 0xa, 0xb
// gas irOptimized: 203310

View File

@ -30,7 +30,6 @@ contract C {
// ====
// compileToEwasm: also
// compileViaYul: also
// ----
// f0() -> 0x20, 0x0
// f1() -> 0x20, 0x40, 0x1, 0x2

View File

@ -22,7 +22,5 @@ contract C {
}
}
// ====
// compileViaYul: also
// ----
// f() -> true

View File

@ -57,7 +57,6 @@ contract C {
}
// ====
// EVMVersion: >homestead
// compileViaYul: also
// ----
// test_bytes() ->
// gas irOptimized: 371912

View File

@ -7,6 +7,5 @@ contract C {
// ====
// compileToEwasm: also
// compileViaYul: also
// ----
// f() -> 0x21, 0x40, 0x7, "abcdefg"

View File

@ -7,6 +7,5 @@ contract C {
// ====
// compileToEwasm: also
// compileViaYul: also
// ----
// f() -> 0x20, 0x40, 0x1, -2

View File

@ -4,6 +4,7 @@ contract C {
}
// ====
// ABIEncoderV1Only: true
// compileViaYul: false
// ----
// f(bool): true -> true
// f(bool): false -> false

View File

@ -9,8 +9,6 @@ contract C {
return (a, b.length, b[3], c);
}
}
// ====
// compileViaYul: also
// ----
// f(uint256,bytes,uint256): 6, 0x60, 9, 7, "abcdefg" -> 6, 7, "d", 9
// f_external(uint256,bytes,uint256): 6, 0x60, 9, 7, "abcdefg" -> 6, 7, "d", 9

View File

@ -5,6 +5,5 @@ contract C {
}
// ====
// compileToEwasm: also
// compileViaYul: also
// ----
// f(uint256,uint256[],uint256): 6, 0x60, 9, 0x8000000000000000000000000000000000000000000000000000000000000002, 1, 2 -> FAILURE

View File

@ -7,6 +7,7 @@ contract C {
}
// ====
// ABIEncoderV1Only: true
// compileViaYul: false
// ----
// 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 -> 0xffff, 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff, 0xffffffffffffffffffffffffffffffffffffffff, "abc", true

View File

@ -8,6 +8,5 @@ contract C {
// ====
// compileToEwasm: also
// compileViaYul: also
// ----
// f(uint256,uint256): 42, 23 -> 42, 23, 42, 23

View File

@ -4,7 +4,5 @@ contract C {
return (b.length, b[a], c);
}
}
// ====
// compileViaYul: also
// ----
// f(uint256,uint16[],uint256): 6, 0x60, 9, 7, 11, 12, 13, 14, 15, 16, 17 -> 7, 17, 9

View File

@ -19,8 +19,6 @@ contract C {
}
}
// ====
// compileViaYul: also
// ----
// test(bytes): 0x20, 0x80, 0x40, 0x60, 0, 0 -> false, false
// test(bytes): 0x20, 0xC0, 0x40, 0x80, 1, 0x42, 1, 0x42 -> false, false

View File

@ -7,6 +7,7 @@ contract C {
}
// ====
// ABIEncoderV1Only: true
// compileViaYul: false
// ----
// f(uint8): 0 -> 0
// f(uint8): 1 -> 1

View File

@ -12,7 +12,5 @@ contract C {
return this.f("abc", "def", x);
}
}
// ====
// compileViaYul: also
// ----
// g() -> 3, 0x6200000000000000000000000000000000000000000000000000000000000000, 3, 0x6600000000000000000000000000000000000000000000000000000000000000, 4, 7

View File

@ -13,6 +13,5 @@ contract C {
}
// ====
// EVMVersion: >homestead
// compileViaYul: also
// ----
// f() -> 0x80, -1, 0xe0, 0x1234, 40, "12345678901234567890123456789012", "34567890", 4, 97767552542602192590433234714624, 0, 0, 537879995309340587922569878831104

View File

@ -12,7 +12,6 @@ contract C {
}
}
// ====
// compileViaYul: also
// EVMVersion: =homestead
// ----
// f(uint256): 0x60 -> true

View File

@ -13,7 +13,6 @@ contract C {
}
// ====
// EVMVersion: >homestead
// compileViaYul: also
// ----
// f(uint256): 0x60 -> FAILURE
// f(uint256): 0x61 -> true

View File

@ -8,6 +8,5 @@ contract C {
}
// ====
// EVMVersion: >homestead
// compileViaYul: also
// ----
// f() -> 0x20, 40, "12345678901234567890123456789012", "34567890"

View File

@ -21,8 +21,6 @@ contract C {
return (r[2], s.x, a, b, c, d);
}
}
// ====
// compileViaYul: also
// ----
// library: L
// f() -> 8, 7, 1, 2, 7, 12

View File

@ -58,7 +58,6 @@ contract C {
}
// ====
// EVMVersion: >homestead
// compileViaYul: also
// ----
// test_bytes() ->
// gas irOptimized: 371912

View File

@ -11,6 +11,5 @@ contract C {
// ====
// compileToEwasm: also
// compileViaYul: also
// ----
// f() -> 0x40, 0xa0, 0x40, 0x20, 0x0, 0x0

View File

@ -10,6 +10,5 @@ contract C {
// ====
// compileToEwasm: also
// compileViaYul: also
// ----
// f() -> 0x20, 0x40, 0x1, -2

View File

@ -45,8 +45,6 @@ contract C {
}
}
// ====
// compileViaYul: also
// ----
// f0() -> 0x20, 0x0
// f1() -> 0x20, 0x40, 0x1, 0x2

View File

@ -28,8 +28,6 @@ contract C is B {
return foo(new A());
}
}
// ====
// compileViaYul: also
// ----
// test() -> 77
// gas irOptimized: 119711

View File

@ -36,8 +36,6 @@ contract C is B {
return (x, y);
}
}
// ====
// compileViaYul: also
// ----
// test() -> 5, 10
// gas irOptimized: 87337

View File

@ -5,7 +5,6 @@ contract C {
}
// ====
// compileToEwasm: also
// compileViaYul: also
// ----
// f(bool): true -> true
// f(bool): false -> false

View File

@ -11,8 +11,6 @@ contract C {
return (a, b.length, b[3], c);
}
}
// ====
// compileViaYul: also
// ----
// f(uint256,bytes,uint256): 6, 0x60, 9, 7, "abcdefg" -> 6, 7, "d", 9
// f_external(uint256,bytes,uint256): 6, 0x60, 9, 7, "abcdefg" -> 6, 7, "d", 9

View File

@ -16,7 +16,6 @@ contract C {
}
// ====
// EVMVersion: >homestead
// compileViaYul: also
// ----
// f(uint256[][1]): 32, 32, 0 -> true
// f(uint256[][1]): 32, 32, 1, 42 -> true

View File

@ -22,7 +22,6 @@ contract C {
}
// ====
// EVMVersion: >homestead
// compileViaYul: also
// ----
// f(uint256[]): 32, 3, 23, 42, 87 -> 32, 160, 32, 3, 23, 42, 87
// g(uint256[]): 32, 3, 23, 42, 87 -> 32, 160, 32, 3, 23, 42, 87

View File

@ -22,7 +22,6 @@ contract C {
}
// ====
// EVMVersion: >homestead
// compileViaYul: also
// ----
// f(uint256[]): 32, 3, 42, 23, 87 -> 32, 160, 32, 3, 42, 23, 87
// g(uint256[][2],uint256): 0x40, 0, 0x40, 0xC0, 3, 42, 23, 87, 4, 11, 13, 17 -> 32, 160, 32, 3, 42, 23, 87

View File

@ -44,7 +44,6 @@ contract C {
}
// ====
// EVMVersion: >homestead
// compileViaYul: also
// ----
// g() -> 32, 196, hex"eccb829a", 32, 1, 32, 32, 1, 42, hex"00000000000000000000000000000000000000000000000000000000"
// h() -> 32, 196, hex"eccb829a", 32, 1, 32, 32, 1, 42, hex"00000000000000000000000000000000000000000000000000000000"

View File

@ -7,7 +7,6 @@ contract C {
}
// ====
// compileToEwasm: also
// compileViaYul: 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 #

View File

@ -7,8 +7,6 @@ contract C {
return this.f(x);
}
}
// ====
// compileViaYul: also
// ----
// g(uint256[][2][]): 0x20, 0x01, 0x20, 0x40, 0x60, 0x00, 0x00 -> 42
// g(uint256[][2][]): 0x20, 0x01, 0x20, 0x00, 0x00 -> 42

View File

@ -25,8 +25,6 @@ contract C {
return reenc ? this.f_reenc(a) : this.f(a);
}
}
// ====
// compileViaYul: also
// ----
// g(bool): false -> 23, 37, 71
// g(bool): true -> 23, 37, 71

View File

@ -22,7 +22,6 @@ contract C {
}
// ====
// EVMVersion: >homestead
// compileViaYul: also
// ----
// f(uint256[][]): 0x20, 2, 0x40, 0xC0, 3, 13, 17, 23, 4, 27, 31, 37, 41 -> 32, 416, 32, 2, 64, 192, 3, 13, 17, 23, 4, 27, 31, 37, 41
// g(uint256[][]): 0x20, 2, 0x40, 0xC0, 3, 13, 17, 23, 4, 27, 31, 37, 41 -> 32, 416, 32, 2, 64, 192, 3, 13, 17, 23, 4, 27, 31, 37, 41

View File

@ -5,7 +5,6 @@ contract C {
}
// ====
// revertStrings: debug
// compileViaYul: also
// ----
// f(uint256[]): 0x20, 0 ->
// f(uint256[]): 0x20, 1 -> FAILURE, hex"08c379a0", 0x20, 0x2b, "ABI decoding: invalid calldata a", "rray stride"

View File

@ -1,8 +1,6 @@
contract C {
function f(uint[] calldata) public {}
}
// ====
// compileViaYul: also
// ----
// f(uint256[]): 0x20, 0 ->
// f(uint256[]): 0x20, 1 -> FAILURE

View File

@ -16,7 +16,6 @@ contract C {
}
// ====
// EVMVersion: >homestead
// compileViaYul: also
// ----
// f(uint256[3]): 23, 42, 87 -> 32, 96, 23, 42, 87
// g(uint256[3]): 23, 42, 87 -> 32, 96, 23, 42, 87

View File

@ -42,7 +42,6 @@ contract C {
}
// ====
// EVMVersion: >homestead
// compileViaYul: also
// ----
// g() -> 32, 132, hex"15cfcc01", 32, 32, 1, 42, hex"00000000000000000000000000000000000000000000000000000000"
// h() -> 32, 132, hex"15cfcc01", 32, 32, 1, 42, hex"00000000000000000000000000000000000000000000000000000000"

View File

@ -16,7 +16,6 @@ contract C {
}
// ====
// EVMVersion: >homestead
// compileViaYul: also
// ----
// f(uint256[3]): 23, 42, 87 -> 32, 96, 23, 42, 87
// g(uint256[3][2],uint256): 23, 42, 87, 123, 142, 187, 0 -> 32, 96, 23, 42, 87

View File

@ -11,7 +11,6 @@ contract C {
}
// ====
// EVMVersion: >homestead
// compileViaYul: also
// ----
// f((uint256[])[]): 32, 1, 32, 32, 3, 17, 42, 23 -> 32, 256, 32, 1, 32, 32, 3, 17, 42, 23
// g((uint256[])[]): 32, 1, 32, 32, 3, 17, 42, 23 -> 32, 256, 32, 1, 32, 32, 3, 17, 42, 23

View File

@ -13,7 +13,6 @@ contract C {
}
// ====
// EVMVersion: >homestead
// compileViaYul: also
// ----
// f(uint256[],uint256[],bool): 0x60, 0xE0, true, 3, 23, 42, 87, 2, 51, 72 -> 32, 160, 0x20, 3, 23, 42, 87
// f(uint256[],uint256[],bool): 0x60, 0xE0, false, 3, 23, 42, 87, 2, 51, 72 -> 32, 128, 0x20, 2, 51, 72

View File

@ -13,7 +13,6 @@ contract C {
}
// ====
// EVMVersion: >homestead
// compileViaYul: also
// ----
// f(uint256[3],uint256[2],bool): 23, 42, 87, 51, 72, true -> 32, 96, 23, 42, 87
// f(uint256[3],uint256[2],bool): 23, 42, 87, 51, 72, false -> 32, 64, 51, 72

View File

@ -10,7 +10,6 @@ contract C {
}
}
// ====
// compileViaYul: also
// revertStrings: debug
// ----
// h(uint256[][]): 0x20, 1, 0x20, 0 ->

View File

@ -11,8 +11,6 @@ contract C {
abi.encode(a);
}
}
// ====
// compileViaYul: also
// ----
// f(uint256[3][]): 0x20, 1, 0x01 -> FAILURE
// f(uint256[3][]): 0x20, 1, 0x01, 0x02 -> FAILURE

View File

@ -13,7 +13,6 @@ contract C {
}
// ====
// EVMVersion: >homestead
// compileViaYul: also
// ----
// f((uint256[])): 0x20, 0x20, 3, 42, 23, 17 -> 32, 192, 0x20, 0x20, 3, 42, 23, 17
// g((uint256[])): 0x20, 0x20, 3, 42, 23, 17 -> 32, 192, 0x20, 0x20, 3, 42, 23, 17

View File

@ -19,7 +19,5 @@ contract C {
return (b.b, this.g(b));
}
}
// ====
// compileViaYul: also
// ----
// f() -> 11, 11

View File

@ -13,7 +13,6 @@ contract C {
}
// ====
// EVMVersion: >homestead
// compileViaYul: also
// ----
// f((uint256)): 3 -> 32, 32, 3
// g((uint256)): 3 -> 32, 32, 3

View File

@ -10,8 +10,6 @@ contract C {
return this.g(x);
}
}
// ====
// compileViaYul: also
// ----
// f(uint256): 0 -> 0
// g(address): 0 -> 0 # test validation as well as sanity check #

View File

@ -10,8 +10,6 @@ contract C {
return this.gggg(x);
}
}
// ====
// compileViaYul: also
// ----
// f(uint256): 0 -> false
// gggg(bool): 0 -> false # test validation as well as sanity check #

View File

@ -42,8 +42,6 @@ contract C {
return this.g16(x);
}
}
// ====
// compileViaYul: also
// ----
// f1(bytes32): left(0) -> left(0)
// gg1(bytes1): left(0) -> left(0) # test validation as well as sanity check #

View File

@ -8,7 +8,6 @@ contract C {
}
// ====
// compileToEwasm: also
// compileViaYul: 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

View File

@ -15,7 +15,6 @@ contract C {
}
// ====
// EVMVersion: >homestead
// compileViaYul: also
// ----
// f(uint256[]): 0x20, 2, 1, 1 -> 0x20, 0x84, hex"304a4c23", 0x20, 2, 1, 1, hex"00000000000000000000000000000000000000000000000000000000"
// ggg(uint8[]): 0x20, 2, 1, 1 -> 0x20, 0x84, hex"304a4c23", 0x20, 2, 1, 1, hex"00000000000000000000000000000000000000000000000000000000"

View File

@ -16,8 +16,6 @@ contract C {
return (this.ggg(s.f), this.h(s));
}
}
// ====
// compileViaYul: also
// ----
// ffff(uint256): 0 -> 0, 0
// ggg(function): 0 -> 0

View File

@ -42,8 +42,6 @@ contract C {
return this.g128(x);
}
}
// ====
// compileViaYul: also
// ----
// f8(int256): 0 -> 0
// ggg8(int8): 0 -> 0 # test validation as well as sanity check #

View File

@ -17,7 +17,6 @@ contract C {
}
// ====
// EVMVersion: >homestead
// compileViaYul: also
// ----
// f(uint256,bytes32): 1, left(0x01) -> 0x20, 0x44, hex"b63240b0", 1, left(0x01), hex"00000000000000000000000000000000000000000000000000000000"
// gg((uint8,bytes1)): 1, left(0x01) -> 0x20, 0x44, hex"b63240b0", 1, left(0x01), hex"00000000000000000000000000000000000000000000000000000000"

View File

@ -16,7 +16,6 @@ contract C {
}
// ====
// EVMVersion: >homestead
// compileViaYul: also
// ----
// f(uint256,uint256): 1, 1 -> 0x20, 0x44, hex"78b86ac6", 1, 1, hex"00000000000000000000000000000000000000000000000000000000"
// gggggggg(uint8[2]): 1, 1 -> 0x20, 0x44, hex"78b86ac6", 1, 1, hex"00000000000000000000000000000000000000000000000000000000"

View File

@ -42,8 +42,6 @@ contract C {
return this.g128(x);
}
}
// ====
// compileViaYul: also
// ----
// f8(uint256): 0 -> 0
// ggg8(uint8): 0 -> 0 # test validation as well as sanity check #

View File

@ -6,7 +6,5 @@ contract C {
return (b.length, b[a], c);
}
}
// ====
// compileViaYul: also
// ----
// f(uint256,uint16[],uint256): 6, 0x60, 9, 7, 11, 12, 13, 14, 15, 16, 17 -> 7, 17, 9

View File

@ -25,8 +25,6 @@ contract C {
return this.f(12, b, c, 13);
}
}
// ====
// compileViaYul: also
// ----
// test() -> 12, 3, 4, 0x66, 5, 0x85, 13
// f(uint256,uint16[][],uint256[2][][3],uint256): 12, 0x80, 0x220, 13, 3, 0x60, 0xC0, 0x160, 2, 85, 86, 4, 101, 102, 103, 104, 0, 0x60, 0xC0, 0x220, 1, 0, 117, 5, 0, 0, 0, 133, 0, 0, 0, 0, 0, 0, 0 -> 12, 3, 4, 0x66, 5, 0x85, 13

View File

@ -8,7 +8,6 @@ contract C {
}
// ====
// compileToEwasm: also
// compileViaYul: also
// ----
// f(uint8): 0 -> 0
// f(uint8): 1 -> 1

View File

@ -14,7 +14,5 @@ contract C {
return this.f("abc", "def", x);
}
}
// ====
// compileViaYul: also
// ----
// g() -> 3, 0x6200000000000000000000000000000000000000000000000000000000000000, 3, 0x6600000000000000000000000000000000000000000000000000000000000000, 4, 7

View File

@ -16,7 +16,6 @@ contract C {
}
// ====
// EVMVersion: >homestead
// compileViaYul: also
// ----
// h(uint256[2][]): 0x20, 3, 123, 124, 223, 224, 323, 324 -> 32, 256, 0x20, 3, 123, 124, 223, 224, 323, 324
// gas irOptimized: 180924

View File

@ -8,7 +8,5 @@ contract C {
r3 = b;
}
}
// ====
// compileViaYul: also
// ----
// f(uint256,(address,uint256[])[2],uint256): 7, 0x60, 8, 0x40, 0xE0, 0x0, 0x40, 2, 0x11, 0x12, 0x99, 0x40, 4, 0x31, 0x32, 0x34, 0x35 -> 7, 0x0, 8

View File

@ -8,7 +8,5 @@ contract C {
r3 = b;
}
}
// ====
// compileViaYul: also
// ----
// f(uint256,(address)[2],uint256): 7, 0, 0, 8 -> 7, 0, 8

View File

@ -10,7 +10,5 @@ contract C {
}
function g() public returns (uint) { return 7; }
}
// ====
// compileViaYul: also
// ----
// test() -> 7, 3

View File

@ -8,7 +8,6 @@ contract C {
}
// ====
// compileToEwasm: also
// compileViaYul: also
// ----
// f((int256,uint256,bytes16)): 0xff010, 0xff0002, "abcd" -> 0xff010, 0xff0002, "abcd"
// f((int256,uint256,bytes16)): 0xff010, 0xff0002, 0x1111222233334444555566667777888800000000000000000000000000000000 -> 0xff010, 0xff0002, left(0x11112222333344445555666677778888)

View File

@ -11,6 +11,5 @@ contract C {
}
// ====
// compileToEwasm: also
// compileViaYul: also
// ----
// f((uint256,uint8,uint8,bytes2)): 1, 2, 3, "ab" -> 1, 2, 3, 0x6162

View File

@ -11,7 +11,6 @@ contract C {
}
}
// ====
// compileViaYul: also
// compileToEwasm: also
// ----
// f((int16,uint8,bytes2)): 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01, 0xff, "ab" -> 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01, 0xff, "ab"

View File

@ -7,7 +7,6 @@ contract C {
function h(S calldata s) external pure returns (uint r) { s.x; r = 3; }
}
// ====
// compileViaYul: also
// compileToEwasm: also
// ----
// f((function)): "01234567890123456789abcd" -> 1

View File

@ -8,7 +8,5 @@ contract C {
}
}
// ====
// compileViaYul: also
// ----
// f(bytes): 0x20, 0x80, 0x21, 0x40, 0x7, "abcdefg" -> 0x21, 0x40, 0x7, "abcdefg"

View File

@ -4,7 +4,5 @@ contract C {
}
}
// ====
// compileViaYul: also
// ----
// f(bytes): 0x20, 0x80, 0x21, 0x40, 0x7, "abcdefg" -> 0x21, 0x40, 0x7, "abcdefg"

View File

@ -7,8 +7,6 @@ contract C {
}
}
// ====
// compileViaYul: also
// ----
// f(bytes): 0x20, 0x80, 0x21, 0x40, 0x7, "abcdefg" -> 0x21, 0x40, 0x7, "abcdefg"
// gas irOptimized: 135918

View File

@ -45,7 +45,5 @@ contract C {
}
}
// ====
// compileViaYul: also
// ----
// callExternal() -> true

View File

@ -48,7 +48,6 @@ contract C is Base {
}
// ====
// compileViaYul: also
// EVMVersion: >=byzantium
// ----
// test() -> 11116

View File

@ -49,8 +49,6 @@ contract C {
assert(keccak256(fReturnedFunctionPointer()) == keccak256(fSignatureFromLiteral()));
}
}
// ====
// compileViaYul: also
// ----
// assertConsistentSelectors() ->
// fSignatureFromLiteral() -> 0x20, 0x84, 23450202028776381066253055403048136312616272755117076566855971503345107992576, 26959946667150639794667015087019630673637144422540572481103610249216, 1725436586697640946858688965569256363112777243042596638790631055949824, 86060793054017993816230018372407419485142305772921726565498526629888, 0

View File

@ -22,7 +22,5 @@ contract C {
}
}
// ====
// compileViaYul: also
// ----
// test() -> 0xa7a0d53700000000000000000000000000000000000000000000000000000000

View File

@ -36,8 +36,6 @@ contract C {
assert(keccak256(fSignatureFromLiteralUint()) == keccak256(fPointerUint()));
}
}
// ====
// compileViaYul: also
// ----
// assertConsistentSelectors() ->
// fSignatureFromLiteralNoArgs() -> 0x20, 0x04, 12200448252684243758085936796735499259670113115893304444050964496075123064832

View File

@ -14,7 +14,6 @@ contract C {
}
}
// ====
// compileViaYul: also
// EVMVersion: >homestead
// ----
// f() -> 0x20, 0x60, 0x1234000000000000000000000000000000000000000000000000000000000000, 0x6162000000000000000000000000000000000000000000000000000000000000, 0x1234000000000000000000000000000000000000000000000000000000000000

View File

@ -8,5 +8,6 @@ contract C {
}
// ====
// ABIEncoderV1Only: true
// compileViaYul: false
// ----
// f() -> 0x40, 0xa0, 0x40, 0x20, 0x0, 0x0

View File

@ -16,7 +16,6 @@ contract C {
}
}
// ====
// compileViaYul: also
// compileToEwasm: also
// ----
// f0() -> 0x20, 4, 8234104107246695022420661102507966550300666591269321702959126607540084801536

View File

@ -25,7 +25,6 @@ contract C {
}
}
// ====
// compileViaYul: also
// compileToEwasm: also
// ----
// f0() -> 0x20, 4, 8234104107246695022420661102507966550300666591269321702959126607540084801536

View File

@ -25,8 +25,6 @@ contract C {
ar = new uint[](2);
}
}
// ====
// compileViaYul: also
// ----
// f0() -> 0x20, 4, -34435155370463444793260793355178157075203752403645521721995013737368954863616
// f1() -> 0x20, 0x64, -34435155370463444793260793355178157075203752403645521721995013737368954863616, 862718293348820473429344482784628181556388621521298319395315527974912, 91135606241822717681769169345594720818313984248279388438121731325952, 0

View File

@ -33,8 +33,6 @@ contract C {
return abi.encodeWithSignature(s.b, type(uint).max, s, uint(3));
}
}
// ====
// compileViaYul: also
// ----
// f0() -> 0x20, 4, -34435155370463444793260793355178157075203752403645521721995013737368954863616
// f1() -> 0x20, 0x64, -34435155370463444793260793355178157075203752403645521721995013737368954863616, 862718293348820473429344482784628181556388621521298319395315527974912, 91135606241822717681769169345594720818313984248279388438121731325952, 0

View File

@ -10,8 +10,6 @@ contract C {
return abi.encode(c);
}
}
// ====
// compileViaYul: also
// ----
// f(bytes): 0x20, 0xA0, 0x20, 3, 0x01, 0x02, 0x03 -> 0x20, 3, 0x01, 0x02, 0x03
// g() -> 0x20, 0xa0, 0x20, 3, 0x42, 0x21, 0x23

Some files were not shown because too many files have changed in this diff Show More