Branch: refs/heads/blead
Home: https://github.com/Perl/perl5
Commit: 878d0f6b930a6f3a1e01768796d2f7a1b71f9da0
https://github.com/Perl/perl5/commit/878d0f6b930a6f3a1e01768796d2f7a1b71f9da0
Author: TAKAI Kousuke <[email protected]>
Date: 2022-07-01 (Fri, 01 Jul 2022)
Changed paths:
M sv.c
M t/porting/diag.t
Log Message:
-----------
sv.c: Use Perl_fabs rather than hand-coded abs expressions
Same as the commit 644e3ee3290a8de5f7fc90ae85ae5c96a2a00039,
Perl_fabs is usually faster and compacter than hand-coded abs
(conditional negation) on modern environments.
Commit: b52cb8576e7432bf7e962089e9e54451381968c8
https://github.com/Perl/perl5/commit/b52cb8576e7432bf7e962089e9e54451381968c8
Author: TAKAI Kousuke <[email protected]>
Date: 2022-07-01 (Fri, 01 Jul 2022)
Changed paths:
M sv.c
M t/porting/diag.t
Log Message:
-----------
sv.c: Replace a runtime check with compile-time static assertion
The original code used to check U_V(Perl_fabs(SvNVX(sv))) < (UV)IV_MAX
in runtime, but possibility of failing this check will imply that
such perl configuration is unusable anyway. To make this check never fail,
the first non-preserved integer, which is (1 << NV_PRESERVES_UV_BITS),
is required to be less than (or equal to) IV_MAX, which can be checked
at compile time without runtime overhead.
Compare: https://github.com/Perl/perl5/compare/75876c5ebffc...b52cb8576e74