| 606 | } |
| 607 | |
| 608 | void CompilerUtils::abiEncodeV2( |
| 609 | TypePointers const& _givenTypes, |
| 610 | TypePointers const& _targetTypes, |
| 611 | bool _encodeAsLibraryTypes, |
| 612 | bool _padToWordBoundaries |
| 613 | ) |
| 614 | { |
| 615 | if (!_padToWordBoundaries) |
| 616 | solAssert(!_encodeAsLibraryTypes, "Library calls cannot be packed."); |
| 617 | |
| 618 | // stack: <$value0> <$value1> ... <$value(n-1)> <$headStart> |
| 619 | |
| 620 | std::string encoderName = |
| 621 | _padToWordBoundaries ? |
| 622 | m_context.abiFunctions().tupleEncoderReversed(_givenTypes, _targetTypes, _encodeAsLibraryTypes) : |
| 623 | m_context.abiFunctions().tupleEncoderPackedReversed(_givenTypes, _targetTypes); |
| 624 | m_context.callYulFunction(encoderName, sizeOnStack(_givenTypes) + 1, 1); |
| 625 | } |
| 626 | |
| 627 | void CompilerUtils::abiDecodeV2(TypePointers const& _parameterTypes, bool _fromMemory) |
| 628 | { |
nothing calls this directly
no test coverage detected