Граф коммитов

60 Коммитов

Автор SHA1 Сообщение Дата
Andi-Bogdan Postelnicu 3fd4d5f938 Bug 1660405 - Transform mozilla::IsNegative to use std implementation. r=glandium
Since we cannot move away from mozilla::IsNegative to std::signbit because the
first one doesn't accept a NaN we should transform our function to use std implementation.

Differential Revision: https://phabricator.services.mozilla.com/D173111
2023-03-22 11:35:36 +00:00
Andi-Bogdan Postelnicu e6c033fea4 Bug 1660405 - remove unused mozilla::IsFinite. r=sergesanspaille
Differential Revision: https://phabricator.services.mozilla.com/D173050
2023-03-22 11:35:35 +00:00
Andi-Bogdan Postelnicu c4666f21f3 Bug 1660405 - remove unused mozilla::IsInfinite. r=sergesanspaille
Differential Revision: https://phabricator.services.mozilla.com/D173049
2023-03-22 11:35:35 +00:00
Andi-Bogdan Postelnicu 847a0f9d04 Bug 1660405 - remove unused mozilla::IsNaN. r=sergesanspaille
Differential Revision: https://phabricator.services.mozilla.com/D173048
2023-03-22 11:35:34 +00:00
Andi-Bogdan Postelnicu fa5d4cca1f Bug 1660405 - Move away from mozilla::IsFinite in favor of std::isfinite. r=sergesanspaille
Differential Revision: https://phabricator.services.mozilla.com/D173036
2023-03-22 11:35:33 +00:00
Andi-Bogdan Postelnicu 10f49d4180 Bug 1660405 - Move away from mozilla::IsNaN in favor of std::isnan. r=nbp,media-playback-reviewers,sergesanspaille,padenot
Differential Revision: https://phabricator.services.mozilla.com/D173035
2023-03-22 11:35:33 +00:00
Stanca Serban e31a178029 Backed out 7 changesets (bug 1660405) for causing bustages on Linux x64 opt. CLOSED TREE
Backed out changeset ad1a5f59214f (bug 1660405)
Backed out changeset a39e95f0aafe (bug 1660405)
Backed out changeset 48629ee0d70d (bug 1660405)
Backed out changeset 8419b99aab60 (bug 1660405)
Backed out changeset 535cc12c8bed (bug 1660405)
Backed out changeset e27052da4927 (bug 1660405)
Backed out changeset 11b0f9cf8091 (bug 1660405)
2023-03-22 13:05:53 +02:00
Andi-Bogdan Postelnicu 8fed9936fb Bug 1660405 - Transform mozilla::IsNegative to use std implementation. r=glandium
Since we cannot move away from mozilla::IsNegative to std::signbit because the
first one doesn't accept a NaN we should transform our function to use std implementation.

Differential Revision: https://phabricator.services.mozilla.com/D173111
2023-03-22 09:27:59 +00:00
Andi-Bogdan Postelnicu 76fde7399f Bug 1660405 - remove unused mozilla::IsFinite. r=sergesanspaille
Differential Revision: https://phabricator.services.mozilla.com/D173050
2023-03-22 09:27:59 +00:00
Andi-Bogdan Postelnicu ffa4c72717 Bug 1660405 - remove unused mozilla::IsInfinite. r=sergesanspaille
Differential Revision: https://phabricator.services.mozilla.com/D173049
2023-03-22 09:27:58 +00:00
Andi-Bogdan Postelnicu c2d0ffbaf3 Bug 1660405 - remove unused mozilla::IsNaN. r=sergesanspaille
Differential Revision: https://phabricator.services.mozilla.com/D173048
2023-03-22 09:27:58 +00:00
Andi-Bogdan Postelnicu 0b692b5a96 Bug 1660405 - Move away from mozilla::IsFinite in favor of std::isfinite. r=sergesanspaille
Differential Revision: https://phabricator.services.mozilla.com/D173036
2023-03-22 09:27:57 +00:00
Andi-Bogdan Postelnicu a5d28acdd6 Bug 1660405 - Move away from mozilla::IsNaN in favor of std::isnan. r=nbp,media-playback-reviewers,sergesanspaille,padenot
Differential Revision: https://phabricator.services.mozilla.com/D173035
2023-03-22 09:27:56 +00:00
Emilio Cobos Álvarez 0b9fa22976 Bug 1701942 - Use bitwise equality for font variation value comparisons. r=jfkthame
Just like we do for font sizes / size-adjust in gfxFontStyle.

Differential Revision: https://phabricator.services.mozilla.com/D110519
2021-04-02 12:37:23 +00:00
Chris Peterson 7bc752e42b Bug 1571631 - Replace MOZ_MUST_USE with [[nodiscard]] in mfbt. r=sg
Also move MOZ_MUST_USE before function declarations' specifiers and return type. While clang and gcc's __attribute__((warn_unused_result)) can appear before, between, or after function specifiers and return types, the [[nodiscard]] attribute must precede the function specifiers.

Depends on D108344

Differential Revision: https://phabricator.services.mozilla.com/D108345
2021-03-17 03:01:21 +00:00
Jan de Mooij 8a7633e993 Bug 1687441 part 7 - Add NumberEqualsInt64 and NumberIsInt64 to MFBT. r=sg
Tests based on the Int32 tests, with changes/tests for very large/small values.

Differential Revision: https://phabricator.services.mozilla.com/D102724
2021-01-27 15:52:29 +00:00
Simon Giesecke dd80614fa0 Bug 1678062 - Remove unnecessary includes. r=andi
Differential Revision: https://phabricator.services.mozilla.com/D97467

Depends on D96561
2020-11-23 16:12:02 +00:00
Simon Giesecke 971b645fe3 Bug 1660470 - Add missing include directives/forward declarations. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D87865
2020-11-23 16:21:38 +00:00
Timothy Gu bfaebdfe1e Bug 1627285 - Check for NaN before std::min/max() in DOMQuad and DOMRect. r=emilio,jwalden
Tests were added as a part of bug 1626471. Expectations that the tests fail
have been removed.

Differential Revision: https://phabricator.services.mozilla.com/D69605

--HG--
extra : moz-landing-system : lando
2020-04-07 22:27:36 +00:00
André Bargull 14ca007916 Bug 1625138 - Part 41: Remove no longer needed includes for mozilla/TypeTraits. r=froydnj
Also adds missing includes in some files, these were previously only transivitely
included through mozilla/TypeTraits.h.

Differential Revision: https://phabricator.services.mozilla.com/D68561

--HG--
extra : moz-landing-system : lando
2020-03-28 16:00:09 +00:00
André Bargull 5992327185 Bug 1625138 - Part 36: Replace mozilla::IsSame with std::is_same in mfbt/. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D68555

--HG--
extra : moz-landing-system : lando
2020-03-28 13:57:20 +00:00
André Bargull 1f5d157732 Bug 1625138 - Part 15: Replace mozilla::IsFloatingPoint with std::is_floating_point. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D68370

--HG--
extra : moz-landing-system : lando
2020-03-28 13:57:15 +00:00
André Bargull 13e9ad3137 Bug 1625138 - Part 14: Replace mozilla::IsSigned with std::is_signed. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D68369

--HG--
extra : moz-landing-system : lando
2020-03-28 13:57:15 +00:00
Kagami Sascha Rosylight 8e0f5ebfdd Bug 1560658: Add SameValueZero to mfbt/FloatingPoint.h r=jwalden
Add ES-defined SameValueZero and replace existing code.

Differential Revision: https://phabricator.services.mozilla.com/D35596

--HG--
extra : moz-landing-system : lando
2019-06-28 23:57:13 +00:00
Iain Ireland 00ae116a04 Bug 1548908: Add InfinityBits to FloatingPoint.h r=jwalden
We can't generate a constexpr uint64_t containing the bits for positive/negative infinity, because of a (very sensible) static_assert in SpecificNaNBits. This patch adds support to FloatingPoint.h for infinity. The next patch will use it to make JS::InfinityValue constexpr (to match JS::NaNValue).

Differential Revision: https://phabricator.services.mozilla.com/D29869

--HG--
extra : moz-landing-system : lando
2019-06-03 15:59:21 +00:00
Sylvestre Ledru 265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Jeff Walden 5499a179ff Bug 1508725 - Adjust mozilla::FloatingPoint<T>'s definition so only the barest details are specified for floating-point encodings, with every other number, bit mask, &c. mathematically derived. Also add a bunch of documentation comments. r=froydnj
--HG--
extra : rebase_source : fe3e97b77945bcffd5f4415351541fcd5875bdbb
2018-06-07 13:25:12 -07:00
Jeff Walden 701bad47cd Bug 1438212 - Implement mozilla::IsFloat32Representable using an algorithm that handles NaN correctly and doesn't sometimes invoke undefined behavior. r=froydnj
--HG--
extra : rebase_source : b4246ea818046b1e4100b90a3a371a866ea2b098
2018-06-06 16:03:47 -07:00
Jeff Walden 1b16de9738 Bug 744965 - Implement mozilla::NumberEqualsInt32 in a way that doesn't depend on undefined behavior casting an out-of-range floating point number to int32_t. r=froydnj
--HG--
extra : rebase_source : dc4781e2a31ee0e75fc62951cbdc71eaa9fd7b1c
2018-02-15 17:22:14 -08:00
Cosmin Sabou 48de1e7807 Backed out changeset 1fcc972d445b (bug 744965) for assertion failures on TestFloatingPoint.cpp on a CLOSED TREE 2018-02-21 10:12:45 +02:00
Jeff Walden e77ef331a3 Bug 744965 - Implement mozilla::NumberEqualsInt32 in a way that doesn't depend on undefined behavior casting an out-of-range floating point number to int32_t. r=froydnj
--HG--
extra : rebase_source : d6d890b7b20d93297f575abe838e8619418ea545
2018-02-15 17:22:14 -08:00
Tooru Fujisawa 57db30aa76 Bug 1311088 - Part 1: Add mozilla::SpecificNaNBits and JS::detail::CanonicalizedNaNBits. r=jwalden 2016-10-29 01:47:30 +09:00
Tooru Fujisawa 0e8929a00e Bug 1301864 - Remove constexpr from mozilla::IsNaN. r=jwalden 2016-10-29 01:47:30 +09:00
Johannes Schulte b7ccc22970 Bug 1312620 - Add IsPositiveZero function to mfbt and use it to replace MPhi by MNaNToZero iff c is +0.0. r=nbp, r=waldo
--HG--
extra : rebase_source : 7adefc3370c081e17b5e0b090a008e0de0507bb9
2016-10-26 17:47:42 +02:00
Benjamin Bouvier 23575fdec5 Bug 1248555: Introduce variants of SpecificNaN / BitwiseCast that preserve the signaling NaN bit; r=froydnj
MozReview-Commit-ID: 5A8p06nBqyI

--HG--
extra : rebase_source : 87ebcc9792d42c6b2e6164a639340da37b4b602c
extra : histedit_source : b4ab7c6b9f4bb7fe2cc88a3208d6fa8e6fefce08
2016-08-01 20:02:05 +02:00
Chris Peterson 43c2748f66 Bug 1277775 - Replace MOZ_CONSTEXPR{_VAR,_TMPL} with constexpr. r=froydnj 2016-07-08 14:39:53 -07:00
Nicholas Nethercote 2511b2c327 Bug 1267550 (part 2) - Rename MOZ_WARN_UNUSED_RESULT as MOZ_MUST_USE. r=froydnj.
It's an annotation that is used a lot, and should be used even more, so a
shorter name is better.

MozReview-Commit-ID: 1VS4Dney4WX

--HG--
extra : rebase_source : b26919c1b0fcb32e5339adeef5be5becae6032cf
2016-04-27 14:16:50 +10:00
Markus Stange 04177e1aa2 Bug 1209100 - Back out bug 1165185 on inbound.
MozReview-Commit-ID: JqohyXNvjiU

--HG--
extra : rebase_source : c2165d279a6ca57a3439ebbfc081961369a42124
2016-03-21 16:16:52 -04:00
Markus Stange 8f3e1c59d9 Bug 1165185 - Try to avoid invalidations when scrolling transformed elements. r=roc
--HG--
extra : rebase_source : e044d64a50c6afff9e518cf53c51aa9658f3b41e
2015-06-15 19:20:59 -04:00
Ehsan Akhgari d803a0513e Bug 1114351 - Use mozilla::IsNaN() in DOUBLE_TO_JSVAL(); r=Waldo
Note that this requires making sure that IsNaN is constexpr because it
needs to be passed to the constexpr IMPL_TO_JSVALUE() function in
DOUBLE_TO_JSVAL().

--HG--
extra : amend_source : dbd8bb0659b53e7d36d2600ac97f0a753ef772c7
2014-12-21 19:16:49 -05:00
Dan Gohman 13dc791112 Bug 1094052 - IonMonkey: Fix range analysis for Math.sign(-0) r=nbp,h4writer 2014-11-05 08:38:40 -08:00
Kearwood (Kip) Gilbert ecf1650979 Bug 1062406 - Part 1 - Change x and y parameters of window.scroll* CSSOM-View DOM calls from double to unrestricted double. r=bz
- WebIDL updated so that x and y parameters of window.scroll, window.scrollTo,
  and window.ScrollBy are changed from "double" to "unrestricted double".
- Implemented mozilla::ToZeroIfNonfinite
- Updated nsGlobalWindow::Scroll, ScrollTo, and ScrollBy methods so that they
  replace non-finite numbers with 0.
2014-09-09 12:02:00 +02:00
Nicholas Nethercote 9439ff268e Bug 1026319 - Convert the second quarter of MFBT to Gecko style. r=froydnj.
--HG--
extra : rebase_source : 98d2557c7fe4648d79143c654e7e31767fca2e65
2014-06-12 23:34:08 -07:00
Dan Gohman 73faa4dc74 Bug 1012971 - Fix compiler warnings in mfbt r=nbp 2014-05-22 11:15:06 -07:00
Benjamin Bouvier 1ce0aa6d4a Bug 939843: Unify FloatingPoint's code for Double and Float; r=waldo
--HG--
extra : rebase_source : 2f7956d497d534af8931939a38a29ad27695a3fc
2014-01-30 15:54:46 +01:00
Kartikaya Gupta a6ffc9d1a7 Bug 948984 - Add functions to fuzzily compare float numbers. r=bjacob, r=Waldo 2014-02-05 17:04:42 -05:00
Dan Gohman 0333b1cb4a Bug 930708 - IonMonkey: Factor out a DoubleEqualsInt32 from DoubleIsInt32 and use it when negative zero is to be treated as zero. r=nbp 2013-11-02 14:29:44 -07:00
Benjamin Bouvier c695034824 Bug 913282: IsFloat32Representable function in mfbt; r=Waldo
--HG--
extra : rebase_source : 0d4d6f02b880c37d29e3e41e9d105365d9f941b0
2013-10-22 14:55:35 +02:00
Benjamin Bouvier 7f3147dfed Bug 913282: More Float32 operators: Abs; p=dougc,bbouvier; r=jonco,sstangl
dougc for the ARM parts, bbouvier for the rest.
2013-10-22 14:53:12 +02:00
Dan Gohman d359733f1c Bug 924637 - Document a somewhat counterintuitive case in ExponentComponent, and add test coverage for it. r=waldo 2013-10-09 06:41:42 -07:00