@@ -52,6 +52,8 @@ pair<YulString, BuiltinFunctionForEVM> createEVMFunction(
52
52
f.returns .resize (info.ret );
53
53
f.movable = eth::SemanticInformation::movable (_instruction);
54
54
f.sideEffectFree = eth::SemanticInformation::sideEffectFree (_instruction);
55
+ f.sideEffectFreeIfNoMSize = eth::SemanticInformation::sideEffectFreeIfNoMSize (_instruction);
56
+ f.isMSize = _instruction == dev::eth::Instruction::MSIZE;
55
57
f.literalArguments = false ;
56
58
f.instruction = _instruction;
57
59
f.generateCode = [_instruction](
@@ -73,6 +75,7 @@ pair<YulString, BuiltinFunctionForEVM> createFunction(
73
75
size_t _returns,
74
76
bool _movable,
75
77
bool _sideEffectFree,
78
+ bool _sideEffectFreeIfNoMSize,
76
79
bool _literalArguments,
77
80
std::function<void (FunctionCall const &, AbstractAssembly&, BuiltinContext&, std::function<void ()>)> _generateCode
78
81
)
@@ -85,6 +88,8 @@ pair<YulString, BuiltinFunctionForEVM> createFunction(
85
88
f.movable = _movable;
86
89
f.literalArguments = _literalArguments;
87
90
f.sideEffectFree = _sideEffectFree;
91
+ f.sideEffectFreeIfNoMSize = _sideEffectFreeIfNoMSize;
92
+ f.isMSize = false ;
88
93
f.instruction = {};
89
94
f.generateCode = std::move (_generateCode);
90
95
return {name, f};
@@ -105,7 +110,7 @@ map<YulString, BuiltinFunctionForEVM> createBuiltins(langutil::EVMVersion _evmVe
105
110
106
111
if (_objectAccess)
107
112
{
108
- builtins.emplace (createFunction (" datasize" , 1 , 1 , true , true , true , [](
113
+ builtins.emplace (createFunction (" datasize" , 1 , 1 , true , true , true , true , [](
109
114
FunctionCall const & _call,
110
115
AbstractAssembly& _assembly,
111
116
BuiltinContext& _context,
@@ -126,7 +131,7 @@ map<YulString, BuiltinFunctionForEVM> createBuiltins(langutil::EVMVersion _evmVe
126
131
_assembly.appendDataSize (_context.subIDs .at (dataName));
127
132
}
128
133
}));
129
- builtins.emplace (createFunction (" dataoffset" , 1 , 1 , true , true , true , [](
134
+ builtins.emplace (createFunction (" dataoffset" , 1 , 1 , true , true , true , true , [](
130
135
FunctionCall const & _call,
131
136
AbstractAssembly& _assembly,
132
137
BuiltinContext& _context,
@@ -147,7 +152,7 @@ map<YulString, BuiltinFunctionForEVM> createBuiltins(langutil::EVMVersion _evmVe
147
152
_assembly.appendDataOffset (_context.subIDs .at (dataName));
148
153
}
149
154
}));
150
- builtins.emplace (createFunction (" datacopy" , 3 , 0 , false , false , false , [](
155
+ builtins.emplace (createFunction (" datacopy" , 3 , 0 , false , false , false , false , [](
151
156
FunctionCall const &,
152
157
AbstractAssembly& _assembly,
153
158
BuiltinContext&,
0 commit comments