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

387 Коммитов

Автор SHA1 Сообщение Дата
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
Gian-Carlo Pascutto 63f2958637 Bug 923170 - Require GCC 4.6.x before enabling strong enum support. r=Waldo 2013-10-08 15:25:13 -04: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
Jim Blandy deee1f4630 Bug 919337: Use static_assert in double_conversion::BitCast. r=waldo 2013-09-29 21:18:26 -07:00
Bobby Holley 7fcde1d302 Bug 917593 - Don't assert for zero-length strings. r=Waldo 2013-09-27 18:34:24 +02:00
Mike Hommey fb1d665f33 Bug 919832 - Remove EXPORTS related rules from rules.mk. r=gps 2013-09-26 16:43:52 +09:00
Ryan VanderMeulen e9cbf86254 Backed out changeset 74459407359a (bug 917593) for Windows debug checktest asserts. 2013-09-24 16:20:15 -04:00
Bobby Holley aa9e479063 Bug 917593 - Don't assert for zero-length strings. r=Waldo 2013-09-24 08:03:22 -07:00
Benjamin Bouvier adb7f75b72 Bug 913282: Add mfbt Float32 asserts and constants; r=Waldo 2013-09-20 12:08:49 -07:00
Dan Gohman 6c632eebc4 Bug 918350 - Change UnspecifiedNaN's bit pattern to be the all-ones NaN. r=waldo 2013-09-19 18:47:55 -07: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
Joshua Cranmer 44ee5d6929 Bug 904985, part 1: Add better support for char16_t in type traits, r=Waldo.
--HG--
extra : rebase_source : 45cb9155312ead0b8164e1e460c9fd2e39f0d6fc
2013-09-17 22:43:04 -05:00
Jonathan Watt a43cb31d79 Bug 909467 - HTMLInputElement crash loading 8bit.js test (consistantly link against the correct StringBuilder). r=Waldo 2013-09-17 13:24:35 +01:00
Seth Fowler f9cdc752b1 Bug 912299 - Make RefCounted's refcount field mutable. r=waldo 2013-09-06 13:32:55 -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
Jeff Walden 2e1d99cde5 Bug 730805 - Import, unmodified, the Microsoft-compatible <inttypes.h> implementation from the 'msinttypes' Google Code project, r26, into mfbt. r=gerv
--HG--
extra : rebase_source : 3fa8943627740fc4a4a39b173f8dd77d93f8f8e2
2011-12-07 21:52:38 -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
Jan Beich c844d2ff62 Bug 911140 - Fix a typo that prevents libc++ from using C++11 atomics. r=jcranmer 2013-08-30 16:14:52 -04:00
Joshua Cranmer 7cc0542786 Bug 906783 - Attempt to detect the standard C++ library version, r=Waldo 2013-08-29 22:44:23 -05:00
Justin Lebar 6bc3732c09 Bug 906912 - Add move constructors to mozilla::LinkedList and mozilla::LinkedListElement. r=waldo
--HG--
extra : rebase_source : 864a78505421e129a4553634e08a7f9fc343d7d1
2013-08-29 11:54:14 -07: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
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
Justin Lebar 3005147418 No bug: Fix whitespace in mozilla/LinkedList.h. DONTBUILD 2013-08-22 14:39:34 -07:00
Justin Lebar 731cefe044 Bug 907227 - Properly delete LinkedListElement's implicit copy-constructor and operator=. r=waldo
--HG--
extra : rebase_source : b5f09c990f38537266c3e42a211a483e1dd291d6
2013-08-21 12:04:29 -07:00
Justin Lebar 9c181eb3fd Bug 906909 - Make LinkedList::debugAssertIsSane() compile. r=waldo
--HG--
extra : rebase_source : 60027f53b4a8fa91dd7e42863c271c36395d6851
2013-08-21 12:04:29 -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
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
Trevor Saunders 523a468b97 bug 905243 - make the constructors for mozilla::Atomic constexpr r=froydnj 2013-08-14 16:28:17 -04:00
Ms2ger 9d023a67df Bug 904110 - Move alignment features out of Util.h into a new header; r=Waldo 2013-08-14 09:00:52 +02:00
Ms2ger dd430907f0 Bug 903797 - Update mfbt/STYLE to the current policy about include guards; r=Waldo 2013-08-14 09:00:42 +02:00
Till Schneidereit 2616b9851c Bug 898653 - Quell 'not enough parameters for macro' warnings in MSVC. r=djvj
--HG--
extra : rebase_source : 7e467027c24b795d6764894c12290a630663830e
2013-07-27 13:05:36 +02:00
Nathan Froyd 23a4a49409 Bug 900965 - compile failures with gcc 4.6.3 on std::atomic enum support from bug 888548 r=waldo 2013-08-02 18:18:41 -07:00
Guillaume Abadie 7aa8f18b52 bug 899859 - Add typed enums support in strutures / classes - r=Waldo 2013-08-02 20:51:00 -04: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
Birunthan Mohanathas e58014264e Bug 888548 - Part 2: Refactor and cleanup mozilla::Atomic<T> implementation. r=froydnj
This moves the increment and decrement operators from detail::AtomicBase to
detail::AtomicBaseIncDec and moves the implementation of the assignment
operator into detail::AtomicBase. Additionally, this changes the integral
implementation to use mozilla::EnableIf for its specialization.
2013-08-01 21:21:32 -04:00
Birunthan Mohanathas 63361e8113 Bug 888548 - Part 1: Add mozilla::IsEnum to TypeTraits.h. r=froydnj 2013-08-01 21:21:31 -04:00
Daniel Holbert 833ec04321 backout 1e31542e117c (Bug 888548 part 1) for B2G build bustage on a CLOSED TREE 2013-07-31 19:05:34 -07:00
Daniel Holbert f8d5639ac1 backout f607ac59de19 (Bug 888548 part 2) for B2G build bustage 2013-07-31 19:05:05 -07: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
Birunthan Mohanathas 19404c8ec4 Bug 888548 - Part 2: Refactor and cleanup mozilla::Atomic<T> implementation. r=froydnj
This moves the increment and decrement operators from detail::AtomicBase to
detail::AtomicBaseIncDec and moves the implementation of the assignment
operator into detail::AtomicBase. Additionally, this changes the integral
implementation to use mozilla::EnableIf for its specialization.
2013-07-31 21:15:25 -04:00
Birunthan Mohanathas 1ee96e1d2b Bug 888548 - Part 1: Add mozilla::IsEnum to TypeTraits.h. r=froydnj 2013-07-31 21:15:25 -04:00
Ehsan Akhgari d344af7264 Bug 895322 - Part 5: Stop #defining MOZ_STATIC_ASSERT in C++ code; r=Waldo
--HG--
extra : rebase_source : 463c9918228e3f46c909cc7cad45c9d2913b0152
2013-07-18 14:39:20 -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
Nathan Froyd 86df43c75a Bug 898491 - use the four argument form of compare_exchange_strong in Atomics.h; r=Waldo
The C++ standard (29.6p20-22 in N3337) specifies limitations on the failure ordering
for atomic compare-and-exchange.  Specifically, you can't pass memory_order_acq_rel or
memory_order_release.  For the (T&, T, std::memory_order) version, which we use, the
standard specifies that the provided argument should be "lowered" to comply with the
above restrictions on the failure ordering (29.6p21).

However, it seems that some versions of GCC's <atomic> header don't follow the spec
for the generic versions of std::atomic<>, though they do follow the spec with the
appropriate specializations (bool, integer, and pointer) of std::atomic<>.  This
results in mysterious failures when using atomic enums, as bug 888548 purports to
do, and ReleaseAcquire ordering.

Happily, we can work around this by using the more explicit version of
compare-and-exchange.  I've chosen to add another member to AtomicOrderConstraints,
even though it'd be the same as LoadOrder.  I feel explicitness is to be preferred
here.
2013-07-26 12:31:19 -04:00
Ehsan Akhgari 8a2e6c774e Bug 872127 - Part 3: Remove MSStdInt.h; r=Waldo 2013-07-30 10:25:42 -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
Jeff Walden 9dddd7b506 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