mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #9816 from ethereum/exp-base-literals
[Sol->Yul] Optimization for exponentiation when the base is a literal
This commit is contained in:
@@ -128,6 +128,14 @@ public:
|
||||
/// signature: (base, exponent) -> power
|
||||
std::string overflowCheckedIntExpFunction(IntegerType const& _type, IntegerType const& _exponentType);
|
||||
|
||||
/// @returns the name of the exponentiation function, specialized for literal base.
|
||||
/// signature: exponent -> power
|
||||
std::string overflowCheckedIntLiteralExpFunction(
|
||||
RationalNumberType const& _baseType,
|
||||
IntegerType const& _exponentType,
|
||||
IntegerType const& _commonType
|
||||
);
|
||||
|
||||
/// Generic unsigned checked exponentiation function.
|
||||
/// Reverts if the result is larger than max.
|
||||
/// signature: (base, exponent, max) -> power
|
||||
|
||||
Reference in New Issue
Block a user