Skip to content

Commit

Permalink
[be] Remove unshipped experimental <Cache> element type (#28698)
Browse files Browse the repository at this point in the history
Removes the `<Cache />` element type since we're going with a simpler
caching strategy.

DiffTrain build for commit 7319c61.
  • Loading branch information
josephsavona committed Apr 2, 2024
1 parent 9dd5eea commit cc4e126
Show file tree
Hide file tree
Showing 18 changed files with 185 additions and 337 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<2efa0f7ab5ad5e492b13b7c939b8e190>>
* @generated SignedSource<<afb777050b34d9327e7a32096f5bb566>>
*/

"use strict";
Expand Down Expand Up @@ -37,7 +37,6 @@ if (__DEV__) {
var REACT_MEMO_TYPE = Symbol.for("react.memo");
var REACT_LAZY_TYPE = Symbol.for("react.lazy");
var REACT_OFFSCREEN_TYPE = Symbol.for("react.offscreen");
var REACT_CACHE_TYPE = Symbol.for("react.cache");

// Re-export dynamic flags from the internal module.
var dynamicFlags = dynamicFlagsUntyped; // We destructure each value before re-exporting to avoid a dynamic look-up on
Expand Down Expand Up @@ -66,7 +65,6 @@ if (__DEV__) {
enableLegacyHidden ||
type === REACT_OFFSCREEN_TYPE ||
enableScopeAPI ||
type === REACT_CACHE_TYPE ||
enableTransitionTracing
) {
return true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<f71d56737b959dc3ce937d61f1bd9834>>
* @generated SignedSource<<8b4e45fcdea67ae633a64f641072fdb0>>
*/

"use strict";
Expand All @@ -26,7 +26,6 @@ var dynamicFlagsUntyped = require("ReactNativeInternalFeatureFlags"),
REACT_MEMO_TYPE = Symbol.for("react.memo"),
REACT_LAZY_TYPE = Symbol.for("react.lazy"),
REACT_OFFSCREEN_TYPE = Symbol.for("react.offscreen"),
REACT_CACHE_TYPE = Symbol.for("react.cache"),
enableRenderableContext = dynamicFlagsUntyped.enableRenderableContext,
REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference");
function typeOf(object) {
Expand Down Expand Up @@ -131,7 +130,6 @@ exports.isValidElementType = function (type) {
type === REACT_SUSPENSE_TYPE ||
type === REACT_SUSPENSE_LIST_TYPE ||
type === REACT_OFFSCREEN_TYPE ||
type === REACT_CACHE_TYPE ||
("object" === typeof type &&
null !== type &&
(type.$$typeof === REACT_LAZY_TYPE ||
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<f71d56737b959dc3ce937d61f1bd9834>>
* @generated SignedSource<<8b4e45fcdea67ae633a64f641072fdb0>>
*/

"use strict";
Expand All @@ -26,7 +26,6 @@ var dynamicFlagsUntyped = require("ReactNativeInternalFeatureFlags"),
REACT_MEMO_TYPE = Symbol.for("react.memo"),
REACT_LAZY_TYPE = Symbol.for("react.lazy"),
REACT_OFFSCREEN_TYPE = Symbol.for("react.offscreen"),
REACT_CACHE_TYPE = Symbol.for("react.cache"),
enableRenderableContext = dynamicFlagsUntyped.enableRenderableContext,
REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference");
function typeOf(object) {
Expand Down Expand Up @@ -131,7 +130,6 @@ exports.isValidElementType = function (type) {
type === REACT_SUSPENSE_TYPE ||
type === REACT_SUSPENSE_LIST_TYPE ||
type === REACT_OFFSCREEN_TYPE ||
type === REACT_CACHE_TYPE ||
("object" === typeof type &&
null !== type &&
(type.$$typeof === REACT_LAZY_TYPE ||
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<450ce571f0c96cb1643d074e993d3573>>
* @generated SignedSource<<42436c5e972cb03b026adac4f26b9197>>
*/

"use strict";
Expand Down Expand Up @@ -203,7 +203,6 @@ if (__DEV__) {
var REACT_DEBUG_TRACING_MODE_TYPE = Symbol.for("react.debug_trace_mode");
var REACT_OFFSCREEN_TYPE = Symbol.for("react.offscreen");
var REACT_LEGACY_HIDDEN_TYPE = Symbol.for("react.legacy_hidden");
var REACT_CACHE_TYPE = Symbol.for("react.cache");
var REACT_TRACING_MARKER_TYPE = Symbol.for("react.tracing_marker");
var REACT_MEMO_CACHE_SENTINEL = Symbol.for("react.memo_cache_sentinel");
var MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
Expand Down Expand Up @@ -280,10 +279,6 @@ if (__DEV__) {

case REACT_SUSPENSE_LIST_TYPE:
return "SuspenseList";

case REACT_CACHE_TYPE: {
return "Cache";
}
}

if (typeof type === "object") {
Expand Down Expand Up @@ -26490,12 +26485,6 @@ if (__DEV__) {

// Fall through

case REACT_CACHE_TYPE: {
return createFiberFromCache(pendingProps, mode, lanes, key);
}

// Fall through

case REACT_TRACING_MARKER_TYPE:

// Fall through
Expand Down Expand Up @@ -26674,12 +26663,6 @@ if (__DEV__) {
fiber.stateNode = primaryChildInstance;
return fiber;
}
function createFiberFromCache(pendingProps, mode, lanes, key) {
var fiber = createFiber(CacheComponent, pendingProps, key, mode);
fiber.elementType = REACT_CACHE_TYPE;
fiber.lanes = lanes;
return fiber;
}
function createFiberFromText(content, mode, lanes) {
var fiber = createFiber(HostText, content, null, mode);
fiber.lanes = lanes;
Expand Down Expand Up @@ -26826,7 +26809,7 @@ if (__DEV__) {
return root;
}

var ReactVersion = "19.0.0-canary-a7826ac0";
var ReactVersion = "19.0.0-canary-4a355ff9";

// Might add PROFILE later.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<b862b395b4f51e602cf4cf820214c31d>>
* @generated SignedSource<<7ac197948521e47e5a2da9b0dae35269>>
*/

"use strict";
Expand Down Expand Up @@ -43,12 +43,11 @@ var assign = Object.assign,
REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"),
REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"),
REACT_MEMO_TYPE = Symbol.for("react.memo"),
REACT_LAZY_TYPE = Symbol.for("react.lazy"),
REACT_SCOPE_TYPE = Symbol.for("react.scope");
REACT_LAZY_TYPE = Symbol.for("react.lazy");
Symbol.for("react.scope");
Symbol.for("react.debug_trace_mode");
var REACT_OFFSCREEN_TYPE = Symbol.for("react.offscreen"),
REACT_LEGACY_HIDDEN_TYPE = Symbol.for("react.legacy_hidden"),
REACT_CACHE_TYPE = Symbol.for("react.cache");
var REACT_OFFSCREEN_TYPE = Symbol.for("react.offscreen");
Symbol.for("react.legacy_hidden");
Symbol.for("react.tracing_marker");
var REACT_MEMO_CACHE_SENTINEL = Symbol.for("react.memo_cache_sentinel"),
MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
Expand Down Expand Up @@ -80,8 +79,6 @@ function getComponentNameFromType(type) {
return "Suspense";
case REACT_SUSPENSE_LIST_TYPE:
return "SuspenseList";
case REACT_CACHE_TYPE:
return "Cache";
}
if ("object" === typeof type)
switch (type.$$typeof) {
Expand Down Expand Up @@ -8655,15 +8652,6 @@ function createFiberFromTypeAndProps(
);
case REACT_OFFSCREEN_TYPE:
return createFiberFromOffscreen(pendingProps, mode, lanes, key);
case REACT_LEGACY_HIDDEN_TYPE:
case REACT_SCOPE_TYPE:
case REACT_CACHE_TYPE:
return (
(type = createFiber(24, pendingProps, key, mode)),
(type.elementType = REACT_CACHE_TYPE),
(type.lanes = lanes),
type
);
default:
if ("object" === typeof type && null !== type)
switch (type.$$typeof) {
Expand Down Expand Up @@ -9208,19 +9196,19 @@ function wrapFiber(fiber) {
fiberToWrapper.set(fiber, wrapper));
return wrapper;
}
var devToolsConfig$jscomp$inline_999 = {
var devToolsConfig$jscomp$inline_992 = {
findFiberByHostInstance: function () {
throw Error("TestRenderer does not support findFiberByHostInstance()");
},
bundleType: 0,
version: "19.0.0-canary-120686d7",
version: "19.0.0-canary-b78d8890",
rendererPackageName: "react-test-renderer"
};
var internals$jscomp$inline_1187 = {
bundleType: devToolsConfig$jscomp$inline_999.bundleType,
version: devToolsConfig$jscomp$inline_999.version,
rendererPackageName: devToolsConfig$jscomp$inline_999.rendererPackageName,
rendererConfig: devToolsConfig$jscomp$inline_999.rendererConfig,
var internals$jscomp$inline_1180 = {
bundleType: devToolsConfig$jscomp$inline_992.bundleType,
version: devToolsConfig$jscomp$inline_992.version,
rendererPackageName: devToolsConfig$jscomp$inline_992.rendererPackageName,
rendererConfig: devToolsConfig$jscomp$inline_992.rendererConfig,
overrideHookState: null,
overrideHookStateDeletePath: null,
overrideHookStateRenamePath: null,
Expand All @@ -9237,26 +9225,26 @@ var internals$jscomp$inline_1187 = {
return null === fiber ? null : fiber.stateNode;
},
findFiberByHostInstance:
devToolsConfig$jscomp$inline_999.findFiberByHostInstance ||
devToolsConfig$jscomp$inline_992.findFiberByHostInstance ||
emptyFindFiberByHostInstance,
findHostInstancesForRefresh: null,
scheduleRefresh: null,
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "19.0.0-canary-120686d7"
reconcilerVersion: "19.0.0-canary-b78d8890"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1188 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
var hook$jscomp$inline_1181 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
if (
!hook$jscomp$inline_1188.isDisabled &&
hook$jscomp$inline_1188.supportsFiber
!hook$jscomp$inline_1181.isDisabled &&
hook$jscomp$inline_1181.supportsFiber
)
try {
(rendererID = hook$jscomp$inline_1188.inject(
internals$jscomp$inline_1187
(rendererID = hook$jscomp$inline_1181.inject(
internals$jscomp$inline_1180
)),
(injectedHook = hook$jscomp$inline_1188);
(injectedHook = hook$jscomp$inline_1181);
} catch (err) {}
}
exports._Scheduler = Scheduler;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<1e162bfd81c2744b7c22ac7c96c87f91>>
* @generated SignedSource<<a70ea58db09502275f7ba43d5cdee6ae>>
*/

"use strict";
Expand Down Expand Up @@ -43,12 +43,11 @@ var assign = Object.assign,
REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"),
REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"),
REACT_MEMO_TYPE = Symbol.for("react.memo"),
REACT_LAZY_TYPE = Symbol.for("react.lazy"),
REACT_SCOPE_TYPE = Symbol.for("react.scope");
REACT_LAZY_TYPE = Symbol.for("react.lazy");
Symbol.for("react.scope");
Symbol.for("react.debug_trace_mode");
var REACT_OFFSCREEN_TYPE = Symbol.for("react.offscreen"),
REACT_LEGACY_HIDDEN_TYPE = Symbol.for("react.legacy_hidden"),
REACT_CACHE_TYPE = Symbol.for("react.cache");
var REACT_OFFSCREEN_TYPE = Symbol.for("react.offscreen");
Symbol.for("react.legacy_hidden");
Symbol.for("react.tracing_marker");
var REACT_MEMO_CACHE_SENTINEL = Symbol.for("react.memo_cache_sentinel"),
MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
Expand Down Expand Up @@ -80,8 +79,6 @@ function getComponentNameFromType(type) {
return "Suspense";
case REACT_SUSPENSE_LIST_TYPE:
return "SuspenseList";
case REACT_CACHE_TYPE:
return "Cache";
}
if ("object" === typeof type)
switch (type.$$typeof) {
Expand Down Expand Up @@ -9268,15 +9265,6 @@ function createFiberFromTypeAndProps(
);
case REACT_OFFSCREEN_TYPE:
return createFiberFromOffscreen(pendingProps, mode, lanes, key);
case REACT_LEGACY_HIDDEN_TYPE:
case REACT_SCOPE_TYPE:
case REACT_CACHE_TYPE:
return (
(type = createFiber(24, pendingProps, key, mode)),
(type.elementType = REACT_CACHE_TYPE),
(type.lanes = lanes),
type
);
default:
if ("object" === typeof type && null !== type)
switch (type.$$typeof) {
Expand Down Expand Up @@ -9826,12 +9814,12 @@ function wrapFiber(fiber) {
fiberToWrapper.set(fiber, wrapper));
return wrapper;
}
var devToolsConfig$jscomp$inline_1083 = {
var devToolsConfig$jscomp$inline_1076 = {
findFiberByHostInstance: function () {
throw Error("TestRenderer does not support findFiberByHostInstance()");
},
bundleType: 0,
version: "19.0.0-canary-841877f9",
version: "19.0.0-canary-4e13c867",
rendererPackageName: "react-test-renderer"
};
(function (internals) {
Expand All @@ -9848,10 +9836,10 @@ var devToolsConfig$jscomp$inline_1083 = {
} catch (err) {}
return hook.checkDCE ? !0 : !1;
})({
bundleType: devToolsConfig$jscomp$inline_1083.bundleType,
version: devToolsConfig$jscomp$inline_1083.version,
rendererPackageName: devToolsConfig$jscomp$inline_1083.rendererPackageName,
rendererConfig: devToolsConfig$jscomp$inline_1083.rendererConfig,
bundleType: devToolsConfig$jscomp$inline_1076.bundleType,
version: devToolsConfig$jscomp$inline_1076.version,
rendererPackageName: devToolsConfig$jscomp$inline_1076.rendererPackageName,
rendererConfig: devToolsConfig$jscomp$inline_1076.rendererConfig,
overrideHookState: null,
overrideHookStateDeletePath: null,
overrideHookStateRenamePath: null,
Expand All @@ -9868,14 +9856,14 @@ var devToolsConfig$jscomp$inline_1083 = {
return null === fiber ? null : fiber.stateNode;
},
findFiberByHostInstance:
devToolsConfig$jscomp$inline_1083.findFiberByHostInstance ||
devToolsConfig$jscomp$inline_1076.findFiberByHostInstance ||
emptyFindFiberByHostInstance,
findHostInstancesForRefresh: null,
scheduleRefresh: null,
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "19.0.0-canary-841877f9"
reconcilerVersion: "19.0.0-canary-4e13c867"
});
exports._Scheduler = Scheduler;
exports.act = act;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<0d9a77506743aad44cc841af6c1c670c>>
* @generated SignedSource<<59264a532371cf816058b1cd23998d35>>
*/

"use strict";
Expand Down Expand Up @@ -38,7 +38,6 @@ if (__DEV__) {
var REACT_MEMO_TYPE = Symbol.for("react.memo");
var REACT_LAZY_TYPE = Symbol.for("react.lazy");
var REACT_OFFSCREEN_TYPE = Symbol.for("react.offscreen");
var REACT_CACHE_TYPE = Symbol.for("react.cache");
var MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
var FAUX_ITERATOR_SYMBOL = "@@iterator";
function getIteratorFn(maybeIterable) {
Expand Down Expand Up @@ -172,10 +171,6 @@ if (__DEV__) {

case REACT_SUSPENSE_LIST_TYPE:
return "SuspenseList";

case REACT_CACHE_TYPE: {
return "Cache";
}
}

if (typeof type === "object") {
Expand Down Expand Up @@ -338,7 +333,6 @@ if (__DEV__) {
enableLegacyHidden ||
type === REACT_OFFSCREEN_TYPE ||
enableScopeAPI ||
type === REACT_CACHE_TYPE ||
enableTransitionTracing
) {
return true;
Expand Down
Loading

0 comments on commit cc4e126

Please sign in to comment.