mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Changelog entry.
This commit is contained in:
parent
baf2ff2a6e
commit
d18db63843
@ -6,6 +6,7 @@ Language Features:
|
|||||||
Compiler Features:
|
Compiler Features:
|
||||||
* Command Line Interface: Drop experimental support for ``--machine evm15``.
|
* Command Line Interface: Drop experimental support for ``--machine evm15``.
|
||||||
* Optimizer: Try to move ``and`` with constant inside ``or`` to improve storage writes of small types.
|
* Optimizer: Try to move ``and`` with constant inside ``or`` to improve storage writes of small types.
|
||||||
|
* Optimizer: Replace multiplications and divisions with powers of two by shifts.
|
||||||
|
|
||||||
|
|
||||||
Bugfixes:
|
Bugfixes:
|
||||||
|
@ -60,7 +60,7 @@ template <class S> S shlWorkaround(S const& _x, unsigned _amount)
|
|||||||
/// @returns k if _x == 2**k, nullopt otherwise
|
/// @returns k if _x == 2**k, nullopt otherwise
|
||||||
inline std::optional<size_t> binaryLogarithm(u256 const& _x)
|
inline std::optional<size_t> binaryLogarithm(u256 const& _x)
|
||||||
{
|
{
|
||||||
if (!_x)
|
if (_x == 0)
|
||||||
return std::nullopt;
|
return std::nullopt;
|
||||||
size_t msb = boost::multiprecision::msb(_x);
|
size_t msb = boost::multiprecision::msb(_x);
|
||||||
return (u256(1) << msb) == _x ? std::make_optional(msb) : std::nullopt;
|
return (u256(1) << msb) == _x ? std::make_optional(msb) : std::nullopt;
|
||||||
|
Loading…
Reference in New Issue
Block a user