mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Add IRNames::internalDispatch() and use it in IRGenerationContext
This commit is contained in:
parent
22c0568d34
commit
bd75543900
@ -53,6 +53,13 @@ string IRNames::runtimeObject(ContractDefinition const& _contract)
|
||||
return _contract.name() + "_" + toString(_contract.id()) + "_deployed";
|
||||
}
|
||||
|
||||
string IRNames::internalDispatch(YulArity const& _arity)
|
||||
{
|
||||
return "dispatch_internal"
|
||||
"_in_" + to_string(_arity.in) +
|
||||
"_out_" + to_string(_arity.out);
|
||||
}
|
||||
|
||||
string IRNames::implicitConstructor(ContractDefinition const& _contract)
|
||||
{
|
||||
return "constructor_" + _contract.name() + "_" + to_string(_contract.id());
|
||||
|
@ -50,6 +50,7 @@ struct IRNames
|
||||
static std::string function(VariableDeclaration const& _varDecl);
|
||||
static std::string creationObject(ContractDefinition const& _contract);
|
||||
static std::string runtimeObject(ContractDefinition const& _contract);
|
||||
static std::string internalDispatch(YulArity const& _arity);
|
||||
static std::string implicitConstructor(ContractDefinition const& _contract);
|
||||
static std::string constantValueFunction(VariableDeclaration const& _constant);
|
||||
static std::string localVariable(VariableDeclaration const& _declaration);
|
||||
|
@ -123,7 +123,7 @@ string IRGenerationContext::newYulVariable()
|
||||
|
||||
string IRGenerationContext::generateInternalDispatchFunction(YulArity const& _arity)
|
||||
{
|
||||
string funName = "dispatch_internal_in_" + to_string(_arity.in) + "_out_" + to_string(_arity.out);
|
||||
string funName = IRNames::internalDispatch(_arity);
|
||||
return m_functions.createFunction(funName, [&]() {
|
||||
Whiskers templ(R"(
|
||||
function <functionName>(fun <comma> <in>) <arrow> <out> {
|
||||
|
Loading…
Reference in New Issue
Block a user