mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Fill in junk in stack layouts on terminating control flow paths.
This commit is contained in:
parent
b6cd3e154c
commit
5cd98006d4
@ -16,6 +16,7 @@ Compiler Features:
|
||||
* JSON-AST: Added selector field for errors and events.
|
||||
* LSP: Implements goto-definition.
|
||||
* Peephole Optimizer: Optimize comparisons in front of conditional jumps and conditional jumps across a single unconditional jump.
|
||||
* Yul EVM Code Transform: Avoid unnecessary ``pop``s on terminating control flow.
|
||||
* Yul Optimizer: Remove ``sstore`` and ``mstore`` operations that are never read from.
|
||||
|
||||
|
||||
|
@ -117,6 +117,35 @@ struct OpPop: SimplePeepholeOptimizerMethod<OpPop>
|
||||
}
|
||||
};
|
||||
|
||||
struct OpStop: SimplePeepholeOptimizerMethod<OpStop>
|
||||
{
|
||||
static bool applySimple(
|
||||
AssemblyItem const& _op,
|
||||
AssemblyItem const& _stop,
|
||||
std::back_insert_iterator<AssemblyItems> _out
|
||||
)
|
||||
{
|
||||
if (_stop == Instruction::STOP)
|
||||
{
|
||||
if (_op.type() == Operation)
|
||||
{
|
||||
Instruction instr = _op.instruction();
|
||||
if (!instructionInfo(instr).sideEffects)
|
||||
{
|
||||
*_out = {Instruction::STOP, _op.location()};
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else if (_op.type() == Push)
|
||||
{
|
||||
*_out = {Instruction::STOP, _op.location()};
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
struct DoubleSwap: SimplePeepholeOptimizerMethod<DoubleSwap>
|
||||
{
|
||||
static size_t applySimple(AssemblyItem const& _s1, AssemblyItem const& _s2, std::back_insert_iterator<AssemblyItems>)
|
||||
@ -430,7 +459,7 @@ bool PeepholeOptimiser::optimise()
|
||||
while (state.i < m_items.size())
|
||||
applyMethods(
|
||||
state,
|
||||
PushPop(), OpPop(), DoublePush(), DoubleSwap(), CommutativeSwap(), SwapComparison(),
|
||||
PushPop(), OpPop(), OpStop(), DoublePush(), DoubleSwap(), CommutativeSwap(), SwapComparison(),
|
||||
DupSwap(), IsZeroIsZeroJumpI(), EqIsZeroJumpI(), DoubleJump(), JumpToNext(), UnreachableCode(),
|
||||
TagConjunctions(), TruthyAnd(), Identity()
|
||||
);
|
||||
|
@ -195,6 +195,14 @@ struct CFG
|
||||
std::shared_ptr<DebugData const> debugData;
|
||||
std::vector<BasicBlock*> entries;
|
||||
std::vector<Operation> operations;
|
||||
/// True, if the block is the beginning of a disconnected subgraph. That is, if no block that is reachable
|
||||
/// from this block is an ancestor of this block. In other words, this is true, if this block is the target
|
||||
/// of a cut-edge/bridge in the CFG or if the block itself terminates.
|
||||
bool isStartOfSubGraph = false;
|
||||
/// True, if there is a path from this block to a function return.
|
||||
bool needsCleanStack = false;
|
||||
/// If the block starts a sub-graph and does not lead to a function return, we are free to add junk to it.
|
||||
bool allowsJunk() const { return isStartOfSubGraph && !needsCleanStack; }
|
||||
std::variant<MainExit, Jump, ConditionalJump, FunctionReturn, Terminated> exit = MainExit{};
|
||||
};
|
||||
|
||||
@ -205,6 +213,7 @@ struct CFG
|
||||
BasicBlock* entry = nullptr;
|
||||
std::vector<VariableSlot> parameters;
|
||||
std::vector<VariableSlot> returnVariables;
|
||||
std::vector<BasicBlock*> exits;
|
||||
};
|
||||
|
||||
/// The main entry point, i.e. the start of the outermost Yul block.
|
||||
|
@ -48,7 +48,7 @@ using namespace std;
|
||||
|
||||
namespace
|
||||
{
|
||||
// Removes edges to blocks that are not reachable.
|
||||
/// Removes edges to blocks that are not reachable.
|
||||
void cleanUnreachable(CFG& _cfg)
|
||||
{
|
||||
// Determine which blocks are reachable from the entry.
|
||||
@ -77,7 +77,8 @@ void cleanUnreachable(CFG& _cfg)
|
||||
return !reachabilityCheck.visited.count(entry);
|
||||
});
|
||||
}
|
||||
// Sets the ``recursive`` member to ``true`` for all recursive function calls.
|
||||
|
||||
/// Sets the ``recursive`` member to ``true`` for all recursive function calls.
|
||||
void markRecursiveCalls(CFG& _cfg)
|
||||
{
|
||||
map<CFG::BasicBlock*, vector<CFG::FunctionCall*>> callsPerBlock;
|
||||
@ -124,6 +125,84 @@ void markRecursiveCalls(CFG& _cfg)
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/// Marks each cut-vertex in the CFG, i.e. each block that begins a disconnected sub-graph of the CFG.
|
||||
/// Entering such a block means that control flow will never return to a previously visited block.
|
||||
void markStartsOfSubGraphs(CFG& _cfg)
|
||||
{
|
||||
vector<CFG::BasicBlock*> entries;
|
||||
entries.emplace_back(_cfg.entry);
|
||||
for (auto&& functionInfo: _cfg.functionInfo | ranges::views::values)
|
||||
entries.emplace_back(functionInfo.entry);
|
||||
for (auto& entry: entries)
|
||||
{
|
||||
/**
|
||||
* Detect bridges following Algorithm 1 in https://arxiv.org/pdf/2108.07346.pdf
|
||||
* and mark the bridge targets as starts of sub-graphs.
|
||||
*/
|
||||
set<CFG::BasicBlock*> visited;
|
||||
map<CFG::BasicBlock*, size_t> disc;
|
||||
map<CFG::BasicBlock*, size_t> low;
|
||||
map<CFG::BasicBlock*, CFG::BasicBlock*> parent;
|
||||
size_t time = 0;
|
||||
auto dfs = [&](CFG::BasicBlock* _u, auto _recurse) -> void {
|
||||
visited.insert(_u);
|
||||
disc[_u] = low[_u] = time;
|
||||
time++;
|
||||
|
||||
vector<CFG::BasicBlock*> children = _u->entries;
|
||||
visit(util::GenericVisitor{
|
||||
[&](CFG::BasicBlock::Jump const& _jump) {
|
||||
children.emplace_back(_jump.target);
|
||||
},
|
||||
[&](CFG::BasicBlock::ConditionalJump const& _jump) {
|
||||
children.emplace_back(_jump.zero);
|
||||
children.emplace_back(_jump.nonZero);
|
||||
},
|
||||
[&](CFG::BasicBlock::FunctionReturn const&) {},
|
||||
[&](CFG::BasicBlock::Terminated const&) { _u->isStartOfSubGraph = true; },
|
||||
[&](CFG::BasicBlock::MainExit const&) { _u->isStartOfSubGraph = true; }
|
||||
}, _u->exit);
|
||||
yulAssert(!util::contains(children, _u));
|
||||
|
||||
for (CFG::BasicBlock* v: children)
|
||||
if (!visited.count(v))
|
||||
{
|
||||
parent[v] = _u;
|
||||
_recurse(v, _recurse);
|
||||
low[_u] = min(low[_u], low[v]);
|
||||
if (low[v] > disc[_u])
|
||||
{
|
||||
// _u <-> v is a cut edge in the undirected graph
|
||||
bool edgeVtoU = util::contains(_u->entries, v);
|
||||
bool edgeUtoV = util::contains(v->entries, _u);
|
||||
if (edgeVtoU && !edgeUtoV)
|
||||
// Cut edge v -> _u
|
||||
_u->isStartOfSubGraph = true;
|
||||
else if (edgeUtoV && !edgeVtoU)
|
||||
// Cut edge _u -> v
|
||||
v->isStartOfSubGraph = true;
|
||||
}
|
||||
}
|
||||
else if (v != parent[_u])
|
||||
low[_u] = min(low[_u], disc[v]);
|
||||
};
|
||||
dfs(entry, dfs);
|
||||
}
|
||||
}
|
||||
|
||||
/// Marks each block that needs to maintain a clean stack. That is each block that has an outgoing
|
||||
/// path to a function return.
|
||||
void markNeedsCleanStack(CFG& _cfg)
|
||||
{
|
||||
for (auto& functionInfo: _cfg.functionInfo | ranges::views::values)
|
||||
for (CFG::BasicBlock* exit: functionInfo.exits)
|
||||
util::BreadthFirstSearch<CFG::BasicBlock*>{{exit}}.run([&](CFG::BasicBlock* _block, auto _addChild) {
|
||||
_block->needsCleanStack = true;
|
||||
for (CFG::BasicBlock* entry: _block->entries)
|
||||
_addChild(entry);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
std::unique_ptr<CFG> ControlFlowGraphBuilder::build(
|
||||
@ -141,6 +220,8 @@ std::unique_ptr<CFG> ControlFlowGraphBuilder::build(
|
||||
|
||||
cleanUnreachable(*result);
|
||||
markRecursiveCalls(*result);
|
||||
markStartsOfSubGraphs(*result);
|
||||
markNeedsCleanStack(*result);
|
||||
|
||||
// TODO: It might be worthwhile to run some further simplifications on the graph itself here.
|
||||
// E.g. if there is a jump to a node that has the jumping node as its only entry, the nodes can be fused, etc.
|
||||
@ -379,6 +460,7 @@ void ControlFlowGraphBuilder::operator()(Leave const& leave_)
|
||||
{
|
||||
yulAssert(m_currentFunction.has_value(), "");
|
||||
m_currentBlock->exit = CFG::BasicBlock::FunctionReturn{debugDataOf(leave_), *m_currentFunction};
|
||||
(*m_currentFunction)->exits.emplace_back(m_currentBlock);
|
||||
m_currentBlock = &m_graph.makeBlock(debugDataOf(*m_currentBlock));
|
||||
}
|
||||
|
||||
@ -395,6 +477,7 @@ void ControlFlowGraphBuilder::operator()(FunctionDefinition const& _function)
|
||||
builder.m_currentFunction = &functionInfo;
|
||||
builder.m_currentBlock = functionInfo.entry;
|
||||
builder(_function.body);
|
||||
functionInfo.exits.emplace_back(builder.m_currentBlock);
|
||||
builder.m_currentBlock->exit = CFG::BasicBlock::FunctionReturn{debugDataOf(_function), &functionInfo};
|
||||
}
|
||||
|
||||
@ -423,7 +506,8 @@ void ControlFlowGraphBuilder::registerFunction(FunctionDefinition const& _functi
|
||||
std::get<Scope::Variable>(virtualFunctionScope->identifiers.at(_retVar.name)),
|
||||
_retVar.debugData
|
||||
};
|
||||
}) | ranges::to<vector>
|
||||
}) | ranges::to<vector>,
|
||||
{}
|
||||
})).second;
|
||||
yulAssert(inserted);
|
||||
}
|
||||
|
@ -23,6 +23,8 @@
|
||||
|
||||
#include <libyul/backends/evm/StackHelpers.h>
|
||||
|
||||
#include <libevmasm/GasMeter.h>
|
||||
|
||||
#include <libsolutil/Algorithms.h>
|
||||
#include <libsolutil/cxx20.h>
|
||||
#include <libsolutil/Visitor.h>
|
||||
@ -400,6 +402,7 @@ void StackLayoutGenerator::processEntryPoint(CFG::BasicBlock const& _entry)
|
||||
}
|
||||
|
||||
stitchConditionalJumps(_entry);
|
||||
fillInJunk(_entry);
|
||||
}
|
||||
|
||||
optional<Stack> StackLayoutGenerator::getExitLayoutOrStageDependencies(
|
||||
@ -703,3 +706,110 @@ Stack StackLayoutGenerator::compressStack(Stack _stack)
|
||||
while (firstDupOffset);
|
||||
return _stack;
|
||||
}
|
||||
|
||||
void StackLayoutGenerator::fillInJunk(CFG::BasicBlock const& _block)
|
||||
{
|
||||
/// Recursively adds junk to the subgraph starting on @a _entry.
|
||||
/// Since it is only called on cut-vertices, the full subgraph retains proper stack balance.
|
||||
auto addJunkRecursive = [&](CFG::BasicBlock const* _entry, size_t _numJunk) {
|
||||
util::BreadthFirstSearch<CFG::BasicBlock const*> breadthFirstSearch{{_entry}};
|
||||
breadthFirstSearch.run([&](CFG::BasicBlock const* _block, auto _addChild) {
|
||||
auto& blockInfo = m_layout.blockInfos.at(_block);
|
||||
blockInfo.entryLayout = Stack{_numJunk, JunkSlot{}} + move(blockInfo.entryLayout);
|
||||
for (auto const& operation: _block->operations)
|
||||
{
|
||||
auto& operationEntryLayout = m_layout.operationEntryLayout.at(&operation);
|
||||
operationEntryLayout = Stack{_numJunk, JunkSlot{}} + move(operationEntryLayout);
|
||||
}
|
||||
blockInfo.exitLayout = Stack{_numJunk, JunkSlot{}} + move(blockInfo.exitLayout);
|
||||
|
||||
std::visit(util::GenericVisitor{
|
||||
[&](CFG::BasicBlock::MainExit const&) {},
|
||||
[&](CFG::BasicBlock::Jump const& _jump)
|
||||
{
|
||||
_addChild(_jump.target);
|
||||
},
|
||||
[&](CFG::BasicBlock::ConditionalJump const& _conditionalJump)
|
||||
{
|
||||
_addChild(_conditionalJump.zero);
|
||||
_addChild(_conditionalJump.nonZero);
|
||||
},
|
||||
[&](CFG::BasicBlock::FunctionReturn const&) { yulAssert(false); },
|
||||
[&](CFG::BasicBlock::Terminated const&) {},
|
||||
}, _block->exit);
|
||||
});
|
||||
};
|
||||
/// @returns the number of operations required to transform @a _source to @a _target.
|
||||
auto evaluateTransform = [](Stack _source, Stack const& _target) -> size_t {
|
||||
size_t opGas = 0;
|
||||
auto swap = [&](unsigned _swapDepth)
|
||||
{
|
||||
if (_swapDepth > 16)
|
||||
opGas += 1000;
|
||||
else
|
||||
opGas += evmasm::GasMeter::runGas(evmasm::swapInstruction(_swapDepth));
|
||||
};
|
||||
auto dupOrPush = [&](StackSlot const& _slot)
|
||||
{
|
||||
if (canBeFreelyGenerated(_slot))
|
||||
opGas += evmasm::GasMeter::runGas(evmasm::pushInstruction(32));
|
||||
else
|
||||
{
|
||||
auto depth = util::findOffset(_source | ranges::views::reverse, _slot);
|
||||
yulAssert(depth);
|
||||
if (*depth < 16)
|
||||
opGas += evmasm::GasMeter::runGas(evmasm::dupInstruction(static_cast<unsigned>(*depth + 1)));
|
||||
else
|
||||
opGas += 1000;
|
||||
}
|
||||
};
|
||||
auto pop = [&]() { opGas += evmasm::GasMeter::runGas(evmasm::Instruction::POP); };
|
||||
createStackLayout(_source, _target, swap, dupOrPush, pop);
|
||||
return opGas;
|
||||
};
|
||||
/// Traverses the CFG and at each block that allows junk, i.e. that is a cut-vertex that never leads to a function
|
||||
/// return, checks if adding junk reduces the shuffling cost upon entering and if so recursively adds junk
|
||||
/// to the spanned subgraph.
|
||||
util::BreadthFirstSearch<CFG::BasicBlock const*>{{&_block}}.run([&](CFG::BasicBlock const* _block, auto _addChild) {
|
||||
std::visit(util::GenericVisitor{
|
||||
[&](CFG::BasicBlock::MainExit const&) {},
|
||||
[&](CFG::BasicBlock::Jump const& _jump)
|
||||
{
|
||||
_addChild(_jump.target);
|
||||
},
|
||||
[&](CFG::BasicBlock::ConditionalJump const& _conditionalJump)
|
||||
{
|
||||
for (CFG::BasicBlock* exit: {_conditionalJump.zero, _conditionalJump.nonZero})
|
||||
if (exit->allowsJunk())
|
||||
{
|
||||
auto& blockInfo = m_layout.blockInfos.at(exit);
|
||||
Stack entryLayout = blockInfo.entryLayout;
|
||||
Stack nextLayout = exit->operations.empty() ? blockInfo.exitLayout : m_layout.operationEntryLayout.at(&exit->operations.front());
|
||||
|
||||
size_t bestCost = evaluateTransform(entryLayout, nextLayout);
|
||||
size_t bestNumJunk = 0;
|
||||
size_t maxJunk = entryLayout.size();
|
||||
for (size_t numJunk = 1; numJunk <= maxJunk; ++numJunk)
|
||||
{
|
||||
size_t cost = evaluateTransform(entryLayout, Stack{numJunk, JunkSlot{}} + nextLayout);
|
||||
if (cost < bestCost)
|
||||
{
|
||||
bestCost = cost;
|
||||
bestNumJunk = numJunk;
|
||||
}
|
||||
}
|
||||
|
||||
if (bestNumJunk > 0)
|
||||
{
|
||||
addJunkRecursive(exit, bestNumJunk);
|
||||
blockInfo.entryLayout = entryLayout;
|
||||
}
|
||||
}
|
||||
_addChild(_conditionalJump.zero);
|
||||
_addChild(_conditionalJump.nonZero);
|
||||
},
|
||||
[&](CFG::BasicBlock::FunctionReturn const&) {},
|
||||
[&](CFG::BasicBlock::Terminated const&) {},
|
||||
}, _block->exit);
|
||||
});
|
||||
}
|
||||
|
@ -111,6 +111,9 @@ private:
|
||||
/// stack @a _stack.
|
||||
static Stack compressStack(Stack _stack);
|
||||
|
||||
//// Fills in junk when entering branches that do not need a clean stack in case the result is cheaper.
|
||||
void fillInJunk(CFG::BasicBlock const& _block);
|
||||
|
||||
StackLayout& m_layout;
|
||||
};
|
||||
|
||||
|
@ -46,8 +46,6 @@ sub_0: assembly {
|
||||
/* "dup_opt_peephole/input.sol":150:162 sstore(0, x) */
|
||||
sstore
|
||||
/* "dup_opt_peephole/input.sol":107:166 {... */
|
||||
pop
|
||||
/* "dup_opt_peephole/input.sol":60:171 contract C {... */
|
||||
stop
|
||||
|
||||
auxdata: <AUXDATA REMOVED>
|
||||
|
@ -13,7 +13,7 @@
|
||||
},
|
||||
"calldata_array_index_access_uint256_dyn_calldata":
|
||||
{
|
||||
"entryPoint": 152,
|
||||
"entryPoint": 145,
|
||||
"parameterSlots": 2,
|
||||
"returnSlots": 1
|
||||
}
|
||||
|
@ -58,15 +58,10 @@
|
||||
assignImmutable(\"0xe4b1702d9298fee62dfeccc57d322a463ad55ca201256d01f62b45b2e1c21c10\")
|
||||
return
|
||||
tag_6:
|
||||
pop
|
||||
0x00
|
||||
dup1
|
||||
revert
|
||||
tag_4:
|
||||
pop
|
||||
pop
|
||||
pop
|
||||
pop
|
||||
mstore(0x00, shl(0xe0, 0x4e487b71))
|
||||
mstore(0x04, 0x41)
|
||||
revert(0x00, 0x24)
|
||||
@ -115,15 +110,12 @@ sub_0: assembly {
|
||||
tag_2
|
||||
jump\t// in
|
||||
tag_9:
|
||||
swap1
|
||||
pop
|
||||
jumpi(tag_19, callvalue)
|
||||
dup1
|
||||
add(calldatasize, not(0x03))
|
||||
slt
|
||||
tag_19
|
||||
jumpi
|
||||
pop
|
||||
0x20
|
||||
/* \"C\":290:298 immutVar */
|
||||
immutable(\"0xe4b1702d9298fee62dfeccc57d322a463ad55ca201256d01f62b45b2e1c21c10\")
|
||||
@ -221,21 +213,16 @@ sub_0: assembly {
|
||||
jumpi
|
||||
/* \"C\":79:428 contract C... */
|
||||
tag_37:
|
||||
/* \"C\":392:411 stateVar + this.f() */
|
||||
pop
|
||||
pop
|
||||
tag_38
|
||||
/* \"C\":392:422 stateVar + this.f() + immutVar */
|
||||
tag_39
|
||||
/* \"C\":392:411 stateVar + this.f() */
|
||||
swap2
|
||||
/* \"C\":79:428 contract C... */
|
||||
tag_40
|
||||
/* \"C\":392:411 stateVar + this.f() */
|
||||
swap4
|
||||
dup6
|
||||
dup8
|
||||
tag_5
|
||||
jump\t// in
|
||||
tag_38:
|
||||
tag_40:
|
||||
/* \"C\":414:422 immutVar */
|
||||
immutable(\"0xe4b1702d9298fee62dfeccc57d322a463ad55ca201256d01f62b45b2e1c21c10\")
|
||||
/* \"C\":392:422 stateVar + this.f() + immutVar */
|
||||
@ -256,7 +243,7 @@ sub_0: assembly {
|
||||
add
|
||||
swap1
|
||||
jump
|
||||
tag_40:
|
||||
tag_38:
|
||||
sub
|
||||
swap1
|
||||
return
|
||||
@ -300,10 +287,10 @@ sub_0: assembly {
|
||||
/* \"C\":79:428 contract C... */
|
||||
swap4
|
||||
/* \"C\":392:411 stateVar + this.f() */
|
||||
tag_38
|
||||
tag_40
|
||||
/* \"C\":79:428 contract C... */
|
||||
swap4
|
||||
tag_40
|
||||
tag_38
|
||||
swap7
|
||||
0x40
|
||||
mstore
|
||||
@ -325,12 +312,7 @@ sub_0: assembly {
|
||||
mstore
|
||||
mstore(0x04, 0x41)
|
||||
0x24
|
||||
swap5
|
||||
pop
|
||||
swap3
|
||||
pop
|
||||
pop
|
||||
pop
|
||||
swap1
|
||||
revert
|
||||
/* \"C\":403:411 this.f() */
|
||||
tag_41:
|
||||
@ -340,10 +322,6 @@ sub_0: assembly {
|
||||
jump(tag_42)
|
||||
tag_34:
|
||||
/* \"C\":79:428 contract C... */
|
||||
swap3
|
||||
pop
|
||||
pop
|
||||
pop
|
||||
mload(0x40)
|
||||
swap1
|
||||
returndatasize
|
||||
@ -419,17 +397,11 @@ sub_0: assembly {
|
||||
swap2
|
||||
sub
|
||||
slt
|
||||
tag_53
|
||||
tag_8
|
||||
jumpi
|
||||
mload
|
||||
swap1
|
||||
jump\t// out
|
||||
tag_53:
|
||||
pop
|
||||
pop
|
||||
0x00
|
||||
dup1
|
||||
revert
|
||||
|
||||
auxdata: <AUXDATA REMOVED>
|
||||
}
|
||||
@ -492,15 +464,10 @@ tag_8:
|
||||
assignImmutable(\"0xe4b1702d9298fee62dfeccc57d322a463ad55ca201256d01f62b45b2e1c21c10\")
|
||||
return
|
||||
tag_6:
|
||||
pop
|
||||
0x00
|
||||
dup1
|
||||
revert
|
||||
tag_4:
|
||||
pop
|
||||
pop
|
||||
pop
|
||||
pop
|
||||
mstore(0x00, shl(0xe0, 0x4e487b71))
|
||||
mstore(0x04, 0x41)
|
||||
revert(0x00, 0x24)
|
||||
@ -526,8 +493,6 @@ tag_1:
|
||||
jump\t// out
|
||||
/* \"D\":91:166 contract D is C(3)... */
|
||||
tag_9:
|
||||
pop
|
||||
pop
|
||||
mstore(0x00, shl(0xe0, 0x4e487b71))
|
||||
mstore(0x04, 0x11)
|
||||
revert(0x00, 0x24)
|
||||
@ -576,15 +541,12 @@ sub_0: assembly {
|
||||
tag_2
|
||||
jump\t// in
|
||||
tag_9:
|
||||
swap1
|
||||
pop
|
||||
jumpi(tag_19, callvalue)
|
||||
dup1
|
||||
add(calldatasize, not(0x03))
|
||||
slt
|
||||
tag_19
|
||||
jumpi
|
||||
pop
|
||||
0x20
|
||||
/* \"C\":290:298 immutVar */
|
||||
immutable(\"0xe4b1702d9298fee62dfeccc57d322a463ad55ca201256d01f62b45b2e1c21c10\")
|
||||
@ -682,21 +644,16 @@ sub_0: assembly {
|
||||
jumpi
|
||||
/* \"D\":91:166 contract D is C(3)... */
|
||||
tag_37:
|
||||
/* \"C\":392:411 stateVar + this.f() */
|
||||
pop
|
||||
pop
|
||||
tag_38
|
||||
/* \"C\":392:422 stateVar + this.f() + immutVar */
|
||||
tag_39
|
||||
/* \"C\":392:411 stateVar + this.f() */
|
||||
swap2
|
||||
/* \"D\":91:166 contract D is C(3)... */
|
||||
tag_40
|
||||
/* \"C\":392:411 stateVar + this.f() */
|
||||
swap4
|
||||
dup6
|
||||
dup8
|
||||
tag_5
|
||||
jump\t// in
|
||||
tag_38:
|
||||
tag_40:
|
||||
/* \"C\":414:422 immutVar */
|
||||
immutable(\"0xe4b1702d9298fee62dfeccc57d322a463ad55ca201256d01f62b45b2e1c21c10\")
|
||||
/* \"C\":392:422 stateVar + this.f() + immutVar */
|
||||
@ -717,7 +674,7 @@ sub_0: assembly {
|
||||
add
|
||||
swap1
|
||||
jump
|
||||
tag_40:
|
||||
tag_38:
|
||||
sub
|
||||
swap1
|
||||
return
|
||||
@ -761,10 +718,10 @@ sub_0: assembly {
|
||||
/* \"D\":91:166 contract D is C(3)... */
|
||||
swap4
|
||||
/* \"C\":392:411 stateVar + this.f() */
|
||||
tag_38
|
||||
tag_40
|
||||
/* \"D\":91:166 contract D is C(3)... */
|
||||
swap4
|
||||
tag_40
|
||||
tag_38
|
||||
swap7
|
||||
0x40
|
||||
mstore
|
||||
@ -786,12 +743,7 @@ sub_0: assembly {
|
||||
mstore
|
||||
mstore(0x04, 0x41)
|
||||
0x24
|
||||
swap5
|
||||
pop
|
||||
swap3
|
||||
pop
|
||||
pop
|
||||
pop
|
||||
swap1
|
||||
revert
|
||||
/* \"C\":403:411 this.f() */
|
||||
tag_41:
|
||||
@ -801,10 +753,6 @@ sub_0: assembly {
|
||||
jump(tag_42)
|
||||
tag_34:
|
||||
/* \"D\":91:166 contract D is C(3)... */
|
||||
swap3
|
||||
pop
|
||||
pop
|
||||
pop
|
||||
mload(0x40)
|
||||
swap1
|
||||
returndatasize
|
||||
@ -880,17 +828,11 @@ sub_0: assembly {
|
||||
swap2
|
||||
sub
|
||||
slt
|
||||
tag_53
|
||||
tag_8
|
||||
jumpi
|
||||
mload
|
||||
swap1
|
||||
jump\t// out
|
||||
tag_53:
|
||||
pop
|
||||
pop
|
||||
0x00
|
||||
dup1
|
||||
revert
|
||||
|
||||
auxdata: <AUXDATA REMOVED>
|
||||
}
|
||||
|
@ -57,15 +57,10 @@ tag_8:
|
||||
codecopy
|
||||
return
|
||||
tag_6:
|
||||
pop
|
||||
0x00
|
||||
dup1
|
||||
revert
|
||||
tag_4:
|
||||
pop
|
||||
pop
|
||||
pop
|
||||
pop
|
||||
mstore(0x00, shl(0xe0, 0x4e487b71))
|
||||
mstore(0x04, 0x41)
|
||||
revert(0x00, 0x24)
|
||||
@ -107,7 +102,6 @@ EVM assembly:
|
||||
codecopy
|
||||
return
|
||||
tag_1:
|
||||
pop
|
||||
0x00
|
||||
dup1
|
||||
revert
|
||||
@ -117,8 +111,6 @@ sub_0: assembly {
|
||||
/* "viair_subobject_optimization/input.sol":669:772 contract D {... */
|
||||
0x80
|
||||
jumpi(tag_2, iszero(lt(calldatasize, 0x04)))
|
||||
tag_3:
|
||||
pop
|
||||
0x00
|
||||
dup1
|
||||
revert
|
||||
@ -134,7 +126,9 @@ sub_0: assembly {
|
||||
tag_4
|
||||
jumpi
|
||||
pop
|
||||
jump(tag_3)
|
||||
0x00
|
||||
dup1
|
||||
revert
|
||||
tag_4:
|
||||
jumpi(tag_8, callvalue)
|
||||
dup2
|
||||
@ -188,15 +182,12 @@ sub_0: assembly {
|
||||
swap1
|
||||
return
|
||||
tag_10:
|
||||
pop
|
||||
pop
|
||||
shl(0xe0, 0x4e487b71)
|
||||
dup3
|
||||
dup5
|
||||
mstore
|
||||
pop
|
||||
mstore(0x04, 0x41)
|
||||
0x24
|
||||
swap1
|
||||
dup5
|
||||
revert
|
||||
tag_8:
|
||||
pop
|
||||
@ -330,15 +321,10 @@ sub_0: assembly {
|
||||
codecopy
|
||||
return
|
||||
tag_6:
|
||||
pop
|
||||
0x00
|
||||
dup1
|
||||
revert
|
||||
tag_4:
|
||||
pop
|
||||
pop
|
||||
pop
|
||||
pop
|
||||
mstore(0x00, shl(0xe0, 0x4e487b71))
|
||||
mstore(0x04, 0x41)
|
||||
revert(0x00, 0x24)
|
||||
|
@ -24,6 +24,6 @@ contract C {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// f() -> 0x20, 0x8, 0x40, 0x3, 0x9, 0xa, 0xb
|
||||
// gas irOptimized: 203312
|
||||
// gas irOptimized: 203310
|
||||
// gas legacy: 206075
|
||||
// gas legacyOptimized: 203059
|
||||
|
@ -60,10 +60,10 @@ contract C {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// test_bytes() ->
|
||||
// gas irOptimized: 371919
|
||||
// gas irOptimized: 371912
|
||||
// gas legacy: 416585
|
||||
// gas legacyOptimized: 322043
|
||||
// test_uint256() ->
|
||||
// gas irOptimized: 523001
|
||||
// gas irOptimized: 523016
|
||||
// gas legacy: 583100
|
||||
// gas legacyOptimized: 444161
|
||||
|
@ -26,6 +26,6 @@ contract C {
|
||||
// ----
|
||||
// library: L
|
||||
// f() -> 8, 7, 1, 2, 7, 12
|
||||
// gas irOptimized: 167696
|
||||
// gas irOptimized: 167691
|
||||
// gas legacy: 169347
|
||||
// gas legacyOptimized: 167269
|
||||
|
@ -61,10 +61,10 @@ contract C {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// test_bytes() ->
|
||||
// gas irOptimized: 371919
|
||||
// gas irOptimized: 371912
|
||||
// gas legacy: 416585
|
||||
// gas legacyOptimized: 322043
|
||||
// test_uint256() ->
|
||||
// gas irOptimized: 523001
|
||||
// gas irOptimized: 523016
|
||||
// gas legacy: 583100
|
||||
// gas legacyOptimized: 444161
|
||||
|
@ -53,6 +53,6 @@ contract C {
|
||||
// f2() -> 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
|
||||
// gas irOptimized: 113299
|
||||
// gas irOptimized: 113277
|
||||
// gas legacy: 114900
|
||||
// gas legacyOptimized: 112606
|
||||
|
@ -32,6 +32,6 @@ contract C is B {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// test() -> 77
|
||||
// gas irOptimized: 119919
|
||||
// gas irOptimized: 119911
|
||||
// gas legacy: 155093
|
||||
// gas legacyOptimized: 111550
|
||||
|
@ -21,6 +21,6 @@ contract C {
|
||||
// f(uint256[][1]): 32, 32, 0 -> true
|
||||
// f(uint256[][1]): 32, 32, 1, 42 -> true
|
||||
// f(uint256[][1]): 32, 32, 8, 421, 422, 423, 424, 425, 426, 427, 428 -> true
|
||||
// gas irOptimized: 171842
|
||||
// gas irOptimized: 171829
|
||||
// gas legacy: 140672
|
||||
// gas legacyOptimized: 119588
|
||||
|
@ -19,10 +19,10 @@ contract C {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// h(uint256[2][]): 0x20, 3, 123, 124, 223, 224, 323, 324 -> 32, 256, 0x20, 3, 123, 124, 223, 224, 323, 324
|
||||
// gas irOptimized: 180931
|
||||
// gas irOptimized: 180924
|
||||
// gas legacy: 184929
|
||||
// gas legacyOptimized: 181504
|
||||
// i(uint256[2][2]): 123, 124, 223, 224 -> 32, 128, 123, 124, 223, 224
|
||||
// gas irOptimized: 112539
|
||||
// gas irOptimized: 112520
|
||||
// gas legacy: 115468
|
||||
// gas legacyOptimized: 112988
|
||||
|
@ -14,7 +14,7 @@ contract Test {
|
||||
// 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
|
||||
// gas irOptimized: 189817
|
||||
// gas irOptimized: 189800
|
||||
// gas legacy: 211149
|
||||
// gas legacyOptimized: 206054
|
||||
// data(uint256,uint256): 0x02, 0x02 -> 0x09
|
||||
|
@ -19,6 +19,6 @@ contract c {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// test() -> 0
|
||||
// gas irOptimized: 157951
|
||||
// gas irOptimized: 157949
|
||||
// gas legacy: 188576
|
||||
// gas legacyOptimized: 183333
|
||||
|
@ -15,7 +15,7 @@ contract c {
|
||||
// ----
|
||||
// getLength() -> 0
|
||||
// set(): 1, 2 -> true
|
||||
// gas irOptimized: 110439
|
||||
// gas irOptimized: 110435
|
||||
// gas legacy: 110723
|
||||
// gas legacyOptimized: 110564
|
||||
// getLength() -> 68
|
||||
|
@ -11,7 +11,7 @@ contract C {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// constructor(): 1, 2, 3 ->
|
||||
// gas irOptimized: 143598
|
||||
// gas irOptimized: 142856
|
||||
// gas legacy: 183490
|
||||
// gas legacyOptimized: 151938
|
||||
// a(uint256): 0 -> 1
|
||||
|
@ -21,6 +21,6 @@ contract c {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// test() -> 0x01000000000000000000000000000000000000000000000000, 0x02000000000000000000000000000000000000000000000000, 0x03000000000000000000000000000000000000000000000000, 0x04000000000000000000000000000000000000000000000000, 0x05000000000000000000000000000000000000000000000000
|
||||
// gas irOptimized: 212568
|
||||
// gas irOptimized: 212564
|
||||
// gas legacy: 221856
|
||||
// gas legacyOptimized: 220680
|
||||
|
@ -37,12 +37,12 @@ contract c {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// test() -> 0x02000202
|
||||
// gas irOptimized: 4652050
|
||||
// gas irOptimized: 4652048
|
||||
// gas legacy: 4578320
|
||||
// gas legacyOptimized: 4548312
|
||||
// storageEmpty -> 1
|
||||
// clear() -> 0, 0
|
||||
// gas irOptimized: 4483175
|
||||
// gas irOptimized: 4483170
|
||||
// gas legacy: 4410748
|
||||
// gas legacyOptimized: 4382489
|
||||
// storageEmpty -> 1
|
||||
|
@ -15,6 +15,6 @@ contract c {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// test(uint256[2][]): 32, 3, 7, 8, 9, 10, 11, 12 -> 10
|
||||
// gas irOptimized: 690205
|
||||
// gas irOptimized: 690203
|
||||
// gas legacy: 686268
|
||||
// gas legacyOptimized: 685688
|
||||
|
@ -19,6 +19,6 @@ contract c {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// test() -> 5, 4
|
||||
// gas irOptimized: 225956
|
||||
// gas irOptimized: 225954
|
||||
// gas legacy: 233801
|
||||
// gas legacyOptimized: 232816
|
||||
|
@ -17,7 +17,7 @@ contract c {
|
||||
// ----
|
||||
// setData1(uint256,uint256,uint256): 10, 5, 4 ->
|
||||
// copyStorageStorage() ->
|
||||
// gas irOptimized: 111397
|
||||
// gas irOptimized: 111387
|
||||
// gas legacy: 109278
|
||||
// gas legacyOptimized: 109268
|
||||
// getData2(uint256): 5 -> 10, 4
|
||||
|
@ -18,6 +18,6 @@ contract c {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// test() -> 8, 0
|
||||
// gas irOptimized: 236090
|
||||
// gas irOptimized: 236079
|
||||
// gas legacy: 234695
|
||||
// gas legacyOptimized: 234103
|
||||
|
@ -22,6 +22,6 @@ contract c {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// test() -> 0x01000000000000000000000000000000000000000000000000, 0x02000000000000000000000000000000000000000000000000, 0x03000000000000000000000000000000000000000000000000, 0x04000000000000000000000000000000000000000000000000, 0x0
|
||||
// gas irOptimized: 294772
|
||||
// gas irOptimized: 294770
|
||||
// gas legacy: 303626
|
||||
// gas legacyOptimized: 301945
|
||||
|
@ -22,6 +22,6 @@ contract c {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// test() -> 0x01000000000000000000000000000000000000000000000000, 0x02000000000000000000000000000000000000000000000000, 0x03000000000000000000000000000000000000000000000000, 0x04000000000000000000000000000000000000000000000000, 0x00
|
||||
// gas irOptimized: 273963
|
||||
// gas irOptimized: 273961
|
||||
// gas legacy: 276360
|
||||
// gas legacyOptimized: 275411
|
||||
|
@ -40,8 +40,8 @@ contract c {
|
||||
// test1(uint256[][]): 0x20, 2, 0x40, 0x40, 2, 23, 42 -> 2, 65
|
||||
// gas irOptimized: 181298
|
||||
// test2(uint256[][2]): 0x20, 0x40, 0x40, 2, 23, 42 -> 2, 65
|
||||
// gas irOptimized: 157936
|
||||
// gas irOptimized: 157929
|
||||
// test3(uint256[2][]): 0x20, 2, 23, 42, 23, 42 -> 2, 65
|
||||
// gas irOptimized: 135098
|
||||
// test4(uint256[2][2]): 23, 42, 23, 42 -> 65
|
||||
// gas irOptimized: 111362
|
||||
// gas irOptimized: 111346
|
||||
|
@ -46,6 +46,6 @@ contract Test {
|
||||
// test1() -> 3
|
||||
// test2() -> 6
|
||||
// test3() -> 24
|
||||
// gas irOptimized: 133597
|
||||
// gas irOptimized: 133590
|
||||
// gas legacy: 134295
|
||||
// gas legacyOptimized: 133383
|
||||
|
@ -47,7 +47,7 @@ contract C {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// copyExternalStorageArrayOfFunctionType() -> true
|
||||
// gas irOptimized: 104669
|
||||
// gas irOptimized: 104659
|
||||
// gas legacy: 108722
|
||||
// gas legacyOptimized: 102438
|
||||
// copyInternalArrayOfFunctionType() -> true
|
||||
|
@ -50,7 +50,7 @@ contract C {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// copyExternalStorageArraysOfFunctionType() -> true
|
||||
// gas irOptimized: 104342
|
||||
// gas irOptimized: 104332
|
||||
// gas legacy: 108459
|
||||
// gas legacyOptimized: 102171
|
||||
// copyInternalArrayOfFunctionType() -> true
|
||||
|
@ -17,4 +17,4 @@ contract C {
|
||||
// compileViaYul: true
|
||||
// ----
|
||||
// f((uint128,uint64,uint128)[]): 0x20, 3, 0, 0, 12, 0, 11, 0, 10, 0, 0 -> 10, 11, 12
|
||||
// gas irOptimized: 121021
|
||||
// gas irOptimized: 121019
|
||||
|
@ -19,4 +19,4 @@ contract C {
|
||||
// compileViaYul: true
|
||||
// ----
|
||||
// f() -> 10, 11, 12
|
||||
// gas irOptimized: 119149
|
||||
// gas irOptimized: 119148
|
||||
|
@ -19,25 +19,25 @@ contract c {
|
||||
// ----
|
||||
// f(uint256): 0 -> 0x20, 0x00
|
||||
// f(uint256): 31 -> 0x20, 0x1f, 0x0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e00
|
||||
// gas irOptimized: 121741
|
||||
// gas irOptimized: 121735
|
||||
// gas legacy: 123884
|
||||
// gas legacyOptimized: 119139
|
||||
// f(uint256): 32 -> 0x20, 0x20, 1780731860627700044960722568376592200742329637303199754547598369979440671
|
||||
// gas irOptimized: 130733
|
||||
// gas irOptimized: 130727
|
||||
// gas legacy: 134936
|
||||
// gas legacyOptimized: 130046
|
||||
// f(uint256): 33 -> 0x20, 33, 1780731860627700044960722568376592200742329637303199754547598369979440671, 0x2000000000000000000000000000000000000000000000000000000000000000
|
||||
// gas irOptimized: 137732
|
||||
// gas irOptimized: 137726
|
||||
// gas legacy: 141728
|
||||
// gas legacyOptimized: 136711
|
||||
// f(uint256): 63 -> 0x20, 0x3f, 1780731860627700044960722568376592200742329637303199754547598369979440671, 14532552714582660066924456880521368950258152170031413196862950297402215316992
|
||||
// gas irOptimized: 152352
|
||||
// gas irOptimized: 152346
|
||||
// gas legacy: 159768
|
||||
// gas legacyOptimized: 150641
|
||||
// f(uint256): 12 -> 0x20, 0x0c, 0x0102030405060708090a0b0000000000000000000000000000000000000000
|
||||
// gas legacy: 59345
|
||||
// gas legacyOptimized: 57279
|
||||
// f(uint256): 129 -> 0x20, 0x81, 1780731860627700044960722568376592200742329637303199754547598369979440671, 0x202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f, 29063324697304692433803953038474361308315562010425523193971352996434451193439, 0x606162636465666768696a6b6c6d6e6f707172737475767778797a7b7c7d7e7f, -57896044618658097711785492504343953926634992332820282019728792003956564819968
|
||||
// gas irOptimized: 406089
|
||||
// gas irOptimized: 406083
|
||||
// gas legacy: 421067
|
||||
// gas legacyOptimized: 402910
|
||||
|
@ -11,6 +11,6 @@ contract C {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// f(uint256[]): 0x20, 0x03, 0x1, 0x2, 0x3 -> 0x1
|
||||
// gas irOptimized: 111161
|
||||
// gas irOptimized: 111159
|
||||
// gas legacy: 111565
|
||||
// gas legacyOptimized: 111347
|
||||
|
@ -37,7 +37,7 @@ contract C {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// f() -> 0x40, 0x80, 6, 0x6162636465660000000000000000000000000000000000000000000000000000, 0x49, 0x3132333435363738393031323334353637383930313233343536373839303120, 0x3132333435363738393031323334353637383930313233343536373839303120, 0x3132333435363738390000000000000000000000000000000000000000000000
|
||||
// gas irOptimized: 179899
|
||||
// gas irOptimized: 179895
|
||||
// gas legacy: 180676
|
||||
// gas legacyOptimized: 180070
|
||||
// g() -> 0x40, 0xc0, 0x49, 0x3132333435363738393031323334353637383930313233343536373839303120, 0x3132333435363738393031323334353637383930313233343536373839303120, 0x3132333435363738390000000000000000000000000000000000000000000000, 0x11, 0x3132333435363738393233343536373839000000000000000000000000000000
|
||||
|
@ -48,6 +48,6 @@ contract C {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// f() -> 0xff
|
||||
// gas irOptimized: 121125
|
||||
// gas irOptimized: 121123
|
||||
// gas legacy: 128005
|
||||
// gas legacyOptimized: 123446
|
||||
|
@ -18,6 +18,6 @@ contract C {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// test() -> 7
|
||||
// gas irOptimized: 124037
|
||||
// gas irOptimized: 124034
|
||||
// gas legacy: 205196
|
||||
// gas legacyOptimized: 204987
|
||||
|
@ -9,7 +9,7 @@ contract c {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// set(): 1, 2, 3, 4, 5 -> true
|
||||
// gas irOptimized: 177390
|
||||
// gas irOptimized: 177386
|
||||
// gas legacy: 177653
|
||||
// gas legacyOptimized: 177493
|
||||
// storageEmpty -> 0
|
||||
|
@ -22,8 +22,8 @@ contract sender {
|
||||
// ----
|
||||
// (): 7 ->
|
||||
// gas irOptimized: 110954
|
||||
// gas legacy: 111073
|
||||
// gas legacyOptimized: 111018
|
||||
// gas legacy: 111071
|
||||
// gas legacyOptimized: 111016
|
||||
// val() -> 0
|
||||
// forward(bool): true -> true
|
||||
// val() -> 0x80
|
||||
|
@ -20,6 +20,6 @@ contract C {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// f() -> 3
|
||||
// gas irOptimized: 129916
|
||||
// gas irOptimized: 129910
|
||||
// gas legacy: 130181
|
||||
// gas legacyOptimized: 129198
|
||||
|
@ -19,6 +19,6 @@ contract C {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// f() -> 1, 2, 3, 4, 5, 6, 7
|
||||
// gas irOptimized: 207785
|
||||
// gas irOptimized: 207781
|
||||
// gas legacy: 212313
|
||||
// gas legacyOptimized: 211462
|
||||
|
@ -20,6 +20,6 @@ contract C {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// f() -> 1, 2, 3, 4, 5, 6, 7
|
||||
// gas irOptimized: 207785
|
||||
// gas irOptimized: 207781
|
||||
// gas legacy: 212318
|
||||
// gas legacyOptimized: 211467
|
||||
|
@ -26,6 +26,6 @@ contract C {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// f() -> 11, 0x0c, 1, 0x15, 22, 4
|
||||
// gas irOptimized: 291850
|
||||
// gas irOptimized: 291848
|
||||
// gas legacy: 293516
|
||||
// gas legacyOptimized: 290263
|
||||
|
@ -15,6 +15,6 @@ contract C {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// f() -> 2, 3, 4
|
||||
// gas irOptimized: 114120
|
||||
// gas irOptimized: 114114
|
||||
// gas legacy: 126350
|
||||
// gas legacyOptimized: 120704
|
||||
|
@ -20,6 +20,6 @@ contract C {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// f() -> "A", 8, 4, "B"
|
||||
// gas irOptimized: 130594
|
||||
// gas irOptimized: 130592
|
||||
// gas legacy: 121398
|
||||
// gas legacyOptimized: 115494
|
||||
|
@ -18,6 +18,6 @@ contract c {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// test1() -> true
|
||||
// gas irOptimized: 225894
|
||||
// gas irOptimized: 225890
|
||||
// gas legacy: 254650
|
||||
// gas legacyOptimized: 247384
|
||||
|
@ -16,7 +16,7 @@ contract c {
|
||||
// ----
|
||||
// storageEmpty -> 1
|
||||
// fill() ->
|
||||
// gas irOptimized: 519886
|
||||
// gas irOptimized: 519884
|
||||
// gas legacy: 521710
|
||||
// gas legacyOptimized: 516922
|
||||
// storageEmpty -> 0
|
||||
|
@ -44,7 +44,7 @@ contract c {
|
||||
// ----
|
||||
// getLengths() -> 0, 0
|
||||
// setLengths(uint256,uint256): 48, 49 ->
|
||||
// gas irOptimized: 111304
|
||||
// gas irOptimized: 111295
|
||||
// gas legacy: 108571
|
||||
// gas legacyOptimized: 100417
|
||||
// getLengths() -> 48, 49
|
||||
|
@ -18,7 +18,7 @@ contract c {
|
||||
// ----
|
||||
// storageEmpty -> 1
|
||||
// fill() -> 8
|
||||
// gas irOptimized: 122534
|
||||
// gas irOptimized: 122531
|
||||
// gas legacy: 121756
|
||||
// gas legacyOptimized: 120687
|
||||
// storageEmpty -> 0
|
||||
|
@ -13,7 +13,7 @@ contract c {
|
||||
// ----
|
||||
// storageEmpty -> 1
|
||||
// fill() ->
|
||||
// gas irOptimized: 465544
|
||||
// gas irOptimized: 465542
|
||||
// gas legacy: 471400
|
||||
// gas legacyOptimized: 467400
|
||||
// storageEmpty -> 0
|
||||
|
@ -21,6 +21,6 @@ contract B {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// f() -> 2, 3, 4, 5, 6, 1000, 1001, 1002, 1003, 1004
|
||||
// gas irOptimized: 129910
|
||||
// gas irOptimized: 128110
|
||||
// gas legacy: 234719
|
||||
// gas legacyOptimized: 132639
|
||||
|
@ -11,7 +11,7 @@ contract Creator {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// constructor(): 1, 2, 3, 4 ->
|
||||
// gas irOptimized: 128995
|
||||
// gas irOptimized: 129013
|
||||
// gas legacy: 176789
|
||||
// gas legacyOptimized: 129585
|
||||
// r() -> 4
|
||||
|
@ -45,6 +45,6 @@ contract C {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// test() -> 5, 6, 7
|
||||
// gas irOptimized: 298735
|
||||
// gas irOptimized: 292702
|
||||
// gas legacy: 452136
|
||||
// gas legacyOptimized: 284945
|
||||
|
@ -25,7 +25,7 @@ contract c {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// test() -> 1, 2, 3
|
||||
// gas irOptimized: 2271050
|
||||
// gas irOptimized: 2271044
|
||||
// gas legacy: 2273434
|
||||
// gas legacyOptimized: 2261820
|
||||
// storageEmpty -> 1
|
||||
|
@ -20,7 +20,7 @@ contract c {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// test() -> 20, 10
|
||||
// gas irOptimized: 159175
|
||||
// gas irOptimized: 159169
|
||||
// gas legacy: 159279
|
||||
// gas legacyOptimized: 152921
|
||||
// storageEmpty -> 1
|
||||
|
@ -12,6 +12,6 @@ contract c {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// test() -> 0x20, 29, 0x0303030303030303030303030303030303030303030303030303030303000000
|
||||
// gas irOptimized: 109503
|
||||
// gas irOptimized: 109499
|
||||
// gas legacy: 126728
|
||||
// gas legacyOptimized: 123444
|
||||
|
@ -18,7 +18,7 @@ contract c {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// test() -> true
|
||||
// gas irOptimized: 196545
|
||||
// gas irOptimized: 196541
|
||||
// gas legacy: 228685
|
||||
// gas legacyOptimized: 209662
|
||||
// storageEmpty -> 1
|
||||
|
@ -17,7 +17,7 @@ contract c {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// test() ->
|
||||
// gas irOptimized: 142640
|
||||
// gas irOptimized: 142639
|
||||
// gas legacy: 164430
|
||||
// gas legacyOptimized: 157898
|
||||
// storageEmpty -> 1
|
||||
|
@ -12,6 +12,6 @@ contract c {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// test() -> 0x20, 33, 0x303030303030303030303030303030303030303030303030303030303030303, 0x0300000000000000000000000000000000000000000000000000000000000000
|
||||
// gas irOptimized: 108493
|
||||
// gas irOptimized: 108487
|
||||
// gas legacy: 125610
|
||||
// gas legacyOptimized: 122582
|
||||
|
@ -14,6 +14,6 @@ contract C {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// f(uint120[]): 0x20, 3, 1, 2, 3 -> 1
|
||||
// gas irOptimized: 113258
|
||||
// gas irOptimized: 113256
|
||||
// gas legacy: 113686
|
||||
// gas legacyOptimized: 113499
|
||||
|
@ -18,6 +18,6 @@ contract c {
|
||||
// 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
|
||||
// gas irOptimized: 138705
|
||||
// gas irOptimized: 138691
|
||||
// gas legacy: 145150
|
||||
// gas legacyOptimized: 139171
|
||||
|
@ -17,6 +17,6 @@ contract c {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// test() -> 0
|
||||
// gas irOptimized: 176497
|
||||
// gas irOptimized: 176495
|
||||
// gas legacy: 216790
|
||||
// gas legacyOptimized: 203886
|
||||
|
@ -29,14 +29,14 @@ contract C {
|
||||
// ----
|
||||
// l() -> 0
|
||||
// f(uint256,uint256): 42, 64 ->
|
||||
// gas irOptimized: 112528
|
||||
// gas irOptimized: 112517
|
||||
// gas legacy: 108105
|
||||
// gas legacyOptimized: 101987
|
||||
// l() -> 1
|
||||
// ll(uint256): 0 -> 43
|
||||
// a(uint256,uint256): 0, 42 -> 64
|
||||
// f(uint256,uint256): 84, 128 ->
|
||||
// gas irOptimized: 116400
|
||||
// gas irOptimized: 116389
|
||||
// gas legacy: 107525
|
||||
// gas legacyOptimized: 96331
|
||||
// l() -> 2
|
||||
|
@ -23,7 +23,7 @@ contract C {
|
||||
// ----
|
||||
// l() -> 0
|
||||
// g(uint256): 70 ->
|
||||
// gas irOptimized: 185936
|
||||
// gas irOptimized: 185922
|
||||
// gas legacy: 183811
|
||||
// gas legacyOptimized: 179218
|
||||
// l() -> 70
|
||||
|
@ -26,6 +26,6 @@ contract Main {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// f(uint256): 0x34 -> 0x46bddb1178e94d7f2892ff5f366840eb658911794f2c3a44c450aa2c505186c1
|
||||
// gas irOptimized: 113604
|
||||
// gas irOptimized: 113398
|
||||
// gas legacy: 126596
|
||||
// gas legacyOptimized: 113823
|
||||
|
@ -12,8 +12,8 @@ contract c {
|
||||
// ----
|
||||
// (): 1, 2, 3, 4, 5 ->
|
||||
// gas irOptimized: 155170
|
||||
// gas legacy: 155251
|
||||
// gas legacyOptimized: 155214
|
||||
// gas legacy: 155249
|
||||
// gas legacyOptimized: 155212
|
||||
// checkIfDataIsEmpty() -> false
|
||||
// sendMessage() -> true, 0x40, 0
|
||||
// checkIfDataIsEmpty() -> true
|
||||
|
@ -26,6 +26,6 @@ contract Creator {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// f(uint256,address[]): 7, 0x40, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 -> 7, 8
|
||||
// gas irOptimized: 443720
|
||||
// gas irOptimized: 437093
|
||||
// gas legacy: 590683
|
||||
// gas legacyOptimized: 448326
|
||||
|
@ -26,6 +26,6 @@ contract Creator {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// f(uint256,bytes): 7, 0x40, 78, "abcdefghijklmnopqrstuvwxyzabcdef", "ghijklmnopqrstuvwxyzabcdefghijkl", "mnopqrstuvwxyz" -> 7, "h"
|
||||
// gas irOptimized: 300834
|
||||
// gas irOptimized: 295403
|
||||
// gas legacy: 428711
|
||||
// gas legacyOptimized: 297922
|
||||
|
@ -10,7 +10,7 @@ contract Test {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// constructor(): 7, 0x40, 78, "abcdefghijklmnopqrstuvwxyzabcdef", "ghijklmnopqrstuvwxyzabcdefghijkl", "mnopqrstuvwxyz" ->
|
||||
// gas irOptimized: 291443
|
||||
// gas irOptimized: 286205
|
||||
// gas legacy: 309607
|
||||
// gas legacyOptimized: 260566
|
||||
// m_x() -> 7
|
||||
|
@ -19,7 +19,7 @@ contract Main {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// constructor(): "abc", true
|
||||
// gas irOptimized: 106221
|
||||
// gas irOptimized: 106683
|
||||
// gas legacy: 145838
|
||||
// gas legacyOptimized: 104017
|
||||
// getFlag() -> true
|
||||
|
@ -12,7 +12,7 @@ contract C {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// constructor(): 1, 2, 3, 4 ->
|
||||
// gas irOptimized: 174041
|
||||
// gas irOptimized: 174020
|
||||
// gas legacy: 221377
|
||||
// gas legacyOptimized: 177671
|
||||
// a() -> 1
|
||||
|
@ -19,6 +19,6 @@ contract C {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// f(), 2000 ether -> true
|
||||
// gas irOptimized: 120036
|
||||
// gas irOptimized: 120037
|
||||
// gas legacy: 123226
|
||||
// gas legacyOptimized: 123092
|
||||
|
@ -15,5 +15,5 @@ contract B is A {
|
||||
// compileViaYul: true
|
||||
// ----
|
||||
// constructor() ->
|
||||
// gas irOptimized: 121153
|
||||
// gas irOptimized: 121557
|
||||
// y() -> 42
|
||||
|
@ -12,7 +12,7 @@ contract B is A {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// constructor() ->
|
||||
// gas irOptimized: 121153
|
||||
// gas irOptimized: 121557
|
||||
// gas legacy: 135046
|
||||
// gas legacyOptimized: 116176
|
||||
// y() -> 42
|
||||
|
@ -11,7 +11,7 @@ contract C {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// constructor(): 2, 0 ->
|
||||
// gas irOptimized: 103290
|
||||
// gas irOptimized: 103630
|
||||
// gas legacy: 117158
|
||||
// i() -> 2
|
||||
// k() -> 0
|
||||
|
@ -23,7 +23,7 @@ contract D is B, C {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// constructor(): 2, 0 ->
|
||||
// gas irOptimized: 160093
|
||||
// gas irOptimized: 158225
|
||||
// gas legacy: 170665
|
||||
// gas legacyOptimized: 145396
|
||||
// i() -> 2
|
||||
|
@ -14,7 +14,7 @@ contract D is C {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// constructor(): 2, 0 ->
|
||||
// gas irOptimized: 123907
|
||||
// gas irOptimized: 124199
|
||||
// gas legacy: 139250
|
||||
// gas legacyOptimized: 119367
|
||||
// i() -> 2
|
||||
|
@ -15,6 +15,6 @@ contract C {
|
||||
// ----
|
||||
// createEvent(uint256): 42 ->
|
||||
// ~ emit E(uint256[]): 0x20, 0x03, 0x2a, 0x2b, 0x2c
|
||||
// gas irOptimized: 114746
|
||||
// gas irOptimized: 114741
|
||||
// gas legacy: 116393
|
||||
// gas legacyOptimized: 114415
|
||||
|
@ -16,6 +16,6 @@ contract C {
|
||||
// ----
|
||||
// createEvent(uint256): 42 ->
|
||||
// ~ emit E(uint256[]): 0x20, 0x03, 0x2a, 0x2b, 0x2c
|
||||
// gas irOptimized: 114746
|
||||
// gas irOptimized: 114741
|
||||
// gas legacy: 116393
|
||||
// gas legacyOptimized: 114415
|
||||
|
@ -17,7 +17,7 @@ contract C {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// constructor() ->
|
||||
// gas irOptimized: 172802
|
||||
// gas irOptimized: 173316
|
||||
// gas legacy: 250376
|
||||
// gas legacyOptimized: 174522
|
||||
// deposit(bytes32), 18 wei: 0x1234 ->
|
||||
|
@ -76,7 +76,7 @@ contract FixedFeeRegistrar is Registrar {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// constructor()
|
||||
// gas irOptimized: 413269
|
||||
// gas irOptimized: 402812
|
||||
// gas legacy: 935817
|
||||
// gas legacyOptimized: 489951
|
||||
// reserve(string), 69 ether: 0x20, 3, "abc" ->
|
||||
|
@ -34,7 +34,7 @@ contract test {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// constructor()
|
||||
// gas irOptimized: 450044
|
||||
// gas irOptimized: 443542
|
||||
// gas legacy: 765640
|
||||
// gas legacyOptimized: 541810
|
||||
// encode_inline_asm(bytes): 0x20, 0 -> 0x20, 0
|
||||
@ -52,10 +52,10 @@ contract test {
|
||||
// encode_no_asm(bytes): 0x20, 5, "fooba" -> 0x20, 8, "Zm9vYmE="
|
||||
// encode_no_asm(bytes): 0x20, 6, "foobar" -> 0x20, 8, "Zm9vYmFy"
|
||||
// encode_inline_asm_large()
|
||||
// gas irOptimized: 1385047
|
||||
// gas irOptimized: 1385042
|
||||
// gas legacy: 1652033
|
||||
// gas legacyOptimized: 1201033
|
||||
// encode_no_asm_large()
|
||||
// gas irOptimized: 3335101
|
||||
// gas irOptimized: 3335099
|
||||
// gas legacy: 4777077
|
||||
// gas legacyOptimized: 2890077
|
||||
|
@ -178,7 +178,7 @@ contract DepositContract is IDepositContract, ERC165 {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// constructor()
|
||||
// gas irOptimized: 1542927
|
||||
// gas irOptimized: 1532125
|
||||
// gas legacy: 2435803
|
||||
// gas legacyOptimized: 1775425
|
||||
// supportsInterface(bytes4): 0x0 -> 0
|
||||
@ -186,27 +186,27 @@ contract DepositContract is IDepositContract, ERC165 {
|
||||
// supportsInterface(bytes4): 0x01ffc9a700000000000000000000000000000000000000000000000000000000 -> true # ERC-165 id #
|
||||
// supportsInterface(bytes4): 0x8564090700000000000000000000000000000000000000000000000000000000 -> true # the deposit interface id #
|
||||
// get_deposit_root() -> 0xd70a234731285c6804c2a4f56711ddb8c82c99740f207854891028af34e27e5e
|
||||
// gas irOptimized: 122135
|
||||
// gas irOptimized: 122134
|
||||
// gas legacy: 150273
|
||||
// gas legacyOptimized: 122510
|
||||
// get_deposit_count() -> 0x20, 8, 0 # TODO: check balance and logs after each deposit #
|
||||
// deposit(bytes,bytes,bytes,bytes32), 32 ether: 0 -> FAILURE # Empty input #
|
||||
// get_deposit_root() -> 0xd70a234731285c6804c2a4f56711ddb8c82c99740f207854891028af34e27e5e
|
||||
// gas irOptimized: 122135
|
||||
// gas irOptimized: 122134
|
||||
// gas legacy: 150273
|
||||
// gas legacyOptimized: 122510
|
||||
// get_deposit_count() -> 0x20, 8, 0
|
||||
// deposit(bytes,bytes,bytes,bytes32), 1 ether: 0x80, 0xe0, 0x120, 0xaa4a8d0b7d9077248630f1a4701ae9764e42271d7f22b7838778411857fd349e, 0x30, 0x933ad9491b62059dd065b560d256d8957a8c402cc6e8d8ee7290ae11e8f73292, 0x67a8811c397529dac52ae1342ba58c9500000000000000000000000000000000, 0x20, 0x00f50428677c60f997aadeab24aabf7fceaef491c96a52b463ae91f95611cf71, 0x60, 0xa29d01cc8c6296a8150e515b5995390ef841dc18948aa3e79be6d7c1851b4cbb, 0x5d6ff49fa70b9c782399506a22a85193151b9b691245cebafd2063012443c132, 0x4b6c36debaedefb7b2d71b0503ffdc00150aaffd42e63358238ec888901738b8 -> # txhash: 0x7085c586686d666e8bb6e9477a0f0b09565b2060a11f1c4209d3a52295033832 #
|
||||
// ~ emit DepositEvent(bytes,bytes,bytes,bytes,bytes): 0xa0, 0x0100, 0x0140, 0x0180, 0x0200, 0x30, 0x933ad9491b62059dd065b560d256d8957a8c402cc6e8d8ee7290ae11e8f73292, 0x67a8811c397529dac52ae1342ba58c9500000000000000000000000000000000, 0x20, 0xf50428677c60f997aadeab24aabf7fceaef491c96a52b463ae91f95611cf71, 0x08, 0xca9a3b00000000000000000000000000000000000000000000000000000000, 0x60, 0xa29d01cc8c6296a8150e515b5995390ef841dc18948aa3e79be6d7c1851b4cbb, 0x5d6ff49fa70b9c782399506a22a85193151b9b691245cebafd2063012443c132, 0x4b6c36debaedefb7b2d71b0503ffdc00150aaffd42e63358238ec888901738b8, 0x08, 0x00
|
||||
// get_deposit_root() -> 0x2089653123d9c721215120b6db6738ba273bbc5228ac093b1f983badcdc8a438
|
||||
// gas irOptimized: 122114
|
||||
// gas irOptimized: 122113
|
||||
// gas legacy: 150283
|
||||
// gas legacyOptimized: 122523
|
||||
// get_deposit_count() -> 0x20, 8, 0x0100000000000000000000000000000000000000000000000000000000000000
|
||||
// deposit(bytes,bytes,bytes,bytes32), 32 ether: 0x80, 0xe0, 0x120, 0xdbd986dc85ceb382708cf90a3500f500f0a393c5ece76963ac3ed72eccd2c301, 0x30, 0xb2ce0f79f90e7b3a113ca5783c65756f96c4b4673c2b5c1eb4efc22280259441, 0x06d601211e8866dc5b50dc48a244dd7c00000000000000000000000000000000, 0x20, 0x00344b6c73f71b11c56aba0d01b7d8ad83559f209d0a4101a515f6ad54c89771, 0x60, 0x945caaf82d18e78c033927d51f452ebcd76524497b91d7a11219cb3db6a1d369, 0x7595fc095ce489e46b2ef129591f2f6d079be4faaf345a02c5eb133c072e7c56, 0x0c6c3617eee66b4b878165c502357d49485326bc6b31bc96873f308c8f19c09d -> # txhash: 0x404d8e109822ce448e68f45216c12cb051b784d068fbe98317ab8e50c58304ac #
|
||||
// ~ emit DepositEvent(bytes,bytes,bytes,bytes,bytes): 0xa0, 0x0100, 0x0140, 0x0180, 0x0200, 0x30, 0xb2ce0f79f90e7b3a113ca5783c65756f96c4b4673c2b5c1eb4efc22280259441, 0x06d601211e8866dc5b50dc48a244dd7c00000000000000000000000000000000, 0x20, 0x344b6c73f71b11c56aba0d01b7d8ad83559f209d0a4101a515f6ad54c89771, 0x08, 0x40597307000000000000000000000000000000000000000000000000000000, 0x60, 0x945caaf82d18e78c033927d51f452ebcd76524497b91d7a11219cb3db6a1d369, 0x7595fc095ce489e46b2ef129591f2f6d079be4faaf345a02c5eb133c072e7c56, 0x0c6c3617eee66b4b878165c502357d49485326bc6b31bc96873f308c8f19c09d, 0x08, 0x0100000000000000000000000000000000000000000000000000000000000000
|
||||
// get_deposit_root() -> 0x40255975859377d912c53aa853245ebd939bdd2b33a28e084babdcc1ed8238ee
|
||||
// gas irOptimized: 122114
|
||||
// gas irOptimized: 122113
|
||||
// gas legacy: 150283
|
||||
// gas legacyOptimized: 122523
|
||||
// get_deposit_count() -> 0x20, 8, 0x0200000000000000000000000000000000000000000000000000000000000000
|
||||
|
@ -50,7 +50,7 @@ contract test {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// constructor()
|
||||
// gas irOptimized: 1937251
|
||||
// gas irOptimized: 1926032
|
||||
// gas legacy: 2478955
|
||||
// gas legacyOptimized: 1877737
|
||||
// div(int256,int256): 3141592653589793238, 88714123 -> 35412542528203691288251815328
|
||||
|
@ -50,7 +50,7 @@ contract test {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// constructor()
|
||||
// gas irOptimized: 1791688
|
||||
// gas irOptimized: 1783505
|
||||
// gas legacy: 2248594
|
||||
// gas legacyOptimized: 1749096
|
||||
// div(uint256,uint256): 3141592653589793238, 88714123 -> 35412542528203691288251815328
|
||||
|
@ -35,7 +35,7 @@ contract test {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// constructor()
|
||||
// gas irOptimized: 464709
|
||||
// gas irOptimized: 456094
|
||||
// gas legacy: 671453
|
||||
// gas legacyOptimized: 480242
|
||||
// prb_pi() -> 3141592656369545286
|
||||
|
@ -51,7 +51,7 @@ contract test {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// constructor()
|
||||
// gas irOptimized: 704522
|
||||
// gas irOptimized: 691317
|
||||
// gas legacy: 1127730
|
||||
// gas legacyOptimized: 753807
|
||||
// toSlice(string): 0x20, 11, "hello world" -> 11, 0xa0
|
||||
@ -71,6 +71,6 @@ contract test {
|
||||
// gas legacy: 31621
|
||||
// gas legacyOptimized: 27914
|
||||
// benchmark(string,bytes32): 0x40, 0x0842021, 8, "solidity" -> 0x2020
|
||||
// gas irOptimized: 2040024
|
||||
// gas irOptimized: 2040019
|
||||
// gas legacy: 4356286
|
||||
// gas legacyOptimized: 2268278
|
||||
|
@ -17,7 +17,7 @@ contract D {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// constructor(): 2 ->
|
||||
// gas irOptimized: 203909
|
||||
// gas irOptimized: 200649
|
||||
// gas legacy: 245842
|
||||
// gas legacyOptimized: 195676
|
||||
// f() -> 2
|
||||
|
@ -18,7 +18,7 @@ contract D {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// constructor(): 2 ->
|
||||
// gas irOptimized: 204072
|
||||
// gas irOptimized: 200812
|
||||
// gas legacy: 246202
|
||||
// gas legacyOptimized: 195914
|
||||
// f() -> 2
|
||||
|
@ -25,7 +25,7 @@ contract C {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// constructor(), 1 ether ->
|
||||
// gas irOptimized: 314681
|
||||
// gas irOptimized: 304151
|
||||
// gas legacy: 464030
|
||||
// gas legacyOptimized: 304049
|
||||
// f(uint256): 0 -> FAILURE
|
||||
|
@ -27,7 +27,7 @@ contract C {
|
||||
// revertStrings: debug
|
||||
// ----
|
||||
// constructor(), 1 ether ->
|
||||
// gas irOptimized: 449901
|
||||
// gas irOptimized: 446871
|
||||
// gas legacy: 832976
|
||||
// gas legacyOptimized: 509560
|
||||
// f(uint256): 0 -> FAILURE, hex"08c379a0", 0x20, 37, "Target contract does not contain", " code"
|
||||
|
@ -18,7 +18,7 @@ contract C {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// constructor(), 20 wei
|
||||
// gas irOptimized: 216903
|
||||
// gas irOptimized: 214971
|
||||
// gas legacy: 294335
|
||||
// gas legacyOptimized: 174279
|
||||
// f(uint256): 20 -> 1370859564726510389319704988634906228201275401179
|
||||
|
@ -41,7 +41,7 @@ contract test {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// constructor(), 20 wei ->
|
||||
// gas irOptimized: 282824
|
||||
// gas irOptimized: 275142
|
||||
// gas legacy: 402654
|
||||
// gas legacyOptimized: 274470
|
||||
// sendAmount(uint256): 5 -> 5
|
||||
|
@ -40,7 +40,7 @@ contract test {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// constructor(), 20 wei ->
|
||||
// gas irOptimized: 282824
|
||||
// gas irOptimized: 275142
|
||||
// gas legacy: 402654
|
||||
// gas legacyOptimized: 274470
|
||||
// sendAmount(uint256): 5 -> 5
|
||||
|
@ -20,7 +20,7 @@ contract test {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// set(uint8,uint8,uint8,uint8,uint8): 1, 21, 22, 42, 43 -> 0, 0, 0, 0
|
||||
// gas irOptimized: 111914
|
||||
// gas irOptimized: 111909
|
||||
// gas legacy: 113806
|
||||
// gas legacyOptimized: 111781
|
||||
// get(uint8): 1 -> 21, 22, 42, 43
|
||||
|
@ -19,7 +19,7 @@ contract Main {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// constructor(), 20 wei ->
|
||||
// gas irOptimized: 101782
|
||||
// gas irOptimized: 100480
|
||||
// gas legacy: 116691
|
||||
// gas legacyOptimized: 100361
|
||||
// s() -> true
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user