Simon Giesecke
9235fda693
Bug 1648452 - Make construction of NotNull work with MovingNotNull of derived-type. r=froydnj
...
Differential Revision: https://phabricator.services.mozilla.com/D81077
2020-06-25 13:10:08 +00:00
Simon Giesecke
6fbe4dd29b
Bug 1648044 - Add Maybe<T&>::refEquals methods. r=froydnj
...
Differential Revision: https://phabricator.services.mozilla.com/D80845
2020-06-25 15:09:58 +00:00
Simon Giesecke
e30a7e3356
Bug 1647647 - Add InitializedOnce::ref methods. r=froydnj
...
Differential Revision: https://phabricator.services.mozilla.com/D80843
2020-06-25 13:12:47 +00:00
John Paul Adrian Glaubitz
1304678d83
Bug 1318905 - mfbt:tests: Define RETURN_INSTR for riscv64 in TestPoisonArea r=glandium
...
Define RETURN_INSTR for riscv64 in TestPoisonArea, i.e. the riscv64 assembly
opcodes for "ret ; ret".
Differential Revision: https://phabricator.services.mozilla.com/D78625
2020-06-18 07:11:09 +00:00
Simon Giesecke
2c863dcd11
Bug 1646391 - Simplify ReverseIterator. r=froydnj
...
The following simplifications are made:
* Unnecessary function template arguments are removed.
* Unnecessary copy constructor definitions are removed (making the types
movable where possible).
* Iterators are moved where possible rather than copied.
* Unnecessary MOZ_IMPLICIT on a constructor with two arguments is removed.
Differential Revision: https://phabricator.services.mozilla.com/D80015
2020-06-18 07:49:16 +00:00
Simon Giesecke
901af53e36
Bug 1645429 - Add tests for ReverseIterator and fix implementation of ReverseIterator::operator-. r=froydnj
...
Depends on D79488
Differential Revision: https://phabricator.services.mozilla.com/D79957
2020-06-17 13:54:12 +00:00
Sylvestre Ledru
85c05f3a47
Bug 1519636 - Reformat recent changes to the Google coding style r=andi
...
# ignore-this-changeset
Differential Revision: https://phabricator.services.mozilla.com/D79795
2020-06-16 14:37:23 +00:00
Simon Giesecke
1a13e8aef8
Bug 1645328 - Add in-place constructor to Maybe. r=froydnj
...
Differential Revision: https://phabricator.services.mozilla.com/D79448
2020-06-15 09:04:02 +00:00
Brindusan Cristian
bff7221969
Backed out changeset 5200dd8a0de5 (bug 1645328) for cppunit assertion failures at Maybe.h. CLOSED TREE
2020-06-12 20:12:37 +03:00
Simon Giesecke
af931b95e6
Bug 1645328 - Add in-place constructor to Maybe. r=froydnj
...
Differential Revision: https://phabricator.services.mozilla.com/D79448
2020-06-12 14:42:26 +00:00
John Paul Adrian Glaubitz
eac5e496ab
Bug 1325771 - mfbt:tests: Define RETURN_INSTR for m68k in TestPoisonArea r=glandium
...
Define RETURN_INSTR for m68k in TestPoisonArea, i.e. the m68k assembly
opcodes for "rts ; rts".
Differential Revision: https://phabricator.services.mozilla.com/D77290
2020-06-06 06:45:53 +00:00
John Paul Adrian Glaubitz
44fad57771
Bug 1325771 - mfbt:tests: Handle targets with less strict alignment in TestCompactPair r=jesup
...
Previously, the tests assumed that the alignment of int and long equals
their size. This commit fixes the tests for targets like m68k that have
sizeof(int) == 4 and alignof(int) == 2. A static helper function sizemax
was introduced as the offset of the second element in Pair<int,long>
might be either determined by its alignment requirement or the size of
the preceding int element and we use the helper function to pick the
larger of the two values.
Differential Revision: https://phabricator.services.mozilla.com/D77289
2020-06-06 06:45:53 +00:00
Dorel Luca
0154691eae
Backed out 5 changesets (bug 1325771) for Spidermonkey failures and build bustage in build/src/mfbt/tests/TestCompactPair.cpp. CLOSED TREE
...
Backed out changeset ace40545b46c (bug 1325771)
Backed out changeset b3e0fb410a1c (bug 1325771)
Backed out changeset d69ac62c063f (bug 1325771)
Backed out changeset 24e6299e112d (bug 1325771)
Backed out changeset 393a6ff847ce (bug 1325771)
2020-06-03 20:23:08 +03:00
John Paul Adrian Glaubitz
196d2e2764
Bug 1325771 - mfbt:tests: Define RETURN_INSTR for m68k in TestPoisonArea r=glandium
...
Define RETURN_INSTR for m68k in TestPoisonArea, i.e. the m68k assembly
opcodes for "rts ; rts".
Depends on D77289
Differential Revision: https://phabricator.services.mozilla.com/D77290
2020-06-02 07:01:56 +00:00
John Paul Adrian Glaubitz
5e52229a75
Bug 1325771 - mfbt:tests: Handle targets with less strict alignment in TestCompactPair r=jesup
...
Previously, the tests assumed that the alignment of int and long equals
their size. This commit fixes the tests for targets like m68k that have
sizeof(int) == 4 and alignof(int) == 2. A static helper function sizemax
was introduced as the offset of the second element in Pair<int,long>
might be either determined by its alignment requirement or the size of
the preceding int element and we use the helper function to pick the
larger of the two values.
Depends on D77288
Differential Revision: https://phabricator.services.mozilla.com/D77289
2020-06-01 22:48:50 +00:00
Chris Fronk
dfcd4afc6e
Bug 1433142 - Add support for hashing enum values. r=jwalden
...
Differential Revision: https://phabricator.services.mozilla.com/D70647
2020-05-27 23:44:51 +00:00
Jon Bauman
c3c1e322ad
Bug 1639637 - Add Maybe method to move out contents leaving Nothing() behind. r=froydnj
...
Add take() and extract() methods returning Maybe<T> and T respectively.
Differential Revision: https://phabricator.services.mozilla.com/D76526
2020-05-22 19:46:07 +00:00
Chris Fronk
2f903c4542
Bug 1624495 - Support move only arguments such as UniquePtr in FunctionRef. r=botond
...
Differential Revision: https://phabricator.services.mozilla.com/D68707
2020-05-21 01:56:57 +00:00
Simon Giesecke
f5342d154a
Bug 1637605
- Add support for polymorphic return values to ToResultInvoke. r=froydnj
...
Differential Revision: https://phabricator.services.mozilla.com/D75294
2020-05-19 09:07:08 +00:00
Simon Giesecke
24e5290fb8
Bug 1637605
- Provide adapter from functions with R*/R& output parameter and nsresult return type to Result<R, nsresult> return type. r=froydnj
...
Differential Revision: https://phabricator.services.mozilla.com/D75091
2020-05-19 08:25:54 +00:00
Simon Giesecke
f07c441f41
Bug 1636114 - Add Span::AsConst method. r=hsivonen
...
Differential Revision: https://phabricator.services.mozilla.com/D74232
2020-05-11 09:27:40 +00:00
Chris Fronk
af8a02cc9d
Bug 1512991 - Add JsonWriteFunc::Write to take string length. r=botond
...
Differential Revision: https://phabricator.services.mozilla.com/D72560
2020-05-08 16:24:31 +00:00
Simon Giesecke
736ed67de5
Bug 1634003 - Add MovingNotNull class template. r=jwalden
...
Differential Revision: https://phabricator.services.mozilla.com/D73032
2020-05-05 09:09:13 +00:00
Simon Giesecke
74b75d282b
Bug 1634023 - Add deduction guides for Span. r=hsivonen
...
Differential Revision: https://phabricator.services.mozilla.com/D73040
2020-04-29 16:04:56 +00:00
Simon Giesecke
8f5212cd79
Bug 1634014 - Allow Span to be created from two Span iterators. r=hsivonen
...
Differential Revision: https://phabricator.services.mozilla.com/D73039
2020-04-29 15:20:50 +00:00
Simon Giesecke
8f84ea1eaa
Bug 1631709
- NotNull must not be movable. r=jwalden
...
Differential Revision: https://phabricator.services.mozilla.com/D71721
2020-04-28 11:23:05 +00:00
Simon Giesecke
46314aa8d2
Bug 1633350 - Add SplitAt method to mozilla::Span. r=hsivonen
...
Differential Revision: https://phabricator.services.mozilla.com/D72605
2020-04-27 11:16:30 +00:00
Simon Giesecke
e8a20bbe1c
Bug 1633350 - Add deduction guide for constructing Span from a plain array. r=hsivonen
...
Differential Revision: https://phabricator.services.mozilla.com/D72604
2020-04-27 16:46:57 +00:00
Simon Giesecke
94fa08db9c
Bug 1626267 - Added transformation algorithms with error handling. r=froydnj
...
Differential Revision: https://phabricator.services.mozilla.com/D68994
--HG--
extra : moz-landing-system : lando
2020-04-01 15:53:58 +00:00
Chris Fronk
62d6d7db0e
Bug 1345842 - Add Ignore to allow ignore elements in Tie. r=froydnj
...
Differential Revision: https://phabricator.services.mozilla.com/D68742
--HG--
extra : moz-landing-system : lando
2020-03-31 12:36:22 +00:00
Simon Giesecke
237efbb270
Bug 1625871 - InitializedOnce<const T> should be a literal type for literal types T. r=froydnj
...
Differential Revision: https://phabricator.services.mozilla.com/D68759
--HG--
extra : moz-landing-system : lando
2020-03-31 08:21:11 +00:00
Simon Giesecke
3eeb9d7e2d
Bug 1625869 - Maybe<T> should be trivially destructible for move-only T. r=froydnj
...
Differential Revision: https://phabricator.services.mozilla.com/D68758
--HG--
extra : moz-landing-system : lando
2020-03-31 08:20:58 +00:00
Bogdan Tara
d6d7d84fec
Backed out 2 changesets (bug 1625871, bug 1625869) for gtest assertions on Maybe.h CLOSED TREE
...
Backed out changeset 8dee41ad98cf (bug 1625871)
Backed out changeset 39fbc765525b (bug 1625869)
2020-03-30 17:29:09 +03:00
Simon Giesecke
df70dae59a
Bug 1625871 - InitializedOnce<const T> should be a literal type for literal types T. r=froydnj
...
Depends on D68758
Differential Revision: https://phabricator.services.mozilla.com/D68759
--HG--
extra : moz-landing-system : lando
2020-03-30 12:27:10 +00:00
Simon Giesecke
b30450b50d
Bug 1625869 - Maybe<T> should be trivially destructible for move-only T. r=froydnj
...
Differential Revision: https://phabricator.services.mozilla.com/D68758
--HG--
extra : moz-landing-system : lando
2020-03-30 12:26:58 +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
13bfe75b97
Bug 1625138 - Part 40: Replace remaining mozilla::IsSame with std::is_same. r=froydnj
...
Differential Revision: https://phabricator.services.mozilla.com/D68560
--HG--
extra : moz-landing-system : lando
2020-03-28 13:57:21 +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
95c76a6863
Bug 1625138 - Part 28: Replace mozilla::AddRvalueReference with std::add_rvalue_reference. r=froydnj
...
Differential Revision: https://phabricator.services.mozilla.com/D68546
--HG--
extra : moz-landing-system : lando
2020-03-28 13:57:18 +00:00
André Bargull
42d4ebbda9
Bug 1625138 - Part 27: Replace mozilla::DeclVal with std::declval. r=froydnj
...
Differential Revision: https://phabricator.services.mozilla.com/D68545
--HG--
extra : moz-landing-system : lando
2020-03-28 13:57:18 +00:00
André Bargull
08a8c3fc78
Bug 1625138 - Part 24: Replace mozilla::IsConvertible with std::is_convertible. r=froydnj
...
Differential Revision: https://phabricator.services.mozilla.com/D68379
--HG--
extra : moz-landing-system : lando
2020-03-28 13:57:17 +00:00
André Bargull
d53798e749
Bug 1625138 - Part 23: Replace mozilla::RemovePointer with std::remove_pointer. r=froydnj
...
Differential Revision: https://phabricator.services.mozilla.com/D68378
--HG--
extra : moz-landing-system : lando
2020-03-28 13:57:17 +00:00
André Bargull
44a255a4d6
Bug 1625138 - Part 22: Replace mozilla::IsArray with std::is_array. r=froydnj
...
Differential Revision: https://phabricator.services.mozilla.com/D68377
--HG--
extra : moz-landing-system : lando
2020-03-28 13:57:17 +00:00
André Bargull
85dfbced09
Bug 1625138 - Part 21: Replace mozilla::IsFunction with std::is_function. r=froydnj
...
Differential Revision: https://phabricator.services.mozilla.com/D68376
--HG--
extra : moz-landing-system : lando
2020-03-28 13:57:16 +00:00
André Bargull
1455e95dc1
Bug 1625138 - Part 19: Replace mozilla::RemoveExtent with std::remove_extent. r=froydnj
...
Differential Revision: https://phabricator.services.mozilla.com/D68374
--HG--
extra : moz-landing-system : lando
2020-03-28 13:57:16 +00:00
André Bargull
b2e7397c33
Bug 1625138 - Part 18: Replace mozilla::AddPointer with std::add_pointer. r=froydnj
...
Differential Revision: https://phabricator.services.mozilla.com/D68373
--HG--
extra : moz-landing-system : lando
2020-03-28 13:57:16 +00:00
André Bargull
a08be4177e
Bug 1625138 - Part 17: Replace mozilla::Decay with std::decay. r=froydnj
...
Differential Revision: https://phabricator.services.mozilla.com/D68372
--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
André Bargull
9ad58ea608
Bug 1625138 - Part 13: Replace mozilla::IsUnsigned with std::is_unsigned. r=froydnj
...
Differential Revision: https://phabricator.services.mozilla.com/D68368
--HG--
extra : moz-landing-system : lando
2020-03-28 13:57:14 +00:00
André Bargull
b0c9db06e3
Bug 1625138 - Part 12: Replace mozilla::IsPointer with std::is_pointer. r=froydnj
...
Differential Revision: https://phabricator.services.mozilla.com/D68366
--HG--
extra : moz-landing-system : lando
2020-03-28 13:57:14 +00:00