WebKit Bugzilla
Attachment 339499 Details for
Bug 185232
: [Win] Use C++17 in MSVC
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-185232-20180504100920.patch (text/plain), 26.37 KB, created by
Yusuke Suzuki
on 2018-05-03 18:09:21 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Yusuke Suzuki
Created:
2018-05-03 18:09:21 PDT
Size:
26.37 KB
patch
obsolete
>Subversion Revision: 231342 >diff --git a/Source/JavaScriptCore/ChangeLog b/Source/JavaScriptCore/ChangeLog >index d90e7ca75172a43a1ca5ad138c0b014b79bda765..dc4dcca6b7080c5500a924d3593ec10ef6115559 100644 >--- a/Source/JavaScriptCore/ChangeLog >+++ b/Source/JavaScriptCore/ChangeLog >@@ -1,3 +1,17 @@ >+2018-05-03 Yusuke Suzuki <utatane.tea@gmail.com> >+ >+ [Win] Use C++17 in MSVC >+ https://bugs.webkit.org/show_bug.cgi?id=185232 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * jit/BinarySwitch.cpp: >+ (JSC::RandomNumberGenerator::RandomNumberGenerator): >+ (JSC::RandomNumberGenerator::operator()): >+ (JSC::RandomNumberGenerator::min): >+ (JSC::RandomNumberGenerator::max): >+ (JSC::BinarySwitch::build): >+ > 2018-05-03 Dominik Infuehr <dinfuehr@igalia.com> > > ARM: Wrong offset for operand rt in disassembler >diff --git a/Source/ThirdParty/ChangeLog b/Source/ThirdParty/ChangeLog >index 153819de1414589b4f8a48aaf66313b4bdbc281a..d1bebbdaff6b31144982cc5c1a36c96d142f7f29 100644 >--- a/Source/ThirdParty/ChangeLog >+++ b/Source/ThirdParty/ChangeLog >@@ -1,3 +1,27 @@ >+2018-05-03 Yusuke Suzuki <utatane.tea@gmail.com> >+ >+ [Win] Use C++17 in MSVC >+ https://bugs.webkit.org/show_bug.cgi?id=185232 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * gtest/include/gtest/internal/gtest-param-util-generated.h: >+ (testing::internal::CartesianProductHolder2::operator ParamGenerator< ::std::tuple<T1, T2> > const): >+ (testing::internal::CartesianProductHolder3::operator ParamGenerator< ::std::tuple<T1, T2, T3> > const): >+ (testing::internal::CartesianProductHolder4::operator ParamGenerator< ::std::tuple<T1, T2, T3, T4> > const): >+ (testing::internal::CartesianProductHolder5::operator ParamGenerator< ::std::tuple<T1, T2, T3, T4, T5> > const): >+ (testing::internal::CartesianProductHolder6::operator ParamGenerator< ::std::tuple<T1, T2, T3, T4, T5, T6> > const): >+ (testing::internal::CartesianProductHolder7:: const): >+ (testing::internal::CartesianProductHolder8:: const): >+ (testing::internal::CartesianProductHolder9:: const): >+ (testing::internal::CartesianProductHolder10:: const): >+ (testing::internal::CartesianProductHolder2::operator ParamGenerator< ::std::tr1::tuple<T1, T2> > const): Deleted. >+ (testing::internal::CartesianProductHolder3::operator ParamGenerator< ::std::tr1::tuple<T1, T2, T3> > const): Deleted. >+ (testing::internal::CartesianProductHolder4::operator ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4> > const): Deleted. >+ (testing::internal::CartesianProductHolder5::operator ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5> > const): Deleted. >+ (testing::internal::CartesianProductHolder6::operator ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6> > const): Deleted. >+ * gtest/include/gtest/internal/gtest-tuple.h: >+ > 2018-03-05 Don Olmstead <don.olmstead@sony.com> > > [CMake] Split JSC header copying into public and private targets >diff --git a/Source/WTF/ChangeLog b/Source/WTF/ChangeLog >index 106a12a8d9cb8a84af20048b2999ec99c918aebd..679167aa561b1787ad3e7499d98f0cfe492024b9 100644 >--- a/Source/WTF/ChangeLog >+++ b/Source/WTF/ChangeLog >@@ -1,3 +1,13 @@ >+2018-05-03 Yusuke Suzuki <utatane.tea@gmail.com> >+ >+ [Win] Use C++17 in MSVC >+ https://bugs.webkit.org/show_bug.cgi?id=185232 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * wtf/Optional.h: >+ * wtf/StdLibExtras.h: >+ > 2018-05-03 Yusuke Suzuki <utatane.tea@gmail.com> > > Use default std::optional if it is provided >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index beade0fe96be23841d9ab9d3207ef180ec0674c4..3a0fbdcd01ab02d8c89aa43313e71d87c1afb74a 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,13 @@ >+2018-05-03 Yusuke Suzuki <utatane.tea@gmail.com> >+ >+ [Win] Use C++17 in MSVC >+ https://bugs.webkit.org/show_bug.cgi?id=185232 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * Modules/geolocation/Coordinates.h: >+ (WebCore::Coordinates::isolatedCopy const): >+ > 2018-05-03 Filip Pizlo <fpizlo@apple.com> > > Strings should not be allocated in a gigacage >diff --git a/Source/JavaScriptCore/jit/BinarySwitch.cpp b/Source/JavaScriptCore/jit/BinarySwitch.cpp >index 0eab5651925329e17b3f5ca25db134ab4dd9a672..e8e657e444b5cc2998205943d16ad49862a36275 100644 >--- a/Source/JavaScriptCore/jit/BinarySwitch.cpp >+++ b/Source/JavaScriptCore/jit/BinarySwitch.cpp >@@ -137,6 +137,27 @@ bool BinarySwitch::advance(MacroAssembler& jit) > } > } > >+class RandomNumberGenerator { >+public: >+ using result_type = uint32_t; >+ >+ RandomNumberGenerator(WeakRandom& weakRandom) >+ : m_weakRandom(weakRandom) >+ { >+ } >+ >+ uint32_t operator()() >+ { >+ return m_weakRandom.getUint32(); >+ } >+ >+ static constexpr uint32_t min() { return std::numeric_limits<uint32_t>::min(); } >+ static constexpr uint32_t max() { return std::numeric_limits<uint32_t>::max(); } >+ >+private: >+ WeakRandom& m_weakRandom; >+}; >+ > void BinarySwitch::build(unsigned start, bool hardStart, unsigned end) > { > if (BinarySwitchInternal::verbose) >@@ -195,13 +216,9 @@ void BinarySwitch::build(unsigned start, bool hardStart, unsigned end) > for (unsigned i = 0; i < size; ++i) > localCaseIndices.append(start + i); > >- std::random_shuffle( >+ std::shuffle( > localCaseIndices.begin(), localCaseIndices.end(), >- [this] (unsigned n) { >- // We use modulo to get a random number in the range we want fully knowing that >- // this introduces a tiny amount of bias, but we're fine with such tiny bias. >- return m_weakRandom.getUint32() % n; >- }); >+ RandomNumberGenerator(m_weakRandom)); > > for (unsigned i = 0; i < size - 1; ++i) { > append(BranchCode(NotEqualToPush, localCaseIndices[i])); >diff --git a/Source/ThirdParty/gtest/include/gtest/internal/gtest-param-util-generated.h b/Source/ThirdParty/gtest/include/gtest/internal/gtest-param-util-generated.h >index ab4ab56625642d2558fd38b18ced06d0351ec1f4..62b5ae13e28e566b1e885127dbb07cd172a26f19 100644 >--- a/Source/ThirdParty/gtest/include/gtest/internal/gtest-param-util-generated.h >+++ b/Source/ThirdParty/gtest/include/gtest/internal/gtest-param-util-generated.h >@@ -38,7 +38,7 @@ > // and at most 10 arguments in Combine. Please contact > // googletestframework@googlegroups.com if you need more. > // Please note that the number of arguments to Combine is limited >-// by the maximum arity of the implementation of tr1::tuple which is >+// by the maximum arity of the implementation of tuple which is > // currently set at 10. > > #ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PARAM_UTIL_GENERATED_H_ >@@ -2834,9 +2834,9 @@ class ValueArray50 { > // > template <typename T1, typename T2> > class CartesianProductGenerator2 >- : public ParamGeneratorInterface< ::std::tr1::tuple<T1, T2> > { >+ : public ParamGeneratorInterface< ::std::tuple<T1, T2> > { > public: >- typedef ::std::tr1::tuple<T1, T2> ParamType; >+ typedef ::std::tuple<T1, T2> ParamType; > > CartesianProductGenerator2(const ParamGenerator<T1>& g1, > const ParamGenerator<T2>& g2) >@@ -2949,9 +2949,9 @@ class CartesianProductGenerator2 > > template <typename T1, typename T2, typename T3> > class CartesianProductGenerator3 >- : public ParamGeneratorInterface< ::std::tr1::tuple<T1, T2, T3> > { >+ : public ParamGeneratorInterface< ::std::tuple<T1, T2, T3> > { > public: >- typedef ::std::tr1::tuple<T1, T2, T3> ParamType; >+ typedef ::std::tuple<T1, T2, T3> ParamType; > > CartesianProductGenerator3(const ParamGenerator<T1>& g1, > const ParamGenerator<T2>& g2, const ParamGenerator<T3>& g3) >@@ -3081,9 +3081,9 @@ class CartesianProductGenerator3 > > template <typename T1, typename T2, typename T3, typename T4> > class CartesianProductGenerator4 >- : public ParamGeneratorInterface< ::std::tr1::tuple<T1, T2, T3, T4> > { >+ : public ParamGeneratorInterface< ::std::tuple<T1, T2, T3, T4> > { > public: >- typedef ::std::tr1::tuple<T1, T2, T3, T4> ParamType; >+ typedef ::std::tuple<T1, T2, T3, T4> ParamType; > > CartesianProductGenerator4(const ParamGenerator<T1>& g1, > const ParamGenerator<T2>& g2, const ParamGenerator<T3>& g3, >@@ -3232,9 +3232,9 @@ class CartesianProductGenerator4 > > template <typename T1, typename T2, typename T3, typename T4, typename T5> > class CartesianProductGenerator5 >- : public ParamGeneratorInterface< ::std::tr1::tuple<T1, T2, T3, T4, T5> > { >+ : public ParamGeneratorInterface< ::std::tuple<T1, T2, T3, T4, T5> > { > public: >- typedef ::std::tr1::tuple<T1, T2, T3, T4, T5> ParamType; >+ typedef ::std::tuple<T1, T2, T3, T4, T5> ParamType; > > CartesianProductGenerator5(const ParamGenerator<T1>& g1, > const ParamGenerator<T2>& g2, const ParamGenerator<T3>& g3, >@@ -3400,10 +3400,10 @@ class CartesianProductGenerator5 > template <typename T1, typename T2, typename T3, typename T4, typename T5, > typename T6> > class CartesianProductGenerator6 >- : public ParamGeneratorInterface< ::std::tr1::tuple<T1, T2, T3, T4, T5, >+ : public ParamGeneratorInterface< ::std::tuple<T1, T2, T3, T4, T5, > T6> > { > public: >- typedef ::std::tr1::tuple<T1, T2, T3, T4, T5, T6> ParamType; >+ typedef ::std::tuple<T1, T2, T3, T4, T5, T6> ParamType; > > CartesianProductGenerator6(const ParamGenerator<T1>& g1, > const ParamGenerator<T2>& g2, const ParamGenerator<T3>& g3, >@@ -3586,10 +3586,10 @@ class CartesianProductGenerator6 > template <typename T1, typename T2, typename T3, typename T4, typename T5, > typename T6, typename T7> > class CartesianProductGenerator7 >- : public ParamGeneratorInterface< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, >+ : public ParamGeneratorInterface< ::std::tuple<T1, T2, T3, T4, T5, T6, > T7> > { > public: >- typedef ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7> ParamType; >+ typedef ::std::tuple<T1, T2, T3, T4, T5, T6, T7> ParamType; > > CartesianProductGenerator7(const ParamGenerator<T1>& g1, > const ParamGenerator<T2>& g2, const ParamGenerator<T3>& g3, >@@ -3789,10 +3789,10 @@ class CartesianProductGenerator7 > template <typename T1, typename T2, typename T3, typename T4, typename T5, > typename T6, typename T7, typename T8> > class CartesianProductGenerator8 >- : public ParamGeneratorInterface< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, >+ : public ParamGeneratorInterface< ::std::tuple<T1, T2, T3, T4, T5, T6, > T7, T8> > { > public: >- typedef ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, T8> ParamType; >+ typedef ::std::tuple<T1, T2, T3, T4, T5, T6, T7, T8> ParamType; > > CartesianProductGenerator8(const ParamGenerator<T1>& g1, > const ParamGenerator<T2>& g2, const ParamGenerator<T3>& g3, >@@ -4011,10 +4011,10 @@ class CartesianProductGenerator8 > template <typename T1, typename T2, typename T3, typename T4, typename T5, > typename T6, typename T7, typename T8, typename T9> > class CartesianProductGenerator9 >- : public ParamGeneratorInterface< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, >+ : public ParamGeneratorInterface< ::std::tuple<T1, T2, T3, T4, T5, T6, > T7, T8, T9> > { > public: >- typedef ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, T8, T9> ParamType; >+ typedef ::std::tuple<T1, T2, T3, T4, T5, T6, T7, T8, T9> ParamType; > > CartesianProductGenerator9(const ParamGenerator<T1>& g1, > const ParamGenerator<T2>& g2, const ParamGenerator<T3>& g3, >@@ -4250,10 +4250,10 @@ class CartesianProductGenerator9 > template <typename T1, typename T2, typename T3, typename T4, typename T5, > typename T6, typename T7, typename T8, typename T9, typename T10> > class CartesianProductGenerator10 >- : public ParamGeneratorInterface< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, >+ : public ParamGeneratorInterface< ::std::tuple<T1, T2, T3, T4, T5, T6, > T7, T8, T9, T10> > { > public: >- typedef ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> ParamType; >+ typedef ::std::tuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> ParamType; > > CartesianProductGenerator10(const ParamGenerator<T1>& g1, > const ParamGenerator<T2>& g2, const ParamGenerator<T3>& g3, >@@ -4515,8 +4515,8 @@ class CartesianProductHolder2 { > CartesianProductHolder2(const Generator1& g1, const Generator2& g2) > : g1_(g1), g2_(g2) {} > template <typename T1, typename T2> >- operator ParamGenerator< ::std::tr1::tuple<T1, T2> >() const { >- return ParamGenerator< ::std::tr1::tuple<T1, T2> >( >+ operator ParamGenerator< ::std::tuple<T1, T2> >() const { >+ return ParamGenerator< ::std::tuple<T1, T2> >( > new CartesianProductGenerator2<T1, T2>( > static_cast<ParamGenerator<T1> >(g1_), > static_cast<ParamGenerator<T2> >(g2_))); >@@ -4537,8 +4537,8 @@ CartesianProductHolder3(const Generator1& g1, const Generator2& g2, > const Generator3& g3) > : g1_(g1), g2_(g2), g3_(g3) {} > template <typename T1, typename T2, typename T3> >- operator ParamGenerator< ::std::tr1::tuple<T1, T2, T3> >() const { >- return ParamGenerator< ::std::tr1::tuple<T1, T2, T3> >( >+ operator ParamGenerator< ::std::tuple<T1, T2, T3> >() const { >+ return ParamGenerator< ::std::tuple<T1, T2, T3> >( > new CartesianProductGenerator3<T1, T2, T3>( > static_cast<ParamGenerator<T1> >(g1_), > static_cast<ParamGenerator<T2> >(g2_), >@@ -4562,8 +4562,8 @@ CartesianProductHolder4(const Generator1& g1, const Generator2& g2, > const Generator3& g3, const Generator4& g4) > : g1_(g1), g2_(g2), g3_(g3), g4_(g4) {} > template <typename T1, typename T2, typename T3, typename T4> >- operator ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4> >() const { >- return ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4> >( >+ operator ParamGenerator< ::std::tuple<T1, T2, T3, T4> >() const { >+ return ParamGenerator< ::std::tuple<T1, T2, T3, T4> >( > new CartesianProductGenerator4<T1, T2, T3, T4>( > static_cast<ParamGenerator<T1> >(g1_), > static_cast<ParamGenerator<T2> >(g2_), >@@ -4589,8 +4589,8 @@ CartesianProductHolder5(const Generator1& g1, const Generator2& g2, > const Generator3& g3, const Generator4& g4, const Generator5& g5) > : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5) {} > template <typename T1, typename T2, typename T3, typename T4, typename T5> >- operator ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5> >() const { >- return ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5> >( >+ operator ParamGenerator< ::std::tuple<T1, T2, T3, T4, T5> >() const { >+ return ParamGenerator< ::std::tuple<T1, T2, T3, T4, T5> >( > new CartesianProductGenerator5<T1, T2, T3, T4, T5>( > static_cast<ParamGenerator<T1> >(g1_), > static_cast<ParamGenerator<T2> >(g2_), >@@ -4620,8 +4620,8 @@ CartesianProductHolder6(const Generator1& g1, const Generator2& g2, > : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5), g6_(g6) {} > template <typename T1, typename T2, typename T3, typename T4, typename T5, > typename T6> >- operator ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6> >() const { >- return ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6> >( >+ operator ParamGenerator< ::std::tuple<T1, T2, T3, T4, T5, T6> >() const { >+ return ParamGenerator< ::std::tuple<T1, T2, T3, T4, T5, T6> >( > new CartesianProductGenerator6<T1, T2, T3, T4, T5, T6>( > static_cast<ParamGenerator<T1> >(g1_), > static_cast<ParamGenerator<T2> >(g2_), >@@ -4653,9 +4653,9 @@ CartesianProductHolder7(const Generator1& g1, const Generator2& g2, > : g1_(g1), g2_(g2), g3_(g3), g4_(g4), g5_(g5), g6_(g6), g7_(g7) {} > template <typename T1, typename T2, typename T3, typename T4, typename T5, > typename T6, typename T7> >- operator ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, >+ operator ParamGenerator< ::std::tuple<T1, T2, T3, T4, T5, T6, > T7> >() const { >- return ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7> >( >+ return ParamGenerator< ::std::tuple<T1, T2, T3, T4, T5, T6, T7> >( > new CartesianProductGenerator7<T1, T2, T3, T4, T5, T6, T7>( > static_cast<ParamGenerator<T1> >(g1_), > static_cast<ParamGenerator<T2> >(g2_), >@@ -4691,9 +4691,9 @@ CartesianProductHolder8(const Generator1& g1, const Generator2& g2, > g8_(g8) {} > template <typename T1, typename T2, typename T3, typename T4, typename T5, > typename T6, typename T7, typename T8> >- operator ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, >+ operator ParamGenerator< ::std::tuple<T1, T2, T3, T4, T5, T6, T7, > T8> >() const { >- return ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, T8> >( >+ return ParamGenerator< ::std::tuple<T1, T2, T3, T4, T5, T6, T7, T8> >( > new CartesianProductGenerator8<T1, T2, T3, T4, T5, T6, T7, T8>( > static_cast<ParamGenerator<T1> >(g1_), > static_cast<ParamGenerator<T2> >(g2_), >@@ -4732,9 +4732,9 @@ CartesianProductHolder9(const Generator1& g1, const Generator2& g2, > g9_(g9) {} > template <typename T1, typename T2, typename T3, typename T4, typename T5, > typename T6, typename T7, typename T8, typename T9> >- operator ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, T8, >+ operator ParamGenerator< ::std::tuple<T1, T2, T3, T4, T5, T6, T7, T8, > T9> >() const { >- return ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, T8, >+ return ParamGenerator< ::std::tuple<T1, T2, T3, T4, T5, T6, T7, T8, > T9> >( > new CartesianProductGenerator9<T1, T2, T3, T4, T5, T6, T7, T8, T9>( > static_cast<ParamGenerator<T1> >(g1_), >@@ -4776,9 +4776,9 @@ CartesianProductHolder10(const Generator1& g1, const Generator2& g2, > g9_(g9), g10_(g10) {} > template <typename T1, typename T2, typename T3, typename T4, typename T5, > typename T6, typename T7, typename T8, typename T9, typename T10> >- operator ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, T8, >+ operator ParamGenerator< ::std::tuple<T1, T2, T3, T4, T5, T6, T7, T8, > T9, T10> >() const { >- return ParamGenerator< ::std::tr1::tuple<T1, T2, T3, T4, T5, T6, T7, T8, >+ return ParamGenerator< ::std::tuple<T1, T2, T3, T4, T5, T6, T7, T8, > T9, T10> >( > new CartesianProductGenerator10<T1, T2, T3, T4, T5, T6, T7, T8, T9, > T10>( >diff --git a/Source/ThirdParty/gtest/include/gtest/internal/gtest-tuple.h b/Source/ThirdParty/gtest/include/gtest/internal/gtest-tuple.h >index 16178fc07af129af154871cc2d9b3a98d1d94ab4..c27f3a421d9c4971ede49cc332912d4a8360c5a5 100644 >--- a/Source/ThirdParty/gtest/include/gtest/internal/gtest-tuple.h >+++ b/Source/ThirdParty/gtest/include/gtest/internal/gtest-tuple.h >@@ -912,7 +912,7 @@ struct SameSizeTuplePrefixComparator<k, k> { > template <class Tuple1, class Tuple2> > static bool Eq(const Tuple1& t1, const Tuple2& t2) { > return SameSizeTuplePrefixComparator<k - 1, k - 1>::Eq(t1, t2) && >- ::std::tr1::get<k - 1>(t1) == ::std::tr1::get<k - 1>(t2); >+ ::std::get<k - 1>(t1) == ::std::get<k - 1>(t2); > } > }; > >diff --git a/Source/WTF/wtf/Optional.h b/Source/WTF/wtf/Optional.h >index 67ee27752ff908202b37ba85a71d1580f71b6101..22702ed168763fcbccd27e8b55eca5b79b03f87a 100644 >--- a/Source/WTF/wtf/Optional.h >+++ b/Source/WTF/wtf/Optional.h >@@ -47,7 +47,7 @@ > # include <wtf/Compiler.h> > # include <wtf/StdLibExtras.h> > >-#if !COMPILER(MSVC) && !PLATFORM(COCOA) && __has_include(<optional>) >+#if !PLATFORM(COCOA) && __has_include(<optional>) > # include <optional> > #else > >diff --git a/Source/WTF/wtf/StdLibExtras.h b/Source/WTF/wtf/StdLibExtras.h >index 49f2e2988d926bc56595ebc9a0ce927184087abe..676f9c6c0ee358e46291fc9ddfe83eb7e66933b8 100644 >--- a/Source/WTF/wtf/StdLibExtras.h >+++ b/Source/WTF/wtf/StdLibExtras.h >@@ -543,7 +543,7 @@ template<class B0, class B1, class B2, class... Bn> struct wtf_conjunction_impl< > template<class... _Args> struct conjunction : wtf_conjunction_impl<_Args...> { }; > #endif > >-#if __cplusplus < 201703L >+#if __cplusplus < 201703L && (!defined(_MSC_FULL_VER) || _MSC_FULL_VER < 190023918) > > // These are inline variable for C++17 and later. > #define __IN_PLACE_INLINE_VARIABLE static const >diff --git a/Source/WebCore/Modules/geolocation/Coordinates.h b/Source/WebCore/Modules/geolocation/Coordinates.h >index 0b73cf681b4c713328e786b89569e27283d63956..e1975bea062abb2e18ac3ba9ab15e89572fd74ce 100644 >--- a/Source/WebCore/Modules/geolocation/Coordinates.h >+++ b/Source/WebCore/Modules/geolocation/Coordinates.h >@@ -41,7 +41,7 @@ class Coordinates : public RefCounted<Coordinates> { > > Ref<Coordinates> isolatedCopy() const > { >- return Coordinates::create( GeolocationPosition { m_position }); >+ return Coordinates::create(GeolocationPosition(m_position)); > } > > double latitude() const { return m_position.latitude; } >diff --git a/Source/cmake/OptionsMSVC.cmake b/Source/cmake/OptionsMSVC.cmake >index 7f378ff8aa9f76cfbc6b6111f9f983d62f636605..23b167c9f7a36d2b9eeb8f8d3e31e355742fd0b3 100644 >--- a/Source/cmake/OptionsMSVC.cmake >+++ b/Source/cmake/OptionsMSVC.cmake >@@ -29,6 +29,10 @@ endif () > # Turn off certain link features > add_compile_options(/Gy- /openmp- /GF-) > >+# Enable C++17 >+# https://msdn.microsoft.com/en-us/library/mt490614.aspx >+add_compile_options(/std:c++latest) >+ > # Specify the source code encoding > add_compile_options(/utf-8 /validate-charset) > >diff --git a/Tools/ChangeLog b/Tools/ChangeLog >index 1aec63c77debe730d7e92bc04b3bb44c03473006..fd0615961827dbbfd11c32cd6c27e6206bb2918e 100644 >--- a/Tools/ChangeLog >+++ b/Tools/ChangeLog >@@ -1,3 +1,19 @@ >+2018-05-03 Yusuke Suzuki <utatane.tea@gmail.com> >+ >+ [Win] Use C++17 in MSVC >+ https://bugs.webkit.org/show_bug.cgi?id=185232 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * DumpRenderTree/win/AccessibilityControllerWin.cpp: >+ (logEventProc): >+ (stringEvent): >+ (AccessibilityController::winNotificationReceived): >+ * DumpRenderTree/win/TextInputControllerWin.cpp: >+ (TextInputController::markedRange): >+ (TextInputController::firstRectForCharacterRange): >+ (TextInputController::selectedRange): >+ > 2018-05-03 Ross Kirsling <ross.kirsling@sony.com> > > [WinCairo] Test archive must use Python zipfile, just like build product. >diff --git a/Tools/DumpRenderTree/win/AccessibilityControllerWin.cpp b/Tools/DumpRenderTree/win/AccessibilityControllerWin.cpp >index cf5d246ff1f91507c86a02f74a0b98b6a26e3e9b..b98a028847dcc07854e689cd9b0228de9284b8ea 100644 >--- a/Tools/DumpRenderTree/win/AccessibilityControllerWin.cpp >+++ b/Tools/DumpRenderTree/win/AccessibilityControllerWin.cpp >@@ -42,8 +42,6 @@ > #include <wtf/Assertions.h> > #include <wtf/text/AtomicString.h> > >-using namespace std; >- > AccessibilityController::AccessibilityController() > : m_focusEventHook(0) > , m_scrollingStartEventHook(0) >@@ -189,7 +187,7 @@ static void CALLBACK logEventProc(HWINEVENTHOOK, DWORD event, HWND hwnd, LONG id > _bstr_t nameBSTR; > hr = parentObject->get_accName(vChild, &nameBSTR.GetBSTR()); > ASSERT(SUCCEEDED(hr)); >- wstring name(nameBSTR, nameBSTR.length()); >+ std::wstring name(nameBSTR, nameBSTR.length()); > > switch (event) { > case EVENT_OBJECT_FOCUS: >@@ -204,7 +202,7 @@ static void CALLBACK logEventProc(HWINEVENTHOOK, DWORD event, HWND hwnd, LONG id > _bstr_t valueBSTR; > hr = parentObject->get_accValue(vChild, &valueBSTR.GetBSTR()); > ASSERT(SUCCEEDED(hr)); >- wstring value(valueBSTR, valueBSTR.length()); >+ std::wstring value(valueBSTR, valueBSTR.length()); > > fprintf(testResult, "Received value change event for object '%S', value '%S'.\n", name.c_str(), value.c_str()); > break; >@@ -304,7 +302,7 @@ void AccessibilityController::setLogAccessibilityEvents(bool logAccessibilityEve > ASSERT(m_allEventsHook); > } > >-static string stringEvent(DWORD event) >+static std::string stringEvent(DWORD event) > { > switch(event) { > case EVENT_OBJECT_VALUECHANGE: >@@ -341,7 +339,7 @@ void AccessibilityController::removeNotificationListener() > { > } > >-void AccessibilityController::winNotificationReceived(PlatformUIElement element, const string& eventName) >+void AccessibilityController::winNotificationReceived(PlatformUIElement element, const std::string& eventName) > { > for (auto& slot : m_notificationListeners) { > COMPtr<IServiceProvider> thisServiceProvider(Query, slot.key); >diff --git a/Tools/DumpRenderTree/win/TextInputControllerWin.cpp b/Tools/DumpRenderTree/win/TextInputControllerWin.cpp >index 199f684d366649b303ec985b4e90459910538450..67e5c69d1f7af66803b5ede64ac129120f18bb8e 100644 >--- a/Tools/DumpRenderTree/win/TextInputControllerWin.cpp >+++ b/Tools/DumpRenderTree/win/TextInputControllerWin.cpp >@@ -36,8 +36,6 @@ > #include <comutil.h> > #include <string> > >-using namespace std; >- > void TextInputController::setMarkedText(JSStringRef text, unsigned int from, unsigned int length) > { > COMPtr<IWebView> webView; >@@ -82,10 +80,10 @@ void TextInputController::unmarkText() > viewPrivate->confirmCompositionForTesting(empty); > } > >-vector<int> TextInputController::markedRange() >+std::vector<int> TextInputController::markedRange() > { > // empty vector >- vector<int> result; >+ std::vector<int> result; > > COMPtr<IWebView> webView; > if (FAILED(frame->webView(&webView))) >@@ -121,10 +119,10 @@ void TextInputController::insertText(JSStringRef text) > viewPrivate->confirmCompositionForTesting(bstr); > } > >-vector<int> TextInputController::firstRectForCharacterRange(unsigned int start, unsigned int length) >+std::vector<int> TextInputController::firstRectForCharacterRange(unsigned int start, unsigned int length) > { > // empty vector >- vector<int> result; >+ std::vector<int> result; > > COMPtr<IWebView> webView; > if (FAILED(frame->webView(&webView))) >@@ -146,10 +144,10 @@ vector<int> TextInputController::firstRectForCharacterRange(unsigned int start, > return result; > } > >-vector<int> TextInputController::selectedRange() >+std::vector<int> TextInputController::selectedRange() > { > // empty vector >- vector<int> result; >+ std::vector<int> result; > > COMPtr<IWebView> webView; > if (FAILED(frame->webView(&webView))) >diff --git a/ChangeLog b/ChangeLog >index 85d1fcaa499532312d706865e020a60cf2c79ce4..e1bfca5fadfdcbe57174d2f7b8b6d001e6c14a93 100644 >--- a/ChangeLog >+++ b/ChangeLog >@@ -1,3 +1,12 @@ >+2018-05-03 Yusuke Suzuki <utatane.tea@gmail.com> >+ >+ [Win] Use C++17 in MSVC >+ https://bugs.webkit.org/show_bug.cgi?id=185232 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * Source/cmake/OptionsMSVC.cmake: >+ > 2018-05-02 Valerie R Young <valerie@bocoup.com> > > test262/Runner.pm: save summary to file
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 185232
:
339374
|
339375
|
339378
|
339386
|
339395
|
339400
|
339499
|
339675
|
339677
|
339678
|
339679
|
339680
|
339682
|
339685
|
340336