From 58012fb445572ab16b925379a32b6d62093e1acc Mon Sep 17 00:00:00 2001 From: Samuel Susla Date: Fri, 22 May 2026 08:57:50 -0700 Subject: [PATCH] Ship useUnorderedMapInDifferentiator (#56918) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/56918 changelog: [internal] the experiment was neutral, let's ship it to simplify code Reviewed By: javache Differential Revision: D105943424 fbshipit-source-id: 3ff2ed1dbcb85f640305c4fcb2485db0a8a312fc --- .../featureflags/ReactNativeFeatureFlags.kt | 8 +- .../ReactNativeFeatureFlagsCxxAccessor.kt | 12 +- .../ReactNativeFeatureFlagsCxxInterop.kt | 4 +- .../ReactNativeFeatureFlagsDefaults.kt | 4 +- .../ReactNativeFeatureFlagsLocalAccessor.kt | 13 +- .../ReactNativeFeatureFlagsProvider.kt | 4 +- .../JReactNativeFeatureFlagsCxxInterop.cpp | 16 +- .../JReactNativeFeatureFlagsCxxInterop.h | 5 +- .../featureflags/ReactNativeFeatureFlags.cpp | 6 +- .../featureflags/ReactNativeFeatureFlags.h | 7 +- .../ReactNativeFeatureFlagsAccessor.cpp | 28 +-- .../ReactNativeFeatureFlagsAccessor.h | 6 +- .../ReactNativeFeatureFlagsDefaults.h | 6 +- .../ReactNativeFeatureFlagsDynamicProvider.h | 11 +- .../ReactNativeFeatureFlagsProvider.h | 3 +- .../NativeReactNativeFeatureFlags.cpp | 7 +- .../NativeReactNativeFeatureFlags.h | 4 +- .../renderer/mounting/Differentiator.cpp | 48 ++--- .../renderer/mounting/internal/DiffMap.h | 170 ------------------ .../renderer/mounting/internal/TinyMap.h | 147 --------------- .../ReactNativeFeatureFlags.config.js | 11 -- .../featureflags/ReactNativeFeatureFlags.js | 7 +- .../specs/NativeReactNativeFeatureFlags.js | 3 +- .../api-snapshots/ReactAndroidDebugCxx.api | 20 --- .../api-snapshots/ReactAndroidNewarchCxx.api | 20 --- .../api-snapshots/ReactAndroidReleaseCxx.api | 20 --- .../api-snapshots/ReactAppleDebugCxx.api | 20 --- .../api-snapshots/ReactAppleNewarchCxx.api | 20 --- .../api-snapshots/ReactAppleReleaseCxx.api | 20 --- .../api-snapshots/ReactCommonDebugCxx.api | 20 --- .../api-snapshots/ReactCommonNewarchCxx.api | 20 --- .../api-snapshots/ReactCommonReleaseCxx.api | 20 --- scripts/cxx-api/config.yml | 1 - 33 files changed, 51 insertions(+), 660 deletions(-) delete mode 100644 packages/react-native/ReactCommon/react/renderer/mounting/internal/DiffMap.h delete mode 100644 packages/react-native/ReactCommon/react/renderer/mounting/internal/TinyMap.h diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlags.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlags.kt index cbac4cab157..9d50747f9c8 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlags.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlags.kt @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<<8b35aa70eea734a8bfcbb7bd651ba8e2>> + * @generated SignedSource<> */ /** @@ -540,12 +540,6 @@ public object ReactNativeFeatureFlags { @JvmStatic public fun useTurboModuleInterop(): Boolean = accessor.useTurboModuleInterop() - /** - * Use std::unordered_map instead of TinyMap in the Differentiator for improved lookup performance. - */ - @JvmStatic - public fun useUnorderedMapInDifferentiator(): Boolean = accessor.useUnorderedMapInDifferentiator() - /** * Outset the culling context frame with the provided ratio. The culling context frame size will be outset by width * ratio on the left and right, and height * ratio on the top and bottom. */ diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxAccessor.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxAccessor.kt index d8c9e5e2c8d..fb9b0932530 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxAccessor.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxAccessor.kt @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<<494ed85c58f80b4feb6fb9b83fe7a27e>> + * @generated SignedSource<<1ac9ff65ae410a6b1afa6c92c2e9a86b>> */ /** @@ -105,7 +105,6 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces private var useSharedAnimatedBackendCache: Boolean? = null private var useTraitHiddenOnAndroidCache: Boolean? = null private var useTurboModuleInteropCache: Boolean? = null - private var useUnorderedMapInDifferentiatorCache: Boolean? = null private var viewCullingOutsetRatioCache: Double? = null private var viewTransitionEnabledCache: Boolean? = null private var viewTransitionUseHardwareBitmapAndroidCache: Boolean? = null @@ -876,15 +875,6 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces return cached } - override fun useUnorderedMapInDifferentiator(): Boolean { - var cached = useUnorderedMapInDifferentiatorCache - if (cached == null) { - cached = ReactNativeFeatureFlagsCxxInterop.useUnorderedMapInDifferentiator() - useUnorderedMapInDifferentiatorCache = cached - } - return cached - } - override fun viewCullingOutsetRatio(): Double { var cached = viewCullingOutsetRatioCache if (cached == null) { diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxInterop.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxInterop.kt index 56cefe7e962..7d9d5be0187 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxInterop.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxInterop.kt @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<<16ca9a4b47da90ea71300eb37287e28b>> + * @generated SignedSource<> */ /** @@ -198,8 +198,6 @@ public object ReactNativeFeatureFlagsCxxInterop { @DoNotStrip @JvmStatic public external fun useTurboModuleInterop(): Boolean - @DoNotStrip @JvmStatic public external fun useUnorderedMapInDifferentiator(): Boolean - @DoNotStrip @JvmStatic public external fun viewCullingOutsetRatio(): Double @DoNotStrip @JvmStatic public external fun viewTransitionEnabled(): Boolean diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsDefaults.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsDefaults.kt index b8eaefddb44..6d17c72fc83 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsDefaults.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsDefaults.kt @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<<10e6516b3c9cf53ae2e48c8b8cd51033>> + * @generated SignedSource<<960de240ad648acc1dca10a80e2bf8a5>> */ /** @@ -193,8 +193,6 @@ public open class ReactNativeFeatureFlagsDefaults : ReactNativeFeatureFlagsProvi override fun useTurboModuleInterop(): Boolean = false - override fun useUnorderedMapInDifferentiator(): Boolean = false - override fun viewCullingOutsetRatio(): Double = 0.0 override fun viewTransitionEnabled(): Boolean = false diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsLocalAccessor.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsLocalAccessor.kt index add1468147a..ad9373a5e6f 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsLocalAccessor.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsLocalAccessor.kt @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<<441fe8be28d4521e1fe9fe7b87b74cf2>> + * @generated SignedSource<<39d4538c638e38cbd1655064edc74761>> */ /** @@ -109,7 +109,6 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc private var useSharedAnimatedBackendCache: Boolean? = null private var useTraitHiddenOnAndroidCache: Boolean? = null private var useTurboModuleInteropCache: Boolean? = null - private var useUnorderedMapInDifferentiatorCache: Boolean? = null private var viewCullingOutsetRatioCache: Double? = null private var viewTransitionEnabledCache: Boolean? = null private var viewTransitionUseHardwareBitmapAndroidCache: Boolean? = null @@ -965,16 +964,6 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc return cached } - override fun useUnorderedMapInDifferentiator(): Boolean { - var cached = useUnorderedMapInDifferentiatorCache - if (cached == null) { - cached = currentProvider.useUnorderedMapInDifferentiator() - accessedFeatureFlags.add("useUnorderedMapInDifferentiator") - useUnorderedMapInDifferentiatorCache = cached - } - return cached - } - override fun viewCullingOutsetRatio(): Double { var cached = viewCullingOutsetRatioCache if (cached == null) { diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsProvider.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsProvider.kt index 622433ab7be..52403c9d0f6 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsProvider.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsProvider.kt @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<<972dbaef144818484bafff334cf97ef2>> + * @generated SignedSource<<4fa46d585a2fe3515557bf06f0e1189f>> */ /** @@ -193,8 +193,6 @@ public interface ReactNativeFeatureFlagsProvider { @DoNotStrip public fun useTurboModuleInterop(): Boolean - @DoNotStrip public fun useUnorderedMapInDifferentiator(): Boolean - @DoNotStrip public fun viewCullingOutsetRatio(): Double @DoNotStrip public fun viewTransitionEnabled(): Boolean diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.cpp b/packages/react-native/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.cpp index 39af8adebf7..8a598a65ef0 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.cpp +++ b/packages/react-native/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.cpp @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<> + * @generated SignedSource<> */ /** @@ -549,12 +549,6 @@ class ReactNativeFeatureFlagsJavaProvider return method(javaProvider_); } - bool useUnorderedMapInDifferentiator() override { - static const auto method = - getReactNativeFeatureFlagsProviderJavaClass()->getMethod("useUnorderedMapInDifferentiator"); - return method(javaProvider_); - } - double viewCullingOutsetRatio() override { static const auto method = getReactNativeFeatureFlagsProviderJavaClass()->getMethod("viewCullingOutsetRatio"); @@ -1008,11 +1002,6 @@ bool JReactNativeFeatureFlagsCxxInterop::useTurboModuleInterop( return ReactNativeFeatureFlags::useTurboModuleInterop(); } -bool JReactNativeFeatureFlagsCxxInterop::useUnorderedMapInDifferentiator( - facebook::jni::alias_ref /*unused*/) { - return ReactNativeFeatureFlags::useUnorderedMapInDifferentiator(); -} - double JReactNativeFeatureFlagsCxxInterop::viewCullingOutsetRatio( facebook::jni::alias_ref /*unused*/) { return ReactNativeFeatureFlags::viewCullingOutsetRatio(); @@ -1319,9 +1308,6 @@ void JReactNativeFeatureFlagsCxxInterop::registerNatives() { makeNativeMethod( "useTurboModuleInterop", JReactNativeFeatureFlagsCxxInterop::useTurboModuleInterop), - makeNativeMethod( - "useUnorderedMapInDifferentiator", - JReactNativeFeatureFlagsCxxInterop::useUnorderedMapInDifferentiator), makeNativeMethod( "viewCullingOutsetRatio", JReactNativeFeatureFlagsCxxInterop::viewCullingOutsetRatio), diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.h b/packages/react-native/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.h index a2549866de4..62f448e90bd 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.h +++ b/packages/react-native/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.h @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<<3007628255a078dafc01eb16b3d55fbe>> + * @generated SignedSource<<8e51c38f988854dd63291df26a78326e>> */ /** @@ -285,9 +285,6 @@ class JReactNativeFeatureFlagsCxxInterop static bool useTurboModuleInterop( facebook::jni::alias_ref); - static bool useUnorderedMapInDifferentiator( - facebook::jni::alias_ref); - static double viewCullingOutsetRatio( facebook::jni::alias_ref); diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlags.cpp b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlags.cpp index 73cd464155c..e2d52f113bb 100644 --- a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlags.cpp +++ b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlags.cpp @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<<5c308b51617953c21d3ae60dc8c530bb>> + * @generated SignedSource<> */ /** @@ -366,10 +366,6 @@ bool ReactNativeFeatureFlags::useTurboModuleInterop() { return getAccessor().useTurboModuleInterop(); } -bool ReactNativeFeatureFlags::useUnorderedMapInDifferentiator() { - return getAccessor().useUnorderedMapInDifferentiator(); -} - double ReactNativeFeatureFlags::viewCullingOutsetRatio() { return getAccessor().viewCullingOutsetRatio(); } diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlags.h b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlags.h index 9b23f06a34e..875cf7d794c 100644 --- a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlags.h +++ b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlags.h @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<> + * @generated SignedSource<<6508c960d2b27f479ecb40056d5c7997>> */ /** @@ -464,11 +464,6 @@ class ReactNativeFeatureFlags { */ RN_EXPORT static bool useTurboModuleInterop(); - /** - * Use std::unordered_map instead of TinyMap in the Differentiator for improved lookup performance. - */ - RN_EXPORT static bool useUnorderedMapInDifferentiator(); - /** * Outset the culling context frame with the provided ratio. The culling context frame size will be outset by width * ratio on the left and right, and height * ratio on the top and bottom. */ diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.cpp b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.cpp index 444a64318c3..ec040c4decc 100644 --- a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.cpp +++ b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.cpp @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<> + * @generated SignedSource<<741c9218697690640831ca2e47090938>> */ /** @@ -1559,24 +1559,6 @@ bool ReactNativeFeatureFlagsAccessor::useTurboModuleInterop() { return flagValue.value(); } -bool ReactNativeFeatureFlagsAccessor::useUnorderedMapInDifferentiator() { - auto flagValue = useUnorderedMapInDifferentiator_.load(); - - if (!flagValue.has_value()) { - // This block is not exclusive but it is not necessary. - // If multiple threads try to initialize the feature flag, we would only - // be accessing the provider multiple times but the end state of this - // instance and the returned flag value would be the same. - - markFlagAsAccessed(85, "useUnorderedMapInDifferentiator"); - - flagValue = currentProvider_->useUnorderedMapInDifferentiator(); - useUnorderedMapInDifferentiator_ = flagValue; - } - - return flagValue.value(); -} - double ReactNativeFeatureFlagsAccessor::viewCullingOutsetRatio() { auto flagValue = viewCullingOutsetRatio_.load(); @@ -1586,7 +1568,7 @@ double ReactNativeFeatureFlagsAccessor::viewCullingOutsetRatio() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(86, "viewCullingOutsetRatio"); + markFlagAsAccessed(85, "viewCullingOutsetRatio"); flagValue = currentProvider_->viewCullingOutsetRatio(); viewCullingOutsetRatio_ = flagValue; @@ -1604,7 +1586,7 @@ bool ReactNativeFeatureFlagsAccessor::viewTransitionEnabled() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(87, "viewTransitionEnabled"); + markFlagAsAccessed(86, "viewTransitionEnabled"); flagValue = currentProvider_->viewTransitionEnabled(); viewTransitionEnabled_ = flagValue; @@ -1622,7 +1604,7 @@ bool ReactNativeFeatureFlagsAccessor::viewTransitionUseHardwareBitmapAndroid() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(88, "viewTransitionUseHardwareBitmapAndroid"); + markFlagAsAccessed(87, "viewTransitionUseHardwareBitmapAndroid"); flagValue = currentProvider_->viewTransitionUseHardwareBitmapAndroid(); viewTransitionUseHardwareBitmapAndroid_ = flagValue; @@ -1640,7 +1622,7 @@ double ReactNativeFeatureFlagsAccessor::virtualViewPrerenderRatio() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(89, "virtualViewPrerenderRatio"); + markFlagAsAccessed(88, "virtualViewPrerenderRatio"); flagValue = currentProvider_->virtualViewPrerenderRatio(); virtualViewPrerenderRatio_ = flagValue; diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.h b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.h index 1a60247f0d1..2e791f842fa 100644 --- a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.h +++ b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.h @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<> + * @generated SignedSource<<1bab95e3659f13124ff8f159f38fc39f>> */ /** @@ -117,7 +117,6 @@ class ReactNativeFeatureFlagsAccessor { bool useSharedAnimatedBackend(); bool useTraitHiddenOnAndroid(); bool useTurboModuleInterop(); - bool useUnorderedMapInDifferentiator(); double viewCullingOutsetRatio(); bool viewTransitionEnabled(); bool viewTransitionUseHardwareBitmapAndroid(); @@ -133,7 +132,7 @@ class ReactNativeFeatureFlagsAccessor { std::unique_ptr currentProvider_; bool wasOverridden_; - std::array, 90> accessedFeatureFlags_; + std::array, 89> accessedFeatureFlags_; std::atomic> commonTestFlag_; std::atomic> cdpInteractionMetricsEnabled_; @@ -220,7 +219,6 @@ class ReactNativeFeatureFlagsAccessor { std::atomic> useSharedAnimatedBackend_; std::atomic> useTraitHiddenOnAndroid_; std::atomic> useTurboModuleInterop_; - std::atomic> useUnorderedMapInDifferentiator_; std::atomic> viewCullingOutsetRatio_; std::atomic> viewTransitionEnabled_; std::atomic> viewTransitionUseHardwareBitmapAndroid_; diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDefaults.h b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDefaults.h index 2dd5ab8ccf8..cf6258c28ab 100644 --- a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDefaults.h +++ b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDefaults.h @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<> + * @generated SignedSource<<37d25a3c42a4bc9dde1665aaacd1acbd>> */ /** @@ -367,10 +367,6 @@ class ReactNativeFeatureFlagsDefaults : public ReactNativeFeatureFlagsProvider { return false; } - bool useUnorderedMapInDifferentiator() override { - return false; - } - double viewCullingOutsetRatio() override { return 0.0; } diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDynamicProvider.h b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDynamicProvider.h index 02a18178c55..a6a21a8e12a 100644 --- a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDynamicProvider.h +++ b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDynamicProvider.h @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<> + * @generated SignedSource<> */ /** @@ -810,15 +810,6 @@ class ReactNativeFeatureFlagsDynamicProvider : public ReactNativeFeatureFlagsDef return ReactNativeFeatureFlagsDefaults::useTurboModuleInterop(); } - bool useUnorderedMapInDifferentiator() override { - auto value = values_["useUnorderedMapInDifferentiator"]; - if (!value.isNull()) { - return value.getBool(); - } - - return ReactNativeFeatureFlagsDefaults::useUnorderedMapInDifferentiator(); - } - double viewCullingOutsetRatio() override { auto value = values_["viewCullingOutsetRatio"]; if (!value.isNull()) { diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsProvider.h b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsProvider.h index c487722fbac..6e6f18b6caa 100644 --- a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsProvider.h +++ b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsProvider.h @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<<584f593b7ca1ea2ab72b7de7afd6b70d>> + * @generated SignedSource<> */ /** @@ -110,7 +110,6 @@ class ReactNativeFeatureFlagsProvider { virtual bool useSharedAnimatedBackend() = 0; virtual bool useTraitHiddenOnAndroid() = 0; virtual bool useTurboModuleInterop() = 0; - virtual bool useUnorderedMapInDifferentiator() = 0; virtual double viewCullingOutsetRatio() = 0; virtual bool viewTransitionEnabled() = 0; virtual bool viewTransitionUseHardwareBitmapAndroid() = 0; diff --git a/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.cpp b/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.cpp index 734b486c021..56d7f201ed5 100644 --- a/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.cpp +++ b/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.cpp @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<<086755643a71f66d1cd023fd36d74fd6>> + * @generated SignedSource<> */ /** @@ -469,11 +469,6 @@ bool NativeReactNativeFeatureFlags::useTurboModuleInterop( return ReactNativeFeatureFlags::useTurboModuleInterop(); } -bool NativeReactNativeFeatureFlags::useUnorderedMapInDifferentiator( - jsi::Runtime& /*runtime*/) { - return ReactNativeFeatureFlags::useUnorderedMapInDifferentiator(); -} - double NativeReactNativeFeatureFlags::viewCullingOutsetRatio( jsi::Runtime& /*runtime*/) { return ReactNativeFeatureFlags::viewCullingOutsetRatio(); diff --git a/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.h b/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.h index 4baefa42468..3be4f2a3ca9 100644 --- a/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.h +++ b/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.h @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<<0eb12f4ad26d7d2b558057e3a6bf2de7>> + * @generated SignedSource<<0aa224e971f7ed80b6194c426d59653a>> */ /** @@ -206,8 +206,6 @@ class NativeReactNativeFeatureFlags bool useTurboModuleInterop(jsi::Runtime& runtime); - bool useUnorderedMapInDifferentiator(jsi::Runtime& runtime); - double viewCullingOutsetRatio(jsi::Runtime& runtime); bool viewTransitionEnabled(jsi::Runtime& runtime); diff --git a/packages/react-native/ReactCommon/react/renderer/mounting/Differentiator.cpp b/packages/react-native/ReactCommon/react/renderer/mounting/Differentiator.cpp index 641826dbb8e..dd89fbb89a3 100644 --- a/packages/react-native/ReactCommon/react/renderer/mounting/Differentiator.cpp +++ b/packages/react-native/ReactCommon/react/renderer/mounting/Differentiator.cpp @@ -11,8 +11,8 @@ #include #include #include +#include #include "internal/CullingContext.h" -#include "internal/DiffMap.h" #include "internal/ShadowViewNodePair.h" #include "internal/sliceChildShadowNodeViewPairs.h" @@ -58,7 +58,9 @@ static std::ostream& operator<<( #ifdef DEBUG_LOGS_DIFFER template -static std::ostream& operator<<(std::ostream& out, DiffMap& map) { +static std::ostream& operator<<( + std::ostream& out, + const std::unordered_map& map) { auto it = map.begin(); if (it != map.end()) { out << *it->second; @@ -143,7 +145,7 @@ struct OrderedMutationInstructionContainer { static void updateMatchedPairSubtrees( ViewNodePairScope& scope, OrderedMutationInstructionContainer& mutationContainer, - DiffMap& newRemainingPairs, + std::unordered_map& newRemainingPairs, std::vector& oldChildPairs, Tag parentTag, const ShadowViewNodePair& oldPair, @@ -164,11 +166,11 @@ static void calculateShadowViewMutationsFlattener( ReparentMode reparentMode, OrderedMutationInstructionContainer& mutationContainer, Tag parentTag, - DiffMap& unvisitedOtherNodes, + std::unordered_map& unvisitedOtherNodes, const ShadowViewNodePair& node, Tag parentTagForUpdate, - DiffMap* parentSubVisitedOtherNewNodes, - DiffMap* parentSubVisitedOtherOldNodes, + std::unordered_map* parentSubVisitedOtherNewNodes, + std::unordered_map* parentSubVisitedOtherOldNodes, const CullingContext& cullingContextForUnvisitedOtherNodes, const CullingContext& cullingContext); @@ -183,7 +185,7 @@ static void calculateShadowViewMutationsFlattener( static void updateMatchedPairSubtrees( ViewNodePairScope& scope, OrderedMutationInstructionContainer& mutationContainer, - DiffMap& newRemainingPairs, + std::unordered_map& newRemainingPairs, std::vector& oldChildPairs, Tag parentTag, const ShadowViewNodePair& oldPair, @@ -239,8 +241,8 @@ static void updateMatchedPairSubtrees( // interwoven with children from other nodes, etc. auto oldFlattenedNodes = sliceChildShadowNodeViewPairsFromViewNodePair( oldPair, scope, true, oldCullingContextCopy); - auto unvisitedOldChildPairs = - DiffMap(oldFlattenedNodes.size()); + std::unordered_map unvisitedOldChildPairs; + unvisitedOldChildPairs.reserve(oldFlattenedNodes.size()); for (size_t i = 0, j = 0; i < oldChildPairs.size() && j < oldFlattenedNodes.size(); i++) { @@ -423,11 +425,11 @@ static void calculateShadowViewMutationsFlattener( ReparentMode reparentMode, OrderedMutationInstructionContainer& mutationContainer, Tag parentTag, - DiffMap& unvisitedOtherNodes, + std::unordered_map& unvisitedOtherNodes, const ShadowViewNodePair& node, Tag parentTagForUpdate, - DiffMap* parentSubVisitedOtherNewNodes, - DiffMap* parentSubVisitedOtherOldNodes, + std::unordered_map* parentSubVisitedOtherNewNodes, + std::unordered_map* parentSubVisitedOtherOldNodes, const CullingContext& cullingContextForUnvisitedOtherNodes, const CullingContext& cullingContext) { // Step 1: iterate through entire tree @@ -446,8 +448,8 @@ static void calculateShadowViewMutationsFlattener( // Views in other tree that are visited by sub-flattening or // sub-unflattening - DiffMap subVisitedOtherNewNodes{}; - DiffMap subVisitedOtherOldNodes{}; + std::unordered_map subVisitedOtherNewNodes{}; + std::unordered_map subVisitedOtherOldNodes{}; auto subVisitedNewMap = (parentSubVisitedOtherNewNodes != nullptr ? parentSubVisitedOtherNewNodes : &subVisitedOtherNewNodes); @@ -456,8 +458,9 @@ static void calculateShadowViewMutationsFlattener( : &subVisitedOtherOldNodes); // Candidates for full tree creation or deletion at the end of this function - auto deletionCreationCandidatePairs = - DiffMap(treeChildren.size()); + std::unordered_map + deletionCreationCandidatePairs; + deletionCreationCandidatePairs.reserve(treeChildren.size()); for (size_t index = 0; index < treeChildren.size() && index < treeChildren.size(); @@ -700,8 +703,9 @@ static void calculateShadowViewMutationsFlattener( ? adjustedNewCullingContext : adjustedOldCullingContext); // Construct unvisited nodes map - auto unvisitedRecursiveChildPairs = - DiffMap(flattenedNodes.size()); + std::unordered_map + unvisitedRecursiveChildPairs; + unvisitedRecursiveChildPairs.reserve(flattenedNodes.size()); for (auto& flattenedNode : flattenedNodes) { auto& newChild = *flattenedNode; @@ -1056,9 +1060,11 @@ static void calculateShadowViewMutations( // Greedy Stage 4 algorithm. // Collect map of tags in the new list auto remainingCount = newChildPairs.size() - lastIndexAfterFirstStage; - auto newRemainingPairs = DiffMap(remainingCount); - auto newInsertedPairs = DiffMap(remainingCount); - auto deletionCandidatePairs = DiffMap{}; + std::unordered_map newRemainingPairs; + newRemainingPairs.reserve(remainingCount); + std::unordered_map newInsertedPairs; + newInsertedPairs.reserve(remainingCount); + std::unordered_map deletionCandidatePairs{}; for (index = lastIndexAfterFirstStage; index < newChildPairs.size(); index++) { auto& newChildPair = *newChildPairs[index]; diff --git a/packages/react-native/ReactCommon/react/renderer/mounting/internal/DiffMap.h b/packages/react-native/ReactCommon/react/renderer/mounting/internal/DiffMap.h deleted file mode 100644 index 14e05f685f9..00000000000 --- a/packages/react-native/ReactCommon/react/renderer/mounting/internal/DiffMap.h +++ /dev/null @@ -1,170 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -#pragma once - -#include -#include -#include -#include "TinyMap.h" - -namespace facebook::react { - -/** - * A facade that delegates to either TinyMap or std::unordered_map based on - * the useUnorderedMapInDifferentiator feature flag. This allows safe rollout - * of the unordered_map change in the Differentiator. - * - * Exposes a subset of the std::unordered_map interface used by the - * Differentiator: find, insert, erase, begin, end, and range-for. - * - * The Iterator returns const references because it uses a cached copy - * internally (the two backends have different pair types). The Differentiator - * only reads through iterators, never writes. - */ -template -class DiffMap final { - public: - using Pair = std::pair; - - class Iterator { - public: - const Pair &operator*() const - { - syncCached(); - return cached_; - } - - const Pair *operator->() const - { - syncCached(); - return &cached_; - } - - Iterator &operator++() - { - if (useUnorderedMap_) { - ++umIt_; - } else { - ++tinyIt_; - } - dirty_ = true; - return *this; - } - - bool operator==(const Iterator &other) const - { - if (useUnorderedMap_) { - return umIt_ == other.umIt_; - } - return tinyIt_ == other.tinyIt_; - } - - bool operator!=(const Iterator &other) const - { - return !(*this == other); - } - - private: - friend class DiffMap; - - void syncCached() const - { - if (!dirty_) { - return; - } - if (useUnorderedMap_) { - cached_ = {umIt_->first, umIt_->second}; - } else { - cached_ = {tinyIt_->first, tinyIt_->second}; - } - dirty_ = false; - } - - bool useUnorderedMap_{false}; - typename TinyMap::Iterator tinyIt_{nullptr}; - typename std::unordered_map::iterator umIt_{}; - mutable Pair cached_{}; - mutable bool dirty_{true}; - }; - - DiffMap() : useUnorderedMap_(ReactNativeFeatureFlags::useUnorderedMapInDifferentiator()) - { - if (useUnorderedMap_) { - unorderedMap_.emplace(); - } - } - - explicit DiffMap(size_t sizeHint) : useUnorderedMap_(ReactNativeFeatureFlags::useUnorderedMapInDifferentiator()) - { - if (useUnorderedMap_) { - unorderedMap_.emplace(); - unorderedMap_->reserve(sizeHint); - } - } - - Iterator begin() - { - Iterator it; - it.useUnorderedMap_ = useUnorderedMap_; - if (useUnorderedMap_) { - it.umIt_ = unorderedMap_->begin(); - } else { - it.tinyIt_ = tinyMap_.begin(); - } - return it; - } - - Iterator end() - { - Iterator it; - it.useUnorderedMap_ = useUnorderedMap_; - if (useUnorderedMap_) { - it.umIt_ = unorderedMap_->end(); - } else { - it.tinyIt_ = tinyMap_.end(); - } - return it; - } - - Iterator find(KeyT key) - { - Iterator it; - it.useUnorderedMap_ = useUnorderedMap_; - if (useUnorderedMap_) { - it.umIt_ = unorderedMap_->find(key); - } else { - it.tinyIt_ = tinyMap_.find(key); - } - return it; - } - - void insert(Pair pair) - { - if (useUnorderedMap_) { - unorderedMap_->insert(std::move(pair)); - } else { - tinyMap_.insert(std::move(pair)); - } - } - - void erase(Iterator it) - { - if (useUnorderedMap_) { - unorderedMap_->erase(it.umIt_); - } else { - tinyMap_.erase(it.tinyIt_); - } - } - - private: - bool useUnorderedMap_; - TinyMap tinyMap_; - std::optional> unorderedMap_; -}; - -} // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/mounting/internal/TinyMap.h b/packages/react-native/ReactCommon/react/renderer/mounting/internal/TinyMap.h deleted file mode 100644 index 445071d4468..00000000000 --- a/packages/react-native/ReactCommon/react/renderer/mounting/internal/TinyMap.h +++ /dev/null @@ -1,147 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -#pragma once - -#include -#include - -/* - * Extremely simple and naive implementation of a map. - * The map is simple but it's optimized for particular constraints that we have - * here. - * - * A regular map implementation (e.g. `std::unordered_map`) has some basic - * performance guarantees like constant average insertion and lookup complexity. - * This is nice, but it's *average* complexity measured on a non-trivial amount - * of data. The regular map is a very complex data structure that using hashing, - * buckets, multiple comprising operations, multiple allocations and so on. - * - * In our particular case, we need a map for `int` to `void *` with a dozen - * values. In these conditions, nothing can beat a naive implementation using a - * stack-allocated vector. And this implementation is exactly this: no - * allocation, no hashing, no complex branching, no buckets, no iterators, no - * rehashing, no other guarantees. It's crazy limited, unsafe, and performant on - * a trivial amount of data. - * - * Besides that, we also need to optimize for insertion performance (the case - * where a bunch of views appears on the screen first time); in this - * implementation, this is as performant as vector `push_back`. - */ -template -class TinyMap final { - public: - using Pair = std::pair; - using Iterator = Pair *; - - /** - * This must strictly only be called from outside of this class. - */ - inline Iterator begin() - { - // Force a clean so that iterating over this TinyMap doesn't iterate over - // erased elements. If all elements erased are at the front of the vector, - // then we don't need to clean. - cleanVector(erasedAtFront_ != numErased_); - - Iterator it = begin_(); - - if (it != nullptr) { - return it + erasedAtFront_; - } - - return nullptr; - } - - inline Iterator end() - { - // `back()` asserts on the vector being non-empty - if (vector_.empty() || numErased_ == vector_.size()) { - return nullptr; - } - - return &vector_.back() + 1; - } - - inline Iterator find(KeyT key) - { - cleanVector(); - - react_native_assert(key != 0); - - if (begin_() == nullptr) { - return end(); - } - - for (auto it = begin_() + erasedAtFront_; it != end(); it++) { - if (it->first == key) { - return it; - } - } - - return end(); - } - - inline void insert(Pair pair) - { - react_native_assert(pair.first != 0); - vector_.push_back(pair); - } - - inline void erase(Iterator iterator) - { - // Invalidate tag. - iterator->first = 0; - - if (iterator == begin_() + erasedAtFront_) { - erasedAtFront_++; - } - - numErased_++; - } - - private: - /** - * Same as begin() but doesn't call cleanVector at the beginning. - */ - inline Iterator begin_() - { - // `front()` asserts on the vector being non-empty - if (vector_.empty() || vector_.size() == numErased_) { - return nullptr; - } - - return &vector_.front(); - } - - /** - * Remove erased elements from internal vector. - * We only modify the vector if erased elements are at least half of the - * vector. - */ - inline void cleanVector(bool forceClean = false) - { - if ((numErased_ < (vector_.size() / 2) && !forceClean) || vector_.empty() || numErased_ == 0 || - numErased_ == erasedAtFront_) { - return; - } - - if (numErased_ == vector_.size()) { - vector_.clear(); - } else { - vector_.erase( - std::remove_if(vector_.begin(), vector_.end(), [](const auto &item) { return item.first == 0; }), - vector_.end()); - } - numErased_ = 0; - erasedAtFront_ = 0; - } - - std::vector vector_; - size_t numErased_{0}; - size_t erasedAtFront_{0}; -}; diff --git a/packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js b/packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js index dfc8cda5ab5..bc17e3dbd9a 100644 --- a/packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js +++ b/packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js @@ -955,17 +955,6 @@ const definitions: FeatureFlagDefinitions = { }, ossReleaseStage: 'canary', }, - useUnorderedMapInDifferentiator: { - defaultValue: false, - metadata: { - dateAdded: '2026-02-26', - description: - 'Use std::unordered_map instead of TinyMap in the Differentiator for improved lookup performance.', - expectedReleaseValue: true, - purpose: 'experimentation', - }, - ossReleaseStage: 'none', - }, viewCullingOutsetRatio: { defaultValue: 0, metadata: { diff --git a/packages/react-native/src/private/featureflags/ReactNativeFeatureFlags.js b/packages/react-native/src/private/featureflags/ReactNativeFeatureFlags.js index 3203b40172e..de57db14401 100644 --- a/packages/react-native/src/private/featureflags/ReactNativeFeatureFlags.js +++ b/packages/react-native/src/private/featureflags/ReactNativeFeatureFlags.js @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<> + * @generated SignedSource<<1d2fba4cafe542180a63997159b5cd2a>> * @flow strict * @noformat */ @@ -131,7 +131,6 @@ export type ReactNativeFeatureFlags = $ReadOnly<{ useSharedAnimatedBackend: Getter, useTraitHiddenOnAndroid: Getter, useTurboModuleInterop: Getter, - useUnorderedMapInDifferentiator: Getter, viewCullingOutsetRatio: Getter, viewTransitionEnabled: Getter, viewTransitionUseHardwareBitmapAndroid: Getter, @@ -537,10 +536,6 @@ export const useTraitHiddenOnAndroid: Getter = createNativeFlagGetter(' * In Bridgeless mode, should legacy NativeModules use the TurboModule system? */ export const useTurboModuleInterop: Getter = createNativeFlagGetter('useTurboModuleInterop', false); -/** - * Use std::unordered_map instead of TinyMap in the Differentiator for improved lookup performance. - */ -export const useUnorderedMapInDifferentiator: Getter = createNativeFlagGetter('useUnorderedMapInDifferentiator', false); /** * Outset the culling context frame with the provided ratio. The culling context frame size will be outset by width * ratio on the left and right, and height * ratio on the top and bottom. */ diff --git a/packages/react-native/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js b/packages/react-native/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js index af309dee200..c08e658e3f3 100644 --- a/packages/react-native/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +++ b/packages/react-native/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<<922d3f0709d01e77b6ef4061c541130f>> + * @generated SignedSource<> * @flow strict * @noformat */ @@ -110,7 +110,6 @@ export interface Spec extends TurboModule { +useSharedAnimatedBackend?: () => boolean; +useTraitHiddenOnAndroid?: () => boolean; +useTurboModuleInterop?: () => boolean; - +useUnorderedMapInDifferentiator?: () => boolean; +viewCullingOutsetRatio?: () => number; +viewTransitionEnabled?: () => boolean; +viewTransitionUseHardwareBitmapAndroid?: () => boolean; diff --git a/scripts/cxx-api/api-snapshots/ReactAndroidDebugCxx.api b/scripts/cxx-api/api-snapshots/ReactAndroidDebugCxx.api index cc7c7b338aa..9a10db99294 100644 --- a/scripts/cxx-api/api-snapshots/ReactAndroidDebugCxx.api +++ b/scripts/cxx-api/api-snapshots/ReactAndroidDebugCxx.api @@ -8283,26 +8283,6 @@ class facebook::react::SimpleThreadSafeCache { public std::pair getWithKey(const KeyT& key, facebook::react::CacheGeneratorFunction auto generator) const; } -template -class facebook::react::DiffMap { - public DiffMap(); - public DiffMap(size_t sizeHint); - public facebook::react::DiffMap::Iterator begin(); - public facebook::react::DiffMap::Iterator end(); - public facebook::react::DiffMap::Iterator find(KeyT key); - public using Pair = std::pair; - public void erase(facebook::react::DiffMap::Iterator it); - public void insert(facebook::react::DiffMap::Pair pair); -} - -class facebook::react::DiffMap::Iterator { - public bool operator!=(const facebook::react::DiffMap::Iterator& other) const; - public bool operator==(const facebook::react::DiffMap::Iterator& other) const; - public const facebook::react::DiffMap::Pair& operator*() const; - public const facebook::react::DiffMap::Pair* operator->() const; - public facebook::react::DiffMap::Iterator& operator++(); -} - template class facebook::react::OnScopeExit { public OnScopeExit(const Lambda&& lambda) noexcept; diff --git a/scripts/cxx-api/api-snapshots/ReactAndroidNewarchCxx.api b/scripts/cxx-api/api-snapshots/ReactAndroidNewarchCxx.api index 5fe3ece7b09..9d8211cbf16 100644 --- a/scripts/cxx-api/api-snapshots/ReactAndroidNewarchCxx.api +++ b/scripts/cxx-api/api-snapshots/ReactAndroidNewarchCxx.api @@ -8059,26 +8059,6 @@ class facebook::react::SimpleThreadSafeCache { public std::pair getWithKey(const KeyT& key, facebook::react::CacheGeneratorFunction auto generator) const; } -template -class facebook::react::DiffMap { - public DiffMap(); - public DiffMap(size_t sizeHint); - public facebook::react::DiffMap::Iterator begin(); - public facebook::react::DiffMap::Iterator end(); - public facebook::react::DiffMap::Iterator find(KeyT key); - public using Pair = std::pair; - public void erase(facebook::react::DiffMap::Iterator it); - public void insert(facebook::react::DiffMap::Pair pair); -} - -class facebook::react::DiffMap::Iterator { - public bool operator!=(const facebook::react::DiffMap::Iterator& other) const; - public bool operator==(const facebook::react::DiffMap::Iterator& other) const; - public const facebook::react::DiffMap::Pair& operator*() const; - public const facebook::react::DiffMap::Pair* operator->() const; - public facebook::react::DiffMap::Iterator& operator++(); -} - template class facebook::react::OnScopeExit { public OnScopeExit(const Lambda&& lambda) noexcept; diff --git a/scripts/cxx-api/api-snapshots/ReactAndroidReleaseCxx.api b/scripts/cxx-api/api-snapshots/ReactAndroidReleaseCxx.api index ff664fc38be..93f507c3138 100644 --- a/scripts/cxx-api/api-snapshots/ReactAndroidReleaseCxx.api +++ b/scripts/cxx-api/api-snapshots/ReactAndroidReleaseCxx.api @@ -8274,26 +8274,6 @@ class facebook::react::SimpleThreadSafeCache { public std::pair getWithKey(const KeyT& key, facebook::react::CacheGeneratorFunction auto generator) const; } -template -class facebook::react::DiffMap { - public DiffMap(); - public DiffMap(size_t sizeHint); - public facebook::react::DiffMap::Iterator begin(); - public facebook::react::DiffMap::Iterator end(); - public facebook::react::DiffMap::Iterator find(KeyT key); - public using Pair = std::pair; - public void erase(facebook::react::DiffMap::Iterator it); - public void insert(facebook::react::DiffMap::Pair pair); -} - -class facebook::react::DiffMap::Iterator { - public bool operator!=(const facebook::react::DiffMap::Iterator& other) const; - public bool operator==(const facebook::react::DiffMap::Iterator& other) const; - public const facebook::react::DiffMap::Pair& operator*() const; - public const facebook::react::DiffMap::Pair* operator->() const; - public facebook::react::DiffMap::Iterator& operator++(); -} - template class facebook::react::OnScopeExit { public OnScopeExit(const Lambda&& lambda) noexcept; diff --git a/scripts/cxx-api/api-snapshots/ReactAppleDebugCxx.api b/scripts/cxx-api/api-snapshots/ReactAppleDebugCxx.api index 973ca78172e..a2b9bb40e12 100644 --- a/scripts/cxx-api/api-snapshots/ReactAppleDebugCxx.api +++ b/scripts/cxx-api/api-snapshots/ReactAppleDebugCxx.api @@ -10667,26 +10667,6 @@ class facebook::react::SimpleThreadSafeCache { public std::pair getWithKey(const KeyT& key, facebook::react::CacheGeneratorFunction auto generator) const; } -template -class facebook::react::DiffMap { - public DiffMap(); - public DiffMap(size_t sizeHint); - public facebook::react::DiffMap::Iterator begin(); - public facebook::react::DiffMap::Iterator end(); - public facebook::react::DiffMap::Iterator find(KeyT key); - public using Pair = std::pair; - public void erase(facebook::react::DiffMap::Iterator it); - public void insert(facebook::react::DiffMap::Pair pair); -} - -class facebook::react::DiffMap::Iterator { - public bool operator!=(const facebook::react::DiffMap::Iterator& other) const; - public bool operator==(const facebook::react::DiffMap::Iterator& other) const; - public const facebook::react::DiffMap::Pair& operator*() const; - public const facebook::react::DiffMap::Pair* operator->() const; - public facebook::react::DiffMap::Iterator& operator++(); -} - template class facebook::react::OnScopeExit { public OnScopeExit(const Lambda&& lambda) noexcept; diff --git a/scripts/cxx-api/api-snapshots/ReactAppleNewarchCxx.api b/scripts/cxx-api/api-snapshots/ReactAppleNewarchCxx.api index 6d2f26f0422..66dd85e4cb8 100644 --- a/scripts/cxx-api/api-snapshots/ReactAppleNewarchCxx.api +++ b/scripts/cxx-api/api-snapshots/ReactAppleNewarchCxx.api @@ -10116,26 +10116,6 @@ class facebook::react::SimpleThreadSafeCache { public std::pair getWithKey(const KeyT& key, facebook::react::CacheGeneratorFunction auto generator) const; } -template -class facebook::react::DiffMap { - public DiffMap(); - public DiffMap(size_t sizeHint); - public facebook::react::DiffMap::Iterator begin(); - public facebook::react::DiffMap::Iterator end(); - public facebook::react::DiffMap::Iterator find(KeyT key); - public using Pair = std::pair; - public void erase(facebook::react::DiffMap::Iterator it); - public void insert(facebook::react::DiffMap::Pair pair); -} - -class facebook::react::DiffMap::Iterator { - public bool operator!=(const facebook::react::DiffMap::Iterator& other) const; - public bool operator==(const facebook::react::DiffMap::Iterator& other) const; - public const facebook::react::DiffMap::Pair& operator*() const; - public const facebook::react::DiffMap::Pair* operator->() const; - public facebook::react::DiffMap::Iterator& operator++(); -} - template class facebook::react::OnScopeExit { public OnScopeExit(const Lambda&& lambda) noexcept; diff --git a/scripts/cxx-api/api-snapshots/ReactAppleReleaseCxx.api b/scripts/cxx-api/api-snapshots/ReactAppleReleaseCxx.api index c1bb3484c5e..84098faa318 100644 --- a/scripts/cxx-api/api-snapshots/ReactAppleReleaseCxx.api +++ b/scripts/cxx-api/api-snapshots/ReactAppleReleaseCxx.api @@ -10658,26 +10658,6 @@ class facebook::react::SimpleThreadSafeCache { public std::pair getWithKey(const KeyT& key, facebook::react::CacheGeneratorFunction auto generator) const; } -template -class facebook::react::DiffMap { - public DiffMap(); - public DiffMap(size_t sizeHint); - public facebook::react::DiffMap::Iterator begin(); - public facebook::react::DiffMap::Iterator end(); - public facebook::react::DiffMap::Iterator find(KeyT key); - public using Pair = std::pair; - public void erase(facebook::react::DiffMap::Iterator it); - public void insert(facebook::react::DiffMap::Pair pair); -} - -class facebook::react::DiffMap::Iterator { - public bool operator!=(const facebook::react::DiffMap::Iterator& other) const; - public bool operator==(const facebook::react::DiffMap::Iterator& other) const; - public const facebook::react::DiffMap::Pair& operator*() const; - public const facebook::react::DiffMap::Pair* operator->() const; - public facebook::react::DiffMap::Iterator& operator++(); -} - template class facebook::react::OnScopeExit { public OnScopeExit(const Lambda&& lambda) noexcept; diff --git a/scripts/cxx-api/api-snapshots/ReactCommonDebugCxx.api b/scripts/cxx-api/api-snapshots/ReactCommonDebugCxx.api index 24cad7a45f4..3a7473351c4 100644 --- a/scripts/cxx-api/api-snapshots/ReactCommonDebugCxx.api +++ b/scripts/cxx-api/api-snapshots/ReactCommonDebugCxx.api @@ -6367,26 +6367,6 @@ class facebook::react::SimpleThreadSafeCache { public std::pair getWithKey(const KeyT& key, facebook::react::CacheGeneratorFunction auto generator) const; } -template -class facebook::react::DiffMap { - public DiffMap(); - public DiffMap(size_t sizeHint); - public facebook::react::DiffMap::Iterator begin(); - public facebook::react::DiffMap::Iterator end(); - public facebook::react::DiffMap::Iterator find(KeyT key); - public using Pair = std::pair; - public void erase(facebook::react::DiffMap::Iterator it); - public void insert(facebook::react::DiffMap::Pair pair); -} - -class facebook::react::DiffMap::Iterator { - public bool operator!=(const facebook::react::DiffMap::Iterator& other) const; - public bool operator==(const facebook::react::DiffMap::Iterator& other) const; - public const facebook::react::DiffMap::Pair& operator*() const; - public const facebook::react::DiffMap::Pair* operator->() const; - public facebook::react::DiffMap::Iterator& operator++(); -} - template class facebook::react::OnScopeExit { public OnScopeExit(const Lambda&& lambda) noexcept; diff --git a/scripts/cxx-api/api-snapshots/ReactCommonNewarchCxx.api b/scripts/cxx-api/api-snapshots/ReactCommonNewarchCxx.api index 7576ead1ec2..5a5fc19d0af 100644 --- a/scripts/cxx-api/api-snapshots/ReactCommonNewarchCxx.api +++ b/scripts/cxx-api/api-snapshots/ReactCommonNewarchCxx.api @@ -6207,26 +6207,6 @@ class facebook::react::SimpleThreadSafeCache { public std::pair getWithKey(const KeyT& key, facebook::react::CacheGeneratorFunction auto generator) const; } -template -class facebook::react::DiffMap { - public DiffMap(); - public DiffMap(size_t sizeHint); - public facebook::react::DiffMap::Iterator begin(); - public facebook::react::DiffMap::Iterator end(); - public facebook::react::DiffMap::Iterator find(KeyT key); - public using Pair = std::pair; - public void erase(facebook::react::DiffMap::Iterator it); - public void insert(facebook::react::DiffMap::Pair pair); -} - -class facebook::react::DiffMap::Iterator { - public bool operator!=(const facebook::react::DiffMap::Iterator& other) const; - public bool operator==(const facebook::react::DiffMap::Iterator& other) const; - public const facebook::react::DiffMap::Pair& operator*() const; - public const facebook::react::DiffMap::Pair* operator->() const; - public facebook::react::DiffMap::Iterator& operator++(); -} - template class facebook::react::OnScopeExit { public OnScopeExit(const Lambda&& lambda) noexcept; diff --git a/scripts/cxx-api/api-snapshots/ReactCommonReleaseCxx.api b/scripts/cxx-api/api-snapshots/ReactCommonReleaseCxx.api index 6bcf01ff392..f64fbd2790a 100644 --- a/scripts/cxx-api/api-snapshots/ReactCommonReleaseCxx.api +++ b/scripts/cxx-api/api-snapshots/ReactCommonReleaseCxx.api @@ -6358,26 +6358,6 @@ class facebook::react::SimpleThreadSafeCache { public std::pair getWithKey(const KeyT& key, facebook::react::CacheGeneratorFunction auto generator) const; } -template -class facebook::react::DiffMap { - public DiffMap(); - public DiffMap(size_t sizeHint); - public facebook::react::DiffMap::Iterator begin(); - public facebook::react::DiffMap::Iterator end(); - public facebook::react::DiffMap::Iterator find(KeyT key); - public using Pair = std::pair; - public void erase(facebook::react::DiffMap::Iterator it); - public void insert(facebook::react::DiffMap::Pair pair); -} - -class facebook::react::DiffMap::Iterator { - public bool operator!=(const facebook::react::DiffMap::Iterator& other) const; - public bool operator==(const facebook::react::DiffMap::Iterator& other) const; - public const facebook::react::DiffMap::Pair& operator*() const; - public const facebook::react::DiffMap::Pair* operator->() const; - public facebook::react::DiffMap::Iterator& operator++(); -} - template class facebook::react::OnScopeExit { public OnScopeExit(const Lambda&& lambda) noexcept; diff --git a/scripts/cxx-api/config.yml b/scripts/cxx-api/config.yml index b8f38e078a4..1a4e90747cd 100644 --- a/scripts/cxx-api/config.yml +++ b/scripts/cxx-api/config.yml @@ -14,7 +14,6 @@ exclude_symbols: - "(?i)experimental" - "unstable_" - "UnstableLegacy" - - "TinyMap" - "packAnimatedProps" - "DO_NOT_USE" - "_DEPRECATED|DEPRECATED_"