MCPcopy Create free account
hub / github.com/argotorg/solidity / generateMemoryStore

Function generateMemoryStore

libyul/optimiser/StackToMemoryMover.cpp:38–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36namespace
37{
38std::vector<Statement> generateMemoryStore(
39 Dialect const& _dialect,
40 langutil::DebugData::ConstPtr const& _debugData,
41 LiteralValue const& _mpos,
42 Expression _value
43)
44{
45 std::optional<BuiltinHandle> memoryStoreFunctionHandle = _dialect.memoryStoreFunctionHandle();
46 yulAssert(memoryStoreFunctionHandle);
47 std::vector<Statement> result;
48 result.emplace_back(ExpressionStatement{_debugData, FunctionCall{
49 _debugData,
50 BuiltinName{_debugData, *memoryStoreFunctionHandle},
51 {
52 Literal{_debugData, LiteralKind::Number, _mpos},
53 std::move(_value)
54 }
55 }});
56 return result;
57}
58
59FunctionCall generateMemoryLoad(Dialect const& _dialect, langutil::DebugData::ConstPtr const& _debugData, LiteralValue const& _mpos)
60{

Callers 1

operator()Method · 0.85

Calls 1

Tested by

no test coverage detected