Skip to content

Commit

Permalink
Make RefStatic and LayoutStatic the same bit (facebook#31965)
Browse files Browse the repository at this point in the history
Refs are basically just fancy Layout Effects. These are conceptually the
same thing and are always visited together so they don't need to be
different flags.

Whenever we disappear/reappear Offscreen content we need to do both Refs
and Layout Effects.

This is just indicating which phase needs to be visited and these are
always the same phase.

DiffTrain build for [3b009b4](facebook@3b009b4)
  • Loading branch information
pull[bot] committed Jan 3, 2025
1 parent a59608c commit d91307d
Show file tree
Hide file tree
Showing 23 changed files with 216 additions and 216 deletions.
2 changes: 1 addition & 1 deletion compiled-rn/VERSION_NATIVE_FB
Original file line number Diff line number Diff line change
@@ -1 +1 @@
19.1.0-native-fb-220dece9-20250102
19.1.0-native-fb-3b009b4c-20250102
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<ad2cddda705ff13e200b6e2f91f1bf8b>>
* @generated SignedSource<<9bd134138f5b06cd767f897c60d22200>>
*/

"use strict";
Expand Down Expand Up @@ -420,5 +420,5 @@ __DEV__ &&
exports.useFormStatus = function () {
return resolveDispatcher().useHostTransitionStatus();
};
exports.version = "19.1.0-native-fb-220dece9-20250102";
exports.version = "19.1.0-native-fb-3b009b4c-20250102";
})();
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<bd71177cfa84a33e48d09354b4e1872a>>
* @generated SignedSource<<0948aeab04f6f5ed7045a019b211bcec>>
*/

"use strict";
Expand Down Expand Up @@ -203,4 +203,4 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
exports.version = "19.1.0-native-fb-220dece9-20250102";
exports.version = "19.1.0-native-fb-3b009b4c-20250102";
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<bd71177cfa84a33e48d09354b4e1872a>>
* @generated SignedSource<<0948aeab04f6f5ed7045a019b211bcec>>
*/

"use strict";
Expand Down Expand Up @@ -203,4 +203,4 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactSharedInternals.H.useHostTransitionStatus();
};
exports.version = "19.1.0-native-fb-220dece9-20250102";
exports.version = "19.1.0-native-fb-3b009b4c-20250102";
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<4b37f50999a3cd0adf96ec416a7c47be>>
* @generated SignedSource<<03613344aa6068afaba47c44eeaf2e5f>>
*/

/*
Expand Down Expand Up @@ -5803,7 +5803,7 @@ __DEV__ &&
null;
hookTypesUpdateIndexDev = -1;
null !== current &&
(current.flags & 31457280) !== (workInProgress.flags & 31457280) &&
(current.flags & 29360128) !== (workInProgress.flags & 29360128) &&
(current.mode & ConcurrentMode) !== NoMode &&
error$jscomp$0(
"Internal React error: Expected static flag was missing. Please notify the React team."
Expand Down Expand Up @@ -9174,14 +9174,14 @@ __DEV__ &&
if (null === ref)
null !== current &&
null !== current.ref &&
(workInProgress.flags |= 2097664);
(workInProgress.flags |= 4194816);
else {
if ("function" !== typeof ref && "object" !== typeof ref)
throw Error(
"Expected ref to be a function, an object returned by React.createRef(), or undefined/null."
);
if (null === current || current.ref !== ref)
workInProgress.flags |= 2097664;
workInProgress.flags |= 4194816;
}
}
function updateFunctionComponent(
Expand Down Expand Up @@ -10033,7 +10033,7 @@ __DEV__ &&
componentStack
)),
(JSCompiler_object_inline_stack_2404.subtreeFlags =
JSCompiler_temp.subtreeFlags & 31457280)),
JSCompiler_temp.subtreeFlags & 29360128)),
null !== instance
? (JSCompiler_object_inline_componentStack_2405 =
createWorkInProgress(
Expand Down Expand Up @@ -14035,7 +14035,7 @@ __DEV__ &&
(workInProgress.deletions = null),
(workInProgress.actualDuration = -0),
(workInProgress.actualStartTime = -1.1));
workInProgress.flags = current.flags & 31457280;
workInProgress.flags = current.flags & 29360128;
workInProgress.childLanes = current.childLanes;
workInProgress.lanes = current.lanes;
workInProgress.child = current.child;
Expand Down Expand Up @@ -14073,7 +14073,7 @@ __DEV__ &&
return workInProgress;
}
function resetWorkInProgress(workInProgress, renderLanes) {
workInProgress.flags &= 31457282;
workInProgress.flags &= 29360130;
var current = workInProgress.alternate;
null === current
? ((workInProgress.childLanes = 0),
Expand Down Expand Up @@ -14383,8 +14383,8 @@ __DEV__ &&

)
(newChildLanes |= _child2.lanes | _child2.childLanes),
(subtreeFlags |= _child2.subtreeFlags & 31457280),
(subtreeFlags |= _child2.flags & 31457280),
(subtreeFlags |= _child2.subtreeFlags & 29360128),
(subtreeFlags |= _child2.flags & 29360128),
(_treeBaseDuration += _child2.treeBaseDuration),
(_child2 = _child2.sibling);
completedWork.treeBaseDuration = _treeBaseDuration;
Expand All @@ -14396,8 +14396,8 @@ __DEV__ &&
)
(newChildLanes |=
_treeBaseDuration.lanes | _treeBaseDuration.childLanes),
(subtreeFlags |= _treeBaseDuration.subtreeFlags & 31457280),
(subtreeFlags |= _treeBaseDuration.flags & 31457280),
(subtreeFlags |= _treeBaseDuration.subtreeFlags & 29360128),
(subtreeFlags |= _treeBaseDuration.flags & 29360128),
(_treeBaseDuration.return = completedWork),
(_treeBaseDuration = _treeBaseDuration.sibling);
else if ((completedWork.mode & ProfileMode) !== NoMode) {
Expand Down Expand Up @@ -25886,11 +25886,11 @@ __DEV__ &&
};
(function () {
var isomorphicReactPackageVersion = React.version;
if ("19.1.0-native-fb-220dece9-20250102" !== isomorphicReactPackageVersion)
if ("19.1.0-native-fb-3b009b4c-20250102" !== isomorphicReactPackageVersion)
throw Error(
'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' +
(isomorphicReactPackageVersion +
"\n - react-dom: 19.1.0-native-fb-220dece9-20250102\nLearn more: https://react.dev/warnings/version-mismatch")
"\n - react-dom: 19.1.0-native-fb-3b009b4c-20250102\nLearn more: https://react.dev/warnings/version-mismatch")
);
})();
("function" === typeof Map &&
Expand Down Expand Up @@ -25927,10 +25927,10 @@ __DEV__ &&
!(function () {
var internals = {
bundleType: 1,
version: "19.1.0-native-fb-220dece9-20250102",
version: "19.1.0-native-fb-3b009b4c-20250102",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.1.0-native-fb-220dece9-20250102"
reconcilerVersion: "19.1.0-native-fb-3b009b4c-20250102"
};
internals.overrideHookState = overrideHookState;
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
Expand Down Expand Up @@ -26076,5 +26076,5 @@ __DEV__ &&
listenToAllSupportedEvents(container);
return new ReactDOMHydrationRoot(initialChildren);
};
exports.version = "19.1.0-native-fb-220dece9-20250102";
exports.version = "19.1.0-native-fb-3b009b4c-20250102";
})();
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<2bb318f4d010f209ef3e9156c8f72c76>>
* @generated SignedSource<<4ed2f264bde385ff618b27f469c22dc6>>
*/

/*
Expand Down Expand Up @@ -6404,12 +6404,12 @@ function markRef(current, workInProgress) {
if (null === ref)
null !== current &&
null !== current.ref &&
(workInProgress.flags |= 2097664);
(workInProgress.flags |= 4194816);
else {
if ("function" !== typeof ref && "object" !== typeof ref)
throw Error(formatProdErrorMessage(284));
if (null === current || current.ref !== ref)
workInProgress.flags |= 2097664;
workInProgress.flags |= 4194816;
}
}
function updateFunctionComponent(
Expand Down Expand Up @@ -7029,7 +7029,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) {
didSuspend
)),
(nextProps.subtreeFlags =
JSCompiler_temp$jscomp$0.subtreeFlags & 31457280)),
JSCompiler_temp$jscomp$0.subtreeFlags & 29360128)),
null !== digest
? (showFallback = createWorkInProgress(digest, showFallback))
: ((showFallback = createFiberFromFragment(
Expand Down Expand Up @@ -10012,7 +10012,7 @@ function createWorkInProgress(current, pendingProps) {
(workInProgress.flags = 0),
(workInProgress.subtreeFlags = 0),
(workInProgress.deletions = null));
workInProgress.flags = current.flags & 31457280;
workInProgress.flags = current.flags & 29360128;
workInProgress.childLanes = current.childLanes;
workInProgress.lanes = current.lanes;
workInProgress.child = current.child;
Expand All @@ -10031,7 +10031,7 @@ function createWorkInProgress(current, pendingProps) {
return workInProgress;
}
function resetWorkInProgress(workInProgress, renderLanes) {
workInProgress.flags &= 31457282;
workInProgress.flags &= 29360130;
var current = workInProgress.alternate;
null === current
? ((workInProgress.childLanes = 0),
Expand Down Expand Up @@ -10265,8 +10265,8 @@ function bubbleProperties(completedWork) {
if (didBailout)
for (var child$144 = completedWork.child; null !== child$144; )
(newChildLanes |= child$144.lanes | child$144.childLanes),
(subtreeFlags |= child$144.subtreeFlags & 31457280),
(subtreeFlags |= child$144.flags & 31457280),
(subtreeFlags |= child$144.subtreeFlags & 29360128),
(subtreeFlags |= child$144.flags & 29360128),
(child$144.return = completedWork),
(child$144 = child$144.sibling);
else
Expand Down Expand Up @@ -15904,14 +15904,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
};
var isomorphicReactPackageVersion$jscomp$inline_1754 = React.version;
if (
"19.1.0-native-fb-220dece9-20250102" !==
"19.1.0-native-fb-3b009b4c-20250102" !==
isomorphicReactPackageVersion$jscomp$inline_1754
)
throw Error(
formatProdErrorMessage(
527,
isomorphicReactPackageVersion$jscomp$inline_1754,
"19.1.0-native-fb-220dece9-20250102"
"19.1.0-native-fb-3b009b4c-20250102"
)
);
ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
Expand All @@ -15933,10 +15933,10 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
};
var internals$jscomp$inline_2202 = {
bundleType: 0,
version: "19.1.0-native-fb-220dece9-20250102",
version: "19.1.0-native-fb-3b009b4c-20250102",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.1.0-native-fb-220dece9-20250102"
reconcilerVersion: "19.1.0-native-fb-3b009b4c-20250102"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_2203 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down Expand Up @@ -16042,4 +16042,4 @@ exports.hydrateRoot = function (container, initialChildren, options) {
listenToAllSupportedEvents(container);
return new ReactDOMHydrationRoot(initialChildren);
};
exports.version = "19.1.0-native-fb-220dece9-20250102";
exports.version = "19.1.0-native-fb-3b009b4c-20250102";
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<d950a3877c41bf7b790ddc097001997a>>
* @generated SignedSource<<77dbda27b5049a4b3f2def588adb6ecc>>
*/

/*
Expand Down Expand Up @@ -6547,12 +6547,12 @@ function markRef(current, workInProgress) {
if (null === ref)
null !== current &&
null !== current.ref &&
(workInProgress.flags |= 2097664);
(workInProgress.flags |= 4194816);
else {
if ("function" !== typeof ref && "object" !== typeof ref)
throw Error(formatProdErrorMessage(284));
if (null === current || current.ref !== ref)
workInProgress.flags |= 2097664;
workInProgress.flags |= 4194816;
}
}
function updateFunctionComponent(
Expand Down Expand Up @@ -7190,7 +7190,7 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) {
didSuspend
)),
(nextProps.subtreeFlags =
JSCompiler_temp$jscomp$0.subtreeFlags & 31457280)),
JSCompiler_temp$jscomp$0.subtreeFlags & 29360128)),
null !== digest
? (showFallback = createWorkInProgress(digest, showFallback))
: ((showFallback = createFiberFromFragment(
Expand Down Expand Up @@ -10445,7 +10445,7 @@ function createWorkInProgress(current, pendingProps) {
(workInProgress.deletions = null),
(workInProgress.actualDuration = -0),
(workInProgress.actualStartTime = -1.1));
workInProgress.flags = current.flags & 31457280;
workInProgress.flags = current.flags & 29360128;
workInProgress.childLanes = current.childLanes;
workInProgress.lanes = current.lanes;
workInProgress.child = current.child;
Expand All @@ -10466,7 +10466,7 @@ function createWorkInProgress(current, pendingProps) {
return workInProgress;
}
function resetWorkInProgress(workInProgress, renderLanes) {
workInProgress.flags &= 31457282;
workInProgress.flags &= 29360130;
var current = workInProgress.alternate;
null === current
? ((workInProgress.childLanes = 0),
Expand Down Expand Up @@ -10711,8 +10711,8 @@ function bubbleProperties(completedWork) {

)
(newChildLanes |= child$156.lanes | child$156.childLanes),
(subtreeFlags |= child$156.subtreeFlags & 31457280),
(subtreeFlags |= child$156.flags & 31457280),
(subtreeFlags |= child$156.subtreeFlags & 29360128),
(subtreeFlags |= child$156.flags & 29360128),
(treeBaseDuration$155 += child$156.treeBaseDuration),
(child$156 = child$156.sibling);
completedWork.treeBaseDuration = treeBaseDuration$155;
Expand All @@ -10724,8 +10724,8 @@ function bubbleProperties(completedWork) {
)
(newChildLanes |=
treeBaseDuration$155.lanes | treeBaseDuration$155.childLanes),
(subtreeFlags |= treeBaseDuration$155.subtreeFlags & 31457280),
(subtreeFlags |= treeBaseDuration$155.flags & 31457280),
(subtreeFlags |= treeBaseDuration$155.subtreeFlags & 29360128),
(subtreeFlags |= treeBaseDuration$155.flags & 29360128),
(treeBaseDuration$155.return = completedWork),
(treeBaseDuration$155 = treeBaseDuration$155.sibling);
else if (0 !== (completedWork.mode & 2)) {
Expand Down Expand Up @@ -16551,14 +16551,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
};
var isomorphicReactPackageVersion$jscomp$inline_1849 = React.version;
if (
"19.1.0-native-fb-220dece9-20250102" !==
"19.1.0-native-fb-3b009b4c-20250102" !==
isomorphicReactPackageVersion$jscomp$inline_1849
)
throw Error(
formatProdErrorMessage(
527,
isomorphicReactPackageVersion$jscomp$inline_1849,
"19.1.0-native-fb-220dece9-20250102"
"19.1.0-native-fb-3b009b4c-20250102"
)
);
ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
Expand All @@ -16580,10 +16580,10 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
};
var internals$jscomp$inline_1856 = {
bundleType: 0,
version: "19.1.0-native-fb-220dece9-20250102",
version: "19.1.0-native-fb-3b009b4c-20250102",
rendererPackageName: "react-dom",
currentDispatcherRef: ReactSharedInternals,
reconcilerVersion: "19.1.0-native-fb-220dece9-20250102",
reconcilerVersion: "19.1.0-native-fb-3b009b4c-20250102",
getLaneLabelMap: function () {
for (
var map = new Map(), lane = 1, index$294 = 0;
Expand Down Expand Up @@ -16704,4 +16704,4 @@ exports.hydrateRoot = function (container, initialChildren, options) {
listenToAllSupportedEvents(container);
return new ReactDOMHydrationRoot(initialChildren);
};
exports.version = "19.1.0-native-fb-220dece9-20250102";
exports.version = "19.1.0-native-fb-3b009b4c-20250102";
Loading

0 comments on commit d91307d

Please sign in to comment.