Merge pull request #11244 from ethereum/berlin-gas-update

Change default EVM version to Berlin and update Gas costs.
This commit is contained in:
chriseth 2021-05-26 13:34:04 +02:00 committed by GitHub
commit caa833909d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
149 changed files with 653 additions and 541 deletions

View File

@ -28,7 +28,9 @@ set -e
REPODIR="$(realpath "$(dirname "$0")"/..)" REPODIR="$(realpath "$(dirname "$0")"/..)"
EVM_VALUES=(homestead byzantium constantinople petersburg istanbul) EVM_VALUES=(homestead byzantium constantinople petersburg istanbul berlin)
DEFAULT_EVM=berlin
[[ " ${EVM_VALUES[*]} " =~ $DEFAULT_EVM ]]
OPTIMIZE_VALUES=(0 1) OPTIMIZE_VALUES=(0 1)
STEPS=$(( 1 + ${#EVM_VALUES[@]} * ${#OPTIMIZE_VALUES[@]} )) STEPS=$(( 1 + ${#EVM_VALUES[@]} * ${#OPTIMIZE_VALUES[@]} ))
@ -45,7 +47,7 @@ STEP=1
# Run for ABI encoder v1, without SMTChecker tests. # Run for ABI encoder v1, without SMTChecker tests.
[[ " $RUN_STEPS " == *" $STEP "* ]] && EVM=istanbul OPTIMIZE=1 ABI_ENCODER_V1=1 BOOST_TEST_ARGS="-t !smtCheckerTests" "${REPODIR}/.circleci/soltest.sh" [[ " $RUN_STEPS " == *" $STEP "* ]] && EVM="${DEFAULT_EVM}" OPTIMIZE=1 ABI_ENCODER_V1=1 BOOST_TEST_ARGS="-t !smtCheckerTests" "${REPODIR}/.circleci/soltest.sh"
STEP=$((STEP + 1)) STEP=$((STEP + 1))
for OPTIMIZE in "${OPTIMIZE_VALUES[@]}" for OPTIMIZE in "${OPTIMIZE_VALUES[@]}"
@ -56,7 +58,7 @@ do
EWASM_ARGS="" EWASM_ARGS=""
[ "${EVM}" = "byzantium" ] && [ "${OPTIMIZE}" = "0" ] && EWASM_ARGS="--ewasm" [ "${EVM}" = "byzantium" ] && [ "${OPTIMIZE}" = "0" ] && EWASM_ARGS="--ewasm"
ENFORCE_GAS_ARGS="" ENFORCE_GAS_ARGS=""
[ "${EVM}" = "istanbul" ] && ENFORCE_GAS_ARGS="--enforce-gas-cost" [ "${EVM}" = "${DEFAULT_EVM}" ] && ENFORCE_GAS_ARGS="--enforce-gas-cost"
# Run SMTChecker tests only when OPTIMIZE == 0 # Run SMTChecker tests only when OPTIMIZE == 0
DISABLE_SMTCHECKER="" DISABLE_SMTCHECKER=""
[ "${OPTIMIZE}" != "0" ] && DISABLE_SMTCHECKER="-t !smtCheckerTests" [ "${OPTIMIZE}" != "0" ] && DISABLE_SMTCHECKER="-t !smtCheckerTests"

View File

@ -6,6 +6,7 @@ Language Features:
Compiler Features: Compiler Features:
* EVM: Set the default EVM version to "Berlin".
* SMTChecker: Function definitions can be annotated with the custom Natspec tag ``custom:smtchecker abstract-function-nondet`` to be abstracted by a nondeterministic value when called. * SMTChecker: Function definitions can be annotated with the custom Natspec tag ``custom:smtchecker abstract-function-nondet`` to be abstracted by a nondeterministic value when called.
* Standard JSON / combined JSON: New artifact "functionDebugData" that contains bytecode offsets of entry points of functions and potentially more information in the future. * Standard JSON / combined JSON: New artifact "functionDebugData" that contains bytecode offsets of entry points of functions and potentially more information in the future.
* Yul Optimizer: Evaluate ``keccak256(a, c)``, when the value at memory location ``a`` is known at compile time and ``c`` is a constant ``<= 32``. * Yul Optimizer: Evaluate ``keccak256(a, c)``, when the value at memory location ``a`` is known at compile time and ``c`` is a constant ``<= 32``.

View File

@ -158,9 +158,12 @@ at each version. Backward compatibility is not guaranteed between each version.
- Shifting operators use shifting opcodes and thus need less gas. - Shifting operators use shifting opcodes and thus need less gas.
- ``petersburg`` - ``petersburg``
- The compiler behaves the same way as with constantinople. - The compiler behaves the same way as with constantinople.
- ``istanbul`` (**default**) - ``istanbul``
- Opcodes ``chainid`` and ``selfbalance`` are available in assembly. - Opcodes ``chainid`` and ``selfbalance`` are available in assembly.
- ``berlin`` (**experimental**) - ``berlin`` (**default**)
- Gas costs for ``SLOAD``, ``*CALL``, ``BALANCE``, ``EXT*`` and ``SELFDESTRUCT`` increased. The
compiler assumes cold gas costs for such operations. This is relevant for gas estimation and
the optimizer.
.. _compiler-api: .. _compiler-api:

View File

@ -71,9 +71,9 @@ GasMeter::GasConsumption GasMeter::estimateMax(AssemblyItem const& _item, bool _
m_state->storageContent().count(slot) && m_state->storageContent().count(slot) &&
classes.knownNonZero(m_state->storageContent().at(slot)) classes.knownNonZero(m_state->storageContent().at(slot))
)) ))
gas = GasCosts::sstoreResetGas; //@todo take refunds into account gas = GasCosts::totalSstoreResetGas(m_evmVersion); //@todo take refunds into account
else else
gas = GasCosts::sstoreSetGas; gas = GasCosts::totalSstoreSetGas(m_evmVersion);
break; break;
} }
case Instruction::SLOAD: case Instruction::SLOAD:

View File

@ -18,6 +18,11 @@
/** @file GasMeter.cpp /** @file GasMeter.cpp
* @author Christian <c@ethdev.com> * @author Christian <c@ethdev.com>
* @date 2015 * @date 2015
*
* Utilities for tracking gas costs.
*
* With respect to EIP-2929, we do not track warm accounts or storage slots and they are always
* charged the worst-case, i.e., cold-access.
*/ */
#pragma once #pragma once
@ -47,19 +52,6 @@ namespace GasCosts
static unsigned const tier5Gas = 10; static unsigned const tier5Gas = 10;
static unsigned const tier6Gas = 20; static unsigned const tier6Gas = 20;
static unsigned const tier7Gas = 0; static unsigned const tier7Gas = 0;
inline unsigned extCodeGas(langutil::EVMVersion _evmVersion)
{
return _evmVersion >= langutil::EVMVersion::tangerineWhistle() ? 700 : 20;
}
inline unsigned balanceGas(langutil::EVMVersion _evmVersion)
{
if (_evmVersion >= langutil::EVMVersion::istanbul())
return 700;
else if (_evmVersion >= langutil::EVMVersion::tangerineWhistle())
return 400;
else
return 20;
}
static unsigned const expGas = 10; static unsigned const expGas = 10;
inline unsigned expByteGas(langutil::EVMVersion _evmVersion) inline unsigned expByteGas(langutil::EVMVersion _evmVersion)
{ {
@ -67,18 +59,65 @@ namespace GasCosts
} }
static unsigned const keccak256Gas = 30; static unsigned const keccak256Gas = 30;
static unsigned const keccak256WordGas = 6; static unsigned const keccak256WordGas = 6;
/// Corresponds to COLD_SLOAD_COST from EIP-2929
static unsigned const coldSloadCost = 2100;
/// Corresponds to COLD_ACCOUNT_ACCESS_COST from EIP-2929
static unsigned const coldAccountAccessCost = 2600;
/// Corresponds to WARM_STORAGE_READ_COST from EIP-2929
static unsigned const warmStorageReadCost = 100;
inline unsigned sloadGas(langutil::EVMVersion _evmVersion) inline unsigned sloadGas(langutil::EVMVersion _evmVersion)
{ {
if (_evmVersion >= langutil::EVMVersion::istanbul()) if (_evmVersion >= langutil::EVMVersion::berlin())
return coldSloadCost;
else if (_evmVersion >= langutil::EVMVersion::istanbul())
return 800; return 800;
else if (_evmVersion >= langutil::EVMVersion::tangerineWhistle()) else if (_evmVersion >= langutil::EVMVersion::tangerineWhistle())
return 200; return 200;
else else
return 50; return 50;
} }
/// Corresponds to SSTORE_SET_GAS
static unsigned const sstoreSetGas = 20000; static unsigned const sstoreSetGas = 20000;
static unsigned const sstoreResetGas = 5000; /// Corresponds to SSTORE_RESET_GAS from EIP-2929
static unsigned const sstoreResetGas = 5000 - coldSloadCost;
static unsigned const sstoreRefundGas = 15000; static unsigned const sstoreRefundGas = 15000;
inline static unsigned totalSstoreSetGas(langutil::EVMVersion _evmVersion)
{
if (_evmVersion >= langutil::EVMVersion::berlin())
return sstoreSetGas + coldSloadCost;
else
return sstoreSetGas;
}
/// Corresponds to SSTORE_RESET_GAS from EIP-2929
/// For Berlin, the maximum is SSTORE_RESET_GAS + COLD_SLOAD_COST = 5000
/// For previous versions, it's a fixed 5000
inline unsigned totalSstoreResetGas(langutil::EVMVersion _evmVersion)
{
if (_evmVersion >= langutil::EVMVersion::berlin())
return sstoreResetGas + coldSloadCost;
else
return 5000;
}
inline unsigned extCodeGas(langutil::EVMVersion _evmVersion)
{
if (_evmVersion >= langutil::EVMVersion::berlin())
return coldAccountAccessCost;
else if (_evmVersion >= langutil::EVMVersion::tangerineWhistle())
return 700;
else
return 20;
}
inline unsigned balanceGas(langutil::EVMVersion _evmVersion)
{
if (_evmVersion >= langutil::EVMVersion::berlin())
return coldAccountAccessCost;
else if (_evmVersion >= langutil::EVMVersion::istanbul())
return 700;
else if (_evmVersion >= langutil::EVMVersion::tangerineWhistle())
return 400;
else
return 20;
}
static unsigned const jumpdestGas = 1; static unsigned const jumpdestGas = 1;
static unsigned const logGas = 375; static unsigned const logGas = 375;
static unsigned const logDataGas = 8; static unsigned const logDataGas = 8;
@ -86,14 +125,24 @@ namespace GasCosts
static unsigned const createGas = 32000; static unsigned const createGas = 32000;
inline unsigned callGas(langutil::EVMVersion _evmVersion) inline unsigned callGas(langutil::EVMVersion _evmVersion)
{ {
return _evmVersion >= langutil::EVMVersion::tangerineWhistle() ? 700 : 40; if (_evmVersion >= langutil::EVMVersion::berlin())
return coldAccountAccessCost;
else if (_evmVersion >= langutil::EVMVersion::tangerineWhistle())
return 700;
else
return 40;
} }
static unsigned const callStipend = 2300; static unsigned const callStipend = 2300;
static unsigned const callValueTransferGas = 9000; static unsigned const callValueTransferGas = 9000;
static unsigned const callNewAccountGas = 25000; static unsigned const callNewAccountGas = 25000;
inline unsigned selfdestructGas(langutil::EVMVersion _evmVersion) inline unsigned selfdestructGas(langutil::EVMVersion _evmVersion)
{ {
return _evmVersion >= langutil::EVMVersion::tangerineWhistle() ? 5000 : 0; if (_evmVersion >= langutil::EVMVersion::berlin())
return coldAccountAccessCost;
else if (_evmVersion >= langutil::EVMVersion::tangerineWhistle())
return 5000;
else
return 0;
} }
static unsigned const selfdestructRefundGas = 24000; static unsigned const selfdestructRefundGas = 24000;
static unsigned const memoryGas = 3; static unsigned const memoryGas = 3;

View File

@ -99,7 +99,7 @@ private:
EVMVersion(Version _version): m_version(_version) {} EVMVersion(Version _version): m_version(_version) {}
Version m_version = Version::Istanbul; Version m_version = Version::Berlin;
}; };
} }

View File

@ -86,7 +86,7 @@ EVM_VERSIONS="homestead byzantium"
if [ -z "$CI" ] if [ -z "$CI" ]
then then
EVM_VERSIONS+=" constantinople petersburg istanbul" EVM_VERSIONS+=" constantinople petersburg istanbul berlin"
fi fi
# And then run the Solidity unit-tests in the matrix combination of optimizer / no optimizer # And then run the Solidity unit-tests in the matrix combination of optimizer / no optimizer
@ -96,9 +96,9 @@ do
for vm in $EVM_VERSIONS for vm in $EVM_VERSIONS
do do
FORCE_ABIV1_RUNS="no" FORCE_ABIV1_RUNS="no"
if [[ "$vm" == "istanbul" ]] if [[ "$vm" == "berlin" ]]
then then
FORCE_ABIV1_RUNS="no yes" # run both in istanbul FORCE_ABIV1_RUNS="no yes" # run both in berlin
fi fi
for abiv1 in $FORCE_ABIV1_RUNS for abiv1 in $FORCE_ABIV1_RUNS
do do

View File

@ -46,6 +46,7 @@
#include <libevmasm/GasMeter.h> #include <libevmasm/GasMeter.h>
#include <liblangutil/Exceptions.h> #include <liblangutil/Exceptions.h>
#include <liblangutil/EVMVersion.h>
#include <liblangutil/Scanner.h> #include <liblangutil/Scanner.h>
#include <liblangutil/SourceReferenceFormatter.h> #include <liblangutil/SourceReferenceFormatter.h>
@ -872,9 +873,9 @@ General Information)").c_str(),
) )
( (
g_strEVMVersion.c_str(), g_strEVMVersion.c_str(),
po::value<string>()->value_name("version"), po::value<string>()->value_name("version")->default_value(EVMVersion{}.name()),
"Select desired EVM version. Either homestead, tangerineWhistle, spuriousDragon, " "Select desired EVM version. Either homestead, tangerineWhistle, spuriousDragon, "
"byzantium, constantinople, petersburg, istanbul (default) or berlin." "byzantium, constantinople, petersburg, istanbul or berlin."
) )
( (
g_strExperimentalViaIR.c_str(), g_strExperimentalViaIR.c_str(),

View File

@ -173,7 +173,7 @@ function run_install
replace_version_pragmas replace_version_pragmas
force_truffle_solc_modules "$soljson" force_truffle_solc_modules "$soljson"
force_truffle_compiler_settings "$CONFIG" "${DIR}/solc" "$OPTIMIZER_LEVEL" istanbul force_truffle_compiler_settings "$CONFIG" "${DIR}/solc" "$OPTIMIZER_LEVEL" berlin
$init_fn $init_fn
} }
@ -234,7 +234,7 @@ function truffle_run_test
for level in $(seq "$OPTIMIZER_LEVEL" 3) for level in $(seq "$OPTIMIZER_LEVEL" 3)
do do
clean clean
force_truffle_compiler_settings "$CONFIG" "${DIR}/solc" "$level" istanbul force_truffle_compiler_settings "$CONFIG" "${DIR}/solc" "$level" berlin
printLog "Running compile function..." printLog "Running compile function..."
$compile_fn $compile_fn
@ -267,4 +267,3 @@ function external_test
rm -rf "$DIR" rm -rf "$DIR"
echo "Done." echo "Done."
} }

View File

@ -192,7 +192,15 @@ BOOST_AUTO_TEST_CASE(function_calls)
} }
)"; )";
testCreationTimeGas(sourceCode); testCreationTimeGas(sourceCode);
testRunTimeGas("f(uint256)", vector<bytes>{encodeArgs(2), encodeArgs(8)}); // In f, data2 is accessed twice, so there is a reduction of 2200 to 100 in actual costs.
// However, GasMeter always assumes cold costs.
testRunTimeGas(
"f(uint256)",
vector<bytes>{encodeArgs(2), encodeArgs(8)},
m_evmVersion < EVMVersion::berlin() ?
u256(0) :
u256(2100)
);
} }
BOOST_AUTO_TEST_CASE(multiple_external_functions) BOOST_AUTO_TEST_CASE(multiple_external_functions)
@ -213,7 +221,16 @@ BOOST_AUTO_TEST_CASE(multiple_external_functions)
} }
)"; )";
testCreationTimeGas(sourceCode); testCreationTimeGas(sourceCode);
testRunTimeGas("f(uint256)", vector<bytes>{encodeArgs(2), encodeArgs(8)}); // In f, data2 is accessed twice, so there is a reduction of 2200 to 100 in actual costs.
// However, GasMeter always assumes cold costs.
testRunTimeGas(
"f(uint256)",
vector<bytes>{encodeArgs(2), encodeArgs(8)},
m_evmVersion < EVMVersion::berlin() ?
u256(0) :
u256(2100)
);
testRunTimeGas("g(uint256)", vector<bytes>{encodeArgs(2)}); testRunTimeGas("g(uint256)", vector<bytes>{encodeArgs(2)});
} }

View File

@ -635,7 +635,7 @@ BOOST_AUTO_TEST_CASE(selfbalance)
bytes code = compileFirstExpression(sourceCode, {}, {}); bytes code = compileFirstExpression(sourceCode, {}, {});
if (solidity::test::CommonOptions::get().evmVersion() == EVMVersion::istanbul()) if (solidity::test::CommonOptions::get().evmVersion().hasSelfBalance())
{ {
bytes expectation({uint8_t(Instruction::SELFBALANCE)}); bytes expectation({uint8_t(Instruction::SELFBALANCE)});
BOOST_CHECK_EQUAL_COLLECTIONS(code.begin(), code.end(), expectation.begin(), expectation.end()); BOOST_CHECK_EQUAL_COLLECTIONS(code.begin(), code.end(), expectation.begin(), expectation.end());

View File

@ -1065,9 +1065,11 @@ BOOST_AUTO_TEST_CASE(evm_version)
BOOST_CHECK(result["contracts"]["fileA"]["A"]["metadata"].asString().find("\"evmVersion\":\"petersburg\"") != string::npos); BOOST_CHECK(result["contracts"]["fileA"]["A"]["metadata"].asString().find("\"evmVersion\":\"petersburg\"") != string::npos);
result = compile(inputForVersion("\"evmVersion\": \"istanbul\",")); result = compile(inputForVersion("\"evmVersion\": \"istanbul\","));
BOOST_CHECK(result["contracts"]["fileA"]["A"]["metadata"].asString().find("\"evmVersion\":\"istanbul\"") != string::npos); BOOST_CHECK(result["contracts"]["fileA"]["A"]["metadata"].asString().find("\"evmVersion\":\"istanbul\"") != string::npos);
result = compile(inputForVersion("\"evmVersion\": \"berlin\","));
BOOST_CHECK(result["contracts"]["fileA"]["A"]["metadata"].asString().find("\"evmVersion\":\"berlin\"") != string::npos);
// test default // test default
result = compile(inputForVersion("")); result = compile(inputForVersion(""));
BOOST_CHECK(result["contracts"]["fileA"]["A"]["metadata"].asString().find("\"evmVersion\":\"istanbul\"") != string::npos); BOOST_CHECK(result["contracts"]["fileA"]["A"]["metadata"].asString().find("\"evmVersion\":\"berlin\"") != string::npos);
// test invalid // test invalid
result = compile(inputForVersion("\"evmVersion\": \"invalid\",")); result = compile(inputForVersion("\"evmVersion\": \"invalid\","));
BOOST_CHECK(result["errors"][0]["message"].asString() == "Invalid EVM version requested."); BOOST_CHECK(result["errors"][0]["message"].asString() == "Invalid EVM version requested.");

View File

@ -18,7 +18,7 @@ contract C {
// executionCost: 1308 // executionCost: 1308
// totalCost: 1261108 // totalCost: 1261108
// external: // external:
// a(): 1130 // a(): 2430
// b(uint256): infinite // b(uint256): infinite
// f1(uint256): infinite // f1(uint256): infinite
// f2(uint256[],string[],uint16,address): infinite // f2(uint256[],string[],uint16,address): infinite

View File

@ -21,8 +21,8 @@ contract C {
// executionCost: 715 // executionCost: 715
// totalCost: 681315 // totalCost: 681315
// external: // external:
// a(): 985 // a(): 2285
// b(uint256): 2052 // b(uint256): 4652
// f1(uint256): 307 // f1(uint256): 307
// f2(uint256[],string[],uint16,address): infinite // f2(uint256[],string[],uint16,address): infinite
// f3(uint16[],string[],uint16,address): infinite // f3(uint16[],string[],uint16,address): infinite

View File

@ -28,7 +28,7 @@ contract Large {
// executionCost: 942 // executionCost: 942
// totalCost: 905342 // totalCost: 905342
// external: // external:
// a(): 1175 // a(): 2475
// b(uint256): infinite // b(uint256): infinite
// f0(uint256): infinite // f0(uint256): infinite
// f1(uint256): infinite // f1(uint256): infinite

View File

@ -31,25 +31,25 @@ contract Large {
// executionCost: 300 // executionCost: 300
// totalCost: 256700 // totalCost: 256700
// external: // external:
// a(): 983 // a(): 2283
// b(uint256): 2337 // b(uint256): 4937
// f0(uint256): 366 // f0(uint256): 366
// f1(uint256): 41506 // f1(uint256): 47006
// f2(uint256): 21572 // f2(uint256): 24972
// f3(uint256): 21660 // f3(uint256): 25060
// f4(uint256): 21638 // f4(uint256): 25038
// f5(uint256): 21616 // f5(uint256): 25016
// f6(uint256): 21528 // f6(uint256): 24928
// f7(uint256): 21308 // f7(uint256): 24708
// f8(uint256): 21440 // f8(uint256): 24840
// f9(uint256): 21462 // f9(uint256): 24862
// g0(uint256): 606 // g0(uint256): 606
// g1(uint256): 41218 // g1(uint256): 46718
// g2(uint256): 21306 // g2(uint256): 24706
// g3(uint256): 21394 // g3(uint256): 24794
// g4(uint256): 21372 // g4(uint256): 24772
// g5(uint256): 21460 // g5(uint256): 24860
// g6(uint256): 21240 // g6(uint256): 24640
// g7(uint256): 21350 // g7(uint256): 24750
// g8(uint256): 21328 // g8(uint256): 24728
// g9(uint256): 21174 // g9(uint256): 24574

View File

@ -15,7 +15,7 @@ contract Medium {
// executionCost: 386 // executionCost: 386
// totalCost: 351786 // totalCost: 351786
// external: // external:
// a(): 1152 // a(): 2452
// b(uint256): infinite // b(uint256): infinite
// f1(uint256): infinite // f1(uint256): infinite
// f2(uint256): infinite // f2(uint256): infinite

View File

@ -18,12 +18,12 @@ contract Medium {
// executionCost: 190 // executionCost: 190
// totalCost: 146990 // totalCost: 146990
// external: // external:
// a(): 983 // a(): 2283
// b(uint256): 2095 // b(uint256): 4695
// f1(uint256): 41286 // f1(uint256): 46786
// f2(uint256): 21330 // f2(uint256): 24730
// f3(uint256): 21374 // f3(uint256): 24774
// g0(uint256): 364 // g0(uint256): 364
// g7(uint256): 21240 // g7(uint256): 24640
// g8(uint256): 21218 // g8(uint256): 24618
// g9(uint256): 21174 // g9(uint256): 24574

View File

@ -11,6 +11,6 @@ contract Small {
// totalCost: 114759 // totalCost: 114759
// external: // external:
// fallback: 129 // fallback: 129
// a(): 1107 // a(): 2407
// b(uint256): infinite // b(uint256): infinite
// f1(uint256): infinite // f1(uint256): infinite

View File

@ -14,6 +14,6 @@ contract Small {
// totalCost: 62111 // totalCost: 62111
// external: // external:
// fallback: 118 // fallback: 118
// a(): 961 // a(): 2261
// b(uint256): 1985 // b(uint256): 4585
// f1(uint256): 41220 // f1(uint256): 46720

View File

@ -0,0 +1,24 @@
contract C {
uint x;
function setX(uint y) public {
x = y;
}
function resetX() public {
x = 0;
}
function readX() public view returns(uint) {
return x;
}
}
// ====
// optimize: true
// optimize-yul: true
// ----
// creation:
// codeDepositCost: 27200
// executionCost: 81
// totalCost: 27281
// external:
// readX(): 2290
// resetX(): 5116
// setX(uint256): 22312

View File

@ -24,6 +24,6 @@ contract C {
// compileViaYul: also // compileViaYul: also
// ---- // ----
// f() -> 0x20, 0x8, 0x40, 0x3, 0x9, 0xa, 0xb // f() -> 0x20, 0x8, 0x40, 0x3, 0x9, 0xa, 0xb
// gas irOptimized: 193521 // gas irOptimized: 203921
// gas legacy: 196426 // gas legacy: 206126
// gas legacyOptimized: 193405 // gas legacyOptimized: 203105

View File

@ -60,10 +60,10 @@ contract C {
// compileViaYul: also // compileViaYul: also
// ---- // ----
// test_bytes() -> // test_bytes() ->
// gas irOptimized: 508617 // gas irOptimized: 465417
// gas legacy: 466763 // gas legacy: 423563
// gas legacyOptimized: 374591 // gas legacyOptimized: 331391
// test_uint256() -> // test_uint256() ->
// gas irOptimized: 704259 // gas irOptimized: 661059
// gas legacy: 634592 // gas legacy: 591392
// gas legacyOptimized: 499337 // gas legacyOptimized: 456137

View File

@ -26,6 +26,6 @@ contract C {
// ---- // ----
// library: L // library: L
// f() -> 8, 7, 1, 2, 7, 12 // f() -> 8, 7, 1, 2, 7, 12
// gas irOptimized: 164899 // gas irOptimized: 168199
// gas legacy: 164775 // gas legacy: 169475
// gas legacyOptimized: 162697 // gas legacyOptimized: 167397

View File

@ -61,10 +61,10 @@ contract C {
// compileViaYul: also // compileViaYul: also
// ---- // ----
// test_bytes() -> // test_bytes() ->
// gas irOptimized: 508617 // gas irOptimized: 465417
// gas legacy: 466763 // gas legacy: 423563
// gas legacyOptimized: 374591 // gas legacyOptimized: 331391
// test_uint256() -> // test_uint256() ->
// gas irOptimized: 704259 // gas irOptimized: 661059
// gas legacy: 634592 // gas legacy: 591392
// gas legacyOptimized: 499337 // gas legacyOptimized: 456137

View File

@ -53,6 +53,6 @@ contract C {
// f2() -> 0x20, 0xa0, 0x1, 0x60, 0x2, 0x3, "abc" // f2() -> 0x20, 0xa0, 0x1, 0x60, 0x2, 0x3, "abc"
// f3() -> 0x20, 0xa0, 0x1, 0x60, 0x2, 0x3, "abc" // f3() -> 0x20, 0xa0, 0x1, 0x60, 0x2, 0x3, "abc"
// f4() -> 0x20, 0x160, 0x1, 0x80, 0xc0, 0x2, 0x3, "abc", 0x7, 0x40, 0x2, 0x2, 0x3 // f4() -> 0x20, 0x160, 0x1, 0x80, 0xc0, 0x2, 0x3, "abc", 0x7, 0x40, 0x2, 0x2, 0x3
// gas irOptimized: 110283 // gas irOptimized: 113683
// gas legacy: 111328 // gas legacy: 114728
// gas legacyOptimized: 109206 // gas legacyOptimized: 112606

View File

@ -32,6 +32,6 @@ contract C is B {
// compileViaYul: also // compileViaYul: also
// ---- // ----
// test() -> 77 // test() -> 77
// gas irOptimized: 133635 // gas irOptimized: 132435
// gas legacy: 156449 // gas legacy: 155249
// gas legacyOptimized: 112943 // gas legacyOptimized: 111743

View File

@ -40,5 +40,5 @@ contract C is B {
// compileViaYul: also // compileViaYul: also
// ---- // ----
// test() -> 5, 10 // test() -> 5, 10
// gas irOptimized: 92624 // gas irOptimized: 91524
// gas legacy: 100237 // gas legacy: 99137

View File

@ -21,6 +21,6 @@ contract C {
// f(uint256[][1]): 32, 32, 0 -> true // f(uint256[][1]): 32, 32, 0 -> true
// f(uint256[][1]): 32, 32, 1, 42 -> true // f(uint256[][1]): 32, 32, 1, 42 -> true
// f(uint256[][1]): 32, 32, 8, 421, 422, 423, 424, 425, 426, 427, 428 -> true // f(uint256[][1]): 32, 32, 8, 421, 422, 423, 424, 425, 426, 427, 428 -> true
// gas irOptimized: 227075 // gas irOptimized: 224675
// gas legacy: 144300 // gas legacy: 141900
// gas legacyOptimized: 124188 // gas legacyOptimized: 121788

View File

@ -19,10 +19,10 @@ contract C {
// compileViaYul: also // compileViaYul: also
// ---- // ----
// h(uint256[2][]): 0x20, 3, 123, 124, 223, 224, 323, 324 -> 32, 256, 0x20, 3, 123, 124, 223, 224, 323, 324 // h(uint256[2][]): 0x20, 3, 123, 124, 223, 224, 323, 324 -> 32, 256, 0x20, 3, 123, 124, 223, 224, 323, 324
// gas irOptimized: 172410 // gas irOptimized: 181410
// gas legacy: 175929 // gas legacy: 184929
// gas legacyOptimized: 172504 // gas legacyOptimized: 181504
// i(uint256[2][2]): 123, 124, 223, 224 -> 32, 128, 123, 124, 223, 224 // i(uint256[2][2]): 123, 124, 223, 224 -> 32, 128, 123, 124, 223, 224
// gas irOptimized: 107381 // gas irOptimized: 112981
// gas legacy: 109868 // gas legacy: 115468
// gas legacyOptimized: 107388 // gas legacyOptimized: 112988

View File

@ -11,6 +11,6 @@ contract C {
// compileViaYul: also // compileViaYul: also
// ---- // ----
// f(bytes): 0x20, 0x80, 0x21, 0x40, 0x7, "abcdefg" -> 0x21, 0x40, 0x7, "abcdefg" // f(bytes): 0x20, 0x80, 0x21, 0x40, 0x7, "abcdefg" -> 0x21, 0x40, 0x7, "abcdefg"
// gas irOptimized: 130031 // gas irOptimized: 136231
// gas legacy: 131690 // gas legacy: 137190
// gas legacyOptimized: 130582 // gas legacyOptimized: 136082

View File

@ -18,4 +18,4 @@ contract D {
// ---- // ----
// f() -> FAILURE, hex"4e487b71", 0x11 // f() -> FAILURE, hex"4e487b71", 0x11
// g(), 100 wei -> 1 // g(), 100 wei -> 1
// gas legacy: 101718 // gas legacy: 101918

View File

@ -14,9 +14,9 @@ contract Test {
// compileViaYul: also // compileViaYul: also
// ---- // ----
// set(uint24[3][]): 0x20, 0x06, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12 -> 0x06 // set(uint24[3][]): 0x20, 0x06, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12 -> 0x06
// gas irOptimized: 199693 // gas irOptimized: 191293
// gas legacy: 278685 // gas legacy: 211485
// gas legacyOptimized: 273594 // gas legacyOptimized: 206394
// data(uint256,uint256): 0x02, 0x02 -> 0x09 // data(uint256,uint256): 0x02, 0x02 -> 0x09
// data(uint256,uint256): 0x05, 0x01 -> 0x11 // data(uint256,uint256): 0x05, 0x01 -> 0x11
// data(uint256,uint256): 0x06, 0x00 -> FAILURE // data(uint256,uint256): 0x06, 0x00 -> FAILURE

View File

@ -43,15 +43,15 @@ contract c {
// ---- // ----
// storageEmpty -> 1 // storageEmpty -> 1
// test_short() -> 1780731860627700044960722568376587075150542249149356309979516913770823710 // test_short() -> 1780731860627700044960722568376587075150542249149356309979516913770823710
// gas legacy: 110938 // gas legacy: 59838
// gas legacyOptimized: 109706 // gas legacyOptimized: 58606
// storageEmpty -> 0 // storageEmpty -> 0
// test_long() -> 67 // test_long() -> 67
// gas irOptimized: 134320 // gas irOptimized: 91520
// gas legacy: 213590 // gas legacy: 103590
// gas legacyOptimized: 211044 // gas legacyOptimized: 101044
// storageEmpty -> 0 // storageEmpty -> 0
// test_pop() -> 1780731860627700044960722568376592200742329637303199754547598369979433020 // test_pop() -> 1780731860627700044960722568376592200742329637303199754547598369979433020
// gas legacy: 176030 // gas legacy: 61930
// gas legacyOptimized: 173504 // gas legacyOptimized: 59404
// storageEmpty -> 0 // storageEmpty -> 0

View File

@ -19,6 +19,6 @@ contract c {
// compileViaYul: also // compileViaYul: also
// ---- // ----
// test() -> 0 // test() -> 0
// gas irOptimized: 309167 // gas irOptimized: 171767
// gas legacy: 483915 // gas legacy: 189715
// gas legacyOptimized: 478672 // gas legacyOptimized: 184472

View File

@ -15,7 +15,7 @@ contract c {
// ---- // ----
// getLength() -> 0 // getLength() -> 0
// set(): 1, 2 -> true // set(): 1, 2 -> true
// gas irOptimized: 102970 // gas irOptimized: 110570
// gas legacy: 103126 // gas legacy: 110726
// gas legacyOptimized: 102967 // gas legacyOptimized: 110567
// getLength() -> 68 // getLength() -> 68

View File

@ -22,7 +22,7 @@ contract c {
// compileViaYul: also // compileViaYul: also
// ---- // ----
// store(uint256[9],uint8[3][]): 21, 22, 23, 24, 25, 26, 27, 28, 29, 0x140, 4, 1, 2, 3, 11, 12, 13, 21, 22, 23, 31, 32, 33 -> 32 // store(uint256[9],uint8[3][]): 21, 22, 23, 24, 25, 26, 27, 28, 29, 0x140, 4, 1, 2, 3, 11, 12, 13, 21, 22, 23, 31, 32, 33 -> 32
// gas irOptimized: 612216 // gas irOptimized: 651816
// gas legacy: 817315 // gas legacy: 694515
// gas legacyOptimized: 816813 // gas legacyOptimized: 694013
// retrieve() -> 9, 28, 9, 28, 4, 3, 32 // retrieve() -> 9, 28, 9, 28, 4, 3, 32

View File

@ -23,6 +23,6 @@ contract C {
// compileViaYul: also // compileViaYul: also
// ---- // ----
// f() -> true // f() -> true
// gas irOptimized: 107258 // gas irOptimized: 92958
// gas legacy: 107335 // gas legacy: 93035
// gas legacyOptimized: 105857 // gas legacyOptimized: 92257

View File

@ -48,6 +48,6 @@ contract C {
// compileViaYul: also // compileViaYul: also
// ---- // ----
// f() -> true // f() -> true
// gas irOptimized: 231941 // gas irOptimized: 154441
// gas legacy: 239061 // gas legacy: 155961
// gas legacyOptimized: 235988 // gas legacyOptimized: 153588

View File

@ -15,6 +15,6 @@ contract C {
// compileViaYul: also // compileViaYul: also
// ---- // ----
// f() -> 0 // f() -> 0
// gas irOptimized: 139105 // gas irOptimized: 135505
// gas legacy: 138913 // gas legacy: 135313
// gas legacyOptimized: 137448 // gas legacyOptimized: 134548

View File

@ -42,11 +42,11 @@ contract C {
// compileViaYul: also // compileViaYul: also
// ---- // ----
// f() -> 0 // f() -> 0
// gas irOptimized: 107266 // gas irOptimized: 92966
// gas legacy: 107306 // gas legacy: 93006
// gas legacyOptimized: 105861 // gas legacyOptimized: 92261
// g() -> 0 // g() -> 0
// h() -> 0 // h() -> 0
// gas irOptimized: 107312 // gas irOptimized: 93012
// gas legacy: 107328 // gas legacy: 93028
// gas legacyOptimized: 105903 // gas legacyOptimized: 92303

View File

@ -21,6 +21,6 @@ contract c {
// compileViaYul: also // compileViaYul: also
// ---- // ----
// test() -> 0x01000000000000000000000000000000000000000000000000, 0x02000000000000000000000000000000000000000000000000, 0x03000000000000000000000000000000000000000000000000, 0x04000000000000000000000000000000000000000000000000, 0x05000000000000000000000000000000000000000000000000 // test() -> 0x01000000000000000000000000000000000000000000000000, 0x02000000000000000000000000000000000000000000000000, 0x03000000000000000000000000000000000000000000000000, 0x04000000000000000000000000000000000000000000000000, 0x05000000000000000000000000000000000000000000000000
// gas irOptimized: 245944 // gas irOptimized: 214644
// gas legacy: 276683 // gas legacy: 221883
// gas legacyOptimized: 275534 // gas legacyOptimized: 220734

View File

@ -37,12 +37,12 @@ contract c {
// compileViaYul: also // compileViaYul: also
// ---- // ----
// test() -> 0x02000202 // test() -> 0x02000202
// gas irOptimized: 2476392 // gas irOptimized: 4690992
// gas legacy: 2288641 // gas legacy: 4578341
// gas legacyOptimized: 2258654 // gas legacyOptimized: 4548354
// storageEmpty -> 1 // storageEmpty -> 1
// clear() -> 0, 0 // clear() -> 0, 0
// gas irOptimized: 1852821 // gas irOptimized: 4516821
// gas legacy: 1727169 // gas legacy: 4410769
// gas legacyOptimized: 1698931 // gas legacyOptimized: 4382531
// storageEmpty -> 1 // storageEmpty -> 1

View File

@ -15,6 +15,6 @@ contract c {
// compileViaYul: also // compileViaYul: also
// ---- // ----
// test(uint256[2][]): 32, 3, 7, 8, 9, 10, 11, 12 -> 10 // test(uint256[2][]): 32, 3, 7, 8, 9, 10, 11, 12 -> 10
// gas irOptimized: 610177 // gas irOptimized: 691977
// gas legacy: 604268 // gas legacy: 686268
// gas legacyOptimized: 603688 // gas legacyOptimized: 685688

View File

@ -19,6 +19,6 @@ contract c {
// compileViaYul: also // compileViaYul: also
// ---- // ----
// test() -> 5, 4 // test() -> 5, 4
// gas irOptimized: 234667 // gas irOptimized: 226467
// gas legacy: 237001 // gas legacy: 233801
// gas legacyOptimized: 235316 // gas legacyOptimized: 232816

View File

@ -20,10 +20,10 @@ contract c {
} }
} }
// ==== // ====
// compileViaYul: also
// compileToEwasm: also // compileToEwasm: also
// compileViaYul: also
// ---- // ----
// test() -> 3, 4 // test() -> 3, 4
// gas irOptimized: 191158 // gas irOptimized: 191858
// gas legacy: 208853 // gas legacy: 195353
// gas legacyOptimized: 200341 // gas legacyOptimized: 192441

View File

@ -17,6 +17,9 @@ contract c {
// ---- // ----
// setData1(uint256,uint256,uint256): 10, 5, 4 -> // setData1(uint256,uint256,uint256): 10, 5, 4 ->
// copyStorageStorage() -> // copyStorageStorage() ->
// gas irOptimized: 111563
// gas legacy: 109278
// gas legacyOptimized: 109268
// getData2(uint256): 5 -> 10, 4 // getData2(uint256): 5 -> 10, 4
// setData1(uint256,uint256,uint256): 0, 0, 0 -> // setData1(uint256,uint256,uint256): 0, 0, 0 ->
// copyStorageStorage() -> // copyStorageStorage() ->

View File

@ -20,6 +20,6 @@ contract c {
// compileViaYul: also // compileViaYul: also
// ---- // ----
// test() -> 5, 4 // test() -> 5, 4
// gas irOptimized: 264686 // gas irOptimized: 272786
// gas legacy: 264734 // gas legacy: 270834
// gas legacyOptimized: 263160 // gas legacyOptimized: 269960

View File

@ -14,4 +14,6 @@ contract c {
// compileViaYul: also // compileViaYul: also
// ---- // ----
// test() -> 9, 4 // test() -> 9, 4
// gas irOptimized: 99075 // gas irOptimized: 123375
// gas legacy: 123579
// gas legacyOptimized: 123208

View File

@ -10,9 +10,9 @@ contract C {
} }
} }
// ==== // ====
// compileViaYul: also
// compileToEwasm: also // compileToEwasm: also
// compileViaYul: also
// ---- // ----
// test() -> left(0x01), left(0x02) // test() -> left(0x01), left(0x02)
// gas legacy: 154001 // gas legacy: 90001
// gas legacyOptimized: 152385 // gas legacyOptimized: 89085

View File

@ -18,6 +18,6 @@ contract c {
// compileViaYul: also // compileViaYul: also
// ---- // ----
// test() -> 8, 0 // test() -> 8, 0
// gas irOptimized: 154656 // gas irOptimized: 236656
// gas legacy: 153995 // gas legacy: 234695
// gas legacyOptimized: 153403 // gas legacyOptimized: 234103

View File

@ -19,7 +19,7 @@ contract c {
// compileViaYul: also // compileViaYul: also
// ---- // ----
// test() -> 4, 5 // test() -> 4, 5
// gas irOptimized: 257752 // gas irOptimized: 240552
// gas legacy: 255936 // gas legacy: 238736
// gas legacyOptimized: 254359 // gas legacyOptimized: 237159
// storageEmpty -> 1 // storageEmpty -> 1

View File

@ -17,6 +17,6 @@ contract C {
// compileViaYul: also // compileViaYul: also
// ---- // ----
// f() -> 0x20, 2, 0x40, 0xa0, 2, 0, 1, 2, 2, 3 // f() -> 0x20, 2, 0x40, 0xa0, 2, 0, 1, 2, 2, 3
// gas irOptimized: 166791 // gas irOptimized: 161991
// gas legacy: 163978 // gas legacy: 162278
// gas legacyOptimized: 158155 // gas legacyOptimized: 159955

View File

@ -16,10 +16,10 @@ contract c {
} }
} }
// ==== // ====
// compileViaYul: also
// compileToEwasm: also // compileToEwasm: also
// compileViaYul: also
// ---- // ----
// test() -> 0xffffffff, 0x0000000000000000000000000a00090008000700060005000400030002000100, 0x0000000000000000000000000000000000000000000000000000000000000000 // test() -> 0xffffffff, 0x0000000000000000000000000a00090008000700060005000400030002000100, 0x0000000000000000000000000000000000000000000000000000000000000000
// gas irOptimized: 218618 // gas irOptimized: 140618
// gas legacy: 328106 // gas legacy: 186406
// gas legacyOptimized: 307826 // gas legacyOptimized: 166126

View File

@ -18,10 +18,10 @@ contract c {
} }
} }
// ==== // ====
// compileViaYul: also
// compileToEwasm: also // compileToEwasm: also
// compileViaYul: also
// ---- // ----
// test() -> 0x04000000000000000000000000000000000000000000000000, 0x0, 0x0 // test() -> 0x04000000000000000000000000000000000000000000000000, 0x0, 0x0
// gas irOptimized: 107728 // gas irOptimized: 95528
// gas legacy: 116651 // gas legacy: 97451
// gas legacyOptimized: 107000 // gas legacyOptimized: 94200

View File

@ -18,10 +18,10 @@ contract c {
} }
// ==== // ====
// compileViaYul: also
// compileToEwasm: also // compileToEwasm: also
// compileViaYul: also
// ---- // ----
// test() -> 0x01000000000000000000000000000000000000000000000000, 0x02000000000000000000000000000000000000000000000000, 0x03000000000000000000000000000000000000000000000000, 0x04000000000000000000000000000000000000000000000000, 0x0 // test() -> 0x01000000000000000000000000000000000000000000000000, 0x02000000000000000000000000000000000000000000000000, 0x03000000000000000000000000000000000000000000000000, 0x04000000000000000000000000000000000000000000000000, 0x0
// gas irOptimized: 288892 // gas irOptimized: 296092
// gas legacy: 309353 // gas legacy: 303653
// gas legacyOptimized: 307699 // gas legacyOptimized: 301999

View File

@ -18,10 +18,10 @@ contract c {
} }
// ==== // ====
// compileViaYul: also
// compileToEwasm: also // compileToEwasm: also
// compileViaYul: also
// ---- // ----
// test() -> 0x01000000000000000000000000000000000000000000000000, 0x02000000000000000000000000000000000000000000000000, 0x03000000000000000000000000000000000000000000000000, 0x04000000000000000000000000000000000000000000000000, 0x00 // test() -> 0x01000000000000000000000000000000000000000000000000, 0x02000000000000000000000000000000000000000000000000, 0x03000000000000000000000000000000000000000000000000, 0x04000000000000000000000000000000000000000000000000, 0x00
// gas irOptimized: 263885 // gas irOptimized: 274785
// gas legacy: 269681 // gas legacy: 276381
// gas legacyOptimized: 268753 // gas legacyOptimized: 275453

View File

@ -38,10 +38,10 @@ contract c {
// compileViaYul: true // compileViaYul: true
// ---- // ----
// test1(uint256[][]): 0x20, 2, 0x40, 0x40, 2, 23, 42 -> 2, 65 // test1(uint256[][]): 0x20, 2, 0x40, 0x40, 2, 23, 42 -> 2, 65
// gas irOptimized: 179148 // gas irOptimized: 182348
// test2(uint256[][2]): 0x20, 0x40, 0x40, 2, 23, 42 -> 2, 65 // test2(uint256[][2]): 0x20, 0x40, 0x40, 2, 23, 42 -> 2, 65
// gas irOptimized: 153938 // gas irOptimized: 158638
// test3(uint256[2][]): 0x20, 2, 23, 42, 23, 42 -> 2, 65 // test3(uint256[2][]): 0x20, 2, 23, 42, 23, 42 -> 2, 65
// gas irOptimized: 132378 // gas irOptimized: 135778
// test4(uint256[2][2]): 23, 42, 23, 42 -> 65 // test4(uint256[2][2]): 23, 42, 23, 42 -> 65
// gas irOptimized: 105395 // gas irOptimized: 111695

View File

@ -40,12 +40,12 @@ contract Test {
// compileViaYul: also // compileViaYul: also
// ---- // ----
// test() -> 24 // test() -> 24
// gas irOptimized: 216291 // gas irOptimized: 227891
// gas legacy: 215533 // gas legacy: 227133
// gas legacyOptimized: 214947 // gas legacyOptimized: 226547
// test1() -> 3 // test1() -> 3
// test2() -> 6 // test2() -> 6
// test3() -> 24 // test3() -> 24
// gas irOptimized: 122838 // gas irOptimized: 134338
// gas legacy: 122795 // gas legacy: 134295
// gas legacyOptimized: 121883 // gas legacyOptimized: 133383

View File

@ -17,4 +17,4 @@ contract C {
// compileViaYul: true // compileViaYul: true
// ---- // ----
// f((uint128,uint64,uint128)[]): 0x20, 3, 0, 0, 12, 0, 11, 0, 10, 0, 0 -> 10, 11, 12 // f((uint128,uint64,uint128)[]): 0x20, 3, 0, 0, 12, 0, 11, 0, 10, 0, 0 -> 10, 11, 12
// gas irOptimized: 122861 // gas irOptimized: 121461

View File

@ -19,4 +19,4 @@ contract C {
// compileViaYul: true // compileViaYul: true
// ---- // ----
// f() -> 10, 11, 12 // f() -> 10, 11, 12
// gas irOptimized: 121857 // gas irOptimized: 120457

View File

@ -23,4 +23,4 @@ contract C {
// compileViaYul: true // compileViaYul: true
// ---- // ----
// f((uint256[])[]): 0x20, 3, 0x60, 0x60, 0x60, 0x20, 3, 1, 2, 3 -> 3, 1 // f((uint256[])[]): 0x20, 3, 0x60, 0x60, 0x60, 0x20, 3, 1, 2, 3 -> 3, 1
// gas irOptimized: 352878 // gas irOptimized: 332878

View File

@ -26,4 +26,4 @@ contract C {
// compileViaYul: true // compileViaYul: true
// ---- // ----
// f() -> 3, 3, 3, 1 // f() -> 3, 3, 3, 1
// gas irOptimized: 187277 // gas irOptimized: 185077

View File

@ -15,6 +15,6 @@ contract C {
// compileViaYul: also // compileViaYul: also
// ---- // ----
// f() -> 1, 2, 3 // f() -> 1, 2, 3
// gas irOptimized: 133471 // gas irOptimized: 133671
// gas legacy: 134419 // gas legacy: 134619
// gas legacyOptimized: 125440 // gas legacyOptimized: 131940

View File

@ -12,9 +12,9 @@ contract Test {
// compileViaYul: also // compileViaYul: also
// ---- // ----
// set(uint24[]): 0x20, 18, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18 -> 18 // set(uint24[]): 0x20, 18, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18 -> 18
// gas irOptimized: 120859 // gas irOptimized: 101659
// gas legacy: 125815 // gas legacy: 103815
// gas legacyOptimized: 123614 // gas legacyOptimized: 101614
// data(uint256): 7 -> 8 // data(uint256): 7 -> 8
// data(uint256): 15 -> 16 // data(uint256): 15 -> 16
// data(uint256): 18 -> FAILURE // data(uint256): 18 -> FAILURE

View File

@ -7,13 +7,13 @@ contract c {
// compileViaYul: also // compileViaYul: also
// ---- // ----
// set(uint256): 1, 2 -> true // set(uint256): 1, 2 -> true
// gas irOptimized: 103224 // gas irOptimized: 110824
// gas legacy: 103491 // gas legacy: 111091
// gas legacyOptimized: 103136 // gas legacyOptimized: 110736
// set(uint256): 2, 2, 3, 4, 5 -> true // set(uint256): 2, 2, 3, 4, 5 -> true
// gas irOptimized: 163911 // gas irOptimized: 177811
// gas legacy: 164121 // gas legacy: 178021
// gas legacyOptimized: 163766 // gas legacyOptimized: 177666
// storageEmpty -> 0 // storageEmpty -> 0
// copy(uint256,uint256): 1, 2 -> true // copy(uint256,uint256): 1, 2 -> true
// storageEmpty -> 0 // storageEmpty -> 0

View File

@ -19,25 +19,25 @@ contract c {
// ---- // ----
// f(uint256): 0 -> 0x20, 0x00 // f(uint256): 0 -> 0x20, 0x00
// f(uint256): 31 -> 0x20, 0x1f, 0x0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e00 // f(uint256): 31 -> 0x20, 0x1f, 0x0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e00
// gas irOptimized: 221696 // gas irOptimized: 135396
// gas legacy: 255464 // gas legacy: 124364
// gas legacyOptimized: 250998 // gas legacyOptimized: 119898
// f(uint256): 32 -> 0x20, 0x20, 1780731860627700044960722568376592200742329637303199754547598369979440671 // f(uint256): 32 -> 0x20, 0x20, 1780731860627700044960722568376592200742329637303199754547598369979440671
// gas irOptimized: 229291 // gas irOptimized: 142291
// gas legacy: 267931 // gas legacy: 135431
// gas legacyOptimized: 263329 // gas legacyOptimized: 130829
// f(uint256): 33 -> 0x20, 33, 1780731860627700044960722568376592200742329637303199754547598369979440671, 0x2000000000000000000000000000000000000000000000000000000000000000 // f(uint256): 33 -> 0x20, 33, 1780731860627700044960722568376592200742329637303199754547598369979440671, 0x2000000000000000000000000000000000000000000000000000000000000000
// gas irOptimized: 238003 // gas irOptimized: 149603
// gas legacy: 277538 // gas legacy: 142238
// gas legacyOptimized: 272818 // gas legacyOptimized: 137518
// f(uint256): 63 -> 0x20, 0x3f, 1780731860627700044960722568376592200742329637303199754547598369979440671, 14532552714582660066924456880521368950258152170031413196862950297402215316992 // f(uint256): 63 -> 0x20, 0x3f, 1780731860627700044960722568376592200742329637303199754547598369979440671, 14532552714582660066924456880521368950258152170031413196862950297402215316992
// gas irOptimized: 348673 // gas irOptimized: 174873
// gas legacy: 423428 // gas legacy: 160728
// gas legacyOptimized: 414868 // gas legacyOptimized: 152168
// f(uint256): 12 -> 0x20, 0x0c, 0x0102030405060708090a0b0000000000000000000000000000000000000000 // f(uint256): 12 -> 0x20, 0x0c, 0x0102030405060708090a0b0000000000000000000000000000000000000000
// gas legacy: 106445 // gas legacy: 59345
// gas legacyOptimized: 104379 // gas legacyOptimized: 57279
// f(uint256): 129 -> 0x20, 0x81, 1780731860627700044960722568376592200742329637303199754547598369979440671, 0x202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f, 29063324697304692433803953038474361308315562010425523193971352996434451193439, 0x606162636465666768696a6b6c6d6e6f707172737475767778797a7b7c7d7e7f, -57896044618658097711785492504343953926634992332820282019728792003956564819968 // f(uint256): 129 -> 0x20, 0x81, 1780731860627700044960722568376592200742329637303199754547598369979440671, 0x202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f, 29063324697304692433803953038474361308315562010425523193971352996434451193439, 0x606162636465666768696a6b6c6d6e6f707172737475767778797a7b7c7d7e7f, -57896044618658097711785492504343953926634992332820282019728792003956564819968
// gas irOptimized: 802315 // gas irOptimized: 452115
// gas legacy: 954517 // gas legacy: 423017
// gas legacyOptimized: 937521 // gas legacyOptimized: 406021

View File

@ -11,6 +11,6 @@ contract C {
// compileViaYul: also // compileViaYul: also
// ---- // ----
// f(uint256[]): 0x20, 0x03, 0x1, 0x2, 0x3 -> 0x1 // f(uint256[]): 0x20, 0x03, 0x1, 0x2, 0x3 -> 0x1
// gas irOptimized: 105184 // gas irOptimized: 111384
// gas legacy: 105365 // gas legacy: 111565
// gas legacyOptimized: 105147 // gas legacyOptimized: 111347

View File

@ -37,10 +37,12 @@ contract C {
// compileViaYul: also // compileViaYul: also
// ---- // ----
// f() -> 0x40, 0x80, 6, 0x6162636465660000000000000000000000000000000000000000000000000000, 0x49, 0x3132333435363738393031323334353637383930313233343536373839303120, 0x3132333435363738393031323334353637383930313233343536373839303120, 0x3132333435363738390000000000000000000000000000000000000000000000 // f() -> 0x40, 0x80, 6, 0x6162636465660000000000000000000000000000000000000000000000000000, 0x49, 0x3132333435363738393031323334353637383930313233343536373839303120, 0x3132333435363738393031323334353637383930313233343536373839303120, 0x3132333435363738390000000000000000000000000000000000000000000000
// gas irOptimized: 172274 // gas irOptimized: 180274
// gas legacy: 174794 // gas legacy: 180694
// gas legacyOptimized: 174188 // gas legacyOptimized: 180088
// g() -> 0x40, 0xc0, 0x49, 0x3132333435363738393031323334353637383930313233343536373839303120, 0x3132333435363738393031323334353637383930313233343536373839303120, 0x3132333435363738390000000000000000000000000000000000000000000000, 0x11, 0x3132333435363738393233343536373839000000000000000000000000000000 // g() -> 0x40, 0xc0, 0x49, 0x3132333435363738393031323334353637383930313233343536373839303120, 0x3132333435363738393031323334353637383930313233343536373839303120, 0x3132333435363738390000000000000000000000000000000000000000000000, 0x11, 0x3132333435363738393233343536373839000000000000000000000000000000
// gas legacy: 100595 // gas irOptimized: 107618
// gas legacy: 107895
// gas legacyOptimized: 107254
// h() -> 0x40, 0x60, 0x00, 0x00 // h() -> 0x40, 0x60, 0x00, 0x00
// storageEmpty -> 1 // storageEmpty -> 1

View File

@ -48,6 +48,6 @@ contract C {
// compileViaYul: also // compileViaYul: also
// ---- // ----
// f() -> 0xff // f() -> 0xff
// gas irOptimized: 132909 // gas irOptimized: 122009
// gas legacy: 137645 // gas legacy: 126745
// gas legacyOptimized: 134376 // gas legacyOptimized: 123476

View File

@ -18,6 +18,6 @@ contract C {
// compileViaYul: also // compileViaYul: also
// ---- // ----
// test() -> 7 // test() -> 7
// gas irOptimized: 133946 // gas irOptimized: 127846
// gas legacy: 211296 // gas legacy: 205196
// gas legacyOptimized: 211087 // gas legacyOptimized: 204987

View File

@ -22,6 +22,6 @@ contract C {
// compileViaYul: also // compileViaYul: also
// ---- // ----
// one() -> 3 // one() -> 3
// gas legacy: 154760 // gas legacy: 140260
// gas legacyOptimized: 154597 // gas legacyOptimized: 140097
// two() -> FAILURE, hex"4e487b71", 0x51 // two() -> FAILURE, hex"4e487b71", 0x51

View File

@ -9,9 +9,9 @@ contract c {
// compileViaYul: also // compileViaYul: also
// ---- // ----
// set(): 1, 2, 3, 4, 5 -> true // set(): 1, 2, 3, 4, 5 -> true
// gas irOptimized: 163657 // gas irOptimized: 177557
// gas legacy: 163756 // gas legacy: 177656
// gas legacyOptimized: 163596 // gas legacyOptimized: 177496
// storageEmpty -> 0 // storageEmpty -> 0
// reset() -> true // reset() -> true
// storageEmpty -> 1 // storageEmpty -> 1

View File

@ -20,6 +20,6 @@ contract C {
// compileViaYul: also // compileViaYul: also
// ---- // ----
// f() -> 3 // f() -> 3
// gas irOptimized: 173108 // gas irOptimized: 134208
// gas legacy: 179707 // gas legacy: 130307
// gas legacyOptimized: 178763 // gas legacyOptimized: 129363

View File

@ -19,6 +19,6 @@ contract C {
// compileViaYul: also // compileViaYul: also
// ---- // ----
// f() -> 1, 2, 3, 4, 5, 6, 7 // f() -> 1, 2, 3, 4, 5, 6, 7
// gas irOptimized: 212108 // gas irOptimized: 209108
// gas legacy: 223725 // gas legacy: 212325
// gas legacyOptimized: 222886 // gas legacyOptimized: 211486

View File

@ -13,6 +13,6 @@ contract C {
// compileViaYul: also // compileViaYul: also
// ---- // ----
// f() -> 0x20, 0x02, 0x40, 0x80, 3, 0x6162630000000000000000000000000000000000000000000000000000000000, 0x99, 44048183304486788312148433451363384677562265908331949128489393215789685032262, 32241931068525137014058842823026578386641954854143559838526554899205067598957, 49951309422467613961193228765530489307475214998374779756599339590522149884499, 0x54555658595a6162636465666768696a6b6c6d6e6f707172737475767778797a, 0x4142434445464748494a4b4c4d4e4f5051525354555658595a00000000000000 // f() -> 0x20, 0x02, 0x40, 0x80, 3, 0x6162630000000000000000000000000000000000000000000000000000000000, 0x99, 44048183304486788312148433451363384677562265908331949128489393215789685032262, 32241931068525137014058842823026578386641954854143559838526554899205067598957, 49951309422467613961193228765530489307475214998374779756599339590522149884499, 0x54555658595a6162636465666768696a6b6c6d6e6f707172737475767778797a, 0x4142434445464748494a4b4c4d4e4f5051525354555658595a00000000000000
// gas irOptimized: 197063 // gas irOptimized: 203063
// gas legacy: 199159 // gas legacy: 204459
// gas legacyOptimized: 198137 // gas legacyOptimized: 203437

View File

@ -20,6 +20,6 @@ contract C {
// compileViaYul: also // compileViaYul: also
// ---- // ----
// f() -> 1, 2, 3, 4, 5, 6, 7 // f() -> 1, 2, 3, 4, 5, 6, 7
// gas irOptimized: 212108 // gas irOptimized: 209108
// gas legacy: 223730 // gas legacy: 212330
// gas legacyOptimized: 222891 // gas legacyOptimized: 211491

View File

@ -26,6 +26,6 @@ contract C {
// compileViaYul: also // compileViaYul: also
// ---- // ----
// f() -> 11, 0x0c, 1, 0x15, 22, 4 // f() -> 11, 0x0c, 1, 0x15, 22, 4
// gas irOptimized: 288695 // gas irOptimized: 293695
// gas legacy: 296916 // gas legacy: 293516
// gas legacyOptimized: 283163 // gas legacyOptimized: 290263

View File

@ -15,6 +15,6 @@ contract C {
// compileViaYul: also // compileViaYul: also
// ---- // ----
// f() -> 2, 3, 4 // f() -> 2, 3, 4
// gas irOptimized: 208083 // gas irOptimized: 115383
// gas legacy: 241549 // gas legacy: 126449
// gas legacyOptimized: 236002 // gas legacyOptimized: 120902

View File

@ -18,6 +18,6 @@ contract c {
// compileViaYul: also // compileViaYul: also
// ---- // ----
// test1() -> true // test1() -> true
// gas irOptimized: 527479 // gas irOptimized: 244579
// gas legacy: 613377 // gas legacy: 255577
// gas legacyOptimized: 606411 // gas legacyOptimized: 248611

View File

@ -16,4 +16,4 @@ contract C {
// compileViaYul: also // compileViaYul: also
// ---- // ----
// f() -> 0, 0, 0 // f() -> 0, 0, 0
// gas irOptimized: 101279 // gas irOptimized: 91179

View File

@ -16,9 +16,9 @@ contract c {
// ---- // ----
// storageEmpty -> 1 // storageEmpty -> 1
// fill() -> // fill() ->
// gas irOptimized: 535098 // gas irOptimized: 520998
// gas legacy: 504373 // gas legacy: 521773
// gas legacyOptimized: 499648 // gas legacyOptimized: 517048
// storageEmpty -> 0 // storageEmpty -> 0
// halfClear() -> // halfClear() ->
// storageEmpty -> 0 // storageEmpty -> 0

View File

@ -44,9 +44,9 @@ contract c {
// ---- // ----
// getLengths() -> 0, 0 // getLengths() -> 0, 0
// setLengths(uint256,uint256): 48, 49 -> // setLengths(uint256,uint256): 48, 49 ->
// gas irOptimized: 273726 // gas irOptimized: 108326
// gas legacy: 308271 // gas legacy: 108571
// gas legacyOptimized: 300117 // gas legacyOptimized: 100417
// getLengths() -> 48, 49 // getLengths() -> 48, 49
// setIDStatic(uint256): 11 -> // setIDStatic(uint256): 11 ->
// getID(uint256): 2 -> 11 // getID(uint256): 2 -> 11

View File

@ -18,9 +18,9 @@ contract c {
// ---- // ----
// storageEmpty -> 1 // storageEmpty -> 1
// fill() -> 8 // fill() -> 8
// gas irOptimized: 168980 // gas irOptimized: 124480
// gas legacy: 165456 // gas legacy: 121756
// gas legacyOptimized: 164387 // gas legacyOptimized: 120687
// storageEmpty -> 0 // storageEmpty -> 0
// clear() -> // clear() ->
// storageEmpty -> 1 // storageEmpty -> 1

View File

@ -13,9 +13,9 @@ contract c {
// ---- // ----
// storageEmpty -> 1 // storageEmpty -> 1
// fill() -> // fill() ->
// gas irOptimized: 423878 // gas irOptimized: 465878
// gas legacy: 429460 // gas legacy: 471460
// gas legacyOptimized: 425520 // gas legacyOptimized: 467520
// storageEmpty -> 0 // storageEmpty -> 0
// clear() -> // clear() ->
// storageEmpty -> 1 // storageEmpty -> 1

View File

@ -21,6 +21,6 @@ contract B {
// compileViaYul: also // compileViaYul: also
// ---- // ----
// f() -> 2, 3, 4, 5, 6, 1000, 1001, 1002, 1003, 1004 // f() -> 2, 3, 4, 5, 6, 1000, 1001, 1002, 1003, 1004
// gas irOptimized: 135883 // gas irOptimized: 133483
// gas legacy: 266210 // gas legacy: 263810
// gas legacyOptimized: 135699 // gas legacyOptimized: 133299

View File

@ -45,6 +45,6 @@ contract C {
// compileViaYul: also // compileViaYul: also
// ---- // ----
// test() -> 5, 6, 7 // test() -> 5, 6, 7
// gas irOptimized: 345955 // gas irOptimized: 337455
// gas legacy: 508437 // gas legacy: 499937
// gas legacyOptimized: 309013 // gas legacyOptimized: 300513

View File

@ -25,7 +25,7 @@ contract c {
// compileViaYul: also // compileViaYul: also
// ---- // ----
// test() -> 1, 2, 3 // test() -> 1, 2, 3
// gas irOptimized: 2455497 // gas irOptimized: 2280897
// gas legacy: 2416722 // gas legacy: 2273722
// gas legacyOptimized: 2405396 // gas legacyOptimized: 2262396
// storageEmpty -> 1 // storageEmpty -> 1

View File

@ -20,7 +20,7 @@ contract c {
// compileViaYul: also // compileViaYul: also
// ---- // ----
// test() -> 38, 28, 18 // test() -> 38, 28, 18
// gas irOptimized: 527367 // gas irOptimized: 195867
// gas legacy: 454080 // gas legacy: 189780
// gas legacyOptimized: 443170 // gas legacyOptimized: 178870
// storageEmpty -> 1 // storageEmpty -> 1

View File

@ -20,7 +20,7 @@ contract c {
// compileViaYul: also // compileViaYul: also
// ---- // ----
// test() -> 20, 10 // test() -> 20, 10
// gas irOptimized: 367121 // gas irOptimized: 163721
// gas legacy: 320859 // gas legacy: 159459
// gas legacyOptimized: 314681 // gas legacyOptimized: 153281
// storageEmpty -> 1 // storageEmpty -> 1

View File

@ -12,6 +12,6 @@ contract c {
// compileViaYul: also // compileViaYul: also
// ---- // ----
// test() -> 0x20, 29, 0x0303030303030303030303030303030303030303030303030303030303000000 // test() -> 0x20, 29, 0x0303030303030303030303030303030303030303030303030303030303000000
// gas irOptimized: 162426 // gas irOptimized: 112526
// gas legacy: 245809 // gas legacy: 127309
// gas legacyOptimized: 242636 // gas legacyOptimized: 124136

View File

@ -18,7 +18,7 @@ contract c {
// compileViaYul: also // compileViaYul: also
// ---- // ----
// test() -> true // test() -> true
// gas irOptimized: 445718 // gas irOptimized: 219418
// gas legacy: 552064 // gas legacy: 229864
// gas legacyOptimized: 533164 // gas legacyOptimized: 210964
// storageEmpty -> 1 // storageEmpty -> 1

View File

@ -17,7 +17,7 @@ contract c {
// compileViaYul: also // compileViaYul: also
// ---- // ----
// test() -> // test() ->
// gas irOptimized: 291114 // gas irOptimized: 150914
// gas legacy: 372763 // gas legacy: 165363
// gas legacyOptimized: 366846 // gas legacyOptimized: 159446
// storageEmpty -> 1 // storageEmpty -> 1

View File

@ -12,6 +12,6 @@ contract c {
// compileViaYul: also // compileViaYul: also
// ---- // ----
// test() -> 0x20, 33, 0x303030303030303030303030303030303030303030303030303030303030303, 0x0300000000000000000000000000000000000000000000000000000000000000 // test() -> 0x20, 33, 0x303030303030303030303030303030303030303030303030303030303030303, 0x0300000000000000000000000000000000000000000000000000000000000000
// gas irOptimized: 159714 // gas irOptimized: 110514
// gas legacy: 243287 // gas legacy: 126187
// gas legacyOptimized: 240361 // gas legacyOptimized: 123261

View File

@ -18,6 +18,6 @@ contract c {
// compileViaYul: also // compileViaYul: also
// ---- // ----
// test() -> 5, 4, 3, 3 // test() -> 5, 4, 3, 3
// gas irOptimized: 110669 // gas irOptimized: 111269
// gas legacy: 111938 // gas legacy: 111838
// gas legacyOptimized: 110528 // gas legacyOptimized: 111128

View File

@ -14,6 +14,6 @@ contract C {
// compileViaYul: also // compileViaYul: also
// ---- // ----
// f(uint120[]): 0x20, 3, 1, 2, 3 -> 1 // f(uint120[]): 0x20, 3, 1, 2, 3 -> 1
// gas irOptimized: 116184 // gas irOptimized: 113684
// gas legacy: 116886 // gas legacy: 113686
// gas legacyOptimized: 116699 // gas legacyOptimized: 113499

View File

@ -16,6 +16,6 @@ contract c {
// compileViaYul: also // compileViaYul: also
// ---- // ----
// test() -> 1, 2, 3, 4 // test() -> 1, 2, 3, 4
// gas irOptimized: 111583 // gas irOptimized: 93083
// gas legacy: 107098 // gas legacy: 92798
// gas legacyOptimized: 106362 // gas legacyOptimized: 92062

View File

@ -22,6 +22,6 @@ contract c {
// compileViaYul: also // compileViaYul: also
// ---- // ----
// test() -> 2, 3, 4, 5 // test() -> 2, 3, 4, 5
// gas irOptimized: 146270 // gas irOptimized: 138070
// gas legacy: 190684 // gas legacy: 147484
// gas legacyOptimized: 188256 // gas legacyOptimized: 146456

View File

@ -18,6 +18,6 @@ contract c {
// compileViaYul: also // compileViaYul: also
// ---- // ----
// test((uint16,uint16,uint16[3],uint16[])): 0x20, 2, 3, 0, 0, 4, 0xC0, 4, 0, 0, 5, 0, 0 -> 2, 3, 4, 5 // test((uint16,uint16,uint16[3],uint16[])): 0x20, 2, 3, 0, 0, 4, 0xC0, 4, 0, 0, 5, 0, 0 -> 2, 3, 4, 5
// gas irOptimized: 147998 // gas irOptimized: 139798
// gas legacy: 152522 // gas legacy: 144322
// gas legacyOptimized: 146671 // gas legacyOptimized: 139171

View File

@ -17,6 +17,6 @@ contract c {
// compileViaYul: also // compileViaYul: also
// ---- // ----
// test() -> 0 // test() -> 0
// gas irOptimized: 394087 // gas irOptimized: 195787
// gas legacy: 565428 // gas legacy: 218028
// gas legacyOptimized: 552524 // gas legacyOptimized: 205124

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