mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Function call options for YulIR.
This commit is contained in:
parent
92d4bbb017
commit
6a896f766a
@ -739,6 +739,25 @@ void IRGeneratorForStatements::endVisit(FunctionCall const& _functionCall)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void IRGeneratorForStatements::endVisit(FunctionCallOptions const& _options)
|
||||||
|
{
|
||||||
|
FunctionType const& previousType = dynamic_cast<FunctionType const&>(*_options.expression().annotation().type);
|
||||||
|
|
||||||
|
solUnimplementedAssert(!previousType.bound(), "");
|
||||||
|
|
||||||
|
// Copy over existing values.
|
||||||
|
for (auto const& item: previousType.stackItems())
|
||||||
|
define(IRVariable(_options).part(get<0>(item)), IRVariable(_options.expression()).part(get<0>(item)));
|
||||||
|
|
||||||
|
for (size_t i = 0; i < _options.names().size(); ++i)
|
||||||
|
{
|
||||||
|
string const& name = *_options.names()[i];
|
||||||
|
solAssert(name == "salt" || name == "gas" || name == "value", "");
|
||||||
|
|
||||||
|
define(IRVariable(_options).part(name), *_options.options()[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void IRGeneratorForStatements::endVisit(MemberAccess const& _memberAccess)
|
void IRGeneratorForStatements::endVisit(MemberAccess const& _memberAccess)
|
||||||
{
|
{
|
||||||
ASTString const& member = _memberAccess.memberName();
|
ASTString const& member = _memberAccess.memberName();
|
||||||
|
@ -60,6 +60,7 @@ public:
|
|||||||
void endVisit(UnaryOperation const& _unaryOperation) override;
|
void endVisit(UnaryOperation const& _unaryOperation) override;
|
||||||
bool visit(BinaryOperation const& _binOp) override;
|
bool visit(BinaryOperation const& _binOp) override;
|
||||||
void endVisit(FunctionCall const& _funCall) override;
|
void endVisit(FunctionCall const& _funCall) override;
|
||||||
|
void endVisit(FunctionCallOptions const& _funCallOptions) override;
|
||||||
void endVisit(MemberAccess const& _memberAccess) override;
|
void endVisit(MemberAccess const& _memberAccess) override;
|
||||||
bool visit(InlineAssembly const& _inlineAsm) override;
|
bool visit(InlineAssembly const& _inlineAsm) override;
|
||||||
void endVisit(IndexAccess const& _indexAccess) override;
|
void endVisit(IndexAccess const& _indexAccess) override;
|
||||||
|
Loading…
Reference in New Issue
Block a user