Diff
Modified: branches/safari-613.1.5-branch/Source/_javascript_Core/ChangeLog (284203 => 284204)
--- branches/safari-613.1.5-branch/Source/_javascript_Core/ChangeLog 2021-10-14 22:32:37 UTC (rev 284203)
+++ branches/safari-613.1.5-branch/Source/_javascript_Core/ChangeLog 2021-10-14 22:42:36 UTC (rev 284204)
@@ -1,5 +1,49 @@
2021-10-14 Alan Coon <[email protected]>
+ Cherry-pick r284187. rdar://problem/84277677
+
+ Unreviewed build fix with recent SDKs.
+
+ Use std::invoke_result<> instead of std::result_of<>, as it was deprecated in C++17.
+
+ Source/_javascript_Core:
+
+ * runtime/JSCJSValue.h:
+ * runtime/JSCJSValueInlines.h:
+ (JSC::JSValue::getPropertySlot const):
+ * runtime/JSObject.h:
+ * runtime/JSObjectInlines.h:
+ (JSC::JSObject::getPropertySlot const):
+ * runtime/ParseInt.h:
+ (JSC::toStringView):
+
+ Source/WTF:
+
+ * wtf/IndexedContainerIterator.h:
+ (WTF::IndexedContainerIterator::operator* const):
+ (WTF::IndexedContainerIterator::operator*): Deleted.
+ * wtf/Vector.h:
+ * wtf/WeakHashSet.h:
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@284187 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2021-10-14 Chris Dumez <[email protected]>
+
+ Unreviewed build fix with recent SDKs.
+
+ Use std::invoke_result<> instead of std::result_of<>, as it was deprecated in C++17.
+
+ * runtime/JSCJSValue.h:
+ * runtime/JSCJSValueInlines.h:
+ (JSC::JSValue::getPropertySlot const):
+ * runtime/JSObject.h:
+ * runtime/JSObjectInlines.h:
+ (JSC::JSObject::getPropertySlot const):
+ * runtime/ParseInt.h:
+ (JSC::toStringView):
+
+2021-10-14 Alan Coon <[email protected]>
+
Cherry-pick r284145. rdar://problem/84266646
Unreviewed, speculative build fix with new clang
Modified: branches/safari-613.1.5-branch/Source/_javascript_Core/heap/IsoSubspace.h (284203 => 284204)
--- branches/safari-613.1.5-branch/Source/_javascript_Core/heap/IsoSubspace.h 2021-10-14 22:32:37 UTC (rev 284203)
+++ branches/safari-613.1.5-branch/Source/_javascript_Core/heap/IsoSubspace.h 2021-10-14 22:42:36 UTC (rev 284204)
@@ -82,7 +82,7 @@
template<typename T>
struct isAllocatedFromIsoSubspace {
- static constexpr bool value = std::is_same<std::result_of_t<decltype(T::template subspaceFor<T, SubspaceAccess::OnMainThread>)&(VM&)>, IsoSubspace*>::value;
+ static constexpr bool value = std::is_same<std::invoke_result_t<decltype(T::template subspaceFor<T, SubspaceAccess::OnMainThread>)&, VM&>, IsoSubspace*>::value;
};
} // namespace JSC
Modified: branches/safari-613.1.5-branch/Source/_javascript_Core/runtime/JSCJSValue.h (284203 => 284204)
--- branches/safari-613.1.5-branch/Source/_javascript_Core/runtime/JSCJSValue.h 2021-10-14 22:32:37 UTC (rev 284203)
+++ branches/safari-613.1.5-branch/Source/_javascript_Core/runtime/JSCJSValue.h 2021-10-14 22:42:36 UTC (rev 284204)
@@ -321,8 +321,8 @@
T getAs(JSGlobalObject*, PropertyNameType) const;
bool getPropertySlot(JSGlobalObject*, PropertyName, PropertySlot&) const;
- template<typename CallbackWhenNoException> typename std::result_of<CallbackWhenNoException(bool, PropertySlot&)>::type getPropertySlot(JSGlobalObject*, PropertyName, CallbackWhenNoException) const;
- template<typename CallbackWhenNoException> typename std::result_of<CallbackWhenNoException(bool, PropertySlot&)>::type getPropertySlot(JSGlobalObject*, PropertyName, PropertySlot&, CallbackWhenNoException) const;
+ template<typename CallbackWhenNoException> typename std::invoke_result<CallbackWhenNoException, bool, PropertySlot&>::type getPropertySlot(JSGlobalObject*, PropertyName, CallbackWhenNoException) const;
+ template<typename CallbackWhenNoException> typename std::invoke_result<CallbackWhenNoException, bool, PropertySlot&>::type getPropertySlot(JSGlobalObject*, PropertyName, PropertySlot&, CallbackWhenNoException) const;
bool getOwnPropertySlot(JSGlobalObject*, PropertyName, PropertySlot&) const;
Modified: branches/safari-613.1.5-branch/Source/_javascript_Core/runtime/JSCJSValueInlines.h (284203 => 284204)
--- branches/safari-613.1.5-branch/Source/_javascript_Core/runtime/JSCJSValueInlines.h 2021-10-14 22:32:37 UTC (rev 284203)
+++ branches/safari-613.1.5-branch/Source/_javascript_Core/runtime/JSCJSValueInlines.h 2021-10-14 22:42:36 UTC (rev 284204)
@@ -951,7 +951,7 @@
}
template<typename CallbackWhenNoException>
-ALWAYS_INLINE typename std::result_of<CallbackWhenNoException(bool, PropertySlot&)>::type JSValue::getPropertySlot(JSGlobalObject* globalObject, PropertyName propertyName, CallbackWhenNoException callback) const
+ALWAYS_INLINE typename std::invoke_result<CallbackWhenNoException, bool, PropertySlot&>::type JSValue::getPropertySlot(JSGlobalObject* globalObject, PropertyName propertyName, CallbackWhenNoException callback) const
{
PropertySlot slot(asValue(), PropertySlot::InternalMethodType::Get);
return getPropertySlot(globalObject, propertyName, slot, callback);
@@ -958,7 +958,7 @@
}
template<typename CallbackWhenNoException>
-ALWAYS_INLINE typename std::result_of<CallbackWhenNoException(bool, PropertySlot&)>::type JSValue::getPropertySlot(JSGlobalObject* globalObject, PropertyName propertyName, PropertySlot& slot, CallbackWhenNoException callback) const
+ALWAYS_INLINE typename std::invoke_result<CallbackWhenNoException, bool, PropertySlot&>::type JSValue::getPropertySlot(JSGlobalObject* globalObject, PropertyName propertyName, PropertySlot& slot, CallbackWhenNoException callback) const
{
auto scope = DECLARE_THROW_SCOPE(getVM(globalObject));
bool found = getPropertySlot(globalObject, propertyName, slot);
Modified: branches/safari-613.1.5-branch/Source/_javascript_Core/runtime/JSObject.h (284203 => 284204)
--- branches/safari-613.1.5-branch/Source/_javascript_Core/runtime/JSObject.h 2021-10-14 22:32:37 UTC (rev 284203)
+++ branches/safari-613.1.5-branch/Source/_javascript_Core/runtime/JSObject.h 2021-10-14 22:42:36 UTC (rev 284204)
@@ -159,8 +159,8 @@
bool getPropertySlot(JSGlobalObject*, PropertyName, PropertySlot&);
bool getPropertySlot(JSGlobalObject*, unsigned propertyName, PropertySlot&);
bool getPropertySlot(JSGlobalObject*, uint64_t propertyName, PropertySlot&);
- template<typename CallbackWhenNoException> typename std::result_of<CallbackWhenNoException(bool, PropertySlot&)>::type getPropertySlot(JSGlobalObject*, PropertyName, CallbackWhenNoException) const;
- template<typename CallbackWhenNoException> typename std::result_of<CallbackWhenNoException(bool, PropertySlot&)>::type getPropertySlot(JSGlobalObject*, PropertyName, PropertySlot&, CallbackWhenNoException) const;
+ template<typename CallbackWhenNoException> typename std::invoke_result<CallbackWhenNoException, bool, PropertySlot&>::type getPropertySlot(JSGlobalObject*, PropertyName, CallbackWhenNoException) const;
+ template<typename CallbackWhenNoException> typename std::invoke_result<CallbackWhenNoException, bool, PropertySlot&>::type getPropertySlot(JSGlobalObject*, PropertyName, PropertySlot&, CallbackWhenNoException) const;
JSValue getIfPropertyExists(JSGlobalObject*, PropertyName);
Modified: branches/safari-613.1.5-branch/Source/_javascript_Core/runtime/JSObjectInlines.h (284203 => 284204)
--- branches/safari-613.1.5-branch/Source/_javascript_Core/runtime/JSObjectInlines.h 2021-10-14 22:32:37 UTC (rev 284203)
+++ branches/safari-613.1.5-branch/Source/_javascript_Core/runtime/JSObjectInlines.h 2021-10-14 22:42:36 UTC (rev 284204)
@@ -90,7 +90,7 @@
}
template<typename CallbackWhenNoException>
-ALWAYS_INLINE typename std::result_of<CallbackWhenNoException(bool, PropertySlot&)>::type JSObject::getPropertySlot(JSGlobalObject* globalObject, PropertyName propertyName, CallbackWhenNoException callback) const
+ALWAYS_INLINE typename std::invoke_result<CallbackWhenNoException, bool, PropertySlot&>::type JSObject::getPropertySlot(JSGlobalObject* globalObject, PropertyName propertyName, CallbackWhenNoException callback) const
{
PropertySlot slot(this, PropertySlot::InternalMethodType::Get);
return getPropertySlot(globalObject, propertyName, slot, callback);
@@ -97,7 +97,7 @@
}
template<typename CallbackWhenNoException>
-ALWAYS_INLINE typename std::result_of<CallbackWhenNoException(bool, PropertySlot&)>::type JSObject::getPropertySlot(JSGlobalObject* globalObject, PropertyName propertyName, PropertySlot& slot, CallbackWhenNoException callback) const
+ALWAYS_INLINE typename std::invoke_result<CallbackWhenNoException, bool, PropertySlot&>::type JSObject::getPropertySlot(JSGlobalObject* globalObject, PropertyName propertyName, PropertySlot& slot, CallbackWhenNoException callback) const
{
VM& vm = getVM(globalObject);
auto scope = DECLARE_THROW_SCOPE(vm);
Modified: branches/safari-613.1.5-branch/Source/_javascript_Core/runtime/ParseInt.h (284203 => 284204)
--- branches/safari-613.1.5-branch/Source/_javascript_Core/runtime/ParseInt.h 2021-10-14 22:32:37 UTC (rev 284203)
+++ branches/safari-613.1.5-branch/Source/_javascript_Core/runtime/ParseInt.h 2021-10-14 22:42:36 UTC (rev 284204)
@@ -198,7 +198,7 @@
}
template<typename CallbackWhenNoException>
-static ALWAYS_INLINE typename std::result_of<CallbackWhenNoException(StringView)>::type toStringView(JSGlobalObject* globalObject, JSValue value, CallbackWhenNoException callback)
+static ALWAYS_INLINE typename std::invoke_result<CallbackWhenNoException, StringView>::type toStringView(JSGlobalObject* globalObject, JSValue value, CallbackWhenNoException callback)
{
VM& vm = getVM(globalObject);
auto scope = DECLARE_THROW_SCOPE(vm);
Modified: branches/safari-613.1.5-branch/Source/WTF/ChangeLog (284203 => 284204)
--- branches/safari-613.1.5-branch/Source/WTF/ChangeLog 2021-10-14 22:32:37 UTC (rev 284203)
+++ branches/safari-613.1.5-branch/Source/WTF/ChangeLog 2021-10-14 22:42:36 UTC (rev 284204)
@@ -1,3 +1,44 @@
+2021-10-14 Alan Coon <[email protected]>
+
+ Cherry-pick r284187. rdar://problem/84277677
+
+ Unreviewed build fix with recent SDKs.
+
+ Use std::invoke_result<> instead of std::result_of<>, as it was deprecated in C++17.
+
+ Source/_javascript_Core:
+
+ * runtime/JSCJSValue.h:
+ * runtime/JSCJSValueInlines.h:
+ (JSC::JSValue::getPropertySlot const):
+ * runtime/JSObject.h:
+ * runtime/JSObjectInlines.h:
+ (JSC::JSObject::getPropertySlot const):
+ * runtime/ParseInt.h:
+ (JSC::toStringView):
+
+ Source/WTF:
+
+ * wtf/IndexedContainerIterator.h:
+ (WTF::IndexedContainerIterator::operator* const):
+ (WTF::IndexedContainerIterator::operator*): Deleted.
+ * wtf/Vector.h:
+ * wtf/WeakHashSet.h:
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@284187 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2021-10-14 Chris Dumez <[email protected]>
+
+ Unreviewed build fix with recent SDKs.
+
+ Use std::invoke_result<> instead of std::result_of<>, as it was deprecated in C++17.
+
+ * wtf/IndexedContainerIterator.h:
+ (WTF::IndexedContainerIterator::operator* const):
+ (WTF::IndexedContainerIterator::operator*): Deleted.
+ * wtf/Vector.h:
+ * wtf/WeakHashSet.h:
+
2021-10-14 Russell Epstein <[email protected]>
Cherry-pick r283940. rdar://problem/84158485
Modified: branches/safari-613.1.5-branch/Source/WTF/wtf/IndexedContainerIterator.h (284203 => 284204)
--- branches/safari-613.1.5-branch/Source/WTF/wtf/IndexedContainerIterator.h 2021-10-14 22:32:37 UTC (rev 284203)
+++ branches/safari-613.1.5-branch/Source/WTF/wtf/IndexedContainerIterator.h 2021-10-14 22:42:36 UTC (rev 284204)
@@ -45,7 +45,7 @@
{
}
- auto operator*() -> typename std::result_of<decltype(&Container::at)(const Container, unsigned)>::type
+ auto operator*() -> typename std::invoke_result<decltype(&Container::at), const Container, unsigned>::type
{
return m_container->at(m_index);
}
Modified: branches/safari-613.1.5-branch/Source/WTF/wtf/Vector.h (284203 => 284204)
--- branches/safari-613.1.5-branch/Source/WTF/wtf/Vector.h 2021-10-14 22:32:37 UTC (rev 284203)
+++ branches/safari-613.1.5-branch/Source/WTF/wtf/Vector.h 2021-10-14 22:42:36 UTC (rev 284204)
@@ -838,7 +838,7 @@
void checkConsistency();
- template<typename MapFunction, typename R = typename std::result_of<MapFunction(const T&)>::type> Vector<R> map(MapFunction) const;
+ template<typename MapFunction, typename R = typename std::invoke_result<MapFunction, const T&>::type> Vector<R> map(MapFunction) const;
bool isHashTableDeletedValue() const { return m_size == std::numeric_limits<decltype(m_size)>::max(); }
@@ -1675,7 +1675,7 @@
template<typename MapFunction, typename SourceType, typename Enable = void>
struct Mapper {
using SourceItemType = typename CollectionInspector<SourceType>::SourceItemType;
- using DestinationItemType = typename std::result_of<MapFunction(SourceItemType&)>::type;
+ using DestinationItemType = typename std::invoke_result<MapFunction, SourceItemType&>::type;
static Vector<DestinationItemType> map(SourceType source, const MapFunction& mapFunction)
{
@@ -1691,7 +1691,7 @@
template<typename MapFunction, typename SourceType>
struct Mapper<MapFunction, SourceType, typename std::enable_if<std::is_rvalue_reference<SourceType&&>::value>::type> {
using SourceItemType = typename CollectionInspector<SourceType>::SourceItemType;
- using DestinationItemType = typename std::result_of<MapFunction(SourceItemType&&)>::type;
+ using DestinationItemType = typename std::invoke_result<MapFunction, SourceItemType&&>::type;
static Vector<DestinationItemType> map(SourceType&& source, const MapFunction& mapFunction)
{
@@ -1734,7 +1734,7 @@
template<typename MapFunction, typename SourceType, typename Enable = void>
struct CompactMapper {
using SourceItemType = typename CollectionInspector<SourceType>::SourceItemType;
- using ResultItemType = typename std::result_of<MapFunction(SourceItemType&)>::type;
+ using ResultItemType = typename std::invoke_result<MapFunction, SourceItemType&>::type;
using DestinationItemType = typename CompactMapTraits<ResultItemType>::ItemType;
static Vector<DestinationItemType> compactMap(SourceType source, const MapFunction& mapFunction)
@@ -1753,7 +1753,7 @@
template<typename MapFunction, typename SourceType>
struct CompactMapper<MapFunction, SourceType, typename std::enable_if<std::is_rvalue_reference<SourceType&&>::value>::type> {
using SourceItemType = typename CollectionInspector<SourceType>::SourceItemType;
- using ResultItemType = typename std::result_of<MapFunction(SourceItemType&&)>::type;
+ using ResultItemType = typename std::invoke_result<MapFunction, SourceItemType&&>::type;
using DestinationItemType = typename CompactMapTraits<ResultItemType>::ItemType;
static Vector<DestinationItemType> compactMap(SourceType source, const MapFunction& mapFunction)
Modified: branches/safari-613.1.5-branch/Source/WTF/wtf/WeakHashSet.h (284203 => 284204)
--- branches/safari-613.1.5-branch/Source/WTF/wtf/WeakHashSet.h 2021-10-14 22:32:37 UTC (rev 284203)
+++ branches/safari-613.1.5-branch/Source/WTF/wtf/WeakHashSet.h 2021-10-14 22:42:36 UTC (rev 284204)
@@ -154,7 +154,7 @@
template<typename MapFunction, typename T>
struct Mapper<MapFunction, const WeakHashSet<T> &, void> {
using SourceItemType = T&;
- using DestinationItemType = typename std::result_of<MapFunction(SourceItemType&)>::type;
+ using DestinationItemType = typename std::invoke_result<MapFunction, SourceItemType&>::type;
static Vector<DestinationItemType> map(const WeakHashSet<T>& source, const MapFunction& mapFunction)
{