Named function labels.

This commit is contained in:
Daniel Kirchner 2021-11-01 14:19:33 +01:00
parent 1a0605c594
commit 28ae316556
10 changed files with 271 additions and 236 deletions

View File

@ -65,8 +65,14 @@ void EVMObjectCompiler::run(Object& _object, bool _optimize)
yulAssert(_object.code, "No code."); yulAssert(_object.code, "No code.");
if (_optimize && m_dialect.evmVersion().canOverchargeGasForCall()) if (_optimize && m_dialect.evmVersion().canOverchargeGasForCall())
{ {
auto stackErrors = OptimizedEVMCodeTransform::run(
auto stackErrors = OptimizedEVMCodeTransform::run(m_assembly, *_object.analysisInfo, *_object.code, m_dialect, context); m_assembly,
*_object.analysisInfo,
*_object.code,
m_dialect,
context,
OptimizedEVMCodeTransform::UseNamedLabels::ForFirstFunctionOfEachName
);
if (!stackErrors.empty()) if (!stackErrors.empty())
BOOST_THROW_EXCEPTION(stackErrors.front()); BOOST_THROW_EXCEPTION(stackErrors.front());
} }

View File

@ -44,7 +44,7 @@ vector<StackTooDeepError> OptimizedEVMCodeTransform::run(
Block const& _block, Block const& _block,
EVMDialect const& _dialect, EVMDialect const& _dialect,
BuiltinContext& _builtinContext, BuiltinContext& _builtinContext,
bool _useNamedLabelsForFunctions UseNamedLabels _useNamedLabelsForFunctions
) )
{ {
std::unique_ptr<CFG> dfg = ControlFlowGraphBuilder::build(_analysisInfo, _dialect, _block); std::unique_ptr<CFG> dfg = ControlFlowGraphBuilder::build(_analysisInfo, _dialect, _block);
@ -170,15 +170,35 @@ void OptimizedEVMCodeTransform::operator()(CFG::Assignment const& _assignment)
OptimizedEVMCodeTransform::OptimizedEVMCodeTransform( OptimizedEVMCodeTransform::OptimizedEVMCodeTransform(
AbstractAssembly& _assembly, AbstractAssembly& _assembly,
BuiltinContext& _builtinContext, BuiltinContext& _builtinContext,
bool _useNamedLabelsForFunctions, UseNamedLabels _useNamedLabelsForFunctions,
CFG const& _dfg, CFG const& _dfg,
StackLayout const& _stackLayout StackLayout const& _stackLayout
): ):
m_assembly(_assembly), m_assembly(_assembly),
m_builtinContext(_builtinContext), m_builtinContext(_builtinContext),
m_useNamedLabelsForFunctions(_useNamedLabelsForFunctions),
m_dfg(_dfg), m_dfg(_dfg),
m_stackLayout(_stackLayout) m_stackLayout(_stackLayout),
m_functionLabels([&](){
map<CFG::FunctionInfo const*, AbstractAssembly::LabelID> functionLabels;
set<YulString> assignedFunctionNames;
for (Scope::Function const* function: m_dfg.functions)
{
CFG::FunctionInfo const& functionInfo = m_dfg.functionInfo.at(function);
bool nameAlreadySeen = !assignedFunctionNames.insert(function->name).second;
if (_useNamedLabelsForFunctions == UseNamedLabels::YesAndForceUnique)
yulAssert(!nameAlreadySeen);
bool useNamedLabel = _useNamedLabelsForFunctions != UseNamedLabels::Never && !nameAlreadySeen;
functionLabels[&functionInfo] = useNamedLabel ?
m_assembly.namedLabel(
function->name.str(),
function->arguments.size(),
function->returns.size(),
functionInfo.debugData ? functionInfo.debugData->astID : nullopt
) :
m_assembly.newLabelId();
}
return functionLabels;
}())
{ {
} }
@ -191,15 +211,7 @@ void OptimizedEVMCodeTransform::assertLayoutCompatibility(Stack const& _currentS
AbstractAssembly::LabelID OptimizedEVMCodeTransform::getFunctionLabel(Scope::Function const& _function) AbstractAssembly::LabelID OptimizedEVMCodeTransform::getFunctionLabel(Scope::Function const& _function)
{ {
CFG::FunctionInfo const& functionInfo = m_dfg.functionInfo.at(&_function); return m_functionLabels.at(&m_dfg.functionInfo.at(&_function));
if (!m_functionLabels.count(&functionInfo))
m_functionLabels[&functionInfo] = m_useNamedLabelsForFunctions ? m_assembly.namedLabel(
functionInfo.function.name.str(),
functionInfo.function.arguments.size(),
functionInfo.function.returns.size(),
{}
) : m_assembly.newLabelId();
return m_functionLabels[&functionInfo];
} }
void OptimizedEVMCodeTransform::validateSlot(StackSlot const& _slot, Expression const& _expression) void OptimizedEVMCodeTransform::validateSlot(StackSlot const& _slot, Expression const& _expression)

View File

@ -43,13 +43,17 @@ struct StackLayout;
class OptimizedEVMCodeTransform class OptimizedEVMCodeTransform
{ {
public: public:
/// Use named labels for functions 1) Yes and check that the names are unique
/// 2) For none of the functions 3) for the first function of each name.
enum class UseNamedLabels { YesAndForceUnique, Never, ForFirstFunctionOfEachName };
[[nodiscard]] static std::vector<StackTooDeepError> run( [[nodiscard]] static std::vector<StackTooDeepError> run(
AbstractAssembly& _assembly, AbstractAssembly& _assembly,
AsmAnalysisInfo& _analysisInfo, AsmAnalysisInfo& _analysisInfo,
Block const& _block, Block const& _block,
EVMDialect const& _dialect, EVMDialect const& _dialect,
BuiltinContext& _builtinContext, BuiltinContext& _builtinContext,
bool _useNamedLabelsForFunctions = false UseNamedLabels _useNamedLabelsForFunctions
); );
/// Generate code for the function call @a _call. Only public for using with std::visit. /// Generate code for the function call @a _call. Only public for using with std::visit.
@ -62,7 +66,7 @@ private:
OptimizedEVMCodeTransform( OptimizedEVMCodeTransform(
AbstractAssembly& _assembly, AbstractAssembly& _assembly,
BuiltinContext& _builtinContext, BuiltinContext& _builtinContext,
bool _useNamedLabelsForFunctions, UseNamedLabels _useNamedLabelsForFunctions,
CFG const& _dfg, CFG const& _dfg,
StackLayout const& _stackLayout StackLayout const& _stackLayout
); );
@ -70,6 +74,7 @@ private:
/// Assert that it is valid to transition from @a _currentStack to @a _desiredStack. /// Assert that it is valid to transition from @a _currentStack to @a _desiredStack.
/// That is @a _currentStack matches each slot in @a _desiredStack that is not a JunkSlot exactly. /// That is @a _currentStack matches each slot in @a _desiredStack that is not a JunkSlot exactly.
static void assertLayoutCompatibility(Stack const& _currentStack, Stack const& _desiredStack); static void assertLayoutCompatibility(Stack const& _currentStack, Stack const& _desiredStack);
/// @returns The label of the entry point of the given @a _function. /// @returns The label of the entry point of the given @a _function.
/// Creates and stores a new label, if none exists already. /// Creates and stores a new label, if none exists already.
AbstractAssembly::LabelID getFunctionLabel(Scope::Function const& _function); AbstractAssembly::LabelID getFunctionLabel(Scope::Function const& _function);
@ -94,13 +99,12 @@ private:
AbstractAssembly& m_assembly; AbstractAssembly& m_assembly;
BuiltinContext& m_builtinContext; BuiltinContext& m_builtinContext;
bool m_useNamedLabelsForFunctions = true;
CFG const& m_dfg; CFG const& m_dfg;
StackLayout const& m_stackLayout; StackLayout const& m_stackLayout;
Stack m_stack; Stack m_stack;
std::map<yul::FunctionCall const*, AbstractAssembly::LabelID> m_returnLabels; std::map<yul::FunctionCall const*, AbstractAssembly::LabelID> m_returnLabels;
std::map<CFG::BasicBlock const*, AbstractAssembly::LabelID> m_blockLabels; std::map<CFG::BasicBlock const*, AbstractAssembly::LabelID> m_blockLabels;
std::map<CFG::FunctionInfo const*, AbstractAssembly::LabelID> m_functionLabels; std::map<CFG::FunctionInfo const*, AbstractAssembly::LabelID> const m_functionLabels;
/// Set of blocks already generated. If any of the contained blocks is ever jumped to, m_blockLabels should /// Set of blocks already generated. If any of the contained blocks is ever jumped to, m_blockLabels should
/// contain a jump label for it. /// contain a jump label for it.
std::set<CFG::BasicBlock const*> m_generated; std::set<CFG::BasicBlock const*> m_generated;

View File

@ -4,7 +4,20 @@
"function_debug_info_via_yul/input.sol:C": "function_debug_info_via_yul/input.sol:C":
{ {
"function-debug": {}, "function-debug": {},
"function-debug-runtime": {} "function-debug-runtime":
{
"abi_encode_uint256":
{
"parameterSlots": 2,
"returnSlots": 1
},
"calldata_array_index_access_uint256_dyn_calldata":
{
"entryPoint": 152,
"parameterSlots": 2,
"returnSlots": 1
}
}
} }
}, },
"version": "<VERSION REMOVED>" "version": "<VERSION REMOVED>"

View File

@ -3,7 +3,7 @@
dup1 dup1
0x40 0x40
mstore mstore
jumpi(tag_5, callvalue) jumpi(tag_6, callvalue)
0x1f 0x1f
bytecodeSize bytecodeSize
codesize codesize
@ -25,7 +25,7 @@
dup5 dup5
lt lt
or or
tag_3 tag_4
jumpi jumpi
dup1 dup1
dup5 dup5
@ -40,7 +40,7 @@
add add
sub sub
slt slt
tag_5 tag_6
jumpi jumpi
mload mload
/* \"C\":147:149 42 */ /* \"C\":147:149 42 */
@ -60,12 +60,12 @@
dup2 dup2
assignImmutable(\"0xe4b1702d9298fee62dfeccc57d322a463ad55ca201256d01f62b45b2e1c21c10\") assignImmutable(\"0xe4b1702d9298fee62dfeccc57d322a463ad55ca201256d01f62b45b2e1c21c10\")
return return
tag_5: tag_6:
pop pop
0x00 0x00
dup1 dup1
revert revert
tag_3: tag_4:
pop pop
pop pop
pop pop
@ -78,11 +78,11 @@ stop
sub_0: assembly { sub_0: assembly {
/* \"C\":79:428 contract C... */ /* \"C\":79:428 contract C... */
mstore(0x40, 0x80) mstore(0x40, 0x80)
jumpi(tag_1, iszero(lt(calldatasize, 0x04))) jumpi(tag_8, iszero(lt(calldatasize, 0x04)))
0x00 0x00
dup1 dup1
revert revert
tag_1: tag_8:
0x00 0x00
dup1 dup1
calldataload calldataload
@ -91,35 +91,35 @@ sub_0: assembly {
dup1 dup1
0x26121ff0 0x26121ff0
eq eq
tag_3 tag_10
jumpi jumpi
dup1 dup1
0x793816ec 0x793816ec
eq eq
tag_5 tag_12
jumpi jumpi
0x9942ec6f 0x9942ec6f
eq eq
tag_7 tag_14
jumpi jumpi
pop pop
0x00 0x00
dup1 dup1
revert revert
tag_7:
jumpi(tag_9, callvalue)
pop
tag_11
calldatasize
tag_12
jump\t// in
tag_11:
tag_13
/* \"C\":375:378 int */
tag_14
tag_15
jump\t// in
tag_14: tag_14:
jumpi(tag_16, callvalue)
pop
tag_18
calldatasize
tag_1
jump\t// in
tag_18:
tag_19
/* \"C\":375:378 int */
tag_20
tag_6
jump\t// in
tag_20:
/* \"C\":79:428 contract C... */ /* \"C\":79:428 contract C... */
mload(0x40) mload(0x40)
swap1 swap1
@ -133,23 +133,23 @@ sub_0: assembly {
add add
swap1 swap1
jump jump
tag_13: tag_19:
sub sub
swap1 swap1
return return
tag_9: tag_16:
dup1 dup1
revert revert
tag_5: tag_12:
pop pop
jumpi(tag_9, callvalue) jumpi(tag_16, callvalue)
tag_13 tag_19
swap1 swap1
tag_20 tag_24
calldatasize calldatasize
tag_12 tag_1
jump\t// in jump\t// in
tag_20: tag_24:
sload sload
mload(0x40) mload(0x40)
swap1 swap1
@ -163,64 +163,64 @@ sub_0: assembly {
add add
swap1 swap1
jump jump
tag_3: tag_10:
pop pop
jumpi(tag_9, callvalue) jumpi(tag_16, callvalue)
pop pop
tag_23 tag_27
calldatasize calldatasize
tag_12 tag_1
jump\t// in jump\t// in
tag_23: tag_27:
tag_13 tag_19
/* \"C\":279:298 constVar + immutVar */ /* \"C\":279:298 constVar + immutVar */
tag_14 tag_20
/* \"C\":290:298 immutVar */ /* \"C\":290:298 immutVar */
immutable(\"0xe4b1702d9298fee62dfeccc57d322a463ad55ca201256d01f62b45b2e1c21c10\") immutable(\"0xe4b1702d9298fee62dfeccc57d322a463ad55ca201256d01f62b45b2e1c21c10\")
/* \"C\":279:298 constVar + immutVar */ /* \"C\":279:298 constVar + immutVar */
tag_26 tag_4
jump\t// in jump\t// in
/* \"C\":79:428 contract C... */ /* \"C\":79:428 contract C... */
tag_12: tag_1:
0x00 0x00
swap1 swap1
not(0x03) not(0x03)
add add
slt slt
tag_27 tag_30
jumpi jumpi
jump\t// out jump\t// out
tag_27: tag_30:
pop pop
0x00 0x00
dup1 dup1
revert revert
/* \"C\":117:119 41 */ /* \"C\":117:119 41 */
tag_29: tag_3:
pop pop
mstore(0x00, shl(0xe0, 0x4e487b71)) mstore(0x00, shl(0xe0, 0x4e487b71))
mstore(0x04, 0x11) mstore(0x04, 0x11)
revert(0x00, 0x24) revert(0x00, 0x24)
tag_26: tag_4:
sub(shl(0xff, 0x01), 0x2a) sub(shl(0xff, 0x01), 0x2a)
dup2 dup2
sgt sgt
0x01 0x01
and and
tag_30 tag_32
jumpi jumpi
tag_31: tag_33:
0x29 0x29
add add
swap1 swap1
jump\t// out jump\t// out
tag_30:
tag_32
tag_29
jump\t// in
tag_32: tag_32:
jump(tag_31) tag_34
tag_33: tag_3
jump\t// in
tag_34:
jump(tag_33)
tag_5:
0x00 0x00
dup2 dup2
slt slt
@ -233,9 +233,9 @@ sub_0: assembly {
dup5 dup5
sgt sgt
and and
tag_34 tag_35
jumpi jumpi
tag_35: tag_36:
shl(0xff, 0x01) shl(0xff, 0x01)
dup3 dup3
swap1 swap1
@ -243,27 +243,27 @@ sub_0: assembly {
dup4 dup4
slt slt
and and
tag_36 tag_37
jumpi jumpi
add add
swap1 swap1
jump\t// out jump\t// out
tag_36: tag_37:
tag_38 tag_39
tag_29 tag_3
jump\t// in jump\t// in
tag_38: tag_39:
add add
swap1 swap1
jump\t// out jump\t// out
tag_34: tag_35:
tag_39 tag_40
tag_29 tag_3
jump\t// in jump\t// in
tag_39: tag_40:
jump(tag_35) jump(tag_36)
/* \"C\":304:341 modifier m()... */ /* \"C\":304:341 modifier m()... */
tag_15: tag_6:
/* \"C\":79:428 contract C... */ /* \"C\":79:428 contract C... */
0x00 0x00
dup1 dup1
@ -275,10 +275,10 @@ sub_0: assembly {
/* \"C\":79:428 contract C... */ /* \"C\":79:428 contract C... */
dup2 dup2
eq eq
tag_40 tag_41
jumpi jumpi
/* \"C\":304:341 modifier m()... */ /* \"C\":304:341 modifier m()... */
tag_41: tag_42:
/* \"C\":79:428 contract C... */ /* \"C\":79:428 contract C... */
add add
swap1 swap1
@ -290,7 +290,7 @@ sub_0: assembly {
/* \"C\":403:411 this.f() */ /* \"C\":403:411 this.f() */
extcodesize extcodesize
iszero iszero
tag_42 tag_43
jumpi jumpi
/* \"C\":79:428 contract C... */ /* \"C\":79:428 contract C... */
mload(0x40) mload(0x40)
@ -313,38 +313,38 @@ sub_0: assembly {
swap2 swap2
dup3 dup3
iszero iszero
tag_44 tag_45
jumpi jumpi
dup1 dup1
swap3 swap3
tag_46 tag_47
jumpi jumpi
/* \"C\":304:341 modifier m()... */ /* \"C\":304:341 modifier m()... */
tag_47: tag_48:
/* \"C\":392:411 stateVar + this.f() */ /* \"C\":392:411 stateVar + this.f() */
pop pop
pop pop
tag_48 tag_49
swap1 swap1
/* \"C\":392:422 stateVar + this.f() + immutVar */ /* \"C\":392:422 stateVar + this.f() + immutVar */
tag_49 tag_50
/* \"C\":392:411 stateVar + this.f() */ /* \"C\":392:411 stateVar + this.f() */
swap3 swap3
tag_33 tag_5
jump\t// in jump\t// in
tag_48: tag_49:
/* \"C\":414:422 immutVar */ /* \"C\":414:422 immutVar */
immutable(\"0xe4b1702d9298fee62dfeccc57d322a463ad55ca201256d01f62b45b2e1c21c10\") immutable(\"0xe4b1702d9298fee62dfeccc57d322a463ad55ca201256d01f62b45b2e1c21c10\")
/* \"C\":392:422 stateVar + this.f() + immutVar */ /* \"C\":392:422 stateVar + this.f() + immutVar */
swap1 swap1
tag_33 tag_5
jump\t// in jump\t// in
tag_49: tag_50:
/* \"C\":304:341 modifier m()... */ /* \"C\":304:341 modifier m()... */
swap1 swap1
jump\t// out jump\t// out
/* \"C\":403:411 this.f() */ /* \"C\":403:411 this.f() */
tag_46: tag_47:
/* \"C\":79:428 contract C... */ /* \"C\":79:428 contract C... */
swap1 swap1
swap2 swap2
@ -366,18 +366,18 @@ sub_0: assembly {
dup4 dup4
lt lt
or or
tag_50 tag_51
jumpi jumpi
pop pop
swap2 swap2
/* \"C\":403:411 this.f() */ /* \"C\":403:411 this.f() */
tag_52 tag_53
/* \"C\":392:411 stateVar + this.f() */ /* \"C\":392:411 stateVar + this.f() */
tag_48 tag_49
/* \"C\":79:428 contract C... */ /* \"C\":79:428 contract C... */
swap3 swap3
/* \"C\":392:422 stateVar + this.f() + immutVar */ /* \"C\":392:422 stateVar + this.f() + immutVar */
tag_49 tag_50
/* \"C\":79:428 contract C... */ /* \"C\":79:428 contract C... */
swap5 swap5
0x40 0x40
@ -387,16 +387,16 @@ sub_0: assembly {
dup2 dup2
add add
swap1 swap1
tag_53 tag_7
jump\t// in jump\t// in
tag_52: tag_53:
swap2 swap2
dup2 dup2
swap4 swap4
pop pop
jump(tag_47) jump(tag_48)
/* \"C\":79:428 contract C... */ /* \"C\":79:428 contract C... */
tag_50: tag_51:
shl(0xe0, 0x4e487b71) shl(0xe0, 0x4e487b71)
dup2 dup2
mstore mstore
@ -416,7 +416,7 @@ sub_0: assembly {
/* \"C\":79:428 contract C... */ /* \"C\":79:428 contract C... */
revert revert
/* \"C\":403:411 this.f() */ /* \"C\":403:411 this.f() */
tag_44: tag_45:
/* \"C\":79:428 contract C... */ /* \"C\":79:428 contract C... */
swap4 swap4
pop pop
@ -433,20 +433,20 @@ sub_0: assembly {
swap1 swap1
revert revert
/* \"C\":403:411 this.f() */ /* \"C\":403:411 this.f() */
tag_42: tag_43:
/* \"C\":79:428 contract C... */ /* \"C\":79:428 contract C... */
swap2 swap2
pop pop
pop pop
dup1 dup1
revert revert
tag_40: tag_41:
tag_54 tag_54
tag_29 tag_3
jump\t// in jump\t// in
tag_54: tag_54:
jump(tag_41) jump(tag_42)
tag_53: tag_7:
swap1 swap1
dup2 dup2
0x20 0x20
@ -472,7 +472,7 @@ sub_0: assembly {
dup1 dup1
0x40 0x40
mstore mstore
jumpi(tag_5, callvalue) jumpi(tag_6, callvalue)
0x1f 0x1f
bytecodeSize bytecodeSize
codesize codesize
@ -494,7 +494,7 @@ sub_0: assembly {
dup5 dup5
lt lt
or or
tag_3 tag_4
jumpi jumpi
dup1 dup1
dup5 dup5
@ -509,14 +509,14 @@ sub_0: assembly {
add add
sub sub
slt slt
tag_5 tag_6
jumpi jumpi
tag_7 tag_8
swap1 swap1
mload mload
tag_8 tag_1
jump\t// in jump\t// in
tag_7: tag_8:
mload(0x40) mload(0x40)
dataSize(sub_0) dataSize(sub_0)
swap1 swap1
@ -528,12 +528,12 @@ tag_7:
dup2 dup2
assignImmutable(\"0xe4b1702d9298fee62dfeccc57d322a463ad55ca201256d01f62b45b2e1c21c10\") assignImmutable(\"0xe4b1702d9298fee62dfeccc57d322a463ad55ca201256d01f62b45b2e1c21c10\")
return return
tag_5: tag_6:
pop pop
0x00 0x00
dup1 dup1
revert revert
tag_3: tag_4:
pop pop
pop pop
pop pop
@ -542,7 +542,7 @@ tag_3:
mstore(0x04, 0x41) mstore(0x04, 0x41)
revert(0x00, 0x24) revert(0x00, 0x24)
/* \"D\":113:164 constructor(int _init2)... */ /* \"D\":113:164 constructor(int _init2)... */
tag_8: tag_1:
/* \"C\":147:149 42 */ /* \"C\":147:149 42 */
mstore(0x80, 0x2a) mstore(0x80, 0x2a)
/* \"D\":107:108 3 */ /* \"D\":107:108 3 */
@ -588,11 +588,11 @@ stop
sub_0: assembly { sub_0: assembly {
/* \"D\":91:166 contract D is C(3)... */ /* \"D\":91:166 contract D is C(3)... */
mstore(0x40, 0x80) mstore(0x40, 0x80)
jumpi(tag_1, iszero(lt(calldatasize, 0x04))) jumpi(tag_8, iszero(lt(calldatasize, 0x04)))
0x00 0x00
dup1 dup1
revert revert
tag_1: tag_8:
0x00 0x00
dup1 dup1
calldataload calldataload
@ -601,35 +601,35 @@ sub_0: assembly {
dup1 dup1
0x26121ff0 0x26121ff0
eq eq
tag_3 tag_10
jumpi jumpi
dup1 dup1
0x793816ec 0x793816ec
eq eq
tag_5 tag_12
jumpi jumpi
0x9942ec6f 0x9942ec6f
eq eq
tag_7 tag_14
jumpi jumpi
pop pop
0x00 0x00
dup1 dup1
revert revert
tag_7:
jumpi(tag_9, callvalue)
pop
tag_11
calldatasize
tag_12
jump\t// in
tag_11:
tag_13
/* \"C\":375:378 int */
tag_14
tag_15
jump\t// in
tag_14: tag_14:
jumpi(tag_16, callvalue)
pop
tag_18
calldatasize
tag_1
jump\t// in
tag_18:
tag_19
/* \"C\":375:378 int */
tag_20
tag_6
jump\t// in
tag_20:
/* \"D\":91:166 contract D is C(3)... */ /* \"D\":91:166 contract D is C(3)... */
mload(0x40) mload(0x40)
swap1 swap1
@ -643,23 +643,23 @@ sub_0: assembly {
add add
swap1 swap1
jump jump
tag_13: tag_19:
sub sub
swap1 swap1
return return
tag_9: tag_16:
dup1 dup1
revert revert
tag_5: tag_12:
pop pop
jumpi(tag_9, callvalue) jumpi(tag_16, callvalue)
tag_13 tag_19
swap1 swap1
tag_20 tag_24
calldatasize calldatasize
tag_12 tag_1
jump\t// in jump\t// in
tag_20: tag_24:
sload sload
mload(0x40) mload(0x40)
swap1 swap1
@ -673,64 +673,64 @@ sub_0: assembly {
add add
swap1 swap1
jump jump
tag_3: tag_10:
pop pop
jumpi(tag_9, callvalue) jumpi(tag_16, callvalue)
pop pop
tag_23 tag_27
calldatasize calldatasize
tag_12 tag_1
jump\t// in jump\t// in
tag_23: tag_27:
tag_13 tag_19
/* \"C\":279:298 constVar + immutVar */ /* \"C\":279:298 constVar + immutVar */
tag_14 tag_20
/* \"C\":290:298 immutVar */ /* \"C\":290:298 immutVar */
immutable(\"0xe4b1702d9298fee62dfeccc57d322a463ad55ca201256d01f62b45b2e1c21c10\") immutable(\"0xe4b1702d9298fee62dfeccc57d322a463ad55ca201256d01f62b45b2e1c21c10\")
/* \"C\":279:298 constVar + immutVar */ /* \"C\":279:298 constVar + immutVar */
tag_26 tag_4
jump\t// in jump\t// in
/* \"D\":91:166 contract D is C(3)... */ /* \"D\":91:166 contract D is C(3)... */
tag_12: tag_1:
0x00 0x00
swap1 swap1
not(0x03) not(0x03)
add add
slt slt
tag_27 tag_30
jumpi jumpi
jump\t// out jump\t// out
tag_27: tag_30:
pop pop
0x00 0x00
dup1 dup1
revert revert
/* \"C\":117:119 41 */ /* \"C\":117:119 41 */
tag_29: tag_3:
pop pop
mstore(0x00, shl(0xe0, 0x4e487b71)) mstore(0x00, shl(0xe0, 0x4e487b71))
mstore(0x04, 0x11) mstore(0x04, 0x11)
revert(0x00, 0x24) revert(0x00, 0x24)
tag_26: tag_4:
sub(shl(0xff, 0x01), 0x2a) sub(shl(0xff, 0x01), 0x2a)
dup2 dup2
sgt sgt
0x01 0x01
and and
tag_30 tag_32
jumpi jumpi
tag_31: tag_33:
0x29 0x29
add add
swap1 swap1
jump\t// out jump\t// out
tag_30:
tag_32
tag_29
jump\t// in
tag_32: tag_32:
jump(tag_31) tag_34
tag_33: tag_3
jump\t// in
tag_34:
jump(tag_33)
tag_5:
0x00 0x00
dup2 dup2
slt slt
@ -743,9 +743,9 @@ sub_0: assembly {
dup5 dup5
sgt sgt
and and
tag_34 tag_35
jumpi jumpi
tag_35: tag_36:
shl(0xff, 0x01) shl(0xff, 0x01)
dup3 dup3
swap1 swap1
@ -753,27 +753,27 @@ sub_0: assembly {
dup4 dup4
slt slt
and and
tag_36 tag_37
jumpi jumpi
add add
swap1 swap1
jump\t// out jump\t// out
tag_36: tag_37:
tag_38 tag_39
tag_29 tag_3
jump\t// in jump\t// in
tag_38: tag_39:
add add
swap1 swap1
jump\t// out jump\t// out
tag_34: tag_35:
tag_39 tag_40
tag_29 tag_3
jump\t// in jump\t// in
tag_39: tag_40:
jump(tag_35) jump(tag_36)
/* \"C\":304:341 modifier m()... */ /* \"C\":304:341 modifier m()... */
tag_15: tag_6:
/* \"D\":91:166 contract D is C(3)... */ /* \"D\":91:166 contract D is C(3)... */
0x00 0x00
dup1 dup1
@ -785,10 +785,10 @@ sub_0: assembly {
/* \"D\":91:166 contract D is C(3)... */ /* \"D\":91:166 contract D is C(3)... */
dup2 dup2
eq eq
tag_40 tag_41
jumpi jumpi
/* \"C\":304:341 modifier m()... */ /* \"C\":304:341 modifier m()... */
tag_41: tag_42:
/* \"D\":91:166 contract D is C(3)... */ /* \"D\":91:166 contract D is C(3)... */
add add
swap1 swap1
@ -800,7 +800,7 @@ sub_0: assembly {
/* \"C\":403:411 this.f() */ /* \"C\":403:411 this.f() */
extcodesize extcodesize
iszero iszero
tag_42 tag_43
jumpi jumpi
/* \"D\":91:166 contract D is C(3)... */ /* \"D\":91:166 contract D is C(3)... */
mload(0x40) mload(0x40)
@ -823,38 +823,38 @@ sub_0: assembly {
swap2 swap2
dup3 dup3
iszero iszero
tag_44 tag_45
jumpi jumpi
dup1 dup1
swap3 swap3
tag_46 tag_47
jumpi jumpi
/* \"C\":304:341 modifier m()... */ /* \"C\":304:341 modifier m()... */
tag_47: tag_48:
/* \"C\":392:411 stateVar + this.f() */ /* \"C\":392:411 stateVar + this.f() */
pop pop
pop pop
tag_48 tag_49
swap1 swap1
/* \"C\":392:422 stateVar + this.f() + immutVar */ /* \"C\":392:422 stateVar + this.f() + immutVar */
tag_49 tag_50
/* \"C\":392:411 stateVar + this.f() */ /* \"C\":392:411 stateVar + this.f() */
swap3 swap3
tag_33 tag_5
jump\t// in jump\t// in
tag_48: tag_49:
/* \"C\":414:422 immutVar */ /* \"C\":414:422 immutVar */
immutable(\"0xe4b1702d9298fee62dfeccc57d322a463ad55ca201256d01f62b45b2e1c21c10\") immutable(\"0xe4b1702d9298fee62dfeccc57d322a463ad55ca201256d01f62b45b2e1c21c10\")
/* \"C\":392:422 stateVar + this.f() + immutVar */ /* \"C\":392:422 stateVar + this.f() + immutVar */
swap1 swap1
tag_33 tag_5
jump\t// in jump\t// in
tag_49: tag_50:
/* \"C\":304:341 modifier m()... */ /* \"C\":304:341 modifier m()... */
swap1 swap1
jump\t// out jump\t// out
/* \"C\":403:411 this.f() */ /* \"C\":403:411 this.f() */
tag_46: tag_47:
/* \"D\":91:166 contract D is C(3)... */ /* \"D\":91:166 contract D is C(3)... */
swap1 swap1
swap2 swap2
@ -876,18 +876,18 @@ sub_0: assembly {
dup4 dup4
lt lt
or or
tag_50 tag_51
jumpi jumpi
pop pop
swap2 swap2
/* \"C\":403:411 this.f() */ /* \"C\":403:411 this.f() */
tag_52 tag_53
/* \"C\":392:411 stateVar + this.f() */ /* \"C\":392:411 stateVar + this.f() */
tag_48 tag_49
/* \"D\":91:166 contract D is C(3)... */ /* \"D\":91:166 contract D is C(3)... */
swap3 swap3
/* \"C\":392:422 stateVar + this.f() + immutVar */ /* \"C\":392:422 stateVar + this.f() + immutVar */
tag_49 tag_50
/* \"D\":91:166 contract D is C(3)... */ /* \"D\":91:166 contract D is C(3)... */
swap5 swap5
0x40 0x40
@ -897,16 +897,16 @@ sub_0: assembly {
dup2 dup2
add add
swap1 swap1
tag_53 tag_7
jump\t// in jump\t// in
tag_52: tag_53:
swap2 swap2
dup2 dup2
swap4 swap4
pop pop
jump(tag_47) jump(tag_48)
/* \"D\":91:166 contract D is C(3)... */ /* \"D\":91:166 contract D is C(3)... */
tag_50: tag_51:
shl(0xe0, 0x4e487b71) shl(0xe0, 0x4e487b71)
dup2 dup2
mstore mstore
@ -926,7 +926,7 @@ sub_0: assembly {
/* \"D\":91:166 contract D is C(3)... */ /* \"D\":91:166 contract D is C(3)... */
revert revert
/* \"C\":403:411 this.f() */ /* \"C\":403:411 this.f() */
tag_44: tag_45:
/* \"D\":91:166 contract D is C(3)... */ /* \"D\":91:166 contract D is C(3)... */
swap4 swap4
pop pop
@ -943,20 +943,20 @@ sub_0: assembly {
swap1 swap1
revert revert
/* \"C\":403:411 this.f() */ /* \"C\":403:411 this.f() */
tag_42: tag_43:
/* \"D\":91:166 contract D is C(3)... */ /* \"D\":91:166 contract D is C(3)... */
swap2 swap2
pop pop
pop pop
dup1 dup1
revert revert
tag_40: tag_41:
tag_54 tag_54
tag_29 tag_3
jump\t// in jump\t// in
tag_54: tag_54:
jump(tag_41) jump(tag_42)
tag_53: tag_7:
swap1 swap1
dup2 dup2
0x20 0x20

View File

@ -7,15 +7,15 @@
// stackOptimization: true // stackOptimization: true
// ---- // ----
// /* "":15:22 */ // /* "":15:22 */
// tag_1 // tag_2
// /* "":20:21 */ // /* "":20:21 */
// 0x02 // 0x02
// /* "":17:18 */ // /* "":17:18 */
// 0x01 // 0x01
// /* "":15:22 */ // /* "":15:22 */
// tag_2 // tag_1
// jump // in // jump // in
// tag_1: // tag_2:
// /* "":62:69 */ // /* "":62:69 */
// pop // pop
// tag_3 // tag_3
@ -24,13 +24,13 @@
// /* "":64:65 */ // /* "":64:65 */
// 0x03 // 0x03
// /* "":62:69 */ // /* "":62:69 */
// tag_2 // tag_1
// jump // in // jump // in
// tag_3: // tag_3:
// /* "":0:71 */ // /* "":0:71 */
// stop // stop
// /* "":27:52 */ // /* "":27:52 */
// tag_2: // tag_1:
// pop // pop
// pop // pop
// /* "":47:48 */ // /* "":47:48 */

View File

@ -11,37 +11,37 @@
// stackOptimization: true // stackOptimization: true
// ---- // ----
// /* "":74:81 */ // /* "":74:81 */
// tag_1 // tag_3
// /* "":79:80 */ // /* "":79:80 */
// 0x02 // 0x02
// /* "":76:77 */ // /* "":76:77 */
// 0x01 // 0x01
// /* "":74:81 */ // /* "":74:81 */
// tag_2 // tag_1
// jump // in // jump // in
// tag_1: // tag_3:
// /* "":91:98 */ // /* "":91:98 */
// pop // pop
// tag_3 // tag_4
// /* "":96:97 */ // /* "":96:97 */
// 0x04 // 0x04
// /* "":93:94 */ // /* "":93:94 */
// 0x03 // 0x03
// /* "":91:98 */ // /* "":91:98 */
// tag_2 // tag_1
// jump // in
// tag_3:
// /* "":115:118 */
// pop
// tag_4
// tag_5
// jump // in // jump // in
// tag_4: // tag_4:
// /* "":115:118 */
// pop
// tag_5
// tag_2
// jump // in
// tag_5:
// /* "":131:134 */ // /* "":131:134 */
// pop // pop
// pop // pop
// tag_6 // tag_6
// tag_5 // tag_2
// jump // in // jump // in
// tag_6: // tag_6:
// /* "":139:154 */ // /* "":139:154 */
@ -52,7 +52,7 @@
// /* "":0:156 */ // /* "":0:156 */
// stop // stop
// /* "":6:31 */ // /* "":6:31 */
// tag_2: // tag_1:
// pop // pop
// pop // pop
// /* "":26:27 */ // /* "":26:27 */
@ -61,7 +61,7 @@
// swap1 // swap1
// jump // out // jump // out
// /* "":36:60 */ // /* "":36:60 */
// tag_5: // tag_2:
// /* "":55:56 */ // /* "":55:56 */
// 0x00 // 0x00
// /* "":52:53 */ // /* "":52:53 */

View File

@ -6,10 +6,10 @@
// stackOptimization: true // stackOptimization: true
// ---- // ----
// /* "":58:61 */ // /* "":58:61 */
// tag_1
// tag_2 // tag_2
// tag_1
// jump // in // jump // in
// tag_1: // tag_2:
// /* "":62:73 */ // /* "":62:73 */
// pop // pop
// swap2 // swap2
@ -29,7 +29,7 @@
// /* "":0:115 */ // /* "":0:115 */
// stop // stop
// /* "":6:35 */ // /* "":6:35 */
// tag_2: // tag_1:
// /* "":25:26 */ // /* "":25:26 */
// 0x00 // 0x00
// /* "":28:29 */ // /* "":28:29 */

View File

@ -19,10 +19,10 @@
// swap2 // swap2
// mstore // mstore
// /* "":207:210 */ // /* "":207:210 */
// tag_1
// tag_2 // tag_2
// tag_1
// jump // in // jump // in
// tag_1: // tag_2:
// /* "":211:224 */ // /* "":211:224 */
// swap4 // swap4
// swap1 // swap1
@ -35,7 +35,7 @@
// /* "":0:239 */ // /* "":0:239 */
// stop // stop
// /* "":155:184 */ // /* "":155:184 */
// tag_2: // tag_1:
// /* "":174:175 */ // /* "":174:175 */
// 0x00 // 0x00
// /* "":177:178 */ // /* "":177:178 */

View File

@ -21,14 +21,14 @@
// stackOptimization: true // stackOptimization: true
// ---- // ----
// /* "":14:21 */ // /* "":14:21 */
// tag_1
// tag_2 // tag_2
// tag_1
// jump // in // jump // in
// tag_1: // tag_2:
// /* "":0:460 */ // /* "":0:460 */
// stop // stop
// /* "":34:458 */ // /* "":34:458 */
// tag_2: // tag_1:
// /* "":108:109 */ // /* "":108:109 */
// 0x00 // 0x00
// /* "":95:110 */ // /* "":95:110 */