diff --git a/ReactCommon/yoga/yoga/internal/experiments-inl.h b/ReactCommon/yoga/yoga/internal/experiments-inl.h deleted file mode 100644 index 44235590161..00000000000 --- a/ReactCommon/yoga/yoga/internal/experiments-inl.h +++ /dev/null @@ -1,32 +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 "experiments.h" - -#include - -namespace facebook { -namespace yoga { -namespace internal { - -namespace detail { -extern std::bitset enabledExperiments; -} // namespace detail - -inline bool isEnabled(Experiment experiment) { - return detail::enabledExperiments.test(static_cast(experiment)); -} - -inline void disableAllExperiments() { - detail::enabledExperiments = 0; -} - -} // namespace internal -} // namespace yoga -} // namespace facebook diff --git a/ReactCommon/yoga/yoga/internal/experiments.cpp b/ReactCommon/yoga/yoga/internal/experiments.cpp deleted file mode 100644 index 016ea208709..00000000000 --- a/ReactCommon/yoga/yoga/internal/experiments.cpp +++ /dev/null @@ -1,38 +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. - */ - -#include "experiments.h" -#include "experiments-inl.h" - -namespace facebook { -namespace yoga { -namespace internal { - -namespace detail { - -std::bitset enabledExperiments = 0; - -} // namespace detail - -void enable(Experiment experiment) { - detail::enabledExperiments.set(static_cast(experiment)); -} - -void disable(Experiment experiment) { - detail::enabledExperiments.reset(static_cast(experiment)); -} - -bool toggle(Experiment experiment) { - auto bit = static_cast(experiment); - auto previousState = detail::enabledExperiments.test(bit); - detail::enabledExperiments.flip(bit); - return previousState; -} - -} // namespace internal -} // namespace yoga -} // namespace facebook diff --git a/ReactCommon/yoga/yoga/internal/experiments.h b/ReactCommon/yoga/yoga/internal/experiments.h deleted file mode 100644 index 2298e247224..00000000000 --- a/ReactCommon/yoga/yoga/internal/experiments.h +++ /dev/null @@ -1,26 +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 - -namespace facebook { -namespace yoga { -namespace internal { - -enum struct Experiment : size_t { - kDoubleMeasureCallbacks, -}; - -void enable(Experiment); -void disable(Experiment); -bool toggle(Experiment); - -} // namespace internal -} // namespace yoga -} // namespace facebook