react-native-windows 0.0.0-canary.581 → 0.0.0-canary.583
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Directory.Build.props +2 -2
- package/Folly/Folly.vcxproj +1 -1
- package/Folly/Folly.vcxproj.filters +0 -3
- package/Folly/TEMP_UntilFollyUpdate/dynamic-inl.h +59 -43
- package/Folly/TEMP_UntilFollyUpdate/lang/SafeAssert.h +192 -0
- package/Folly/TEMP_UntilFollyUpdate/lang/ToAscii.cpp +7 -5
- package/Folly/cgmanifest.json +1 -1
- package/{rntypes/Libraries → Libraries}/ActionSheetIOS/ActionSheetIOS.d.ts +0 -0
- package/{rntypes/Libraries → Libraries}/Alert/Alert.d.ts +0 -0
- package/{rntypes/Libraries → Libraries}/Animated/Animated.d.ts +0 -0
- package/{rntypes/Libraries → Libraries}/Animated/Easing.d.ts +0 -0
- package/{rntypes/Libraries → Libraries}/AppState/AppState.d.ts +0 -0
- package/{rntypes/Libraries → Libraries}/BatchedBridge/NativeModules.d.ts +0 -0
- package/{rntypes/Libraries → Libraries}/Components/AccessibilityInfo/AccessibilityInfo.d.ts +0 -0
- package/{rntypes/Libraries → Libraries}/Components/ActivityIndicator/ActivityIndicator.d.ts +0 -0
- package/{rntypes/Libraries → Libraries}/Components/Button.d.ts +0 -0
- package/{rntypes/Libraries → Libraries}/Components/Clipboard/Clipboard.d.ts +0 -0
- package/{rntypes/Libraries → Libraries}/Components/DatePicker/DatePickerIOS.d.ts +0 -0
- package/{rntypes/Libraries → Libraries}/Components/DrawerAndroid/DrawerLayoutAndroid.d.ts +0 -0
- package/{rntypes/Libraries → Libraries}/Components/Keyboard/Keyboard.d.ts +0 -0
- package/{rntypes/Libraries → Libraries}/Components/Keyboard/KeyboardAvoidingView.d.ts +0 -0
- package/{rntypes/Libraries → Libraries}/Components/Pressable/Pressable.d.ts +0 -0
- package/{rntypes/Libraries → Libraries}/Components/ProgressBarAndroid/ProgressBarAndroid.d.ts +0 -0
- package/{rntypes/Libraries → Libraries}/Components/ProgressViewIOS/ProgressViewIOS.d.ts +0 -0
- package/{rntypes/Libraries → Libraries}/Components/RefreshControl/RefreshControl.d.ts +0 -0
- package/{rntypes/Libraries → Libraries}/Components/SafeAreaView/SafeAreaView.d.ts +0 -0
- package/{rntypes/Libraries → Libraries}/Components/ScrollView/ScrollView.d.ts +0 -0
- package/{rntypes/Libraries → Libraries}/Components/Slider/Slider.d.ts +0 -0
- package/{rntypes/Libraries → Libraries}/Components/StatusBar/StatusBar.d.ts +0 -0
- package/{rntypes/Libraries → Libraries}/Components/Switch/Switch.d.ts +0 -0
- package/{rntypes/Libraries → Libraries}/Components/TextInput/InputAccessoryView.d.ts +0 -0
- package/{rntypes/Libraries → Libraries}/Components/TextInput/TextInput.d.ts +0 -0
- package/{rntypes/Libraries → Libraries}/Components/ToastAndroid/ToastAndroid.d.ts +0 -0
- package/{rntypes/Libraries → Libraries}/Components/Touchable/Touchable.d.ts +0 -0
- package/{rntypes/Libraries → Libraries}/Components/Touchable/TouchableHighlight.d.ts +0 -0
- package/{rntypes/Libraries → Libraries}/Components/Touchable/TouchableNativeFeedback.d.ts +0 -0
- package/{rntypes/Libraries → Libraries}/Components/Touchable/TouchableOpacity.d.ts +0 -0
- package/{rntypes/Libraries → Libraries}/Components/Touchable/TouchableWithoutFeedback.d.ts +0 -0
- package/{rntypes/Libraries → Libraries}/Components/View/View.d.ts +0 -0
- package/{rntypes/Libraries → Libraries}/Components/View/ViewAccessibility.d.ts +0 -0
- package/{rntypes/Libraries → Libraries}/Components/View/ViewPropTypes.d.ts +0 -0
- package/{rntypes/Libraries → Libraries}/EventEmitter/NativeEventEmitter.d.ts +0 -0
- package/{rntypes/Libraries → Libraries}/EventEmitter/RCTDeviceEventEmitter.d.ts +0 -0
- package/{rntypes/Libraries → Libraries}/EventEmitter/RCTNativeAppEventEmitter.d.ts +0 -0
- package/{rntypes/Libraries → Libraries}/Image/Image.d.ts +0 -0
- package/{rntypes/Libraries → Libraries}/Image/ImagePickerIOS.d.ts +0 -0
- package/{rntypes/Libraries → Libraries}/Image/ImageResizeMode.d.ts +0 -0
- package/{rntypes/Libraries → Libraries}/Image/ImageSource.d.ts +0 -0
- package/{rntypes/Libraries → Libraries}/Interaction/InteractionManager.d.ts +0 -0
- package/{rntypes/Libraries → Libraries}/Interaction/PanResponder.d.ts +0 -0
- package/{rntypes/Libraries → Libraries}/LayoutAnimation/LayoutAnimation.d.ts +0 -0
- package/{rntypes/Libraries → Libraries}/Linking/Linking.d.ts +0 -0
- package/{rntypes/Libraries → Libraries}/Lists/FlatList.d.ts +0 -0
- package/{rntypes/Libraries → Libraries}/Lists/SectionList.d.ts +0 -0
- package/{rntypes/Libraries → Libraries}/Lists/VirtualizedList.d.ts +0 -0
- package/{rntypes/Libraries → Libraries}/LogBox/LogBox.d.ts +0 -0
- package/{rntypes/Libraries → Libraries}/Modal/Modal.d.ts +0 -0
- package/{rntypes/Libraries → Libraries}/Performance/Systrace.d.ts +0 -0
- package/{rntypes/Libraries → Libraries}/PermissionsAndroid/PermissionsAndroid.d.ts +0 -0
- package/{rntypes/Libraries → Libraries}/PushNotificationIOS/PushNotificationIOS.d.ts +0 -0
- package/{rntypes/Libraries → Libraries}/ReactNative/AppRegistry.d.ts +0 -0
- package/{rntypes/Libraries → Libraries}/ReactNative/I18nManager.d.ts +0 -0
- package/{rntypes/Libraries → Libraries}/ReactNative/RendererProxy.d.ts +0 -0
- package/{rntypes/Libraries → Libraries}/ReactNative/UIManager.d.ts +0 -0
- package/{rntypes/Libraries → Libraries}/ReactNative/requireNativeComponent.d.ts +0 -0
- package/{rntypes/Libraries → Libraries}/Renderer/implementations/ReactNativeRenderer.d.ts +0 -0
- package/{rntypes/Libraries → Libraries}/Renderer/shims/ReactNativeTypes.d.ts +0 -0
- package/{rntypes/Libraries → Libraries}/Settings/Settings.d.ts +0 -0
- package/{rntypes/Libraries → Libraries}/Share/Share.d.ts +0 -0
- package/{rntypes/Libraries → Libraries}/Storage/AsyncStorage.d.ts +0 -0
- package/{rntypes/Libraries → Libraries}/StyleSheet/PlatformColorValueTypes.d.ts +0 -0
- package/{rntypes/Libraries → Libraries}/StyleSheet/PlatformColorValueTypesIOS.d.ts +0 -0
- package/{rntypes/Libraries → Libraries}/StyleSheet/StyleSheet.d.ts +0 -0
- package/{rntypes/Libraries → Libraries}/StyleSheet/StyleSheetTypes.d.ts +0 -0
- package/{rntypes/Libraries → Libraries}/StyleSheet/processColor.d.ts +0 -0
- package/{rntypes/Libraries → Libraries}/Text/Text.d.ts +0 -0
- package/{rntypes/Libraries → Libraries}/TurboModule/RCTExport.d.ts +0 -0
- package/{rntypes/Libraries → Libraries}/TurboModule/TurboModuleRegistry.d.ts +0 -0
- package/{rntypes/Libraries → Libraries}/Types/CoreEventTypes.d.ts +0 -0
- package/{rntypes/Libraries → Libraries}/Utilities/Appearance.d.ts +0 -0
- package/{rntypes/Libraries → Libraries}/Utilities/BackHandler.d.ts +0 -0
- package/{rntypes/Libraries → Libraries}/Utilities/DevSettings.d.ts +0 -0
- package/{rntypes/Libraries → Libraries}/Utilities/Dimensions.d.ts +0 -0
- package/{rntypes/Libraries → Libraries}/Utilities/PixelRatio.d.ts +0 -0
- package/{rntypes/Libraries → Libraries}/Utilities/Platform.d.ts +0 -0
- package/{rntypes/Libraries → Libraries}/Vibration/Vibration.d.ts +0 -0
- package/{rntypes/Libraries → Libraries}/YellowBox/YellowBoxDeprecated.d.ts +0 -0
- package/Libraries/platform-types.d.ts +17 -0
- package/{rntypes/Libraries → Libraries}/vendor/core/ErrorUtils.d.ts +0 -0
- package/{rntypes/Libraries → Libraries}/vendor/emitter/EventEmitter.d.ts +0 -0
- package/Microsoft.ReactNative/Base/CoreNativeModules.cpp +8 -25
- package/Microsoft.ReactNative/CompositionSwitcher.idl +1 -0
- package/Microsoft.ReactNative/Fabric/Composition/CompositionContextHelper.cpp +12 -0
- package/Microsoft.ReactNative/Fabric/Composition/CompositionViewComponentView.cpp +83 -6
- package/Microsoft.ReactNative/Fabric/Composition/CompositionViewComponentView.h +6 -0
- package/Microsoft.ReactNative/Fabric/Composition/ImageComponentView.cpp +1 -0
- package/Microsoft.ReactNative/Fabric/Composition/ParagraphComponentView.cpp +1 -0
- package/Microsoft.ReactNative/Fabric/Composition/ScrollViewComponentView.cpp +1 -0
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentView.cpp +1 -0
- package/Microsoft.ReactNative/Modules/Animated/AdditionAnimatedNode.cpp +1 -1
- package/Microsoft.ReactNative/Modules/Animated/CalculatedAnimationDriver.cpp +2 -2
- package/Microsoft.ReactNative/Modules/Animated/DiffClampAnimatedNode.cpp +1 -1
- package/Microsoft.ReactNative/Modules/Animated/DivisionAnimatedNode.cpp +1 -1
- package/Microsoft.ReactNative/Modules/Animated/FrameAnimationDriver.cpp +2 -2
- package/Microsoft.ReactNative/Modules/Animated/InterpolationAnimatedNode.cpp +1 -1
- package/Microsoft.ReactNative/Modules/Animated/ModulusAnimatedNode.cpp +1 -1
- package/Microsoft.ReactNative/Modules/Animated/MultiplicationAnimatedNode.cpp +1 -1
- package/Microsoft.ReactNative/Modules/Animated/NativeAnimatedModule.cpp +1 -0
- package/Microsoft.ReactNative/Modules/Animated/NativeAnimatedModule.h +1 -1
- package/Microsoft.ReactNative/Modules/Animated/NativeAnimatedNodeManager.cpp +28 -0
- package/Microsoft.ReactNative/Modules/Animated/NativeAnimatedNodeManager.h +4 -0
- package/Microsoft.ReactNative/Modules/Animated/PropsAnimatedNode.cpp +105 -17
- package/Microsoft.ReactNative/Modules/Animated/PropsAnimatedNode.h +21 -0
- package/Microsoft.ReactNative/Modules/Animated/SubtractionAnimatedNode.cpp +1 -1
- package/Microsoft.ReactNative/Modules/Animated/ValueAnimatedNode.cpp +1 -3
- package/Microsoft.ReactNative/Views/KeyboardEventHandler.cpp +16 -3
- package/Microsoft.ReactNative/Views/ViewControl.cpp +2 -2
- package/Microsoft.ReactNative/Views/ViewControl.h +1 -1
- package/Microsoft.ReactNative/Views/ViewViewManager.cpp +12 -12
- package/Microsoft.ReactNative/Views/cppwinrt/ViewPanel.idl +4 -4
- package/Microsoft.ReactNative.Managed/Microsoft.ReactNative.Managed.csproj +5 -4
- package/PropertySheets/External/Microsoft.ReactNative.CSharp.Dependencies.props +17 -0
- package/PropertySheets/External/Microsoft.ReactNative.Common.props +1 -0
- package/PropertySheets/External/Microsoft.ReactNative.Uwp.CSharpApp.targets +1 -0
- package/PropertySheets/External/Microsoft.ReactNative.Uwp.CSharpLib.targets +1 -0
- package/PropertySheets/External/Microsoft.ReactNative.Uwp.CppApp.targets +1 -0
- package/PropertySheets/External/Microsoft.ReactNative.Uwp.CppLib.targets +1 -0
- package/PropertySheets/Generated/PackageVersion.g.props +1 -1
- package/Scripts/rnw-dependencies.ps1 +315 -160
- package/Shared/Networking/WinRTHttpResource.cpp +18 -13
- package/Shared/OInstance.cpp +2 -8
- package/Shared/Shared.vcxitems +3 -1
- package/package.json +6 -6
- package/rntypes/types/BatchedBridge.d.ts +0 -32
- package/rntypes/types/Codegen.d.ts +0 -74
- package/rntypes/types/Devtools.d.ts +0 -31
- package/rntypes/types/LaunchScreen.d.ts +0 -18
- package/rntypes/types/Utilities.d.ts +0 -29
- package/rntypes/types/globals.d.ts +0 -577
- package/rntypes/types/index.d.ts +0 -211
- package/rntypes/types/legacy-properties.d.ts +0 -208
- package/typings-index.d.ts +0 -19
- package/typings-index.js +0 -44
- package/typings-index.js.map +0 -1
package/Directory.Build.props
CHANGED
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
-->
|
|
17
17
|
<EnableSourceLink Condition="'$(EnableSourceLink)' == ''">false</EnableSourceLink>
|
|
18
18
|
<!-- When bumping the Folly version, be sure to bump the git hash of that version's commit and build Folly.vcxproj (to update its cgmanifest.json) too. -->
|
|
19
|
-
<FollyVersion>
|
|
20
|
-
<FollyCommitHash>
|
|
19
|
+
<FollyVersion>2022.11.07.00</FollyVersion>
|
|
20
|
+
<FollyCommitHash>2aa28128d1f7a04b41521367f0b615f782814089</FollyCommitHash>
|
|
21
21
|
<!-- When bumping the fmt version, be sure to bump the git hash of that version's commit and build fmt.vcxproj (to update its cgmanifest.json) too. -->
|
|
22
22
|
<FmtVersion>8.0.0</FmtVersion>
|
|
23
23
|
<FmtCommitHash>9e8b86fd2d9806672cc73133d21780dd182bfd24</FmtCommitHash>
|
package/Folly/Folly.vcxproj
CHANGED
|
@@ -51,10 +51,10 @@
|
|
|
51
51
|
<ClCompile Include="$(FollyDir)\folly\portability\Unistd.cpp" />
|
|
52
52
|
</ItemGroup>
|
|
53
53
|
<ItemGroup>
|
|
54
|
+
<ClCompile Include="$(FollyDir)\folly\system\AtFork.cpp" />
|
|
54
55
|
<ClCompile Include="$(FollyDir)\folly\system\ThreadId.cpp" />
|
|
55
56
|
<ClCompile Include="$(FollyDir)\folly\lang\SafeAssert.cpp" />
|
|
56
57
|
<ClCompile Include="$(FollyDir)\folly\lang\ToAscii.cpp" />
|
|
57
|
-
<ClCompile Include="$(FollyDir)\folly\lang\Assume.cpp" />
|
|
58
58
|
<ClCompile Include="$(FollyDir)\folly\json_pointer.cpp" />
|
|
59
59
|
<ClCompile Include="$(FollyDir)\folly\Format.cpp" />
|
|
60
60
|
<ClCompile Include="$(FollyDir)\folly\String.cpp" />
|
|
@@ -39,9 +39,6 @@
|
|
|
39
39
|
<ClCompile Include="$(FollyDir)\folly\lang\ToAscii.cpp">
|
|
40
40
|
<Filter>Source Files\lang</Filter>
|
|
41
41
|
</ClCompile>
|
|
42
|
-
<ClCompile Include="$(FollyDir)\folly\lang\Assume.cpp">
|
|
43
|
-
<Filter>Source Files\lang</Filter>
|
|
44
|
-
</ClCompile>
|
|
45
42
|
<ClCompile Include="$(FollyDir)\folly\Conv.cpp">
|
|
46
43
|
<Filter>Source Files</Filter>
|
|
47
44
|
</ClCompile>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c)
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
3
|
*
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
5
|
* you may not use this file except in compliance with the License.
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
#include <folly/Conv.h>
|
|
23
23
|
#include <folly/Format.h>
|
|
24
24
|
#include <folly/Likely.h>
|
|
25
|
+
#include <folly/Portability.h>
|
|
25
26
|
#include <folly/detail/Iterators.h>
|
|
26
27
|
#include <folly/lang/Exception.h>
|
|
27
28
|
|
|
@@ -87,38 +88,41 @@ struct hash<::folly::dynamic> {
|
|
|
87
88
|
} // namespace std
|
|
88
89
|
|
|
89
90
|
//////////////////////////////////////////////////////////////////////
|
|
90
|
-
|
|
91
|
+
/* clang-format off */
|
|
91
92
|
// This is a higher-order preprocessor macro to aid going from runtime
|
|
92
93
|
// types to the compile time type system.
|
|
93
|
-
#define FB_DYNAMIC_APPLY(type, apply) \
|
|
94
|
-
do { \
|
|
95
|
-
switch ((type)) { \
|
|
96
|
-
case NULLT: \
|
|
97
|
-
apply(std::nullptr_t); \
|
|
98
|
-
break; \
|
|
99
|
-
case ARRAY: \
|
|
100
|
-
apply(Array); \
|
|
101
|
-
break; \
|
|
102
|
-
case BOOL: \
|
|
103
|
-
apply(bool); \
|
|
104
|
-
break; \
|
|
105
|
-
case DOUBLE: \
|
|
106
|
-
apply(double); \
|
|
107
|
-
break; \
|
|
108
|
-
case INT64: \
|
|
109
|
-
apply(int64_t); \
|
|
110
|
-
break; \
|
|
111
|
-
case OBJECT: \
|
|
112
|
-
apply(ObjectImpl); \
|
|
113
|
-
break; \
|
|
114
|
-
case STRING: \
|
|
115
|
-
apply(std::string); \
|
|
116
|
-
break; \
|
|
117
|
-
default: \
|
|
118
|
-
abort(); \
|
|
119
|
-
} \
|
|
120
|
-
} while (0)
|
|
121
94
|
|
|
95
|
+
#define FB_DYNAMIC_APPLY(type, apply) \
|
|
96
|
+
do { \
|
|
97
|
+
FOLLY_PUSH_WARNING FOLLY_CLANG_DISABLE_WARNING("-Wcovered-switch-default") \
|
|
98
|
+
switch ((type)) { \
|
|
99
|
+
case NULLT: \
|
|
100
|
+
apply(std::nullptr_t); \
|
|
101
|
+
break; \
|
|
102
|
+
case ARRAY: \
|
|
103
|
+
apply(Array); \
|
|
104
|
+
break; \
|
|
105
|
+
case BOOL: \
|
|
106
|
+
apply(bool); \
|
|
107
|
+
break; \
|
|
108
|
+
case DOUBLE: \
|
|
109
|
+
apply(double); \
|
|
110
|
+
break; \
|
|
111
|
+
case INT64: \
|
|
112
|
+
apply(int64_t); \
|
|
113
|
+
break; \
|
|
114
|
+
case OBJECT: \
|
|
115
|
+
apply(ObjectImpl); \
|
|
116
|
+
break; \
|
|
117
|
+
case STRING: \
|
|
118
|
+
apply(std::string); \
|
|
119
|
+
break; \
|
|
120
|
+
default: \
|
|
121
|
+
abort(); \
|
|
122
|
+
} \
|
|
123
|
+
FOLLY_POP_WARNING \
|
|
124
|
+
} while (0)
|
|
125
|
+
/* clang-format on */
|
|
122
126
|
//////////////////////////////////////////////////////////////////////
|
|
123
127
|
|
|
124
128
|
namespace folly {
|
|
@@ -235,6 +239,7 @@ struct dynamic::item_iterator : detail::IteratorAdaptor<
|
|
|
235
239
|
dynamic::ObjectImpl::iterator,
|
|
236
240
|
std::pair<dynamic const, dynamic>,
|
|
237
241
|
std::forward_iterator_tag>;
|
|
242
|
+
item_iterator() = default;
|
|
238
243
|
/* implicit */ item_iterator(dynamic::ObjectImpl::iterator b) : Super(b) {}
|
|
239
244
|
|
|
240
245
|
using object_type = dynamic::ObjectImpl;
|
|
@@ -250,6 +255,7 @@ struct dynamic::value_iterator : detail::IteratorAdaptor<
|
|
|
250
255
|
dynamic::ObjectImpl::iterator,
|
|
251
256
|
dynamic,
|
|
252
257
|
std::forward_iterator_tag>;
|
|
258
|
+
value_iterator() = default;
|
|
253
259
|
/* implicit */ value_iterator(dynamic::ObjectImpl::iterator b) : Super(b) {}
|
|
254
260
|
|
|
255
261
|
using object_type = dynamic::ObjectImpl;
|
|
@@ -268,6 +274,7 @@ struct dynamic::const_item_iterator
|
|
|
268
274
|
dynamic::ObjectImpl::const_iterator,
|
|
269
275
|
std::pair<dynamic const, dynamic> const,
|
|
270
276
|
std::forward_iterator_tag>;
|
|
277
|
+
const_item_iterator() = default;
|
|
271
278
|
/* implicit */ const_item_iterator(dynamic::ObjectImpl::const_iterator b)
|
|
272
279
|
: Super(b) {}
|
|
273
280
|
/* implicit */ const_item_iterator(const_item_iterator const& i)
|
|
@@ -287,6 +294,7 @@ struct dynamic::const_key_iterator : detail::IteratorAdaptor<
|
|
|
287
294
|
dynamic::ObjectImpl::const_iterator,
|
|
288
295
|
dynamic const,
|
|
289
296
|
std::forward_iterator_tag>;
|
|
297
|
+
const_key_iterator() = default;
|
|
290
298
|
/* implicit */ const_key_iterator(dynamic::ObjectImpl::const_iterator b)
|
|
291
299
|
: Super(b) {}
|
|
292
300
|
|
|
@@ -305,6 +313,7 @@ struct dynamic::const_value_iterator : detail::IteratorAdaptor<
|
|
|
305
313
|
dynamic::ObjectImpl::const_iterator,
|
|
306
314
|
dynamic const,
|
|
307
315
|
std::forward_iterator_tag>;
|
|
316
|
+
const_value_iterator() = default;
|
|
308
317
|
/* implicit */ const_value_iterator(dynamic::ObjectImpl::const_iterator b)
|
|
309
318
|
: Super(b) {}
|
|
310
319
|
/* implicit */ const_value_iterator(value_iterator i) : Super(i.base()) {}
|
|
@@ -348,14 +357,6 @@ inline dynamic::dynamic(ObjectMaker&& maker) : type_(OBJECT) {
|
|
|
348
357
|
ObjectImpl(std::move(*maker.val_.getAddress<ObjectImpl>()));
|
|
349
358
|
}
|
|
350
359
|
|
|
351
|
-
inline dynamic::dynamic(dynamic const& o) : type_(NULLT) {
|
|
352
|
-
*this = o;
|
|
353
|
-
}
|
|
354
|
-
|
|
355
|
-
inline dynamic::dynamic(dynamic&& o) noexcept : type_(NULLT) {
|
|
356
|
-
*this = std::move(o);
|
|
357
|
-
}
|
|
358
|
-
|
|
359
360
|
inline dynamic::~dynamic() noexcept {
|
|
360
361
|
destroy();
|
|
361
362
|
}
|
|
@@ -558,7 +559,7 @@ struct dynamic::CompareOp<dynamic::ObjectImpl> {
|
|
|
558
559
|
template <>
|
|
559
560
|
struct dynamic::CompareOp<std::nullptr_t> {
|
|
560
561
|
static bool comp(std::nullptr_t const&, std::nullptr_t const&) {
|
|
561
|
-
return
|
|
562
|
+
return false;
|
|
562
563
|
}
|
|
563
564
|
};
|
|
564
565
|
|
|
@@ -834,6 +835,20 @@ inline dynamic::IfNotIterator<K, void> dynamic::insert(K&& key, V&& val) {
|
|
|
834
835
|
obj[std::forward<K>(key)] = std::forward<V>(val);
|
|
835
836
|
}
|
|
836
837
|
|
|
838
|
+
template <class... Args>
|
|
839
|
+
inline std::pair<dynamic::item_iterator, bool> dynamic::emplace(
|
|
840
|
+
Args&&... args) {
|
|
841
|
+
auto& obj = get<ObjectImpl>();
|
|
842
|
+
return obj.emplace(std::forward<Args>(args)...);
|
|
843
|
+
}
|
|
844
|
+
|
|
845
|
+
template <class K, class... Args>
|
|
846
|
+
inline std::pair<dynamic::item_iterator, bool> dynamic::try_emplace(
|
|
847
|
+
K&& key, Args&&... args) {
|
|
848
|
+
auto& obj = get<ObjectImpl>();
|
|
849
|
+
return obj.try_emplace(std::forward<K>(key), std::forward<Args>(args)...);
|
|
850
|
+
}
|
|
851
|
+
|
|
837
852
|
template <class T>
|
|
838
853
|
inline dynamic::iterator dynamic::insert(const_iterator pos, T&& value) {
|
|
839
854
|
auto& arr = get<Array>();
|
|
@@ -993,6 +1008,8 @@ FOLLY_DYNAMIC_DEC_TYPEINFO(dynamic::ObjectImpl, dynamic::OBJECT)
|
|
|
993
1008
|
|
|
994
1009
|
template <class T>
|
|
995
1010
|
T dynamic::asImpl() const {
|
|
1011
|
+
FOLLY_PUSH_WARNING
|
|
1012
|
+
FOLLY_CLANG_DISABLE_WARNING("-Wcovered-switch-default")
|
|
996
1013
|
switch (type()) {
|
|
997
1014
|
case INT64:
|
|
998
1015
|
return to<T>(*get_nothrow<int64_t>());
|
|
@@ -1008,10 +1025,10 @@ T dynamic::asImpl() const {
|
|
|
1008
1025
|
default:
|
|
1009
1026
|
throw_exception<TypeError>("int/double/bool/string", type());
|
|
1010
1027
|
}
|
|
1028
|
+
FOLLY_POP_WARNING
|
|
1011
1029
|
}
|
|
1012
1030
|
|
|
1013
1031
|
// Return a T* to our type, or null if we're not that type.
|
|
1014
|
-
// clang-format off
|
|
1015
1032
|
template <class T>
|
|
1016
1033
|
T* dynamic::get_nothrow() & noexcept {
|
|
1017
1034
|
if (type_ != TypeInfo<T>::type) {
|
|
@@ -1019,7 +1036,6 @@ T* dynamic::get_nothrow() & noexcept {
|
|
|
1019
1036
|
}
|
|
1020
1037
|
return getAddress<T>();
|
|
1021
1038
|
}
|
|
1022
|
-
// clang-format on
|
|
1023
1039
|
|
|
1024
1040
|
template <class T>
|
|
1025
1041
|
T const* dynamic::get_nothrow() const& noexcept {
|
|
@@ -1216,7 +1232,7 @@ const_dynamic_view::descend_unchecked_(Key const& key) const noexcept {
|
|
|
1216
1232
|
if /* constexpr */ (!std::is_integral<Key>::value) {
|
|
1217
1233
|
return nullptr;
|
|
1218
1234
|
}
|
|
1219
|
-
if (key < 0 || key >= parray->size()) {
|
|
1235
|
+
if (key < 0 || folly::to_unsigned(key) >= parray->size()) {
|
|
1220
1236
|
return nullptr;
|
|
1221
1237
|
}
|
|
1222
1238
|
return &(*parray)[size_t(key)];
|
|
@@ -1327,7 +1343,7 @@ inline std::string dynamic_view::move_string_or(Stringish&& val) {
|
|
|
1327
1343
|
|
|
1328
1344
|
//////////////////////////////////////////////////////////////////////
|
|
1329
1345
|
|
|
1330
|
-
//
|
|
1346
|
+
// Specialization of FormatValue so dynamic objects can be formatted
|
|
1331
1347
|
template <>
|
|
1332
1348
|
class FormatValue<dynamic> {
|
|
1333
1349
|
public:
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
#pragma once
|
|
18
|
+
|
|
19
|
+
#include <cstdint>
|
|
20
|
+
#include <utility>
|
|
21
|
+
|
|
22
|
+
#include <folly/CppAttributes.h>
|
|
23
|
+
#include <folly/Portability.h>
|
|
24
|
+
#include <folly/Preprocessor.h>
|
|
25
|
+
#include <folly/lang/CArray.h>
|
|
26
|
+
|
|
27
|
+
#define FOLLY_DETAIL_SAFE_CHECK_IMPL(d, p, u, expr, ...) \
|
|
28
|
+
do { \
|
|
29
|
+
if ((!d || ::folly::kIsDebug || ::folly::kIsSanitize) && \
|
|
30
|
+
!static_cast<bool>(expr)) { \
|
|
31
|
+
static constexpr auto __folly_detail_safe_assert_fun = __func__; \
|
|
32
|
+
static constexpr ::folly::detail::safe_assert_arg \
|
|
33
|
+
__folly_detail_safe_assert_arg{ \
|
|
34
|
+
u ? nullptr : #expr, \
|
|
35
|
+
__FILE__, \
|
|
36
|
+
FOLLY_PP_CONSTINIT_LINE_UNSIGNED, \
|
|
37
|
+
__folly_detail_safe_assert_fun, \
|
|
38
|
+
::folly::detail::safe_assert_msg_types< \
|
|
39
|
+
decltype(::folly::detail::safe_assert_msg_types_seq_of( \
|
|
40
|
+
__VA_ARGS__))>::value.data}; \
|
|
41
|
+
constexpr ::folly::detail::safe_assert_terminate_w<p> \
|
|
42
|
+
__folly_detail_safe_assert_terminate_w{ \
|
|
43
|
+
__folly_detail_safe_assert_arg}; \
|
|
44
|
+
__folly_detail_safe_assert_terminate_w(__VA_ARGS__); \
|
|
45
|
+
} \
|
|
46
|
+
} while (false)
|
|
47
|
+
|
|
48
|
+
// FOLLY_SAFE_CHECK
|
|
49
|
+
//
|
|
50
|
+
// If expr evaluates to false after explicit conversion to bool, prints context
|
|
51
|
+
// information to stderr and aborts. Context information includes the remaining
|
|
52
|
+
// variadic arguments.
|
|
53
|
+
//
|
|
54
|
+
// When the remaining variadic arguments are printed to stderr, there are two
|
|
55
|
+
// supported types after implicit conversions: char const* and uint64_t. This
|
|
56
|
+
// facility is intentionally not extensible to custom types.
|
|
57
|
+
//
|
|
58
|
+
// multi-thread-safe
|
|
59
|
+
// async-signal-safe
|
|
60
|
+
#define FOLLY_SAFE_CHECK(expr, ...) \
|
|
61
|
+
FOLLY_DETAIL_SAFE_CHECK_IMPL(0, 0, 0, expr, __VA_ARGS__)
|
|
62
|
+
|
|
63
|
+
// FOLLY_SAFE_DCHECK
|
|
64
|
+
//
|
|
65
|
+
// Equivalent to FOLLY_SAFE_CHECK when in debug or instrumented builds, where
|
|
66
|
+
// debug builds are signalled by NDEBUG being undefined and instrumented builds
|
|
67
|
+
// include sanitizer builds.
|
|
68
|
+
//
|
|
69
|
+
// multi-thread-safe
|
|
70
|
+
// async-signal-safe
|
|
71
|
+
#define FOLLY_SAFE_DCHECK(expr, ...) \
|
|
72
|
+
FOLLY_DETAIL_SAFE_CHECK_IMPL(1, 0, 0, expr, __VA_ARGS__)
|
|
73
|
+
|
|
74
|
+
// FOLLY_SAFE_PCHECK
|
|
75
|
+
//
|
|
76
|
+
// Equivalent to FOLLY_SAFE_CHECK but includes errno in the contextual
|
|
77
|
+
// information printed to stderr.
|
|
78
|
+
//
|
|
79
|
+
// multi-thread-safe
|
|
80
|
+
// async-signal-safe
|
|
81
|
+
#define FOLLY_SAFE_PCHECK(expr, ...) \
|
|
82
|
+
FOLLY_DETAIL_SAFE_CHECK_IMPL(0, 1, 0, expr, __VA_ARGS__)
|
|
83
|
+
|
|
84
|
+
// FOLLY_SAFE_DPCHECK
|
|
85
|
+
//
|
|
86
|
+
// Equivalent to FOLLY_SAFE_DCHECK but includes errno in the contextual
|
|
87
|
+
// information printed to stderr.
|
|
88
|
+
//
|
|
89
|
+
// multi-thread-safe
|
|
90
|
+
// async-signal-safe
|
|
91
|
+
#define FOLLY_SAFE_DPCHECK(expr, ...) \
|
|
92
|
+
FOLLY_DETAIL_SAFE_CHECK_IMPL(1, 1, 0, expr, __VA_ARGS__)
|
|
93
|
+
|
|
94
|
+
// FOLLY_SAFE_FATAL
|
|
95
|
+
//
|
|
96
|
+
// Equivalent to FOLLY_SAFE_CHECK(false, ...) but excludes any failing
|
|
97
|
+
// expression from the contextual information printed to stderr.
|
|
98
|
+
//
|
|
99
|
+
// multi-thread-safe
|
|
100
|
+
// async-signal-safe
|
|
101
|
+
#define FOLLY_SAFE_FATAL(...) \
|
|
102
|
+
FOLLY_DETAIL_SAFE_CHECK_IMPL(0, 0, 1, false, __VA_ARGS__)
|
|
103
|
+
|
|
104
|
+
// FOLLY_SAFE_DFATAL
|
|
105
|
+
//
|
|
106
|
+
// Equivalent to FOLLY_SAFE_DCHECK(false, ...) but excludes any failing
|
|
107
|
+
// expression from the contextual information printed to stderr.
|
|
108
|
+
//
|
|
109
|
+
// multi-thread-safe
|
|
110
|
+
// async-signal-safe
|
|
111
|
+
#define FOLLY_SAFE_DFATAL(...) \
|
|
112
|
+
FOLLY_DETAIL_SAFE_CHECK_IMPL(1, 0, 1, false, __VA_ARGS__)
|
|
113
|
+
|
|
114
|
+
namespace folly {
|
|
115
|
+
namespace detail {
|
|
116
|
+
|
|
117
|
+
enum class safe_assert_msg_type : char { term, cstr, ui64 };
|
|
118
|
+
|
|
119
|
+
template <safe_assert_msg_type... A>
|
|
120
|
+
struct safe_assert_msg_type_s {};
|
|
121
|
+
|
|
122
|
+
struct safe_assert_msg_types_one_fn {
|
|
123
|
+
template <safe_assert_msg_type A>
|
|
124
|
+
using c = std::integral_constant<safe_assert_msg_type, A>;
|
|
125
|
+
// only used in unevaluated contexts:
|
|
126
|
+
c<safe_assert_msg_type::cstr> operator()(char const*) const;
|
|
127
|
+
c<safe_assert_msg_type::ui64> operator()(uint64_t) const;
|
|
128
|
+
};
|
|
129
|
+
FOLLY_INLINE_VARIABLE constexpr safe_assert_msg_types_one_fn
|
|
130
|
+
safe_assert_msg_types_one{}; // a function object to prevent extensions
|
|
131
|
+
|
|
132
|
+
template <typename... A>
|
|
133
|
+
safe_assert_msg_type_s<decltype(safe_assert_msg_types_one((A)A{}))::value...>
|
|
134
|
+
safe_assert_msg_types_seq_of(A...); // only used in unevaluated contexts
|
|
135
|
+
|
|
136
|
+
template <typename>
|
|
137
|
+
struct safe_assert_msg_types;
|
|
138
|
+
template <safe_assert_msg_type... A>
|
|
139
|
+
struct safe_assert_msg_types<safe_assert_msg_type_s<A...>> {
|
|
140
|
+
using value_type = c_array<safe_assert_msg_type, sizeof...(A) + 1>;
|
|
141
|
+
static constexpr value_type value = {{A..., safe_assert_msg_type::term}};
|
|
142
|
+
};
|
|
143
|
+
template <safe_assert_msg_type... A>
|
|
144
|
+
constexpr
|
|
145
|
+
typename safe_assert_msg_types<safe_assert_msg_type_s<A...>>::value_type
|
|
146
|
+
safe_assert_msg_types<safe_assert_msg_type_s<A...>>::value;
|
|
147
|
+
|
|
148
|
+
struct safe_assert_arg {
|
|
149
|
+
char const* expr;
|
|
150
|
+
char const* file;
|
|
151
|
+
unsigned int line;
|
|
152
|
+
char const* function;
|
|
153
|
+
safe_assert_msg_type const* msg_types;
|
|
154
|
+
};
|
|
155
|
+
|
|
156
|
+
struct safe_assert_msg_cast_one_fn {
|
|
157
|
+
FOLLY_ERASE auto operator()(char const* const a) const { return a; }
|
|
158
|
+
FOLLY_ERASE auto operator()(uint64_t const a) const { return a; }
|
|
159
|
+
};
|
|
160
|
+
FOLLY_INLINE_VARIABLE constexpr safe_assert_msg_cast_one_fn
|
|
161
|
+
safe_assert_msg_cast_one{}; // a function object to prevent extensions
|
|
162
|
+
|
|
163
|
+
template <bool P>
|
|
164
|
+
[[noreturn]] FOLLY_COLD FOLLY_NOINLINE void safe_assert_terminate(
|
|
165
|
+
safe_assert_arg const* arg, ...) noexcept; // the true backing function
|
|
166
|
+
|
|
167
|
+
// [Win - Fixes Error C2908 explicit specialization; 'void folly::detail::safe_assert_terminate<false>(const folly::detail::safe_assert_arg *,...) noexcept' has already been instantiated
|
|
168
|
+
template <>
|
|
169
|
+
[[noreturn]] FOLLY_COLD FOLLY_NOINLINE void safe_assert_terminate<0>(
|
|
170
|
+
safe_assert_arg const* arg, ...) noexcept;
|
|
171
|
+
|
|
172
|
+
template <>
|
|
173
|
+
[[noreturn]] FOLLY_COLD FOLLY_NOINLINE void safe_assert_terminate<1>(
|
|
174
|
+
safe_assert_arg const* arg, ...) noexcept;
|
|
175
|
+
// Win]
|
|
176
|
+
|
|
177
|
+
template <bool P>
|
|
178
|
+
struct safe_assert_terminate_w {
|
|
179
|
+
safe_assert_arg const& arg;
|
|
180
|
+
|
|
181
|
+
FOLLY_ERASE constexpr safe_assert_terminate_w(
|
|
182
|
+
safe_assert_arg const& arg_) noexcept
|
|
183
|
+
: arg{arg_} {}
|
|
184
|
+
|
|
185
|
+
template <typename... A>
|
|
186
|
+
[[noreturn]] FOLLY_ERASE void operator()(A... a) const noexcept {
|
|
187
|
+
safe_assert_terminate<P>(&arg, safe_assert_msg_cast_one(a)...);
|
|
188
|
+
}
|
|
189
|
+
};
|
|
190
|
+
|
|
191
|
+
} // namespace detail
|
|
192
|
+
} // namespace folly
|
|
@@ -189,7 +189,8 @@ FOLLY_ALWAYS_INLINE size_t to_ascii_size_clzll(uint64_t v) {
|
|
|
189
189
|
}
|
|
190
190
|
|
|
191
191
|
// blog2r is approx 1 / log<2>(Base), used in log change-of-base just below
|
|
192
|
-
constexpr auto const
|
|
192
|
+
constexpr auto const blog2m = constexpr_log2(constexpr_pow(Base, 8));
|
|
193
|
+
constexpr auto const blog2r = 8. / double(blog2m);
|
|
193
194
|
|
|
194
195
|
// vlogb is approx log<Base>(v) = log<2>(v) / log<2>(Base)
|
|
195
196
|
auto const vlogb = vlog2 * size_t(blog2r * 256) / 256;
|
|
@@ -244,18 +245,19 @@ template <uint64_t Base, typename Alphabet>
|
|
|
244
245
|
FOLLY_ALWAYS_INLINE void to_ascii_with_table(
|
|
245
246
|
char* out, size_t size, uint64_t v) {
|
|
246
247
|
using table = to_ascii_table<Base, Alphabet>;
|
|
247
|
-
auto pos = size
|
|
248
|
-
while (FOLLY_UNLIKELY(
|
|
248
|
+
auto pos = size;
|
|
249
|
+
while (FOLLY_UNLIKELY(pos > 2)) {
|
|
250
|
+
pos -= 2;
|
|
249
251
|
// keep /, % together so a peephole optimization computes them together
|
|
250
252
|
auto const q = v / (Base * Base);
|
|
251
253
|
auto const r = v % (Base * Base);
|
|
252
254
|
auto const val = table::data.data[size_t(r)];
|
|
253
255
|
std::memcpy(out + pos, &val, 2);
|
|
254
|
-
pos -= 2;
|
|
255
256
|
v = q;
|
|
256
257
|
}
|
|
258
|
+
|
|
257
259
|
auto const val = table::data.data[size_t(v)];
|
|
258
|
-
if (FOLLY_UNLIKELY(
|
|
260
|
+
if (FOLLY_UNLIKELY(pos == 2)) {
|
|
259
261
|
std::memcpy(out, &val, 2);
|
|
260
262
|
} else {
|
|
261
263
|
*out = val >> (kIsLittleEndian ? 8 : 0);
|
package/Folly/cgmanifest.json
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/{rntypes/Libraries → Libraries}/Components/ProgressBarAndroid/ProgressBarAndroid.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|