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

Method createFunction

libevmasm/Assembly.cpp:772–781  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

770}
771
772uint16_t Assembly::createFunction(uint8_t _args, uint8_t _rets, bool _nonReturning)
773{
774 size_t functionID = m_codeSections.size();
775 solRequire(functionID < 1024, AssemblyException, "Too many functions for EOF");
776 solAssert(m_currentCodeSection == 0, "Functions need to be declared from the main block.");
777 solRequire(_rets <= 127, AssemblyException, "Too many function returns.");
778 solRequire(_args <= 127, AssemblyException, "Too many function inputs.");
779 m_codeSections.emplace_back(CodeSection{_args, _rets, _nonReturning, {}});
780 return static_cast<uint16_t>(functionID);
781}
782
783void Assembly::beginFunction(uint16_t _functionID)
784{

Callers 1

registerFunctionMethod · 0.45

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected