| 453 | } |
| 454 | |
| 455 | std::string YulUtilFunctions::shiftLeftFunctionDynamic() |
| 456 | { |
| 457 | std::string functionName = "shift_left_dynamic"; |
| 458 | return m_functionCollector.createFunction(functionName, [&]() { |
| 459 | return |
| 460 | Whiskers(R"( |
| 461 | function <functionName>(bits, value) -> newValue { |
| 462 | newValue := |
| 463 | <?hasShifts> |
| 464 | shl(bits, value) |
| 465 | <!hasShifts> |
| 466 | mul(value, exp(2, bits)) |
| 467 | </hasShifts> |
| 468 | } |
| 469 | )") |
| 470 | ("functionName", functionName) |
| 471 | ("hasShifts", m_evmVersion.hasBitwiseShifting()) |
| 472 | .render(); |
| 473 | }); |
| 474 | } |
| 475 | |
| 476 | std::string YulUtilFunctions::shiftRightFunction(size_t _numBits) |
| 477 | { |
nothing calls this directly
no test coverage detected