This commit is contained in:
Alex Beregszaszi 2023-09-01 19:52:16 -07:00 committed by GitHub
commit 69d6812d4b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
140 changed files with 339 additions and 235 deletions

View File

@ -67,7 +67,7 @@ unsigned Assembly::codeSize(unsigned subTagSize) const
ret += i.second.size();
for (AssemblyItem const& i: m_items)
ret += i.bytesRequired(tagSize, Precision::Approximate);
ret += i.bytesRequired(tagSize, m_evmVersion, Precision::Approximate);
if (numberEncodingSize(ret) <= tagSize)
return static_cast<unsigned>(ret);
}
@ -383,7 +383,7 @@ std::map<u256, u256> const& Assembly::optimiseInternal(
if (_settings.runPeephole)
{
PeepholeOptimiser peepOpt{m_items};
PeepholeOptimiser peepOpt{m_items, m_evmVersion};
while (peepOpt.optimise())
{
count++;

View File

@ -116,7 +116,7 @@ void AssemblyItem::setPushTagSubIdAndTag(size_t _subId, size_t _tag)
setData(data);
}
size_t AssemblyItem::bytesRequired(size_t _addressLength, Precision _precision) const
size_t AssemblyItem::bytesRequired(size_t _addressLength, langutil::EVMVersion _evmVersion, Precision _precision) const
{
switch (m_type)
{
@ -124,7 +124,9 @@ size_t AssemblyItem::bytesRequired(size_t _addressLength, Precision _precision)
case Tag: // 1 byte for the JUMPDEST
return 1;
case Push:
return 1 + std::max<size_t>(1, numberEncodingSize(data()));
return
1 +
std::max<size_t>((_evmVersion.hasPush0() ? 0 : 1), numberEncodingSize(data()));
case PushSubSize:
case PushProgramSize:
return 1 + 4; // worst case: a 16MB program

View File

@ -159,10 +159,11 @@ public:
/// @returns an upper bound for the number of bytes required by this item, assuming that
/// the value of a jump tag takes @a _addressLength bytes.
/// @param _evmVersion the EVM version
/// @param _precision Whether to return a precise count (which involves
/// counting immutable references which are only set after
/// a call to `assemble()`) or an approx. count.
size_t bytesRequired(size_t _addressLength, Precision _precision = Precision::Precise) const;
size_t bytesRequired(size_t _addressLength, langutil::EVMVersion _evmVersion, Precision _precision = Precision::Precise) const;
size_t arguments() const;
size_t returnValues() const;
size_t deposit() const { return returnValues() - arguments(); }
@ -204,11 +205,11 @@ private:
mutable std::optional<size_t> m_immutableOccurrences;
};
inline size_t bytesRequired(AssemblyItems const& _items, size_t _addressLength, Precision _precision = Precision::Precise)
inline size_t bytesRequired(AssemblyItems const& _items, size_t _addressLength, langutil::EVMVersion _evmVersion, Precision _precision = Precision::Precise)
{
size_t size = 0;
for (AssemblyItem const& item: _items)
size += item.bytesRequired(_addressLength, _precision);
size += item.bytesRequired(_addressLength, _evmVersion, _precision);
return size;
}

View File

@ -83,7 +83,7 @@ bigint ConstantOptimisationMethod::simpleRunGas(AssemblyItems const& _items, lan
bigint gas = 0;
for (AssemblyItem const& item: _items)
if (item.type() == Push)
gas += GasMeter::runGas(Instruction::PUSH1, _evmVersion);
gas += GasMeter::pushGas(item.data(), _evmVersion);
else if (item.type() == Operation)
{
if (item.instruction() == Instruction::EXP)
@ -100,9 +100,9 @@ bigint ConstantOptimisationMethod::dataGas(bytes const& _data) const
return bigint(GasMeter::dataGas(_data, m_params.isCreation, m_params.evmVersion));
}
size_t ConstantOptimisationMethod::bytesRequired(AssemblyItems const& _items)
size_t ConstantOptimisationMethod::bytesRequired(AssemblyItems const& _items, langutil::EVMVersion _evmVersion)
{
return evmasm::bytesRequired(_items, 3, Precision::Approximate); // assume 3 byte addresses
return evmasm::bytesRequired(_items, 3, _evmVersion, Precision::Approximate); // assume 3 byte addresses
}
void ConstantOptimisationMethod::replaceConstants(
@ -143,7 +143,7 @@ bigint CodeCopyMethod::gasNeeded() const
// Run gas: we ignore memory increase costs
simpleRunGas(copyRoutine(), m_params.evmVersion) + GasCosts::copyGas,
// Data gas for copy routines: Some bytes are zero, but we ignore them.
bytesRequired(copyRoutine()) * (m_params.isCreation ? GasCosts::txDataNonZeroGas(m_params.evmVersion) : GasCosts::createDataGas),
bytesRequired(copyRoutine(), m_params.evmVersion) * (m_params.isCreation ? GasCosts::txDataNonZeroGas(m_params.evmVersion) : GasCosts::createDataGas),
// Data gas for data itself
dataGas(toBigEndian(m_value))
);
@ -153,37 +153,74 @@ AssemblyItems CodeCopyMethod::execute(Assembly& _assembly) const
{
bytes data = toBigEndian(m_value);
assertThrow(data.size() == 32, OptimizerException, "Invalid number encoding.");
AssemblyItems actualCopyRoutine = copyRoutine();
actualCopyRoutine[4] = _assembly.newData(data);
return actualCopyRoutine;
AssemblyItem newPushData = _assembly.newData(data);
return copyRoutine(&newPushData);
}
AssemblyItems const& CodeCopyMethod::copyRoutine()
AssemblyItems CodeCopyMethod::copyRoutine(AssemblyItem* _pushData) const
{
AssemblyItems static copyRoutine{
// constant to be reused 3+ times
u256(0),
if (_pushData)
assertThrow(_pushData->type() == PushData, OptimizerException, "Invalid Assembly Item.");
// back up memory
// mload(0)
Instruction::DUP1,
Instruction::MLOAD,
AssemblyItem dataUsed = _pushData ? *_pushData : AssemblyItem(PushData, u256(1) << 16);
// codecopy(0, <offset>, 32)
u256(32),
AssemblyItem(PushData, u256(1) << 16), // replaced above in actualCopyRoutine[4]
Instruction::DUP4,
Instruction::CODECOPY,
// PUSH0 is cheaper than PUSHn/DUP/SWAP.
if (m_params.evmVersion.hasPush0())
{
// This costs ~29 gas.
AssemblyItems copyRoutine{
// back up memory
// mload(0)
u256(0),
Instruction::MLOAD,
// mload(0)
Instruction::DUP2,
Instruction::MLOAD,
// codecopy(0, <offset>, 32)
u256(32),
dataUsed,
u256(0),
Instruction::CODECOPY,
// restore original memory
Instruction::SWAP2,
Instruction::MSTORE
};
return copyRoutine;
// mload(0)
u256(0),
Instruction::MLOAD,
// restore original memory
// mstore(0, x)
Instruction::SWAP1,
u256(0),
Instruction::MSTORE
};
return copyRoutine;
}
else
{
// This costs ~33 gas.
AssemblyItems copyRoutine{
// constant to be reused 3+ times
u256(0),
// back up memory
// mload(0)
Instruction::DUP1,
Instruction::MLOAD,
// codecopy(0, <offset>, 32)
u256(32),
dataUsed,
Instruction::DUP4,
Instruction::CODECOPY,
// mload(0)
Instruction::DUP2,
Instruction::MLOAD,
// restore original memory
// mstore(0, x)
Instruction::SWAP2,
Instruction::MSTORE
};
return copyRoutine;
}
}
AssemblyItems ComputeMethod::findRepresentation(u256 const& _value)
@ -323,7 +360,7 @@ bigint ComputeMethod::gasNeeded(AssemblyItems const& _routine) const
return combineGas(
simpleRunGas(_routine, m_params.evmVersion) + numExps * (GasCosts::expGas + GasCosts::expByteGas(m_params.evmVersion)),
// Data gas for routine: Some bytes are zero, but we ignore them.
bytesRequired(_routine) * (m_params.isCreation ? GasCosts::txDataNonZeroGas(m_params.evmVersion) : GasCosts::createDataGas),
bytesRequired(_routine, m_params.evmVersion) * (m_params.isCreation ? GasCosts::txDataNonZeroGas(m_params.evmVersion) : GasCosts::createDataGas),
0
);
}

View File

@ -79,7 +79,7 @@ protected:
static bigint simpleRunGas(AssemblyItems const& _items, langutil::EVMVersion _evmVersion);
/// @returns the gas needed to store the given data literally
bigint dataGas(bytes const& _data) const;
static size_t bytesRequired(AssemblyItems const& _items);
static size_t bytesRequired(AssemblyItems const& _items, langutil::EVMVersion _evmVersion);
/// @returns the combined estimated gas usage taking @a m_params into account.
bigint combineGas(
bigint const& _runGas,
@ -123,7 +123,7 @@ public:
AssemblyItems execute(Assembly& _assembly) const override;
protected:
static AssemblyItems const& copyRoutine();
AssemblyItems copyRoutine(AssemblyItem* _pushData = nullptr) const;
};
/**

View File

@ -277,6 +277,14 @@ unsigned GasMeter::runGas(Instruction _instruction, langutil::EVMVersion _evmVer
return 0;
}
unsigned GasMeter::pushGas(u256 _value, langutil::EVMVersion _evmVersion)
{
return runGas(
(_evmVersion.hasPush0() && _value == u256(0)) ? Instruction::PUSH0 : Instruction::PUSH1,
_evmVersion
);
}
u256 GasMeter::dataGas(bytes const& _data, bool _inCreation, langutil::EVMVersion _evmVersion)
{
bigint gas = 0;

View File

@ -223,6 +223,9 @@ public:
/// change with EVM versions)
static unsigned runGas(Instruction _instruction, langutil::EVMVersion _evmVersion);
/// @returns gas costs for push instructions (may change depending on EVM version)
static unsigned pushGas(u256 _value, langutil::EVMVersion _evmVersion);
/// @returns the gas cost of the supplied data, depending whether it is in creation code, or not.
/// In case of @a _inCreation, the data is only sent as a transaction and is not stored, whereas
/// otherwise code will be stored and have to pay "createDataGas" cost.

View File

@ -59,10 +59,10 @@ u256 executionCost(RangeType const& _itemRange, langutil::EVMVersion _evmVersion
}
/// @returns an estimation of the code size in bytes needed for the AssemblyItems in @a _itemRange.
template<typename RangeType>
uint64_t codeSize(RangeType const& _itemRange)
uint64_t codeSize(RangeType const& _itemRange, langutil::EVMVersion _evmVersion)
{
return ranges::accumulate(_itemRange | ranges::views::transform(
[](auto const& _item) { return _item.bytesRequired(2, Precision::Approximate); }
[&](auto const& _item) { return _item.bytesRequired(2, _evmVersion, Precision::Approximate); }
), 0u);
}
/// @returns the tag id, if @a _item is a PushTag or Tag into the current subassembly, std::nullopt otherwise.
@ -139,7 +139,7 @@ std::map<size_t, Inliner::InlinableBlock> Inliner::determineInlinableBlocks(Asse
bool Inliner::shouldInlineFullFunctionBody(size_t _tag, ranges::span<AssemblyItem const> _block, uint64_t _pushTagCount) const
{
// Accumulate size of the inline candidate block in bytes (without the return jump).
uint64_t functionBodySize = codeSize(ranges::views::drop_last(_block, 1));
uint64_t functionBodySize = codeSize(ranges::views::drop_last(_block, 1), m_evmVersion);
// Use the number of push tags as approximation of the average number of calls to the function per run.
uint64_t numberOfCalls = _pushTagCount;
@ -167,8 +167,8 @@ bool Inliner::shouldInlineFullFunctionBody(size_t _tag, ranges::span<AssemblyIte
);
// Each call site deposits the call site pattern, whereas the jump site pattern and the function itself are deposited once.
bigint uninlinedDepositCost = GasMeter::dataGas(
numberOfCallSites * codeSize(uninlinedCallSitePattern) +
codeSize(uninlinedFunctionPattern) +
numberOfCallSites * codeSize(uninlinedCallSitePattern, m_evmVersion) +
codeSize(uninlinedFunctionPattern, m_evmVersion) +
functionBodySize,
m_isCreation,
m_evmVersion
@ -185,7 +185,7 @@ bool Inliner::shouldInlineFullFunctionBody(size_t _tag, ranges::span<AssemblyIte
// the heuristics is optimistic.
if (m_tagsReferencedFromOutside.count(_tag))
inlinedDepositCost += GasMeter::dataGas(
codeSize(uninlinedFunctionPattern) + functionBodySize,
codeSize(uninlinedFunctionPattern, m_evmVersion) + functionBodySize,
m_isCreation,
m_evmVersion
);
@ -225,8 +225,8 @@ std::optional<AssemblyItem> Inliner::shouldInline(size_t _tag, AssemblyItem cons
AssemblyItem{Instruction::JUMP},
};
if (
GasMeter::dataGas(codeSize(_block.items), m_isCreation, m_evmVersion) <=
GasMeter::dataGas(codeSize(jumpPattern), m_isCreation, m_evmVersion)
GasMeter::dataGas(codeSize(_block.items, m_evmVersion), m_isCreation, m_evmVersion) <=
GasMeter::dataGas(codeSize(jumpPattern, m_evmVersion), m_isCreation, m_evmVersion)
)
return blockExit;
}

View File

@ -520,7 +520,7 @@ bool PeepholeOptimiser::optimise()
);
if (m_optimisedItems.size() < m_items.size() || (
m_optimisedItems.size() == m_items.size() && (
evmasm::bytesRequired(m_optimisedItems, 3, approx) < evmasm::bytesRequired(m_items, 3, approx) ||
evmasm::bytesRequired(m_optimisedItems, 3, m_evmVersion, approx) < evmasm::bytesRequired(m_items, 3, m_evmVersion, approx) ||
numberOfPops(m_optimisedItems) > numberOfPops(m_items)
)
))

View File

@ -25,6 +25,8 @@
#include <cstddef>
#include <iterator>
#include <liblangutil/EVMVersion.h>
namespace solidity::evmasm
{
class AssemblyItem;
@ -41,7 +43,11 @@ public:
class PeepholeOptimiser
{
public:
explicit PeepholeOptimiser(AssemblyItems& _items): m_items(_items) {}
explicit PeepholeOptimiser(AssemblyItems& _items, langutil::EVMVersion const _evmVersion):
m_items(_items),
m_evmVersion(_evmVersion)
{
}
virtual ~PeepholeOptimiser() = default;
bool optimise();
@ -49,6 +55,7 @@ public:
private:
AssemblyItems& m_items;
AssemblyItems m_optimisedItems;
langutil::EVMVersion const m_evmVersion;
};
}

View File

@ -87,14 +87,16 @@ void GasMeterVisitor::operator()(FunctionCall const& _funCall)
void GasMeterVisitor::operator()(Literal const& _lit)
{
m_runGas += evmasm::GasMeter::runGas(evmasm::Instruction::PUSH1, m_dialect.evmVersion());
m_dataGas +=
singleByteDataGas() +
evmasm::GasMeter::dataGas(
toCompactBigEndian(valueOfLiteral(_lit), 1),
m_isCreation,
m_dialect.evmVersion()
);
m_runGas += evmasm::GasMeter::pushGas(valueOfLiteral(_lit), m_dialect.evmVersion());
if (!m_dialect.evmVersion().hasPush0() || valueOfLiteral(_lit) != u256(0))
m_dataGas +=
singleByteDataGas() +
evmasm::GasMeter::dataGas(
toCompactBigEndian(valueOfLiteral(_lit), 1),
m_isCreation,
m_dialect.evmVersion()
);
}
void GasMeterVisitor::operator()(Identifier const&)
@ -120,5 +122,7 @@ void GasMeterVisitor::instructionCostsInternal(evmasm::Instruction _instruction)
m_runGas += evmasm::GasCosts::keccak256Gas + evmasm::GasCosts::keccak256WordGas;
else
m_runGas += evmasm::GasMeter::runGas(_instruction, m_dialect.evmVersion());
m_dataGas += singleByteDataGas();
if (_instruction != evmasm::Instruction::PUSH0)
m_dataGas += singleByteDataGas();
}

View File

@ -771,7 +771,7 @@ void StackLayoutGenerator::fillInJunk(CFG::BasicBlock const& _block, CFG::Functi
yulAssert(util::contains(m_currentFunctionInfo->returnVariables, std::get<VariableSlot>(_slot)));
// Strictly speaking the cost of the PUSH0 depends on the targeted EVM version, but the difference
// will not matter here.
opGas += evmasm::GasMeter::runGas(evmasm::pushInstruction(0), langutil::EVMVersion());;
opGas += evmasm::GasMeter::pushGas(u256(0), langutil::EVMVersion());
}
}
};

View File

@ -42,6 +42,9 @@ sub_0: assembly {
eq
tag_3
jumpi
0x00
dup1
revert
tag_2:
0x00
dup1

View File

@ -42,6 +42,9 @@ sub_0: assembly {
eq
tag_3
jumpi
0x00
dup1
revert
tag_2:
0x00
dup1

View File

@ -40,6 +40,9 @@ sub_0: assembly {
eq
tag_3
jumpi
0x00
dup1
revert
tag_2:
0x00
dup1

View File

@ -22,7 +22,7 @@
{
"@f_14":
{
"entryPoint": 124,
"entryPoint": 127,
"id": 14,
"parameterSlots": 2,
"returnSlots": 1
@ -35,13 +35,13 @@
},
"abi_decode_tuple_t_array$_t_uint256_$dyn_calldata_ptr":
{
"entryPoint": 158,
"entryPoint": 161,
"parameterSlots": 2,
"returnSlots": 2
},
"abi_decode_tuple_t_uint256":
{
"entryPoint": 269,
"entryPoint": 272,
"parameterSlots": 2,
"returnSlots": 1
},
@ -52,7 +52,7 @@
},
"panic_error_0x32":
{
"entryPoint": 292,
"entryPoint": 295,
"parameterSlots": 0,
"returnSlots": 0
}

View File

@ -42,6 +42,9 @@ sub_0: assembly {
eq
tag_3
jumpi
0x00
dup1
revert
tag_2:
0x00
dup1

View File

@ -73,6 +73,9 @@ sub_0: assembly {
eq
tag_3
jumpi
0x00
dup1
revert
tag_2:
0x00
dup1

View File

@ -42,6 +42,9 @@ sub_0: assembly {
eq
tag_3
jumpi
0x00
dup1
revert
tag_2:
0x00
dup1

View File

@ -50,6 +50,9 @@ sub_0: assembly {
eq
tag_3
jumpi
0x00
dup1
revert
tag_2:
0x00
dup1

View File

@ -52,6 +52,9 @@ sub_0: assembly {
eq
tag_5
jumpi
0x00
dup1
revert
tag_2:
0x00
dup1

View File

@ -74,6 +74,9 @@ sub_0: assembly {
eq
tag_4
jumpi
0x00
dup1
revert
tag_2:
0x00
dup1

View File

@ -42,6 +42,9 @@ sub_0: assembly {
eq
tag_3
jumpi
0x00
dup1
revert
tag_2:
0x00
dup1

View File

@ -42,6 +42,9 @@ sub_0: assembly {
eq
tag_3
jumpi
0x00
dup1
revert
tag_2:
0x00
dup1

View File

@ -48,6 +48,9 @@ sub_0: assembly {
eq
tag_3
jumpi
0x00
dup1
revert
tag_2:
0x00
dup1

View File

@ -48,6 +48,9 @@ sub_0: assembly {
eq
tag_3
jumpi
0x00
dup1
revert
tag_2:
0x00
dup1

View File

@ -46,6 +46,9 @@ sub_0: assembly {
eq
tag_3
jumpi
0x00
dup1
revert
tag_2:
0x00
dup1

View File

@ -1001,7 +1001,7 @@ BOOST_AUTO_TEST_CASE(clear_unreachable_code)
AssemblyItem(PushTag, 1),
Instruction::JUMP
};
PeepholeOptimiser peepOpt(items);
PeepholeOptimiser peepOpt(items, solidity::test::CommonOptions::get().evmVersion());
BOOST_REQUIRE(peepOpt.optimise());
BOOST_CHECK_EQUAL_COLLECTIONS(
items.begin(), items.end(),
@ -1027,7 +1027,7 @@ BOOST_AUTO_TEST_CASE(peephole_double_push)
u256(4),
u256(5)
};
PeepholeOptimiser peepOpt(items);
PeepholeOptimiser peepOpt(items, solidity::test::CommonOptions::get().evmVersion());
BOOST_REQUIRE(peepOpt.optimise());
BOOST_CHECK_EQUAL_COLLECTIONS(
items.begin(), items.end(),
@ -1043,7 +1043,7 @@ BOOST_AUTO_TEST_CASE(peephole_pop_calldatasize)
Instruction::LT,
Instruction::POP
};
PeepholeOptimiser peepOpt(items);
PeepholeOptimiser peepOpt(items, solidity::test::CommonOptions::get().evmVersion());
for (size_t i = 0; i < 3; i++)
BOOST_CHECK(peepOpt.optimise());
BOOST_CHECK(items.empty());
@ -1076,7 +1076,7 @@ BOOST_AUTO_TEST_CASE(peephole_commutative_swap1)
u256(4),
u256(5)
};
PeepholeOptimiser peepOpt(items);
PeepholeOptimiser peepOpt(items, solidity::test::CommonOptions::get().evmVersion());
BOOST_REQUIRE(peepOpt.optimise());
BOOST_CHECK_EQUAL_COLLECTIONS(
items.begin(), items.end(),
@ -1114,7 +1114,7 @@ BOOST_AUTO_TEST_CASE(peephole_noncommutative_swap1)
u256(4),
u256(5)
};
PeepholeOptimiser peepOpt(items);
PeepholeOptimiser peepOpt(items, solidity::test::CommonOptions::get().evmVersion());
BOOST_REQUIRE(!peepOpt.optimise());
BOOST_CHECK_EQUAL_COLLECTIONS(
items.begin(), items.end(),
@ -1149,7 +1149,7 @@ BOOST_AUTO_TEST_CASE(peephole_swap_comparison)
u256(4),
u256(5)
};
PeepholeOptimiser peepOpt(items);
PeepholeOptimiser peepOpt(items, solidity::test::CommonOptions::get().evmVersion());
BOOST_REQUIRE(peepOpt.optimise());
BOOST_CHECK_EQUAL_COLLECTIONS(
items.begin(), items.end(),
@ -1175,7 +1175,7 @@ BOOST_AUTO_TEST_CASE(peephole_truthy_and)
AssemblyItem(PushTag, 1),
Instruction::JUMPI
};
PeepholeOptimiser peepOpt(items);
PeepholeOptimiser peepOpt(items, solidity::test::CommonOptions::get().evmVersion());
BOOST_REQUIRE(peepOpt.optimise());
BOOST_CHECK_EQUAL_COLLECTIONS(
items.begin(), items.end(),
@ -1208,7 +1208,7 @@ BOOST_AUTO_TEST_CASE(peephole_iszero_iszero_jumpi)
u256(0x20),
Instruction::RETURN
};
PeepholeOptimiser peepOpt(items);
PeepholeOptimiser peepOpt(items, solidity::test::CommonOptions::get().evmVersion());
BOOST_REQUIRE(peepOpt.optimise());
BOOST_CHECK_EQUAL_COLLECTIONS(
items.begin(), items.end(),
@ -1878,8 +1878,9 @@ BOOST_AUTO_TEST_CASE(inliner_revert_increased_datagas)
{
// Inlining this would increase data gas (5 bytes v/s 4 bytes), therefore, skipped.
AssemblyItems items{
AssemblyItem(PushTag, 1),
Instruction::JUMP,
u256(0),
u256(0),
Instruction::REVERT,
AssemblyItem(Tag, 1),
u256(0),
u256(0),

View File

@ -169,13 +169,14 @@ BOOST_AUTO_TEST_CASE(location_test)
AssemblyItems items = compileContract(make_shared<CharStream>(sourceCode, ""));
shared_ptr<string> sourceName = make_shared<string>();
bool hasShifts = solidity::test::CommonOptions::get().evmVersion().hasBitwiseShifting();
bool hasPush0 = solidity::test::CommonOptions::get().evmVersion().hasPush0();
auto codegenCharStream = make_shared<CharStream>("", "--CODEGEN--");
vector<SourceLocation> locations;
if (solidity::test::CommonOptions::get().optimize)
locations =
vector<SourceLocation>(31, SourceLocation{23, 103, sourceName}) +
vector<SourceLocation>(hasPush0 ? 34 : 31, SourceLocation{23, 103, sourceName}) +
vector<SourceLocation>(1, SourceLocation{41, 100, sourceName}) +
vector<SourceLocation>(1, SourceLocation{93, 95, sourceName}) +
vector<SourceLocation>(15, SourceLocation{41, 100, sourceName});

View File

@ -116,7 +116,7 @@ BOOST_AUTO_TEST_CASE(string_storage)
CHECK_DEPLOY_GAS(0, 97697, evmVersion);
// Shanghai is cheaper due to `push0`
else
CHECK_DEPLOY_GAS(0, 97071, evmVersion);
CHECK_DEPLOY_GAS(0, 97719, evmVersion);
}
else
{
@ -134,7 +134,7 @@ BOOST_AUTO_TEST_CASE(string_storage)
else if (evmVersion < EVMVersion::shanghai())
CHECK_DEPLOY_GAS(114077, 96461, evmVersion);
else
CHECK_DEPLOY_GAS(114077, 95835, evmVersion);
CHECK_DEPLOY_GAS(114077, 96483, evmVersion);
if (evmVersion >= EVMVersion::byzantium())
{

View File

@ -17,9 +17,9 @@ contract C {
// optimize-yul: true
// ----
// creation:
// codeDepositCost: 638600
// codeDepositCost: 639200
// executionCost: 668
// totalCost: 639268
// totalCost: 639868
// external:
// a(): 2283
// b(uint256): 4649

View File

@ -27,9 +27,9 @@ contract Large {
// optimize-runs: 2
// ----
// creation:
// codeDepositCost: 224600
// codeDepositCost: 225200
// executionCost: 267
// totalCost: 224867
// totalCost: 225467
// external:
// a(): 2281
// b(uint256): 4934

View File

@ -14,9 +14,9 @@ contract Medium {
// optimize-runs: 2
// ----
// creation:
// codeDepositCost: 126000
// codeDepositCost: 126600
// executionCost: 169
// totalCost: 126169
// totalCost: 126769
// external:
// a(): 2281
// b(uint256): 4692

View File

@ -19,9 +19,9 @@ contract C {
// optimize-yul: true
// ----
// creation:
// codeDepositCost: 35800
// codeDepositCost: 36400
// executionCost: 85
// totalCost: 35885
// totalCost: 36485
// external:
// exp_neg_one(uint256): 1914
// exp_one(uint256): 1868

View File

@ -15,9 +15,9 @@ contract C {
// optimize-yul: true
// ----
// creation:
// codeDepositCost: 25600
// executionCost: 73
// totalCost: 25673
// codeDepositCost: 26200
// executionCost: 79
// totalCost: 26279
// external:
// readX(): 2288
// resetX(): 5114

View File

@ -51,5 +51,5 @@ contract C {
// f3() -> 0x20, 0xa0, 0x1, 0x60, 0x2, 0x3, "abc"
// f4() -> 0x20, 0x160, 0x1, 0x80, 0xc0, 0x2, 0x3, "abc", 0x7, 0x40, 0x2, 0x2, 0x3
// gas irOptimized: 112630
// gas legacy: 114794
// gas legacy: 114793
// gas legacyOptimized: 112572

View File

@ -32,4 +32,4 @@ contract C is B {
// test() -> 77
// gas irOptimized: 110325
// gas legacy: 151866
// gas legacyOptimized: 110359
// gas legacyOptimized: 110959

View File

@ -12,7 +12,7 @@ contract Test {
}
// ----
// 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: 186554
// gas irOptimized: 186551
// gas legacy: 211054
// gas legacyOptimized: 206042
// data(uint256,uint256): 0x02, 0x02 -> 0x09

View File

@ -17,6 +17,6 @@ contract c {
}
// ----
// test() -> 0
// gas irOptimized: 125058
// gas irOptimized: 125123
// gas legacy: 150372
// gas legacyOptimized: 146391

View File

@ -10,7 +10,7 @@ contract C {
// constructor(): 1, 2, 3 ->
// gas irOptimized: 139656
// gas legacy: 180517
// gas legacyOptimized: 150462
// gas legacyOptimized: 151110
// a(uint256): 0 -> 1
// a(uint256): 1 -> 2
// a(uint256): 2 -> 3

View File

@ -46,6 +46,6 @@ contract C {
}
// ----
// f() -> true
// gas irOptimized: 117261
// gas legacy: 124660
// gas irOptimized: 117206
// gas legacy: 124659
// gas legacyOptimized: 122801

View File

@ -18,6 +18,6 @@ contract c {
}
// ----
// test() -> 0x01000000000000000000000000000000000000000000000000, 0x02000000000000000000000000000000000000000000000000, 0x03000000000000000000000000000000000000000000000000, 0x04000000000000000000000000000000000000000000000000, 0x05000000000000000000000000000000000000000000000000
// gas irOptimized: 208053
// gas irOptimized: 207993
// gas legacy: 221769
// gas legacyOptimized: 220611

View File

@ -18,5 +18,5 @@ contract c {
// ----
// test() -> 5, 4
// gas irOptimized: 205045
// gas legacy: 213863
// gas legacy: 213864
// gas legacyOptimized: 212902

View File

@ -22,5 +22,5 @@ contract c {
// ----
// test() -> 3, 4
// gas irOptimized: 169586
// gas legacy: 175424
// gas legacy: 175419
// gas legacyOptimized: 172535

View File

@ -15,7 +15,7 @@ contract c {
// ----
// setData1(uint256,uint256,uint256): 10, 5, 4 ->
// copyStorageStorage() ->
// gas irOptimized: 111348
// gas irOptimized: 111345
// gas legacy: 109272
// gas legacyOptimized: 109262
// getData2(uint256): 5 -> 10, 4

View File

@ -18,5 +18,5 @@ contract c {
// ----
// test() -> 5, 4
// gas irOptimized: 252929
// gas legacy: 250892
// gas legacy: 250893
// gas legacyOptimized: 250046

View File

@ -15,6 +15,6 @@ contract C {
}
// ----
// f() -> 0x20, 2, 0x40, 0xa0, 2, 0, 1, 2, 2, 3
// gas irOptimized: 161624
// gas legacy: 162203
// gas irOptimized: 161627
// gas legacy: 162201
// gas legacyOptimized: 159934

View File

@ -53,8 +53,8 @@ contract C {
// ----
// from_storage() -> 0x20, 2, 0x40, 0xa0, 2, 10, 11, 3, 12, 13, 14
// gas irOptimized: 150004
// gas legacy: 150745
// gas legacyOptimized: 148678
// gas legacy: 150741
// gas legacyOptimized: 148672
// from_storage_ptr() -> 0x20, 2, 0x40, 0xa0, 2, 10, 11, 3, 12, 13, 14
// from_memory() -> 0x20, 2, 0x40, 0xa0, 2, 10, 11, 3, 12, 13, 14
// from_calldata(uint8[][]): 0x20, 2, 0x40, 0xa0, 2, 10, 11, 3, 12, 13, 14 -> 0x20, 2, 0x40, 0xa0, 2, 10, 11, 3, 12, 13, 14

View File

@ -38,12 +38,12 @@ contract Test {
}
// ----
// test() -> 24
// gas irOptimized: 226666
// gas irOptimized: 226652
// gas legacy: 227084
// gas legacyOptimized: 226529
// test1() -> 3
// test2() -> 6
// test3() -> 24
// gas irOptimized: 141223
// gas irOptimized: 141217
// gas legacy: 142238
// gas legacyOptimized: 141365

View File

@ -37,8 +37,8 @@ contract C {
}
// ----
// from_storage() -> 0x20, 2, 0x40, 0xa0, 2, 10, 11, 3, 12, 13, 14
// gas irOptimized: 147871
// gas legacy: 148896
// gas legacyOptimized: 146901
// gas irOptimized: 147862
// gas legacy: 148894
// gas legacyOptimized: 146895
// from_storage_ptr() -> 0x20, 2, 0x40, 0xa0, 2, 10, 11, 3, 12, 13, 14
// from_memory() -> 0x20, 2, 0x40, 0xa0, 2, 10, 11, 3, 12, 13, 14

View File

@ -21,21 +21,21 @@ contract c {
// gas legacy: 123948
// gas legacyOptimized: 118948
// f(uint256): 32 -> 0x20, 0x20, 1780731860627700044960722568376592200742329637303199754547598369979440671
// gas irOptimized: 124049
// gas irOptimized: 123843
// gas legacy: 140362
// gas legacyOptimized: 135386
// f(uint256): 33 -> 0x20, 33, 1780731860627700044960722568376592200742329637303199754547598369979440671, 0x2000000000000000000000000000000000000000000000000000000000000000
// gas irOptimized: 130665
// gas irOptimized: 130444
// gas legacy: 147916
// gas legacyOptimized: 142278
// f(uint256): 63 -> 0x20, 0x3f, 1780731860627700044960722568376592200742329637303199754547598369979440671, 14532552714582660066924456880521368950258152170031413196862950297402215316992
// gas irOptimized: 139545
// gas irOptimized: 139144
// gas legacy: 171136
// gas legacyOptimized: 161538
// f(uint256): 12 -> 0x20, 0x0c, 0x0102030405060708090a0b0000000000000000000000000000000000000000
// gas legacy: 59345
// gas legacyOptimized: 57279
// f(uint256): 129 -> 0x20, 0x81, 1780731860627700044960722568376592200742329637303199754547598369979440671, 0x202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f, 29063324697304692433803953038474361308315562010425523193971352996434451193439, 0x606162636465666768696a6b6c6d6e6f707172737475767778797a7b7c7d7e7f, -57896044618658097711785492504343953926634992332820282019728792003956564819968
// gas irOptimized: 442421
// gas irOptimized: 441621
// gas legacy: 505021
// gas legacyOptimized: 486997

View File

@ -10,5 +10,5 @@ contract C {
// ----
// f(uint256[]): 0x20, 0x03, 0x1, 0x2, 0x3 -> 0x1
// gas irOptimized: 110962
// gas legacy: 111551
// gas legacy: 111550
// gas legacyOptimized: 111339

View File

@ -18,5 +18,5 @@ contract C {
// constructor()
// gas irOptimized: 226349
// gas legacy: 215757
// gas legacyOptimized: 181760
// gas legacyOptimized: 182408
// f() -> 0

View File

@ -35,11 +35,11 @@ contract C {
}
// ----
// f() -> 0x40, 0x80, 6, 0x6162636465660000000000000000000000000000000000000000000000000000, 0x49, 0x3132333435363738393031323334353637383930313233343536373839303120, 0x3132333435363738393031323334353637383930313233343536373839303120, 0x3132333435363738390000000000000000000000000000000000000000000000
// gas irOptimized: 179734
// gas irOptimized: 179731
// gas legacy: 181001
// gas legacyOptimized: 180018
// g() -> 0x40, 0xc0, 0x49, 0x3132333435363738393031323334353637383930313233343536373839303120, 0x3132333435363738393031323334353637383930313233343536373839303120, 0x3132333435363738390000000000000000000000000000000000000000000000, 0x11, 0x3132333435363738393233343536373839000000000000000000000000000000
// gas irOptimized: 106663
// gas irOptimized: 106657
// gas legacy: 109720
// gas legacyOptimized: 106932
// h() -> 0x40, 0x60, 0x00, 0x00

View File

@ -15,6 +15,6 @@ contract C {
}
// ----
// test() -> 7
// gas irOptimized: 122456
// gas irOptimized: 122442
// gas legacy: 205176
// gas legacyOptimized: 204971

View File

@ -7,7 +7,7 @@ contract c {
}
// ----
// set(): 1, 2, 3, 4, 5 -> true
// gas irOptimized: 177375
// gas irOptimized: 177372
// gas legacy: 177954
// gas legacyOptimized: 177553
// storageEmpty -> 0

View File

@ -18,7 +18,7 @@ contract sender {
}
// ----
// (): 7 ->
// gas irOptimized: 110831
// gas irOptimized: 110822
// gas legacy: 111388
// gas legacyOptimized: 111070
// val() -> 0

View File

@ -46,11 +46,11 @@ contract C {
}
// ----
// test() -> 0x20, 0x14, "[a called][b called]"
// gas irOptimized: 116633
// gas irOptimized: 116622
// gas legacy: 118936
// gas legacyOptimized: 116975
// test2() -> 0x20, 0x14, "[b called][a called]"
// test3() -> 0x20, 0x14, "[b called][a called]"
// gas irOptimized: 103243
// gas irOptimized: 103238
// gas legacy: 102745
// gas legacyOptimized: 101669

View File

@ -14,5 +14,5 @@ contract C {
// ----
// f() -> 2, 3, 4
// gas irOptimized: 109698
// gas legacy: 126129
// gas legacy: 126128
// gas legacyOptimized: 120622

View File

@ -20,4 +20,4 @@ contract B {
// f() -> 2, 3, 4, 5, 6, 1000, 1001, 1002, 1003, 1004
// gas irOptimized: 114204
// gas legacy: 230001
// gas legacyOptimized: 130637
// gas legacyOptimized: 131242

View File

@ -11,6 +11,6 @@ contract Creator {
// constructor(): 1, 2, 3, 4 ->
// gas irOptimized: 126363
// gas legacy: 174186
// gas legacyOptimized: 128709
// gas legacyOptimized: 129357
// r() -> 4
// ch() -> 3

View File

@ -44,4 +44,4 @@ contract C {
// test() -> 5, 6, 7
// gas irOptimized: 256077
// gas legacy: 441556
// gas legacyOptimized: 279321
// gas legacyOptimized: 279921

View File

@ -40,7 +40,7 @@ contract C {
// copyFromStorageShort()
// x() -> 0x20, 3, 0x6162630000000000000000000000000000000000000000000000000000000000
// copyFromStorageLong()
// gas irOptimized: 121104
// gas irOptimized: 121092
// gas legacy: 121904
// gas legacyOptimized: 121400
// x() -> 0x20, 0x25, 0x3132333435363738393031323334353637383930313233343536373839303132, 0x3334353637000000000000000000000000000000000000000000000000000000

View File

@ -16,7 +16,7 @@ contract c {
}
// ----
// test() -> true
// gas irOptimized: 140154
// gas irOptimized: 139984
// gas legacy: 178397
// gas legacyOptimized: 163832
// storageEmpty -> 1

View File

@ -15,7 +15,7 @@ contract c {
}
// ----
// test() ->
// gas irOptimized: 113782
// gas irOptimized: 113734
// gas legacy: 131245
// gas legacyOptimized: 126668
// storageEmpty -> 1

View File

@ -9,6 +9,6 @@ contract c {
}
// ----
// test() -> 0x20, 33, 0x303030303030303030303030303030303030303030303030303030303030303, 0x0300000000000000000000000000000000000000000000000000000000000000
// gas irOptimized: 107976
// gas irOptimized: 107954
// gas legacy: 125420
// gas legacyOptimized: 122472

View File

@ -17,5 +17,5 @@ contract c {
// ----
// test() -> 5, 4, 3, 3
// gas irOptimized: 111363
// gas legacy: 111807
// gas legacy: 111806
// gas legacyOptimized: 111122

View File

@ -21,5 +21,5 @@ contract c {
// ----
// test() -> 2, 3, 4, 5
// gas irOptimized: 135082
// gas legacy: 147443
// gas legacy: 147439
// gas legacyOptimized: 146434

View File

@ -25,5 +25,5 @@ contract Main {
// ----
// f(uint256): 0x34 -> 0x46bddb1178e94d7f2892ff5f366840eb658911794f2c3a44c450aa2c505186c1
// gas irOptimized: 111924
// gas legacy: 125162
// gas legacyOptimized: 113012
// gas legacy: 125160
// gas legacyOptimized: 113612

View File

@ -30,7 +30,7 @@ contract C {
// constructor() ->
// gas irOptimized: 442530
// gas legacy: 711299
// gas legacyOptimized: 481296
// gas legacyOptimized: 481944
// h() -> 0x20, 0x40, 0x00, 0
// ~ emit ev(uint256[],uint256): 0x40, 0x21, 0x02, 0x00, 0x00
// g() -> 0x20, 0x40, 0, 0x00

View File

@ -9,7 +9,7 @@ contract c {
// EVMVersion: >=byzantium
// ----
// (): 1, 2, 3, 4, 5 ->
// gas irOptimized: 155131
// gas irOptimized: 155128
// gas legacy: 155473
// gas legacyOptimized: 155298
// checkIfDataIsEmpty() -> false

View File

@ -26,4 +26,4 @@ contract Creator {
// f(uint256,address[]): 7, 0x40, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 -> 7, 8
// gas irOptimized: 424508
// gas legacy: 581443
// gas legacyOptimized: 444588
// gas legacyOptimized: 445191

View File

@ -26,4 +26,4 @@ contract Creator {
// f(uint256,bytes): 7, 0x40, 78, "abcdefghijklmnopqrstuvwxyzabcdef", "ghijklmnopqrstuvwxyzabcdefghijkl", "mnopqrstuvwxyz" -> 7, "h"
// gas irOptimized: 275487
// gas legacy: 418462
// gas legacyOptimized: 291760
// gas legacyOptimized: 292366

View File

@ -10,6 +10,6 @@ contract Test {
// constructor(): 7, 0x40, 78, "abcdefghijklmnopqrstuvwxyzabcdef", "ghijklmnopqrstuvwxyzabcdefghijkl", "mnopqrstuvwxyz" ->
// gas irOptimized: 268145
// gas legacy: 311324
// gas legacyOptimized: 258388
// gas legacyOptimized: 259036
// m_x() -> 7
// m_s() -> 0x20, 78, "abcdefghijklmnopqrstuvwxyzabcdef", "ghijklmnopqrstuvwxyzabcdefghijkl", "mnopqrstuvwxyz"

View File

@ -19,6 +19,6 @@ contract Main {
// constructor(): "abc", true
// gas irOptimized: 104394
// gas legacy: 143300
// gas legacyOptimized: 102961
// gas legacyOptimized: 103609
// getFlag() -> true
// getName() -> "abc"

View File

@ -11,7 +11,7 @@ contract C {
// constructor(): 1, 2, 3, 4 ->
// gas irOptimized: 170999
// gas legacy: 218378
// gas legacyOptimized: 176195
// gas legacyOptimized: 176843
// a() -> 1
// b(uint256): 0 -> 2
// b(uint256): 1 -> 3

View File

@ -11,5 +11,5 @@ contract B is A {
// constructor() ->
// gas irOptimized: 119640
// gas legacy: 133594
// gas legacyOptimized: 115341
// gas legacyOptimized: 115989
// y() -> 42

View File

@ -23,7 +23,7 @@ contract D is B, C {
// constructor(): 2, 0 ->
// gas irOptimized: 151966
// gas legacy: 168623
// gas legacyOptimized: 144577
// gas legacyOptimized: 145225
// i() -> 2
// j() -> 2
// k() -> 1

View File

@ -14,6 +14,6 @@ contract D is C {
// constructor(): 2, 0 ->
// gas irOptimized: 121805
// gas legacy: 137193
// gas legacyOptimized: 118548
// gas legacyOptimized: 119196
// i() -> 2
// k() -> 1

View File

@ -14,5 +14,5 @@ contract C {
// createEvent(uint256): 42 ->
// ~ emit E(uint256[]): 0x20, 0x03, 0x2a, 0x2b, 0x2c
// gas irOptimized: 113485
// gas legacy: 116314
// gas legacy: 116313
// gas legacyOptimized: 114407

View File

@ -15,5 +15,5 @@ contract C {
// createEvent(uint256): 42 ->
// ~ emit E(uint256[]): 0x20, 0x03, 0x2a, 0x2b, 0x2c
// gas irOptimized: 113485
// gas legacy: 116314
// gas legacy: 116313
// gas legacyOptimized: 114407

View File

@ -16,5 +16,5 @@ contract C {
// createEvent(uint256): 42 ->
// ~ emit E(uint256[][]): 0x20, 0x02, 0x40, 0xa0, 0x02, 0x2a, 0x2b, 0x02, 0x2c, 0x2d
// gas irOptimized: 185033
// gas legacy: 187495
// gas legacy: 187493
// gas legacyOptimized: 184525

View File

@ -16,7 +16,7 @@ contract C {
// ----
// constructor() ->
// gas irOptimized: 165398
// gas legacy: 244800
// gas legacyOptimized: 171615
// gas legacy: 244799
// gas legacyOptimized: 172920
// deposit(bytes32), 18 wei: 0x1234 ->
// ~ emit Deposit(address,bytes32,uint256) from 0x137aa4dfc0911524504fcd4d98501f179bc13b4a: #0xc06afe3a8444fc0004668591e8306bfb9968e79e, #0x1234, 0x00

View File

@ -76,7 +76,7 @@ contract FixedFeeRegistrar is Registrar {
// constructor()
// gas irOptimized: 384610
// gas legacy: 913421
// gas legacyOptimized: 476928
// gas legacyOptimized: 477576
// reserve(string), 69 ether: 0x20, 3, "abc" ->
// ~ emit Changed(string): #0x4e03657aea45a94fc7d47ba826c8d667c0d1e6e33a64a036ec44f58fa12d6c45
// gas irOptimized: 45967

View File

@ -35,7 +35,7 @@ contract test {
// constructor()
// gas irOptimized: 406907
// gas legacy: 737652
// gas legacyOptimized: 526820
// gas legacyOptimized: 527468
// encode_inline_asm(bytes): 0x20, 0 -> 0x20, 0
// encode_inline_asm(bytes): 0x20, 1, "f" -> 0x20, 4, "Zg=="
// encode_inline_asm(bytes): 0x20, 2, "fo" -> 0x20, 4, "Zm8="
@ -56,5 +56,5 @@ contract test {
// gas legacyOptimized: 1199031
// encode_no_asm_large()
// gas irOptimized: 3276081
// gas legacy: 4705075
// gas legacy: 4704075
// gas legacyOptimized: 2890075

View File

@ -178,7 +178,7 @@ contract DepositContract is IDepositContract, ERC165 {
// constructor()
// gas irOptimized: 1391860
// gas legacy: 2391952
// gas legacyOptimized: 1752320
// gas legacyOptimized: 1752944
// supportsInterface(bytes4): 0x0 -> 0
// supportsInterface(bytes4): 0xffffffff00000000000000000000000000000000000000000000000000000000 -> false # defined to be false by ERC-165 #
// supportsInterface(bytes4): 0x01ffc9a700000000000000000000000000000000000000000000000000000000 -> true # ERC-165 id #

View File

@ -50,7 +50,7 @@ contract test {
// constructor()
// gas irOptimized: 1849535
// gas legacy: 2430726
// gas legacyOptimized: 1854979
// gas legacyOptimized: 1855646
// div(int256,int256): 3141592653589793238, 88714123 -> 35412542528203691288251815328
// gas irOptimized: 22137
// gas legacy: 22767

View File

@ -50,7 +50,7 @@ contract test {
// constructor()
// gas irOptimized: 1723666
// gas legacy: 2210160
// gas legacyOptimized: 1734152
// gas legacyOptimized: 1734788
// div(uint256,uint256): 3141592653589793238, 88714123 -> 35412542528203691288251815328
// gas irOptimized: 22004
// gas legacy: 22497

View File

@ -35,7 +35,7 @@ contract test {
// constructor()
// gas irOptimized: 407075
// gas legacy: 631753
// gas legacyOptimized: 459425
// gas legacyOptimized: 460073
// prb_pi() -> 3141592656369545286
// gas irOptimized: 57478
// gas legacy: 101655

View File

@ -296,7 +296,7 @@ contract Test {
// pair() -> true
// gas irOptimized: 269901
// gas legacy: 275678
// gas legacyOptimized: 267193
// gas legacyOptimized: 267130
// verifyTx() -> true
// ~ emit Verified(string): 0x20, 0x16, "Successfully verified."
// gas irOptimized: 783281

View File

@ -51,7 +51,7 @@ contract test {
// constructor()
// gas irOptimized: 633020
// gas legacy: 1065857
// gas legacyOptimized: 725207
// gas legacyOptimized: 725867
// toSlice(string): 0x20, 11, "hello world" -> 11, 0xa0
// gas irOptimized: 22660
// gas legacy: 23190

View File

@ -17,5 +17,5 @@ contract D {
// constructor(): 2 ->
// gas irOptimized: 193567
// gas legacy: 241234
// gas legacyOptimized: 192961
// gas legacyOptimized: 194257
// f() -> 2

View File

@ -19,5 +19,5 @@ contract D {
// constructor(): 2 ->
// gas irOptimized: 193730
// gas legacy: 241606
// gas legacyOptimized: 193193
// gas legacyOptimized: 194489
// f() -> 2

View File

@ -24,7 +24,7 @@ contract C {
// constructor(), 1 ether ->
// gas irOptimized: 265110
// gas legacy: 441442
// gas legacyOptimized: 292862
// gas legacyOptimized: 293510
// f(uint256): 0 -> FAILURE
// f(uint256): 1 -> FAILURE
// f(uint256): 2 -> FAILURE

View File

@ -19,7 +19,7 @@ contract C {
// constructor(), 20 wei
// gas irOptimized: 171806
// gas legacy: 285547
// gas legacyOptimized: 168515
// gas legacyOptimized: 169163
// f(uint256): 20 -> 0x137aa4dfc0911524504fcd4d98501f179bc13b4a
// x() -> 1
// f(uint256): 20 -> FAILURE

View File

@ -39,8 +39,8 @@ contract test {
// ----
// constructor(), 20 wei ->
// gas irOptimized: 253950
// gas legacy: 391588
// gas legacyOptimized: 268089
// gas legacy: 391587
// gas legacyOptimized: 269385
// sendAmount(uint256): 5 -> 5
// outOfGas() -> FAILURE # call to helper should not succeed but amount should be transferred anyway #
// checkState() -> false, 15

View File

@ -38,8 +38,8 @@ contract test {
// ----
// constructor(), 20 wei ->
// gas irOptimized: 253950
// gas legacy: 391588
// gas legacyOptimized: 268089
// gas legacy: 391587
// gas legacyOptimized: 269385
// sendAmount(uint256): 5 -> 5
// outOfGas() -> FAILURE # call to helper should not succeed but amount should be transferred anyway #
// checkState() -> false, 15

View File

@ -27,4 +27,4 @@ contract C {
// t() -> 9
// gas irOptimized: 99064
// gas legacy: 149095
// gas legacyOptimized: 106188
// gas legacyOptimized: 106788

View File

@ -29,6 +29,6 @@ contract C {
// f() -> 3, 7, 5
// gas irOptimized: 124024
// gas legacy: 148528
// gas legacyOptimized: 123971
// gas legacyOptimized: 125171
// x() -> 7
// y() -> 5

View File

@ -16,7 +16,7 @@ contract C {
// ----
// constructor(): 3 ->
// gas irOptimized: 123542
// gas legacy: 197645
// gas legacyOptimized: 137678
// gas legacy: 197644
// gas legacyOptimized: 138326
// f() -> 84, 23
// m(uint256): 3 -> 7

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