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

306 Коммитов

Автор SHA1 Сообщение Дата
Nathan Froyd db188ea282 Bug 1160485 - remove implicit conversion from RefPtr<T> to TemporaryRef<T>; r=ehsan
Having this implicit conversion means that we can silently do extra
refcounting when it's completely unnecessary.  It's also an obstacle to
making RefPtr more nsRefPtr-like, so let's get rid of it.
2015-05-01 09:14:16 -04:00
Nathan Froyd 3e13ec018f Bug 1116905 - part 1 - remove dependence on implicit conversion from T* to TemporaryRef<T>, non-gfx changes; r=ehsan 2015-04-30 15:17:08 -04:00
Gerald Squelart f330df40d4 Bug 1153295 - Add mozilla::Declval. r=nfroyd 2015-04-27 18:11:00 -04:00
Gerald Squelart 173514b341 Bug 1153295 - Add mozilla::AddRvalueReference. r=nfroyd 2015-04-27 18:07:00 -04:00
Andrew McCreight ceaa3c66f9 Bug 1113300 - Add a way to use SegmentedVector like a stack. r=froydnj 2015-05-07 09:11:00 +02:00
Trevor Saunders a75cca3a44 no bug - fix -Wreturn-type warning on a CLOSED TREE 2015-05-06 11:12:46 -04:00
Trevor Saunders ea477e7198 bug 606080 - add SplayTree::LookupOrAdd r=froydnj 2015-05-06 10:57:12 -04:00
Andrew McCreight 0c176ddcff Bug 1062479 - Use static strings for WeakReference type names. r=ehsan 2015-04-24 09:43:01 -07:00
Seth Fowler 36709ff42c Bug 1155864 - Rip out Windows intrinsics from Atomics.h and allow Atomic to hold 64-bit types everywhere. r=Waldo 2015-04-17 18:40:52 -07:00
Seth Fowler dfd05ab4ad Bug 1143077 (Followup) - Add assignments to Pair test. 2015-03-17 19:40:17 -07:00
Seth Fowler fcf3c149c4 Bug 1142366 - Add an equivalent of std::make_pair for mozilla::Pair. r=waldo 2015-03-12 17:44: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
Gerald Squelart 4495d81efb Bug 1131445 - variadic NS_NewRunnableMethodWithArgs with storage&passing argument type decorators. r=waldo
--HG--
extra : rebase_source : 3c2104c19bb37624ec32a1ca4c50235e7cefd953
2015-03-01 18:12:00 +01:00
Gerald Squelart e984800b68 Bug 1137583 - Fix for CV-qualified pointers; Added tests. r=waldo
--HG--
extra : rebase_source : cf379d72ab7165ee5a6f3edad0ec2050ad66001b
2015-03-01 18:08:00 +01:00
Birunthan Mohanathas 847dbb9825 Bug 1120796 - Part 1: Prepare code for explicit bool operators. r=Waldo 2015-02-03 18:52:28 +02:00
Masatoshi Kimura 6cc5dabbee Bug 1111290 - Part 3: Remove TypedEnum.h and fold TypedEnumInternal.h into TypedEnumBits.h. r=waldo 2015-01-26 07:22:11 +09:00
Masatoshi Kimura be535304d8 Bug 1111290 - Part 1: Remove MOZ_(BEGIN|END)_ENUM_CLASS. r=waldo 2015-01-26 07:22:07 +09:00
Trevor Saunders 5b86ecf80c bug 1077549 - remove useless gcc version checks r=glandium 2015-01-15 21:30:05 -05:00
Masatoshi Kimura 01a636855c Bug 1120062 - Part 2: Remove use of IsNullPointer. r=waldo 2015-01-15 02:09:11 +09:00
Ehsan Akhgari 47c67459e2 Backed out changeset 11aebde6e809 (bug 1120059) because of build bustage on Windows 2015-01-13 00:26:16 -05:00
Birunthan Mohanathas 3bbc9f5d8f Bug 1120059 - Remove MOZ_{HAVE_,}EXPLICIT_CONVERSION. r=Waldo 2015-01-13 06:41:15 +02: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
Ehsan Akhgari 039292de5d Bug 1119071 - Clean up some code used for older unsupported MSVC versions in MFBT; r=froydnj 2015-01-08 10:40:15 -05:00
Ehsan Akhgari 1813ae2d33 Bug 867348 - Part 2: Apply MOZ_NO_ARITHMETIC_EXPR_IN_ARGUMENT to CheckedInt's constructor; r=jrmuizel,cpearce
Note that the analysis currently just looks at the AST subtree of the
function call site and is therefore unable to correctly deal with cases
such as the last two hunks of the change to OggCodecState.cpp.  Fixing
the analysis to deal with that would be very difficult, so we currently
adjust the code so that it compiles.  The first hunk in that file though
is a real bug that this analysis found.
2014-12-18 15:27:05 -05:00
Ryan VanderMeulen 3d7d4af71d Backed out changesets acb4dd16755c and 40768f723990 (bug 867348) for static analysis bustage.
CLOSED TREE
2014-12-18 15:59:51 -05:00
Ehsan Akhgari 2e80a88820 Bug 867348 - Part 2: Apply MOZ_NO_ARITHMETIC_EXPR_IN_ARGUMENT to CheckedInt's constructor; r=jrmuizel
Note that the analysis currently just looks at the AST subtree of the
function call site and is therefore unable to correctly deal with cases
such as the last two hunks of the change to OggCodecState.cpp.  Fixing
the analysis to deal with that would be very difficult, so we currently
adjust the code so that it compiles.  The first hunk in that file though
is a real bug that this analysis found.

--HG--
extra : rebase_source : b44bb6d90d95551d860e0b5a1afcf2bb35cde084
2014-12-18 15:27:05 -05:00
Nicholas Nethercote 0846dc4263 Bug 1109407 - Give SegmentedVector a default segment size. r=froydnj.
--HG--
extra : rebase_source : 0ceae77c9fec06bbd8c3231434f62fc0e83d9bf1
2014-12-11 14:11:43 -08:00
Nicholas Nethercote 8225c5d531 Bug 1102525 (part 2) - Add SegmentedVector to MFBT. r=froydnj.
This is based on the SegmentedArray type from nsCycleCollector.cpp.

--HG--
extra : rebase_source : 06d2feea3233e5ddd3c47d18c53a661de8a06bb2
2014-12-08 14:45:13 -08: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
Matthew Gregan 52f69d5963 Bug 1097512 - Allow using compound operators where the LHS and RHS are both CheckedInt<T>. r=jwalden+bmo 2014-11-14 16:13:23 +13:00
Mike Hommey 47c853314f Bug 1077148 part 4 - Add and use new moz.build templates for Gecko programs and libraries. r=gps
There are, sadly, many combinations of linkage in use throughout the tree.
The main differentiator, though, is between program/libraries related to
Gecko or not. Kind of. Some need mozglue, some don't. Some need dependent
linkage, some standalone.

Anyways, these new templates remove the need to manually define the
right dependencies against xpcomglue, nspr, mozalloc and mozglue
in most cases.

Places that build programs and were resetting MOZ_GLUE_PROGRAM_LDFLAGS
or that build libraries and were resetting MOZ_GLUE_LDFLAGS can now
just not use those Gecko-specific templates.
2014-10-30 13:06:12 +09:00
Nicholas Nethercote 295bcae988 Bug 1074591 (part 2) - Remove Pointer{Element,Property}() from JSONWriter. r=froydnj.
--HG--
extra : rebase_source : db07aa93df880e201eba866cb791ccaa245f0ef8
2014-10-02 18:01:32 -07:00
Nicholas Nethercote 56daec2fe6 Bug 1074591 (part 1) - Allow JSON collections to be printed on a single line. r=froydnj.
--HG--
extra : rebase_source : d576a70d2d1ff83311ab8cce849ec0b5a6b3fa80
2014-10-02 18:01:19 -07:00
Masayuki Nakano 506e55fe0a Bug 1069726 Don't use non-ASCII characters in cpp files for avoiding bustage with Visual Studio in some locales r=njn 2014-09-19 20:34:13 +09:00
Nicholas Nethercote 273d7cc068 Bug 1067699 (part 2) - Add mfbt/JSONWriter.h and use it for memory reporting. r=froydnj.
--HG--
extra : rebase_source : 7eb21c4c20c0434b3b236d1c53cbef9cb6a4759c
2014-09-14 23:36:18 -07:00
Mike Hommey 0060683747 Bug 1059090 - Don't require SOURCES to be set for CPP_UNIT_TESTS and SIMPLE_PROGRAMS. r=mshal 2014-09-03 14:16:37 +09:00
Mike Hommey ed70c5f377 Bug 1041941 - Use templates for programs, simple programs, libraries and C++ unit tests. r=gps 2014-09-03 14:10:54 +09:00
Georg Fritzsche 8323fbaa7f Bug 1059179 - Add BinarySearchIf(). r=waldo 2014-09-01 19:26:16 +02:00
Seth Fowler 2450461f0f Bug 1057840 (Part 2) - Expand MSVC version bounds for decltype scope operator workaround. r=waldo 2014-08-26 13:57:45 -07:00
Seth Fowler 47a6f9b86b Bug 1057840 (Part 1) - Expand GCC version bounds for decltype scope operator workaround. r=waldo 2014-08-26 13:57:43 -07: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
Mike Hommey 89777800f9 Bug 1047267 - Move remaining OS_LIBS and EXTRA_LIBS to moz.build. r=gps
* * *
Bug 1047267 - To fold with "Move remaining OS_LIBS and EXTRA_LIBS to moz.build"
2014-08-07 14:21:03 +09:00
Ehsan Akhgari 4d78ae894d Bug 1048013 - Fix some bad implicit constructors in MFBT; r=froydnj 2014-08-05 09:21:12 -04:00
Nicholas Nethercote 21f35c3811 Bug 1047195 - MFBT: Convert UniquePtr module to Gecko style. r=Ms2ger. 2014-07-31 20:34:17 -07:00
Nicholas Nethercote ff21669f0b Bug 980934 (part 1) - Add mfbt/tests/TestSplayTree.cpp. r=froydnj.
--HG--
extra : rebase_source : 2fa739b40d6b6f136002abc875a7c558cb4dd4ed
2014-07-30 15:53:40 -07:00
Benoit Jacob 14dbb23161 Bug 1044668 - 2/2 - let WebGLFramebufferAttachable::AttachmentPoint use WeakPtr instead of a raw pointer - r=kamidphish 2014-07-30 15:52:08 -04:00
Benoit Jacob c50ccf8dba Bug 1044658 - 5/6 - remove asWeakPtr - r=froydnj 2014-07-30 15:52:05 -04:00
Nicholas Nethercote 6548e9518e Bug 1045920 (part 2) - Add mfbt/tests/TestRefPtr.cpp. r=froydnj. 2014-07-30 06:59:52 -07:00
Nicholas Nethercote 6c3f5d7b8e Bug 1041914 - Convert the fourth quarter of MFBT to Gecko style. r=Ms2ger.
--HG--
extra : rebase_source : 588fa9c0d1e819e1826835c4ef4a1428a927bf93
2014-07-22 20:54:41 -07:00
Mike Hommey 5fab42fcaf Bug 1036894 part 8 - Move most in-tree library linkage information to moz.build, as USE_LIBS. r=gps 2014-07-23 13:30:52 +09:00
Mike Hommey 6d6d400ea1 Bug 1036894 part 6 - Emit SimplePrograms for CPP_UNIT_TESTs, and make the corresponding moz.build config look like that of SIMPLE_PROGRAMS. r=gps 2014-07-23 13:29:44 +09: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
Jeff Walden a377a906df Bug 953296 - Properly condition function-deleter tests on SHOULD_TEST_FUNCTION_REFERENCE_DELETER. r=bustage 2014-07-08 11:37:45 -07:00
Jeff Walden 83843f0171 Bug 953296 - Implement mozilla::MakeUnique. r=jcranmer
--HG--
extra : rebase_source : 6e25d80e697f1b00e1525f6b11221f4ed9cf965e
2014-06-10 17:42:58 -07:00
Jeff Walden 9b3cc8ddf5 Bug 953296 - Implement mozilla::UniquePtr. r=jcranmer
--HG--
extra : rebase_source : 76dadc240c40d1ffbd2f3a0414c3667ff2d6706d
2013-12-30 13:34:15 -06:00
Jeff Walden 2c5ed1828b Bug 953296 - Introduce an EBO-performing Pair class to mfbt. r=jcranmer
--HG--
extra : rebase_source : a5d4ad52736a66656aaf3947b31ce8087b859491
2014-06-09 08:49:18 -07:00
Jeff Walden 297cdb7279 Bug 1030515 - Make IsSigned and IsUnsigned usable with user-defined types. r=froydnj
--HG--
extra : rebase_source : f74d5c0b9f05a56c4d56aba1ebbdb944a3464b30
2014-06-25 18:47:04 -07:00
Jeff Walden f4c09e1ea5 Bug 1029132 - Add mozilla::IsInRange method to write out in-range tests more simply. r=froydnj
--HG--
extra : rebase_source : b57c74750e4db2bc5ffe4655069f3597fab5a6b2
2014-06-23 14:14:26 -07:00
Jeff Walden 770045e23f Bug 953296 - Add IsLvalueReference and IsVoid. r=jcranmer
--HG--
extra : rebase_source : 53def7d45901da43ffbcfef3adbbea3a3e6bb329
2014-01-09 10:09:14 -06:00
Jeff Walden b706ddaf73 Bug 953296 - Implement mozilla::RemoveExtent. r=jcranmer
--HG--
extra : rebase_source : 97d4f055fc80074265bd5c8b1b0a565d8e994e7b
2014-06-10 12:58:17 -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
Chris Peterson 969f9037ad Bug 1024318 - Fix warnings in mfbt/tests/ and mark as FAIL_ON_WARNINGS. r=Waldo 2014-06-14 12:47:01 -07:00
Ehsan Akhgari 11ef71dec3 Bug 1025143 - Fix a compilation error in TestTypedEnum.cpp with clang-cl; r=bjacob
This makes the code more correct since if we don't have constexpr
support in the compiler, the CastableTypedEnumResult type would
actually not be a literal type, so we should not assert that here.
2014-06-13 15:22:16 -04:00
Ehsan Akhgari 8b30e40485 Bug 1013662 - Fix bad implicit conversion constructors in MFBT; r=froydnj,Waldo 2014-06-06 23:17:06 -04:00
Ehsan Akhgari fcbd7ebc45 Bug 1022050 - Disable the SEH block used in TestPoisonArea.cpp on clang-cl until it grows SEH support; r=froydnj 2014-06-06 23:11:58 -04:00
Chris Peterson 163d828c29 Bug 945029 - Fix up Android's broken [u]intptr_t inttype macros. r=Waldo 2014-05-12 22:27:14 -07:00
Birunthan Mohanathas 5e01b2cee4 Bug 1001987 - Make MOZ_STATIC_ASSERT_VALID_ARG_COUNT compatible with ICC. r=Waldo 2014-04-28 07:48:00 +02:00
Benoit Jacob 05d01a79c8 Bug 987290 - Work around a GCC 4.6.3 ICE - no review, bustage fix 2014-04-28 12:27:13 -04:00
Benoit Jacob a8a9cf90c0 Bug 987290 - Follow-up: fix TestTypedEnum to avoid requiring behavior that relies on explicit conversions, when they are not available. Fixes the build on MSVC 2012 - no review, bustage fix 2014-04-27 22:46:40 -04:00
Benoit Jacob 888ca078bf Bug 987290 - Allow using MFBT Typed Enums as bitwise flags - r=Waldo 2014-04-25 22:34:04 -04:00
Blair McBride af6be312f8 Backed out 2 changesets (bug 987290). r=sheriff
Backed out changeset 4ad1f662f521 (bug 987290)
Backed out changeset 080ff1f86465 (bug 987290)
2014-04-27 20:41:58 +12:00
Benoit Jacob 645e93ca92 Bug 987290 - Allow using MFBT Typed Enums as bitwise flags - r=Waldo 2014-04-25 22:34:04 -04:00
Birunthan Mohanathas 772debb89d Bug 989460 - Part 2: Add MOZ_FOR_EACH macro. r=Waldo 2014-04-24 10:49:00 +02:00
Birunthan Mohanathas accb4d62ef Bug 989460 - Part 1: Add MacroArgs.h for macros related to implementing variadic macros. r=Waldo
This also converts MOZ_RELEASE_ASSERT and MOZ_BEGIN_NESTED_ENUM_CLASS to use the new helper macros.
2014-04-24 10:48:00 +02:00
Benoit Jacob 7c2d5b3529 Bug 807607 - Make MFBT tests use MOZ_RELEASE_ASSERT instead of MOZ_ASSERT to ensure test coverage in non-DEBUG - r=Waldo
find mfbt/tests/ -type f | xargs sed -i 's/MOZ_ASSERT/MOZ_RELEASE_ASSERT/g'
2014-04-24 17:06:50 -04:00
Luke Wagner 73f0ab2246 Bug 998507 - add BinarySearch (r=sunfish)
--HG--
extra : rebase_source : 6ba04575a5dd8a886235e6799bc790c7a3afc64f
2014-04-15 21:30:26 -05:00
Benoit Jacob 006b370dc5 Bug 987274 - Add IntegerTypeTraits.h to MFBT for additional integer traits and helpers that don't have type_traits equivalents - r=Waldo 2014-04-01 09:38:42 -04:00
Dan Gohman 1bb01da898 Bug 978397 - Fix the implementation of CountPopulation_32 on Windows. r=nbp 2014-03-11 08:09:55 -04:00
Ehsan Akhgari 17f4a32d8b Bug 976896 - Port STL_FLAGS to moz.build; r=mshal 2014-03-04 19:39:06 -05:00
Benjamin Bouvier cab8750482 Bug 939843: Tests for mfbt::Floats; r=waldo
--HG--
extra : rebase_source : a6515f7d4e82e020fd7686f14932855873078813
2014-02-27 16:23:08 +01:00
Benjamin Bouvier 1ce0aa6d4a Bug 939843: Unify FloatingPoint's code for Double and Float; r=waldo
--HG--
extra : rebase_source : 2f7956d497d534af8931939a38a29ad27695a3fc
2014-01-30 15:54:46 +01:00
Ehsan Akhgari 497c5f3692 Bug 935778 - Part 0.5: Add two more MOZ_DECLARE_REFCOUNTED_TYPENAME to TestWeakPtr.cpp 2014-02-21 09:45:05 -05:00
Ehsan Akhgari d91d200572 Bug 969757 - Remove the dead code in our tree which pretends to support OS/2; r=roc,mcmanus,gps,jorendorf,bsmedberg sr=bsmedberg 2014-02-10 17:57:01 -05:00
Viktor Stanchev 529b872af2 Bug 965837 - Add bool support to mozilla::Atomic. r=froydnj 2014-02-06 14:57:30 -05:00
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
Gregory Szorc 282edab58a Bug 784841 - Part 18c: Convert /memory, /mfbt, /mozglue; r=ted f=Ms2ger 2013-02-25 12:47:17 -08:00
Anthony Jones 6f5946f59f Bug 793013 - Add EnumSet to replace 1 << n bit type bitfields. r=Waldo 2012-11-06 18:23:13 -05:00
Jacek Caban 660bdf5a95 Bug 805773 - TestSHA1.exe fails to link on mingw r=espindola 2012-10-29 10:21:33 +01:00
Ehsan Akhgari 7e57f8a9fe Bug 802806 - Make mfbt's IsBaseOf work with multiple inheritance; r=Waldo 2012-10-17 17:37:53 -04:00
Jeff Walden 098475a5bb Minor style nits in WeakPtr code forgotten by me when reviewing. No bug, r=sparky
--HG--
extra : rebase_source : e8b8071218c9280e970ba4525a3e8ebab729d4eb
2012-10-08 16:03:52 -07:00
Jeff Walden a9b67c2069 Move TestBloomFilter out of XPCOM and into mfbt/tests, now that it exists. No bug, r=testingonlychange
--HG--
extra : rebase_source : 85a2a56bcc02bf122ee7fd21d16dffd534d1c98d
2012-10-03 17:09:59 -07:00
Jeff Walden 6c828f9bb0 Bug 798634 - Style patrol on mfbt/SHA1.*. r=espindola
--HG--
extra : rebase_source : 7282b80ebe5f23b669a5f3142f3a6e50b6776789
2012-08-28 17:27:05 -07:00
Jeff Muizelaar ac8fdf1333 Bug 792954. Add a WeakPtr implementation to use instead of nsISupportsWeakReference. r=joe,ehsan,Waldo
This patch also replaces the usage of nsISupportsWeakReference in RasterImage as an example.

--HG--
extra : rebase_source : ac6a039dcc3227a04ac4c2221f38856bb308c695
2012-10-04 15:45:07 -04:00
Rafael Ávila de Espíndola b6f8c36445 Bug 781627 - Copy security/nss/lib/freebl/sha_fast.c to mfbt. r=jlebar. 2012-08-20 15:01:55 -04:00
Mike Hommey 70d7c821af Bug 774032 bonus - Use @DEPTH@ and @relativesrcdir@ in Makefile.in. r=ted 2012-08-04 20:26:44 +02:00
Benoit Jacob da5aee1123 Bug 768570 - Fix all the warnings in CheckedInt - r=jwalden 2012-07-05 10:13:31 -04:00
Benoit Jacob e137681d8c Bug 768538 - 2/2 - Fix undefined behavior in the CheckedInt unit test - r=jwalden 2012-07-05 10:13:23 -04:00
Jeff Walden a10a240530 Bug 766347 - Implement mozilla::IsConvertible to detect when a value of one type will convert to a value of another type. r=luke
--HG--
extra : rebase_source : d25c1b84dfc928a0bc4dcfb43e31b6035882849e
2012-06-19 13:55:23 -07:00
Benoit Jacob ce077b3952 Bug 732875 - Further CheckedInt tweaks - r=Ms2ger,jwalden 2012-05-17 10:07:24 -04:00
Dão Gottwald 5e32254efb Backed out changeset 45ef0e7b2426 2012-05-17 16:48:06 +02:00
Benoit Jacob d88ddfed0d Bug 732875 - Further CheckedInt tweaks - r=Ms2ger,jwalden 2012-05-17 10:07:24 -04:00
Benoit Jacob 6de3cc03da Bug 732875 - 8/8 - move CheckedInt to MFBT, enable unit tests in mfbt/tests - r=jwalden
--HG--
rename : xpcom/ds/CheckedInt.h => mfbt/CheckedInt.h
2012-05-14 15:50:20 -04:00
Ed Morley 0f956d7307 Backout 345ae68f15f4, b3b40121ac8d, 0d18b7a246d7, 9dbb6064ab58, dee9d7fa8eb6, 63eec6bfa948, 323c6be7cfe8 & f4aac7523a48 (bug 732875) for compilation failures 2012-05-14 21:05:24 +01:00
Benoit Jacob fa8d5e0469 Bug 732875 - 8/8 - move CheckedInt to MFBT, enable unit tests in mfbt/tests - r=jwalden
--HG--
rename : xpcom/ds/CheckedInt.h => mfbt/CheckedInt.h
2012-05-14 15:50:20 -04:00