| 553 | } |
| 554 | |
| 555 | void 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 | |
| 571 | void ContractCompiler::registerStateVariables(ContractDefinition const& _contract) |
| 572 | { |
nothing calls this directly
no test coverage detected