Brian Hackett
f6b8e6f81c
Bug 1309552 - Specify buffer size when freeing data in AllocPolicy, r=waldo.
...
--HG--
extra : rebase_source : f4e2d9f8831cf41c19d592ce252e87161f32250b
2018-07-20 23:58:34 +00: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
Luke Wagner
bb375a16d4
Bug 1329019 - Allow specifying capacity to Vector::replaceRawBuffer (r=froydnj)
...
MozReview-Commit-ID: 9Eq6PR53n4i
2017-09-22 10:34:24 -05:00
Luke Wagner
231c33a9fe
Bug 1329019 - Vector::podResizeToFit should update reserved (r=froydnj)
...
MozReview-Commit-ID: CkoNRjxmjom
2017-09-22 10:33:36 -05:00
Benjamin Bouvier
0eeedcfb9c
Bug 1352073: Fix off-by-one in Vector::insert; r=luke
...
MozReview-Commit-ID: HY0DYSAbi6M
--HG--
extra : rebase_source : 15aaf8576c6c78e1dd097685947507445808ee0c
extra : histedit_source : 9ece90f05a7666784a381be085a82231aef5ef29
2017-03-30 16:20:30 +02:00
Jeff Walden
8529eb5317
Bug 1338374 - Shrink Vector from (usually) four pointers in size to three when no inline storage is used. r=froydnj
...
--HG--
extra : rebase_source : bc2c7f706305d04954162720b011029c8095229f
2017-01-30 15:56:05 -08:00
Jeff Walden
d5deea2a4f
Bug 1338374 - Make Vector not use AlignedStorage for its inline element storage. r=froydnj, r=keeler
...
--HG--
extra : rebase_source : 81eb5278404b4843ed5a59819f6000f74200aa41
2017-01-30 15:56:05 -08:00
Nathan Froyd
0a6a801dc2
Bug 1294537 - introduce a non-null-checking placement operator new; r=sunfish,nbp
...
The default placement operator new is defined to always require that its
result be null-checked. A sufficiently smart compiler can remove this
check, but not all compilers are sufficiently smart. Better to have a
custom placement operator new that will remove null checks in a way
defined by the standard.
2016-08-12 22:43:49 -04:00
Luke Wagner
fa9fafb015
Bug 1277896 - add Vector::initLengthUninitialized (r=waldo)
...
MozReview-Commit-ID: He6Kzr0giLU
2016-06-10 13:28:04 -05:00
Luke Wagner
e574e0eda0
Bug 1277377 - prevent unsafe C-style cast in Vector (r=waldo)
...
MozReview-Commit-ID: L0bTDSBHOeY
2016-06-02 14:38:02 -05:00
Luke Wagner
df166c688f
Bug 1271022 - add Vector::podResizeToFit (r=njn)
...
MozReview-Commit-ID: 9HTY6O9GY4U
--HG--
extra : rebase_source : 55c226d23bd6dbb7b3bb21b356e64ae7499d3f0a
2016-05-09 08:59:10 -05:00
Nicholas Nethercote
d8dc169af0
Bug 1268754 - Tweak some MFBT return values. r=Ms2ger.
...
This patch:
- Adds MOZ_MUST_USE to AllocPolicy::checkSimulatedOOM().
- Adds MOZ_MUST_USE to LZ4::decompress() (both variants) and fixes their
comments.
- Changes the return type of SplayTree::insert() from bool to void, because it
always returns true and its callers don't check the return value.
- Changes the return type of SplayTree::finishInsertion() from T* to void,
because it makes things clearer -- it was just returning the aNew argument.
- Adds MOZ_MUST_USE to a Vector::growTo() (both variants).
--HG--
extra : rebase_source : 1547cdeb9ee71d0ecec608ab474ab5e75bfc4b42
2016-04-29 13:14:34 +10: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
Dan Gohman
592be23acb
Bug 1265892 - Change Vector to use Impl::new_ consistently. r=Waldo
2016-04-26 16:26:17 -07:00
Jon Coppeard
99cbfbd0dc
Bug 1259021 - Add Vector::extractRawBuffer method that doesn't copy the buffer r=Waldo
2016-04-25 13:41:25 +01:00
Jon Coppeard
d5b6a661f0
Bug 1259021 - Rename Vector::extractRawBuffer to extractOrCopyRawBuffer r=Waldo
2016-04-25 13:41:25 +01:00
Jan de Mooij
67e655e4bf
Bug 1261361 - Make Vector::infallibleGrowByUninitialized check mReserved instead of mCapacity. r=Waldo
...
--HG--
extra : rebase_source : 2b6cdfae61946505b83748c016ef0b112ecf4780
2016-04-14 17:32:48 +02:00
Nick Fitzgerald
6f93fd8916
Bug 1247412 - Add a `reverse` method to `mozilla::Vector`; r=Waldo
2016-02-11 08:33:00 +01:00
Jon Coppeard
911e4a2d8b
Bug 1242812 - Only check for simulated OOM in vectors when growing beyond reserved size r=Waldo
2016-02-11 19:00:18 +00:00
Morgan Phillips
a427bd0117
Bug 1238582 - Skip simulated OOM check in the case where we're growing within reserved space; r=Waldo
...
--HG--
extra : rebase_source : a0f1db09b114478c52609de705dce4ba9a74445a
2016-01-28 10:07:14 -06:00
Jan de Mooij
e713b8b0ac
Bug 1237201 part 8 - Make fallible Vector methods MOZ_WARN_UNUSED_RESULT. r=jwalden
...
--HG--
extra : rebase_source : fdfb0d0f592a968ee9e5852f2cc05f0873a02375
2016-01-14 22:04:36 +01:00
Jan de Mooij
36e21ef4d9
Bug 1231224 part 10 - Make various Vector calls check for OOM. r=terrence
...
--HG--
extra : rebase_source : fae86eb928fc510c3d5c7a895675cf218fc15b3a
2016-01-06 21:06:25 +01:00
Nick Fitzgerald
4560db90e5
Bug 1170325 - Convert js::Vector into a template alias to mozilla::Vector with a single customized default argument. Also get rid of the CRTP support in mozilla::Vector (through mozilla::VectorBase) now that template aliasing is good enough, and make mozilla::Vector final so that people will use composition and not inheritance with it. (Inheritance plays poorly with movability and a few other things, in addition to messing up template argument deduction matching.) r=Waldo, patch sort of a tag-team between him and me
2015-07-13 12:42:52 -07:00
Jon Coppeard
5ea571ddb7
Bug 1211100 - Add Vector::infallibleEmplaceBack and use it in JSScript::initScriptCounts() r=nbp
...
--HG--
extra : rebase_source : a989ddba0bc981725a955c705a51aa495ef59ab9
2015-10-06 14:50:49 +01:00
Jon Coppeard
1ae90ca7ba
Bug 1200642 - Add OOM simulation to Vector r=Waldo
2015-09-30 11:34:48 +01:00
Nick Fitzgerald
f3f20427ee
Bug 1184235 - Add mozilla::Vector::emplaceBack; r=froydnj
2015-07-20 11:13:28 -07:00
Nick Fitzgerald
8676e03e08
Bug 1139993 - Add VectorBase::ConstRange that gives out |const T&| entries. r=Waldo
2015-03-06 15:37:00 -05:00
Dan Gohman
7a13d87f08
Bug 1131783 - Optimize away null checks in non-POD Vectors too r=waldo
2015-02-12 08:37:01 -08:00
Dan Gohman
52dce1c80b
Bug 1131783 - Optimize away null checks in Vectors of POD r=waldo
2015-02-12 08:37:01 -08:00
Dan Gohman
0a60c87158
Bug 1131783 - Mark various unlikely conditions as MOZ_UNLIKELY r=waldo
2015-02-12 08:37:01 -08:00
Masatoshi Kimura
bf312ad056
Bug 1120062 - Part 1: Remove most Nullptr.h includes. r=waldo
2015-01-11 11:34:52 +09:00
Ehsan Akhgari
4354953b4f
Bug 1118486 - Part 1: Use `= delete` instead of MOZ_DELETE directly; r=Waldo
...
Most of this patch (with the exception of dom/bindings/Codegen.py) was
generated by the following bash script:
#!/bin/bash
function convert() {
echo "Converting $1 to $2..."
find . ! -wholename "*nsprpub*" \
! -wholename "*security/nss*" \
! -wholename "*/.hg*" \
! -wholename "*/.git*" \
! -wholename "obj-*" \
-type f \
\( -iname "*.cpp" \
-o -iname "*.h" \
-o -iname "*.cc" \
-o -iname "*.idl" \
-o -iname "*.ipdl" \
-o -iname "*.ipdlh" \
-o -iname "*.mm" \) | \
xargs -n 1 sed -i -e "s/\b$1\b/$2/g"
}
convert MOZ_DELETE '= delete'
2015-01-08 23:19:05 -05:00
Jeff Walden
a904b21ab1
Bug 1105261 - Revert fresh vectors to not prereserving their inline allocation space, because the guaranteed extent of that space is an implementation detail. r=nbp
2014-11-26 16:01:19 -05:00
Phil Ringnalda
9c46b376e7
Backed out 2 changesets (bug 1052139, bug 1105261) for b2g desktop crashes
...
CLOSED TREE
Backed out changeset 72c672d91f9c (bug 1052139)
Backed out changeset e3ce0e3a147c (bug 1105261)
2014-12-01 18:25:53 -08:00
Jeff Walden
ed080d201a
Bug 1105261 - Revert fresh vectors to not prereserving their inline allocation space, because the guaranteed extent of that space is an implementation detail. r=nbp
...
--HG--
extra : rebase_source : ec5431786f504651b1f8a4a019da6e537b6ac175
2014-11-26 16:01:19 -05:00
Nicholas Nethercote
1eee498c59
Bug 1091986 (part 1) - Remove an over-zealous assertion in Vector.h.
2014-10-30 19:48:10 -07:00
Dan Gohman
03e74f99ca
Bug 1077720 - IonMonkey: Optimize MPhi's addInput and addInputSlow r=nbp
2014-10-08 15:04:12 -07:00
Terrence Cole
6606ad7310
Bug 1033442 - Remove non-pod realloc from MallocProvider and AllocPolicy; r=jonco
...
--HG--
extra : rebase_source : 507ab10313127ffcbf905c42438882aa9074c38a
2014-08-05 14:06:35 -07:00
Terrence Cole
b057565fa0
Bug 1033442 - Remove non-pod malloc from MallocProvider and AllocPolicy; r=jonco
2014-08-08 13:22:39 -07:00
Nicholas Nethercote
2a0942be41
Bug 1036789 - Convert the third quarter of MFBT to Gecko style. r=Ms2ger.
...
--HG--
extra : rebase_source : 668cd394806203ddfa34bd4f226335ff26c846b5
2014-07-10 19:10:17 -07:00
Ehsan Akhgari
8b30e40485
Bug 1013662 - Fix bad implicit conversion constructors in MFBT; r=froydnj,Waldo
2014-06-06 23:17:06 -04:00
Dan Gohman
7c3190bd62
Bug 1012964 - IonMonkey: Optimize LiveInterval::addRange. r=bhackett
2014-05-20 13:36:40 -07:00
Chris Peterson
f29b18d0c0
Bug 808679 - Add asserts for Vector::Range and Vector srcbeg <= srcend. r=Waldo
2014-02-11 22:42:39 -08:00
Birunthan Mohanathas
3440613a39
Bug 713082 - Part 2: Rename Util.h to ArrayUtils.h. r=Waldo
...
--HG--
rename : mfbt/Util.h => mfbt/ArrayUtils.h
2013-12-08 21:52:54 -05:00
Anthony Jones
1b55186ecf
Bug 888084 - Rolling mean for MFBT; r=waldo
2013-09-24 15:56:55 +12:00
Jim Blandy
a448351084
Bug 896100: Convert all uses of OldMove and MoveRef to true rvalue references and the modern Move and Forward. r=luke, r=waldo
2013-11-19 09:05:36 -08:00
Reuben Morais
7c7e7724ea
Bug 921871 - Fix -Wunitialized warning in Vector.h. r=Waldo
...
--HG--
extra : rebase_source : 117d37c7a44c79c6a3b446f3828e5464fc9e391f
2013-10-17 18:29:46 -03:00
Justin Lebar
66f7416cab
Bug 909977 - Rename mozilla::Move to mozilla::OldMove, and make mozilla::Move a synonym for std::move(). r=waldo
...
--HG--
extra : rebase_source : 7b3bb02cc8cbc0ad6721c6c3895564d9567b8ddb
2013-08-29 11:54:14 -07:00
Luke Wagner
240cf1fc53
Bug 905850 - Vector should not be copyable (r=terrence)
...
--HG--
extra : rebase_source : 49c2175af92b79a08982d7dfbc7b7af266b27f7a
2013-08-16 10:21:28 -05:00