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

1415 Коммитов

Автор SHA1 Сообщение Дата
Masatoshi Kimura caada858fb Bug 1451722 - Constexpr-ify mozilla::Span more. r=hsivonen
MozReview-Commit-ID: B7sxH5BAdp6

--HG--
extra : rebase_source : 3e7bf5424478cdff6dfd1c25b9808a41cfb6e0d3
2018-04-05 21:55:00 +09:00
Tristan Bourvon a3a77c0312 Bug 525063 - Initialize uninitialized class attributes in m-c. r=ehsan 2018-04-10 21:11:02 +02:00
Jeff Walden be8ccd5a6b Bug 1452619 - Implement mozilla::IsAsciiAlpha. r=froydnj
--HG--
extra : rebase_source : fd1e3284d293edad0bd96cc378eeeeb1bc2c8829
2018-04-09 12:02:43 -07:00
Nicholas Nethercote 374e333b76 Bug 1451658 - Add MOZ_STATIC_CLASS. r=mystor
MozReview-Commit-ID: HlbfoQypMcI

--HG--
extra : rebase_source : 3f91229f7190f04a9f512a6ac594674e05829039
2018-04-10 17:31:31 +10:00
Nathan Froyd cc035fe9e0 Bug 1444125 - don't poison Maybe on construction; r=gerald
This behavior is pretty heavy-handed and degrades performance.
2018-04-10 13:46:00 -04:00
Nathan Froyd e7e0eac6bc Bug 1444125 - work harder to generate good code for Maybe poisoning; r=gerald 2018-04-10 13:46:00 -04:00
Sylvestre Ledru 99f0e1b624 Bug 1447480 - Add support of MOZ_FALLTHROUGH_ASSERT without any argument r=hsivonen
MozReview-Commit-ID: 6xrdrggcVFR

--HG--
extra : rebase_source : f53d9a62e828d65469c42c79a468b5bea2e8b645
2018-04-05 11:42:23 +02:00
Jonathan Kew c66fb1e660 Bug 1451296 - Make enabling of font-variation-settings and font-optical-sizing properties dependent on adequate platform support at runtime. r=lsalzman 2018-04-05 18:53:56 +01:00
Masatoshi Kimura 3560ad5b6e Bug 1449094 - Implement constexpr mozilla::AllOf. r=froydnj
MozReview-Commit-ID: KvKY9CMqfww

--HG--
extra : rebase_source : 5e548884d3a331b5dc8704a690ccbd532ac2534a
2018-03-28 00:01:08 +09:00
Henri Sivonen 5f81ea7f50 Bug 1448591 - Make MakeStringSpan(nullptr) return an empty span. r=froydnj.
MozReview-Commit-ID: EyuLeWjEL7w

--HG--
extra : rebase_source : a40b671692db0e7faa7772654cb4b1ae75bd30a2
2018-03-24 21:36:00 +02:00
Bogdan Tara 8b1819017d Backed out changeset 577c20417552 (bug 1449094) for failing /builds/worker/workspace/build/src/mfbt/tests/TestAlgorithm.cpp CLOSED TREE 2018-03-30 01:54:04 +03:00
Masatoshi Kimura 316aea87d9 Bug 1449094 - Implement constexpr mozilla::AllOf. r=froydnj
MozReview-Commit-ID: KvKY9CMqfww

--HG--
extra : rebase_source : 15efd61da5b66d6bbb4655cf95936c5d36473a82
2018-03-28 00:01:08 +09:00
Emilio Cobos Álvarez 1f4687f9fc Bug 1448387: Use alignof() in HasFreeLSB. r=froydnj
This doesn't seem relevant for the differences between MOZ_ALIGNOF and alignof
mentioned in bug 1288016.

MozReview-Commit-ID: 8f9Ui7Aecfj
2018-03-23 19:09:42 +01:00
Jeff Walden 36462015eb Bug 1446592 - Update our local double_conversion to tip. Also remove one local patch as unnecessary as of MSVC 2010, hacking around prior versions' lack of <stdint.h> support. r=froydnj
--HG--
extra : rebase_source : ae21e264fc97373f42ea4a01189caed48e785e9c
2018-03-16 20:25:17 -07:00
Nicholas Nethercote cecefaa849 Bug 1443706 - Introduce ConstExprHashString(const char16_t*). r=jwalden
This is a `constexpr` alternative to HashString(const char16_t*). We can't make
HashString(const char16_t*) itself `constexpr` because HashUntilZero(const T*)
isn't in a form that older compilers (like GCC 4.9) allow to be made
`constexpr`. (The trick to satisfying those compilers is to use recursion
instead of iteration, to get the function into a single `return` statement.)

This requires making a bunch of other functions `constexpr` as well. It also
requires adding MOZ_{PUSH,POP}_DISABLE_INTEGRAL_CONSTANT_OVERFLOW_WARNING
macros to avoid some MSVC weirdness.

The introduction of RotateLeft5() partly undoes one of the patches from bug
1443342, but that's unavoidable.

This change will help with static allocation of static atoms (bug 1411469).

MozReview-Commit-ID: 7r3PnrQXb29
2018-03-08 10:27:14 +11:00
Jeff Walden 0eefeabe25 Bug 1445024 - Implement mozilla::WrappingSubtract. r=froydnj
--HG--
extra : rebase_source : 026268df1cb1cfc56873e61834ea90257645c508
2018-03-06 19:22:20 -08:00
Jeff Walden 83186da179 Bug 1445024 - Consolidate some WrappingOperations.h comments and implementation bits. r=froydnj
--HG--
extra : rebase_source : 7efdbb7fa034645f6699954810c52709e54e29fe
2018-03-12 12:56:39 -07:00
Jeff Walden 52d9907ee0 Bug 1445024 - Implement mozilla::WrappingAdd. r=froydnj
--HG--
extra : rebase_source : 3514c6487305e64ce19060cb05d39bc6eb2fd912
2018-03-06 19:21:58 -08:00
Narcis Beleuzu 298d1d55b5 Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-03-13 12:36:54 +02:00
Emilio Cobos Álvarez 2125f0fbd4 Bug 1444416: Handle references in the "can run script" checker. r=mystor
MozReview-Commit-ID: 8F9HjiFqbGN

--HG--
extra : rebase_source : 03d49b9a605ff5eade81a814b0903f81d87720ab
2018-03-09 17:51:59 +01:00
Jeff Walden 15bf6fd876 Bug 1442967 - Boo, MSVC warns when a cast will truncate a numeric constant. Arguably a desirable warning generally, but here we specifically intend the cast to narrow, so disable the warning. r=me in a CLOSED TREE 2018-03-12 19:20:42 -07:00
Jeff Walden fc7dc7e60e Bug 1442967 - When doing a comparison against a 64-bit constant in code run only in 64-bit builds, but compiled in 32-bit builds, cast it to uintptr_t so that the comparison isn't clearly false in 32-bit builds. rs=froydnj by suggestion on IRC
--HG--
extra : rebase_source : 2be98a1a0c436664ea0fa3ef8be55a9fb71541af
2018-03-12 13:36:44 -07:00
Jeff Walden 1b063823be Bug 1442967 - Futz with a uintptr_t (as uint32_t) == uint64_t comparison to evade constantly-false compiler warnings in 32-bit builds. r=jorendorff 2018-03-09 21:59:08 -08:00
Nathan Froyd 1a68724fe3 Bug 1442304 - make already_AddRefed returnable in registers in non-DEBUG Unix builds; r=glandium,tjr
This change saves ~150k (!) of binary size on x86-64 Linux.
2018-03-07 14:27:28 -05:00
Jeff Walden 212527bdf1 Bug 1443342 - Remove XorShift128PlusRNG.h from integer-overflow sanitizer blacklisting. r=froydnj
--HG--
extra : rebase_source : 6ecedb849aa51cffc493017661025365ecdb1eb2
2018-03-06 09:33:52 -08:00
Jeff Walden ba5975180b Bug 1443342 - Opt one HashFunctions.h function out of integer-overflow sanitizing and don't blacklist HashFunctions.h. r=froydnj
--HG--
extra : rebase_source : a33b53362c1f9ce96df22a321990a45a224af9d6
2018-03-01 17:11:33 -08:00
Jeff Walden 75f86d4202 Bug 1443342 - Remove HashFunctions.h's RotateBitsLeft32 and use the general RotateLeft function instead. r=froydnj
--HG--
extra : rebase_source : 88ad42c5757d9f1f0df5590c647a840061523318
2018-03-01 17:05:58 -08:00
Dorel Luca 0e437cae41 Merge mozilla-central to mozilla-inbound 2018-03-06 20:46:45 +02:00
Gerald Squelart a1f5bed9e9 Bug 1443367 - Rework MakeNotNull to build with VS 2017 15.6 - r=njn
VS 2017 15.6 (March 2018) doesn't seem to understand
`*DeclVal<SharedFontList*>()` anymore.
To work around this issue, the pointed-to type is now extracted in a separate
struct, for which we provide a specialization for raw pointers, so we don't
encounter the shaky `*DeclVal<T*>()` statement anymore.

MozReview-Commit-ID: FuslManbfdB

--HG--
extra : rebase_source : be3813aa9a028e6891cb3de1fc4faae5bde0348e
2018-03-06 20:27:27 +11:00
Nathan Froyd 08e65e40ba Bug 1443265 - make already_AddRefed a MOZ_TEMPORARY_CLASS; r=mystor 2018-03-05 16:12:41 -05:00
Nathan Froyd 2bd0c8e0a2 Bug 1414901 - part 2 - poison Maybe<T> instances when not in use; r=Waldo 2018-03-06 11:35:50 -05:00
Nathan Froyd 2ac6e45b48 Bug 1414901 - part 1b - eliminate alignment requirements for poisoning memory; r=Waldo
mozWritePoison secretly depended on the passed-in pointer being aligned
as though it were a pointer to uintptr_t, as it used bare stores to
C-casted pointers to accomplish poisoning.  But this is an unnecessary
limitation: we can use memcpy and rely on the compiler to appropriately
inline the store to an unaligned store instruction if necessary.
2018-03-06 11:35:50 -05:00
Nathan Froyd 450618b0af Bug 1414901 - part 1a - make mozWritePoison respect its documentation; r=Waldo
The documentation for mozWritePoison says that only an even number of
sizeof(uintptr_t) bytes are overwritten; any trailing bytes are not
touched.  This documentation doesn't correspond to how the function
actually works.  The function as written will happily overwrite trailing
bytes and any bytes not contained in the object, if the passed-in size
isn't divisible by sizeof(uintptr_t).  Let's fix that.
2018-03-06 11:35:50 -05:00
Jason Orendorff ef8693d6f2 Bug 1413049 - Part 1a: In a test, zero-pad hex integer constants to the width of their type. r=Waldo.
--HG--
extra : rebase_source : dfd3f1a00470856a177a526d385dd0f1b7d0ec38
2018-03-01 20:06:37 -06:00
Jason Orendorff 2418dfb4b3 Bug 1413049 - Part 1: Add methods to EndianUtils for pointer-sized integers. r=Waldo.
--HG--
extra : rebase_source : 115e40ecaee589b07e4ff9534694e56af7690e9b
2018-03-01 11:05:13 -06:00
Jeff Walden 25a7df6306 Bug 1441657 - Implement mozilla::WrappingMultiply. r=froydnj
--HG--
extra : rebase_source : 57d1796976a25597ee4dda90561d40debc6a9fc9
2018-02-15 17:36:55 -08:00
Jeff Walden b0074d3a7d Bug 1441657 - Create a new mozilla/WrappingOperations.h header to contain implementations of common math operations with well-defined wraparound semantics. r=froydnj
--HG--
rename : mfbt/MathAlgorithms.h => mfbt/WrappingOperations.h
rename : mfbt/tests/TestMathAlgorithms.cpp => mfbt/tests/TestWrappingOperations.cpp
extra : rebase_source : 552a0f17d7ba2ad6229d45fd2945592aceabb354
2018-02-15 17:36:50 -08:00
Blake Kaplan 32db9fed96 Bug 1404297 - Add a move constructor to SegmentedVector. r=smaug
Given that we have a SegmentedVector of nsCOMPtrs, it's probably worth
avoiding copying it.

MozReview-Commit-ID: GHyfVLrdnlQ

--HG--
extra : rebase_source : 75df805d8b2df32b76ee77b95ced625f20331744
2018-03-01 11:26:54 -08:00
Masatoshi Kimura 6648e322a9 Bug 1441112 - Stop including <iostream> in FStream.h. r=froydnj
MozReview-Commit-ID: 8SBsucRbL3i

--HG--
extra : rebase_source : 385a9fafbc07753c1273ed25b09e7c00edb5fe36
2018-02-28 21:45:04 +09:00
Sylvestre Ledru b7b13979a7 Bug 1370794 - Use bool instead of integer being casted to bool r=Ehsan
MozReview-Commit-ID: lUVFeU0Y0p

--HG--
extra : rebase_source : c2dac9c0e0345111f68aea2b9e359ad94086430d
2018-02-07 15:15:28 +01:00
Jeff Walden 1b16de9738 Bug 744965 - Implement mozilla::NumberEqualsInt32 in a way that doesn't depend on undefined behavior casting an out-of-range floating point number to int32_t. r=froydnj
--HG--
extra : rebase_source : dc4781e2a31ee0e75fc62951cbdc71eaa9fd7b1c
2018-02-15 17:22:14 -08:00
Jeff Walden 5472050225 Bug 1438750 - Remove mfbt/double-conversion.h, and change existing users to instead do #include "double-conversion/double-conversion.h" themselves. r=froydnj on a CLOSED TREE
--HG--
extra : amend_source : 72f066d9c75ae5ccd4d1e929896a2b12aa0ddc8c
2018-02-21 10:15:43 +02:00
Cosmin Sabou 48de1e7807 Backed out changeset 1fcc972d445b (bug 744965) for assertion failures on TestFloatingPoint.cpp on a CLOSED TREE 2018-02-21 10:12:45 +02:00
Gurzau Raul 14b89a5ae5 Backed out changeset 66c1c1596bea (bug 1438750) for assertion failure at TestFloatingPoint.cpp on Windows platform 2018-02-21 08:29:50 +02:00
Jeff Walden 2b6c4bedad Bug 1438750 - Remove mfbt/double-conversion.h, and change existing users to instead do #include "double-conversion/double-conversion.h" themselves. r=froydnj
--HG--
extra : rebase_source : 76ecf4ab0caf7a5367636a866512931d3fd9b962
2018-02-15 21:02:53 -08:00
Jeff Walden e77ef331a3 Bug 744965 - Implement mozilla::NumberEqualsInt32 in a way that doesn't depend on undefined behavior casting an out-of-range floating point number to int32_t. r=froydnj
--HG--
extra : rebase_source : d6d890b7b20d93297f575abe838e8619418ea545
2018-02-15 17:22:14 -08:00
Sylvestre Ledru 78c25c6d82 Bug 1437482 - gcc 8 has no-sanitize but not the {un,}signed-integer-overflow option r=Waldo
MozReview-Commit-ID: EfRYhaISZfL

--HG--
extra : rebase_source : 2a5f32a71be4688d260786f6f762183f38b682a8
2018-02-12 12:07:52 +01:00
Masatoshi Kimura 9bbb2153d4 Bug 1428614 - Implement mozilla::IFStream and mozilla::OFStream. r=froydnj
This is drop-in replacements of std::ifstream and std::ofstream, but supports
widechar filenames on Windows. This is just an alias of std::ofstream on other
platforms.

MozReview-Commit-ID: FHNatG5595k

--HG--
extra : rebase_source : 0805153dd13907a6c3b6971bfc0b499a31416b9a
extra : intermediate-source : 3113df1e69bf7444105953df8610b8bbf5d4d41e
extra : source : 750263b126963d2634a89de0a2aac63efa4b49e6
2018-01-07 18:31:31 +09:00
Jeff Walden 0e77ce073b Bug 1435484 - Split the integer-overflow blacklist into two blacklists, one for signed integer overflow and one for unsigned integer overflow, and rename both configure flags to be clearer. r=decoder, r=froydnj
--HG--
rename : build/sanitizers/ubsan_blacklist_int.txt => build/sanitizers/ubsan_signed_overflow_blacklist.txt
rename : build/sanitizers/ubsan_blacklist_int.txt => build/sanitizers/ubsan_unsigned_overflow_blacklist.txt
2018-02-02 21:25:31 -08:00
Eric Rahm 61c1f85e41 Bug 1434689 - Part 2: Add MOZ_TEMPORARY_CLASS attribute. r=mystor
This adds the MOZ_TEMPORARY_CLASS attribute to Attributes.h.

--HG--
extra : rebase_source : aea2ac53705863a839bcf11245b67a9fc1da08bf
2018-01-31 15:22:42 -08:00