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

39 Коммитов

Автор SHA1 Сообщение Дата
Dylan Roeh 5fa70ba038 Bug 1441059 - Add cycle collection implementations for Maybe. r=bz 2018-07-17 10:34:58 -05:00
Emilio Cobos Álvarez 1e9c395548 Bug 1466168: Remove mozilla::Forward in favor of std::forward. r=froydnj
Same approach as the other bug, mostly replacing automatically by removing
'using mozilla::Forward;' and then:

  s/mozilla::Forward/std::forward/
  s/Forward</std::forward</

The only file that required manual fixup was TestTreeTraversal.cpp, which had
a class called TestNodeForward with template parameters :)

MozReview-Commit-ID: A88qFG5AccP
2018-06-02 09:33:26 +02:00
Emilio Cobos Álvarez fffb25b74f Bug 1465585: Switch from mozilla::Move to std::move. r=froydnj
This was done automatically replacing:

  s/mozilla::Move/std::move/
  s/ Move(/ std::move(/
  s/(Move(/(std::move(/

Removing the 'using mozilla::Move;' lines.

And then with a few manual fixups, see the bug for the split series..

MozReview-Commit-ID: Jxze3adipUh
2018-06-01 10:45:27 +02:00
Nathan Froyd b29b040b36 Bug 1410186 - turn Maybe assertions into diagnostic assertions; r=bkelly
We out-of-line the relevant functions because assertions can generate
quite a bit of code, and we'd rather let the compiler determine if these
functions should be inlined now.
2018-05-21 10:03:59 -04:00
Bogdan Tara 2aa42f2cab Backed out changeset c82274a23aea (bug 1410186) on request by igoldan a=backout 2018-05-21 16:53:30 +03:00
Nathan Froyd d0ba1c83de Bug 1410186 - turn Maybe assertions into diagnostic assertions; r=bkelly
We out-of-line the relevant functions because assertions can generate
quite a bit of code, and we'd rather let the compiler determine if these
functions should be inlined now.
2018-05-15 16:34:59 -04:00
Nathan Froyd cc035fe9e0 Bug 1444125 - don't poison Maybe on construction; r=gerald
This behavior is pretty heavy-handed and degrades performance.
2018-04-10 13:46:00 -04:00
Nathan Froyd e7e0eac6bc Bug 1444125 - work harder to generate good code for Maybe poisoning; r=gerald 2018-04-10 13:46:00 -04:00
Nathan Froyd 2bd0c8e0a2 Bug 1414901 - part 2 - poison Maybe<T> instances when not in use; r=Waldo 2018-03-06 11:35:50 -05:00
Nicholas Nethercote 4d9d19123c Backout 15b89e515c94 (bug 1410186) for causing too many crashes on Nightly. 2017-11-13 12:14:02 +11:00
Nathan Froyd 37e5710099 Bug 1410186 - turn Maybe assertions into release assertions; r=bkelly
We out-of-line the relevant functions because release assertions can
generate quite a bit of code, and we'd rather let the compiler determine
if these functions should be inlined now.
2017-11-09 12:27:51 -05:00
Xidorn Quan 667a3cb5a4 Bug 1391103 - Align Maybe::mStorage like when the type is in a struct. r=froydnj
MozReview-Commit-ID: 6ArNhZA4Wdf

--HG--
extra : rebase_source : f69ae80c146f2acb308a6c9707aac7ee22f5d992
2017-08-17 09:49:19 +10:00
Steve Fink 678a2ca3dc Bug 1356063 - Make Maybe<T> inherit static analysis annotations from T, r=mystor
--HG--
extra : rebase_source : 7f5e41e471b319f0143e9f91a331b1edcafc7359
2017-04-13 11:35:01 -07:00
Jeff Walden fceda02d9b Bug 1287006 - Use |alignas(T) unsigned char mStorage[sizeof(T)]| instead of AlignedStorage2 inside Maybe. r=froydnj
--HG--
extra : rebase_source : 59e8039481b332decacd1acc7cf1cb73ec8b78cf
2017-01-30 15:56:04 -08:00
Jeff Walden 8f8272ae04 Bug 1339555 - Make various operator-news into a known-non-null pointer use a ::operator new overload that odesn't null-check. r=froydnj
--HG--
extra : rebase_source : cad3ffa778db607bb2ccee2ac42671e60d3c8160
2017-02-14 11:23:18 -08:00
Jonathan Watt 94c9b96404 Bug 1335780, part 1 - Make Maybe<T>::emplace() work when T is const. r=froydnj 2017-01-03 08:53:05 +00:00
Botond Ballo 79e41b270d Bug 1331495 - Add an operator<< overload for Maybe. r=froydnj
MozReview-Commit-ID: 8TcYoikeCvR

--HG--
extra : rebase_source : 591e3c635ae5521418105e2ad1fc2672143eceeb
2017-01-18 13:53:35 -05:00
Xidorn Quan b4ceaa3474 Bug 1325351 part 3 - Make Maybe accept value from different Maybe type when the inner type is convertible. r=froydnj
MozReview-Commit-ID: 2kYTncYh1Or

--HG--
extra : rebase_source : f3263ce10f3afae6e8ac734296dbb0e641c55c99
2016-12-23 11:49:33 +11:00
Xidorn Quan 30961dadd7 Bug 1325351 part 2 - Simplify 'Some' function. r=froydnj
MozReview-Commit-ID: AkLVQw9WYwy

--HG--
extra : rebase_source : 97449d0b2376d53ee7761da2a1ab425492c70ba6
2016-12-23 11:32:33 +11:00
Xidorn Quan 3526b1e58d Bug 1325351 part 1 - Remove workaround for VC in Maybe. r=froydnj
MozReview-Commit-ID: Anlrf3D2WtN

--HG--
extra : rebase_source : 9cc2e29e374753ad40774ebd0a0efce9f9449e3b
2016-12-29 10:58:01 +11:00
Sebastian Hengst 82a8828349 Backed out changeset b4d189ca8add (bug 1325351) for spidermonkey cgc and plain shell failure in Maybe.h. r=backout 2016-12-27 10:41:01 +01:00
Sebastian Hengst fe7c0739e3 Backed out changeset 79754b9b89b7 (bug 1325351) 2016-12-27 10:39:49 +01:00
Sebastian Hengst 6c5fadc6f5 Backed out changeset 45f0755ff471 (bug 1325351) 2016-12-27 10:39:45 +01:00
Xidorn Quan 3cead98957 Bug 1325351 part 3 - Make Maybe accept value from different Maybe type when the inner type is convertible. r=froydnj
MozReview-Commit-ID: 2kYTncYh1Or

--HG--
extra : rebase_source : 2d15fb3c252f1c0505d739d9540079ceb9296b39
2016-12-23 11:49:33 +11:00
Xidorn Quan 254c28b64c Bug 1325351 part 2 - Simplify 'Some' function. r=froydnj
MozReview-Commit-ID: AkLVQw9WYwy

--HG--
extra : rebase_source : 8bdd5aeb7761d32c25e55966275d9a0804eb3948
2016-12-23 11:32:33 +11:00
Xidorn Quan 32962b7da7 Bug 1325351 part 1 - Remove workaround for VS2010 in Maybe. r=froydnj
MozReview-Commit-ID: Anlrf3D2WtN

--HG--
extra : rebase_source : a90c32e397c5081e51e6c2461d045591afae9320
2016-12-23 11:32:09 +11:00
Jeff Walden 34e7d5b132 Bug 1296760 - Allow Some(nullptr) and Some(Derived*) to convert to Maybe<Base*>. r=froydnj
--HG--
extra : rebase_source : 478e825f476a671e07a94f483b88cbc2d4ae8d13
2016-08-24 11:12:48 -07:00
Daniel Holbert 489e357178 Bug 1291423: Explicitly qualify the destructor call that we invoke in Maybe::reset. r=Waldo
MozReview-Commit-ID: 6vQouBSxnsZ
2016-08-02 21:19:08 -07:00
Seth Fowler a2712d4b0e Bug 1255632 - Make Maybe::map and Maybe::apply support lambdas. r=waldo,njn 2016-06-22 16:32:40 -07:00
Carsten "Tomcat" Book c46c20b362 Backed out changeset 7b03f23fdde5 (bug 1255632) for bustage on a CLOSED TREE 2016-06-22 08:48:25 +02:00
Seth Fowler 358b410aaa Bug 1255632 - Make Maybe::map and Maybe::apply support lambdas. r=waldo,njn 2016-06-21 22:15:27 -07:00
Birunthan Mohanathas 1b10c9d731 Bug 1120796 - Part 2: Replace ConvertibleToBool hackarounds with explicit bool operators. r=Waldo 2015-02-03 18:52:36 +02:00
Xidorn Quan 73159914a2 Bug 1119199 - Rewrite Maybe::emplace with variadic template. r=waldo
--HG--
extra : source : 4ad70d3ba8bcd02f9af68ec19167fb451c395a45
2015-01-13 10:48:10 +11:00
Ehsan Akhgari 64b2aa87ac Bug 1060375 - Mark the Maybe(Nothing) constructor as implicit; r=froydnj 2014-08-29 18:13:04 -04:00
Seth Fowler a712b649ab Bug 913586 (Part 9) - Add more useful features to the Maybe<T> API. r=waldo
* * *
Bug 913586 (Part 10) - Add a test for Maybe<T>. r=waldo
2014-08-22 00:43:02 -07:00
Ehsan Akhgari 1d9c1a39c4 Bug 1055001 - Make Maybe's constructor explicit; r=froydnj 2014-08-18 15:18:30 -04:00
Seth Fowler 165e5028e4 Bug 913586 (Part 1) - Revamp Maybe<T> to be usable in many more situations. r=waldo
--HG--
extra : rebase_source : 33326a59f0458dbda493b1f90b88481507b7a46b
2014-08-13 15:39:40 -07: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
Justin Lebar 35a65ed466 Bug 909514 - Include <new> before mozilla::Maybe (and move Maybe into mfbt/Maybe.h). r=waldo
--HG--
rename : mfbt/Util.h => mfbt/Maybe.h
2013-08-27 15:10:28 -07:00