Commit Graph

31 Commits

Author SHA1 Message Date
Nick Fitzgerald
c2d50838e1 Bug 1139993 - Add VectorBase::ConstRange that gives out |const T&| entries. r=Waldo 2015-03-06 15:37:00 -05:00
Dan Gohman
8093a06678 Bug 1131783 - Optimize away null checks in non-POD Vectors too r=waldo 2015-02-12 08:37:01 -08:00
Dan Gohman
177942dd1e Bug 1131783 - Optimize away null checks in Vectors of POD r=waldo 2015-02-12 08:37:01 -08:00
Dan Gohman
4b04b0652f Bug 1131783 - Mark various unlikely conditions as MOZ_UNLIKELY r=waldo 2015-02-12 08:37:01 -08:00
Masatoshi Kimura
f70d08c5aa Bug 1120062 - Part 1: Remove most Nullptr.h includes. r=waldo 2015-01-11 11:34:52 +09:00
Ehsan Akhgari
b6e35bb4b4 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
e0a245bcec 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
0026c263f6 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
4037ed512e 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
f8116d592a Bug 1091986 (part 1) - Remove an over-zealous assertion in Vector.h. 2014-10-30 19:48:10 -07:00
Dan Gohman
f044bd49a6 Bug 1077720 - IonMonkey: Optimize MPhi's addInput and addInputSlow r=nbp 2014-10-08 15:04:12 -07:00
Terrence Cole
45d3423e01 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
374265c0dd Bug 1033442 - Remove non-pod malloc from MallocProvider and AllocPolicy; r=jonco 2014-08-08 13:22:39 -07:00
Nicholas Nethercote
8ea1b7923f 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
861dfcddf0 Bug 1013662 - Fix bad implicit conversion constructors in MFBT; r=froydnj,Waldo 2014-06-06 23:17:06 -04:00
Dan Gohman
ddd7d7f120 Bug 1012964 - IonMonkey: Optimize LiveInterval::addRange. r=bhackett 2014-05-20 13:36:40 -07:00
Chris Peterson
e75886e22e Bug 808679 - Add asserts for Vector::Range and Vector srcbeg <= srcend. r=Waldo 2014-02-11 22:42:39 -08:00
Birunthan Mohanathas
759ab69b0a 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
82d76badf0 Bug 888084 - Rolling mean for MFBT; r=waldo 2013-09-24 15:56:55 +12:00
Jim Blandy
f0a0296f91 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
e98ada57a9 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
2e2403726d 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
014cc1075f Bug 905850 - Vector should not be copyable (r=terrence)
--HG--
extra : rebase_source : 49c2175af92b79a08982d7dfbc7b7af266b27f7a
2013-08-16 10:21:28 -05:00
Ms2ger
6d567ab3cc Bug 904110 - Move alignment features out of Util.h into a new header; r=Waldo 2013-08-14 09:00:52 +02:00
Ehsan Akhgari
5ee21d6d3f Bug 895322 - Part 1: Replace the usages of MOZ_STATIC_ASSERT with C++11 static_assert; r=Waldo
This patch was mostly generated by running the following scripts on the codebase, with some
manual changes made afterwards:

# static_assert.sh
#!/bin/bash
# Command to convert an NSPR integer type to the equivalent standard integer type

function convert() {
echo "Converting $1 to $2..."
find . ! -wholename "*nsprpub*" \
       ! -wholename "*security/nss*" \
       ! -wholename "*/.hg*" \
       ! -wholename "obj-ff-dbg*" \
       ! -name nsXPCOMCID.h \
       ! -name prtypes.h \
         -type f \
      \( -iname "*.cpp" \
         -o -iname "*.h" \
         -o -iname "*.cc" \
         -o -iname "*.mm" \) | \
    xargs -n 1 `dirname $0`/assert_replacer.py #sed -i -e "s/\b$1\b/$2/g"
}

convert MOZ_STATIC_ASSERT static_assert
hg rev --no-backup mfbt/Assertions.h \
                   media/webrtc/signaling/src/sipcc/core/includes/ccapi.h \
                   modules/libmar/src/mar_private.h \
                   modules/libmar/src/mar.h


# assert_replacer.py
#!/usr/bin/python

import sys
import re

pattern = re.compile(r"\bMOZ_STATIC_ASSERT\b")

def replaceInPlace(fname):
  print fname
  f = open(fname, "rw+")
  lines = f.readlines()
  for i in range(0, len(lines)):
    while True:
      index = re.search(pattern, lines[i])
      if index != None:
        index = index.start()
        lines[i] = lines[i][0:index] + "static_assert" + lines[i][index+len("MOZ_STATIC_ASSERT"):]
        for j in range(i + 1, len(lines)):
          if lines[j].find("                 ", index) == index:
            lines[j] = lines[j][0:index] + lines[j][index+4:]
          else:
            break
      else:
        break
  f.seek(0, 0)
  f.truncate()
  f.write("".join(lines))
  f.close()

argc = len(sys.argv)
for i in range(1, argc):
  replaceInPlace(sys.argv[i])

--HG--
extra : rebase_source : 4b4a4047d82f2c205b9fad8d56dfc3f1afc0b045
2013-07-18 13:59:53 -04:00
Jeff Walden
30f3a1c0a2 Add #include <new> to mfbt/Vector.h so that placement-new actually works when that header hasn't been bootlegged. No bug, r=too-long-spent-debugging-this
--HG--
extra : rebase_source : b4b3a5a10757d01d1c5957736210ed09e3c2b157
2013-07-25 20:01:42 -07:00
Birunthan Mohanathas
6593d6bb16 Bug 784739 - Switch from NULL to nullptr in mfbt/. r=jwalden
--HG--
extra : rebase_source : 090706fa9d97854fe3071adf037a09d914a0854f
2013-07-25 16:31:48 -07:00
Ryan VanderMeulen
4b5a38346d Backed out 3 changesets (bug 896124, bug 784739, bug 894026) for Windows checktest orange on a CLOSED TREE.
Backed out changeset 631b3d5d54f4 (bug 896124)
Backed out changeset 5e1dd28ede5d (bug 894026)
Backed out changeset c10c0a6270ec (bug 784739)
2013-07-26 00:08:51 -04:00
Birunthan Mohanathas
2d66acc4f8 Bug 784739 - Switch from NULL to nullptr in mfbt/. r=jwalden 2013-07-25 16:31:48 -07:00
Ms2ger
28a9e7aa20 Bug 896341 - Update include guards and modelines in MFBT; r=Waldo 2013-07-24 09:41:39 +02:00
Jeff Walden
e127f08ae6 Bug 891177 - Implement mozilla/Vector.h, and make js/Vector.h implement js::Vector using mozilla::Vector's implementation of the functionality. r=terrence
--HG--
rename : js/public/Vector.h => mfbt/Vector.h
extra : rebase_source : d5f87a48485e3f2241228a4b003e80974c86fd5f
2013-07-09 16:33:29 -07:00