| 691 | } |
| 692 | |
| 693 | std::string YulUtilFunctions::roundUpFunction() |
| 694 | { |
| 695 | std::string functionName = "round_up_to_mul_of_32"; |
| 696 | return m_functionCollector.createFunction(functionName, [&]() { |
| 697 | return |
| 698 | Whiskers(R"( |
| 699 | function <functionName>(value) -> result { |
| 700 | result := and(add(value, 31), not(31)) |
| 701 | } |
| 702 | )") |
| 703 | ("functionName", functionName) |
| 704 | .render(); |
| 705 | }); |
| 706 | } |
| 707 | |
| 708 | std::string YulUtilFunctions::divide32CeilFunction() |
| 709 | { |
no test coverage detected