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

Method appendReturnValuePacker

libsolidity/codegen/ContractCompiler.cpp:555–569  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

553}
554
555void ContractCompiler::appendReturnValuePacker(TypePointers const& _typeParameters, bool _isLibrary)
556{
557 CompilerUtils utils(m_context);
558 if (_typeParameters.empty())
559 m_context << Instruction::STOP;
560 else
561 {
562 utils.fetchFreeMemoryPointer();
563 //@todo optimization: if we return a single memory array, there should be enough space before
564 // its data to add the needed parts and we avoid a memory copy.
565 utils.abiEncode(_typeParameters, _typeParameters, _isLibrary);
566 utils.toSizeAfterFreeMemoryPointer();
567 m_context << Instruction::RETURN;
568 }
569}
570
571void ContractCompiler::registerStateVariables(ContractDefinition const& _contract)
572{

Callers

nothing calls this directly

Calls 4

abiEncodeMethod · 0.80
emptyMethod · 0.45

Tested by

no test coverage detected