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

69 Коммитов

Автор SHA1 Сообщение Дата
Kartikaya Gupta a6ffc9d1a7 Bug 948984 - Add functions to fuzzily compare float numbers. r=bjacob, r=Waldo 2014-02-05 17:04:42 -05:00
Marcin Juszkiewicz 4935cd342c Bug 963029 - AArch64 support for MFBT. r=froydnj 2014-01-23 16:34:31 -05:00
Jeff Walden bb04f6021f Bug 953296 - Implement mozilla::IsArray. r=froydnj
--HG--
extra : rebase_source : 3eb6fff774f28c39374f1e7c148f472d95e538c0
2013-12-30 01:07:32 -06:00
Jeff Walden badf564cf4 Bug 953296 - Implement mozilla::IsRvalueReference and mozilla::IsReference. r=froydnj
--HG--
extra : rebase_source : 39cf8fa339f1ea640681fda0d0cda536e5228709
2013-12-30 01:07:25 -06:00
Jeff Walden 6276d9c191 Bug 953296 - Implement mozilla::IsClass and mozilla::IsEmpty. r=jcranmer 2013-12-30 01:07:39 -06:00
Daniel Holbert 225cc7f485 Bug 945121: Use DebugOnly to fix opt-only 'unused variable' build warning in TestCeilingFloor.cpp. r=Waldo 2013-12-20 13:41:48 -08:00
Mike Hommey 8fd06cf41b Bug 874266 - Move all DEFINES that can be moved to moz.build. r=mshal 2013-11-27 22:55:07 +09:00
Mike Hommey b32a4ed166 Backout changeset 3fd4b546eed4 (bug 874266) and changeset a35d2e3a872f (bug 942043) for ASAN build bustage and Windows test bustage
--HG--
extra : amend_source : f20d09aeff1c8b5cbd0f1d24c7ce04e86f3aed1d
2013-11-28 14:24:05 +09:00
Mike Hommey 682364d535 Bug 874266 - Move all DEFINES that can be moved to moz.build. r=mshal 2013-11-28 13:08:16 +09:00
Anthony Jones 1b55186ecf Bug 888084 - Rolling mean for MFBT; r=waldo 2013-09-24 15:56:55 +12: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
Mike Hommey 59a17d0f20 Bug 921492 - Make StrictOrderingOnAppendList use actual alphabetical sorting. r=mshal,r=gps 2013-10-24 08:05:43 +09: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
Birunthan Mohanathas 18e6a4180c Bug 918436 - Make the type argument of MOZ_BEGIN(_NESTED)_ENUM_CLASS optional and add tests. r=Waldo 2013-10-04 13:17:13 -04:00
Dan Gohman dfbc494859 Bug 918350 - SpiderMonkey: Remove js_NaN in favor of a new mozilla::GenericNaN() function. r=waldo 2013-09-19 18:42:56 -07:00
Mike Hommey f8bc7fa754 Bug 912293 - Remove now redundant boilerplate from Makefile.in. r=gps 2013-09-05 09:01:46 +09:00
Jeff Walden de9ce95170 Bug 730805 - Provide mozilla/IntegerPrintfMacros.h to implement the PRI* macros portion of the <inttypes.h> interface. r=espindola
--HG--
extra : rebase_source : be80333003c6fec659e736a77463568c836d8348
2011-12-15 00:27:42 -05:00
Dan Gohman a466fea3f5 Bug 910814 - IonMonkey: Add testcases for several FloatingPoint.h predicates. r=waldo 2013-09-02 13:53:35 -07:00
Dan Gohman 490ec473f0 Bug 906368 - IonMonkey: Define a proper CountPopulation32 function, and use it in place of manual code in RegisterSets.h. r=nbp 2013-08-19 12:32:22 -07:00
Birunthan Mohanathas 1baab48cb7 Bug 888548 - Part 3: Add enum support to mozilla::Atomic<T>. r=froydnj
Due to a bug in GCC, the compareExchange function is not available with enum types.
2013-08-01 21:21:32 -04:00
Daniel Holbert 819cbd5af1 backout fc98067f0aa4 (Bug 888548 part 3) for B2G build bustage 2013-07-31 19:04:25 -07:00
Birunthan Mohanathas 6f4e72b203 Bug 888548 - Part 3: Add enum support to mozilla::Atomic<T>. r=froydnj
Due to a bug in GCC, the compareExchange function is not available with enum types.
2013-07-31 21:15:25 -04:00
Ehsan Akhgari 2824b29025 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
Ehsan Akhgari ef4b479714 Bug 872127 - Part 2: Replace mozilla/StandardInteger.h with stdint.h; r=Waldo,ted 2013-07-30 10:25:31 -04:00
Jeff Walden cea309af82 Bug 895792 - Fix RoundUpPow2's required precondition to not be wrong. r=terrence
--HG--
extra : rebase_source : e42420628dad8b8e9fe37287fa8e08eb262fe615
2013-07-25 20:01:45 -07:00
Birunthan Mohanathas 9e65e2904f 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 c5cf7535b6 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 0c642c695d Bug 784739 - Switch from NULL to nullptr in mfbt/. r=jwalden 2013-07-25 16:31:48 -07:00
Ms2ger 10d5739f7a Bug 888643 - Part b: Move CPP_UNIT_TESTS definitions into moz.build files; r=gps 2013-07-24 09:23:06 +02:00
Jeff Walden 25c4d5d841 Bug 896842 - Implement mozilla::DoublesAreIdentical. r=luke 2013-06-18 15:35:03 -07:00
Jeff Walden 9248a5e743 Bug 891177 - Move leading/trailing-zero-bit counting functions, ceiling/floor log2 functions, and round-up-pow2 functions into MathAlgorithms.h. r=terrence
--HG--
extra : rebase_source : 8cfbd68b8cd4a0e21185dd864c7e827ccfa6b751
2013-07-03 15:46:51 -07:00
Jeff Walden 13aed03de7 Style fixes and proper-numeric-type usage in mfbt/tests/TestEndian.cpp. No bug, r=trivial
--HG--
extra : rebase_source : 54a658a6baf78852a3f8839b2cbb98700a7c91e7
2013-06-13 19:27:11 -07:00
Jeff Gilbert 3049ca7c76 Bug 881980 - Allow casting CheckedInts to other CheckedInt types. - r=bjacob,waldo 2013-06-14 15:19:40 -07:00
Jeff Gilbert 75ab2ff473 Bug 874764 - Add CheckedInt support for operator%. - r=bjacob,waldo 2013-06-14 15:19:30 -07:00
Jeff Walden 6249325181 Bug 798179 - Implement mozilla::MakeUnsigned. r=froydnj
--HG--
extra : rebase_source : fdd1fe8841d1bc42c1758cd4d477969b3f382b30
2013-03-05 15:44:02 -08:00
Jeff Walden ccd085af07 Bug 798179 - Implement mozilla::MakeSigned. r=froydnj
--HG--
extra : rebase_source : 357bf046219e37959d66fde6b2ad2b7f5746960f
2013-03-05 15:44:02 -08:00
Jeff Walden 38cfd84ad8 Bug 798179 - Implement To BitwiseCast<To>(From), abstracting the treatment of a value's bits as being of another type. r=froydnj
--HG--
extra : rebase_source : e6c57c10f7035b2654eafdd5fa2b3c5d8882f282
2013-06-06 18:47:51 -07:00
Justin Lebar c002d5a3a3 Bug 873800 - Add compare-and-exchange to mfbt/Atomics.h. r=froydnj
--HG--
extra : rebase_source : c9e455ed249e6b3cd0f532d240abfb602e2e88a8
2013-05-24 13:10:47 -04:00
Jeff Walden 102c0879dc Bug 873585 - Silence a vacuous-comparison-against-0 warning when compiling with gcc 4.5, at least. Also make IsSigned/IsUnsigned actually work on floating-point types. r=froydnj
--HG--
extra : rebase_source : 149695699ddb5cde3058a066785c2dc4c7c221e7
2013-05-17 11:07:02 -07:00
Nathan Froyd a183814740 Bug 732043 - part 2 - add tests for mfbt/Atomics.h; r=Waldo; original-author=jcranmer 2013-04-25 15:10:38 -04:00
Benoit Jacob b6ecd61d8f Bug 869685 - Reintroduce long long support in CheckedInt - r=Waldo 2013-05-08 17:25:03 -04:00
Mats Palmgren a72cd1a4d3 Bug 867530 - Move PresArena poisoning code to MFBT. r=roc
--HG--
rename : layout/base/tests/cpp-tests/TestPoisonArea.cpp => mfbt/tests/TestPoisonArea.cpp
2013-05-07 20:48:59 +02:00
Jeff Walden f6494f1354 Bug 865036 - Add a Casting.h header to hold various casting methods, right now including a SafeCast method that asserts in-rangeness. r=froydnj
--HG--
extra : rebase_source : ef175e4c89d07cddbe866a40fc2ca521fa32c441
2013-04-23 14:36:51 -07:00
Nathan Froyd 7ef4ee80d8 Bug 798172 - part 2 - add tests for mfbt/Endian.h; r=Waldo 2013-01-30 16:46:45 -05:00
Kyle Machulis 72a717a860 Bug 855465 - Add emacs python mode comments to moz.build files; r=gps 2013-04-01 11:36:59 -07:00
Kyle Machulis 43628a7867 Backout for changeset 03452b187c14 (Bug 855465) due to bustage on a CLOSED TREE; r=qdot 2013-03-29 15:12:58 -07:00
Kyle Machulis 334c0800cf Bug 855465 - Add emacs python mode comments to moz.build files; r=gps
--HG--
extra : rebase_source : 004a756492323e1a049586e85b3be5037159df20
2013-03-29 13:56:18 -07:00
Benoit Jacob cbd3607515 Bug 849667 - Fix/simplify CheckedInt's use-outside-of-MFBT setup - r=Waldo 2013-03-12 15:40:29 -04:00
Jeff Walden 36bb5830c0 Bug 849666 - Make CheckedInt<T>::operator-() not depend on undefined behavior when negating minimum signed values, and add a test for this. Patch is something of a tag-team effort by bjacob and me. r=bjacob 2013-03-11 18:45:22 -07:00
Jeff Walden f22ad604ac Bug 847521 - Allow CheckedInt<signed char> in addition to char/unsigned char. char != signed char (but is guaranteed to have the same representation as either signed char or unsigned char, for backwards-compatibility reasons), so we have to handle signed char as a third character type. r=bjacob
--HG--
rename : content/html/content/src/HTMLObjectElement.h => content/html/content/src/HTMLObjectElement.cpp
extra : rebase_source : d07d72b78fcbae31483d726703b3605561295684
2013-03-01 21:49:25 -08:00