| 4654 | } |
| 4655 | |
| 4656 | std::string YulUtilFunctions::returnDataSelectorFunction() |
| 4657 | { |
| 4658 | std::string const functionName = "return_data_selector"; |
| 4659 | solAssert(m_evmVersion.supportsReturndata(), ""); |
| 4660 | |
| 4661 | return m_functionCollector.createFunction(functionName, [&]() { |
| 4662 | return util::Whiskers(R"( |
| 4663 | function <functionName>() -> sig { |
| 4664 | if gt(returndatasize(), 3) { |
| 4665 | returndatacopy(0, 0, 4) |
| 4666 | sig := <shr224>(mload(0)) |
| 4667 | } |
| 4668 | } |
| 4669 | )") |
| 4670 | ("functionName", functionName) |
| 4671 | ("shr224", shiftRightFunction(224)) |
| 4672 | .render(); |
| 4673 | }); |
| 4674 | } |
| 4675 | |
| 4676 | std::string YulUtilFunctions::tryDecodeErrorMessageFunction() |
| 4677 | { |
no test coverage detected