[Fiber] Profiler - Use two separate functions instead of branch by flag (#30957)

Nit: I don't trust flags in hot code. While it can take somewhat longer
to compile two functions and JIT them. After that they don't need to
check branches. Also makes it clearer the purpose.

DiffTrain build for commit https://github.com/facebook/react/commit/3d95c43b8967d4dda1ec9a22f0d9ea4999fee8b8.
This commit is contained in:
sebmarkbage
2024-09-13 18:59:00 -07:00
parent b42180d84a
commit baaa97f36b
14 changed files with 134 additions and 87 deletions
+1 -1
View File
@@ -1 +1 @@
19.0.0-native-fb-d3d4d3a4-20240913
19.0.0-native-fb-3d95c43b-20240913
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<2d89a3e686f85aa5ee5696aad303b4b0>>
* @generated SignedSource<<e4eab5c04819ff525ec966db4c05e91a>>
*/
"use strict";
@@ -5032,11 +5032,18 @@ __DEV__ &&
profilerStartTime = now();
0 > fiber.actualStartTime && (fiber.actualStartTime = profilerStartTime);
}
function stopProfilerTimerIfRunningAndRecordDelta(fiber, overrideBaseTime) {
function stopProfilerTimerIfRunningAndRecordDuration(fiber) {
if (0 <= profilerStartTime) {
var elapsedTime = now() - profilerStartTime;
fiber.actualDuration += elapsedTime;
fiber.selfBaseDuration = elapsedTime;
profilerStartTime = -1;
}
}
function stopProfilerTimerIfRunningAndRecordIncompleteDuration(fiber) {
if (0 <= profilerStartTime) {
var elapsedTime = now() - profilerStartTime;
fiber.actualDuration += elapsedTime;
overrideBaseTime && (fiber.selfBaseDuration = elapsedTime);
profilerStartTime = -1;
}
}
@@ -11149,7 +11156,7 @@ __DEV__ &&
else
switch (
(handler.mode & 2 &&
stopProfilerTimerIfRunningAndRecordDelta(handler, !0),
stopProfilerTimerIfRunningAndRecordDuration(handler),
markComponentRenderStopped(),
workInProgressSuspendedReason)
) {
@@ -11426,7 +11433,7 @@ __DEV__ &&
unitOfWork,
entangledRenderLanes
)),
stopProfilerTimerIfRunningAndRecordDelta(unitOfWork, !0))
stopProfilerTimerIfRunningAndRecordDuration(unitOfWork))
: (current = runWithFiberInDEV(
unitOfWork,
beginWork,
@@ -11485,7 +11492,7 @@ __DEV__ &&
(current = beginWork(current, unitOfWork, entangledRenderLanes));
}
isProfilingMode &&
stopProfilerTimerIfRunningAndRecordDelta(unitOfWork, !0);
stopProfilerTimerIfRunningAndRecordDuration(unitOfWork);
return current;
}
function throwAndUnwindWorkLoop(root, unitOfWork, thrownValue) {
@@ -11555,7 +11562,9 @@ __DEV__ &&
completedWork,
entangledRenderLanes
)),
stopProfilerTimerIfRunningAndRecordDelta(completedWork, !1));
stopProfilerTimerIfRunningAndRecordIncompleteDuration(
completedWork
));
if (null !== current) {
workInProgress = current;
return;
@@ -11579,7 +11588,7 @@ __DEV__ &&
return;
}
if (0 !== (unitOfWork.mode & 2)) {
stopProfilerTimerIfRunningAndRecordDelta(unitOfWork, !1);
stopProfilerTimerIfRunningAndRecordIncompleteDuration(unitOfWork);
next = unitOfWork.actualDuration;
for (var child = unitOfWork.child; null !== child; )
(next += child.actualDuration), (child = child.sibling);
@@ -15124,11 +15133,11 @@ __DEV__ &&
(function () {
var internals = {
bundleType: 1,
version: "19.0.0-native-fb-d3d4d3a4-20240913",
version: "19.0.0-native-fb-3d95c43b-20240913",
rendererPackageName: "react-test-renderer",
currentDispatcherRef: ReactSharedInternals,
findFiberByHostInstance: getInstanceFromNode,
reconcilerVersion: "19.0.0-native-fb-d3d4d3a4-20240913"
reconcilerVersion: "19.0.0-native-fb-3d95c43b-20240913"
};
internals.overrideHookState = overrideHookState;
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -15273,5 +15282,5 @@ __DEV__ &&
flushSyncWorkAcrossRoots_impl(0, !0));
}
};
exports.version = "19.0.0-native-fb-d3d4d3a4-20240913";
exports.version = "19.0.0-native-fb-3d95c43b-20240913";
})();
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<4f55ec78358c8ebecf4eaa369cc81849>>
* @generated SignedSource<<1bf2ef454808c04dbe363a5699c9a59f>>
*/
"use strict";
@@ -9486,14 +9486,14 @@ function wrapFiber(fiber) {
}
var internals$jscomp$inline_1266 = {
bundleType: 0,
version: "19.0.0-native-fb-d3d4d3a4-20240913",
version: "19.0.0-native-fb-3d95c43b-20240913",
rendererPackageName: "react-test-renderer",
currentDispatcherRef: ReactSharedInternals,
findFiberByHostInstance: function (mockNode) {
mockNode = nodeToInstanceMap.get(mockNode);
return void 0 !== mockNode ? mockNode.internalInstanceHandle : null;
},
reconcilerVersion: "19.0.0-native-fb-d3d4d3a4-20240913"
reconcilerVersion: "19.0.0-native-fb-3d95c43b-20240913"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1267 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -9629,4 +9629,4 @@ exports.unstable_batchedUpdates = function (fn, a) {
flushSyncWorkAcrossRoots_impl(0, !0));
}
};
exports.version = "19.0.0-native-fb-d3d4d3a4-20240913";
exports.version = "19.0.0-native-fb-3d95c43b-20240913";
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<b264040d9a17e92d86c094ff1ead550e>>
* @generated SignedSource<<2929f47cce484593e96e4514ec4d434b>>
*/
"use strict";
@@ -3660,11 +3660,18 @@ function startProfilerTimer(fiber) {
profilerStartTime = now();
0 > fiber.actualStartTime && (fiber.actualStartTime = profilerStartTime);
}
function stopProfilerTimerIfRunningAndRecordDelta(fiber, overrideBaseTime) {
function stopProfilerTimerIfRunningAndRecordDuration(fiber) {
if (0 <= profilerStartTime) {
var elapsedTime = now() - profilerStartTime;
fiber.actualDuration += elapsedTime;
fiber.selfBaseDuration = elapsedTime;
profilerStartTime = -1;
}
}
function stopProfilerTimerIfRunningAndRecordIncompleteDuration(fiber) {
if (0 <= profilerStartTime) {
var elapsedTime = now() - profilerStartTime;
fiber.actualDuration += elapsedTime;
overrideBaseTime && (fiber.selfBaseDuration = elapsedTime);
profilerStartTime = -1;
}
}
@@ -8603,8 +8610,7 @@ function handleThrow(root, thrownValue) {
);
else
switch (
(handler.mode & 2 &&
stopProfilerTimerIfRunningAndRecordDelta(handler, !0),
(handler.mode & 2 && stopProfilerTimerIfRunningAndRecordDuration(handler),
markComponentRenderStopped(),
workInProgressSuspendedReason)
) {
@@ -8830,7 +8836,7 @@ function performUnitOfWork(unitOfWork) {
0 !== (unitOfWork.mode & 2)
? (startProfilerTimer(unitOfWork),
(current = beginWork(current, unitOfWork, entangledRenderLanes)),
stopProfilerTimerIfRunningAndRecordDelta(unitOfWork, !0))
stopProfilerTimerIfRunningAndRecordDuration(unitOfWork))
: (current = beginWork(current, unitOfWork, entangledRenderLanes));
unitOfWork.memoizedProps = unitOfWork.pendingProps;
null === current
@@ -8878,7 +8884,7 @@ function replaySuspendedUnitOfWork(unitOfWork) {
resetWorkInProgress(next, entangledRenderLanes)),
(current = beginWork(current, next, entangledRenderLanes));
}
isProfilingMode && stopProfilerTimerIfRunningAndRecordDelta(next, !0);
isProfilingMode && stopProfilerTimerIfRunningAndRecordDuration(next);
next = current;
unitOfWork.memoizedProps = unitOfWork.pendingProps;
null === next ? completeUnitOfWork(unitOfWork) : (workInProgress = next);
@@ -8937,7 +8943,7 @@ function completeUnitOfWork(unitOfWork) {
? (current = completeWork(current, completedWork, entangledRenderLanes))
: (startProfilerTimer(completedWork),
(current = completeWork(current, completedWork, entangledRenderLanes)),
stopProfilerTimerIfRunningAndRecordDelta(completedWork, !1));
stopProfilerTimerIfRunningAndRecordIncompleteDuration(completedWork));
if (null !== current) {
workInProgress = current;
return;
@@ -8960,7 +8966,7 @@ function unwindUnitOfWork(unitOfWork, skipSiblings) {
return;
}
if (0 !== (unitOfWork.mode & 2)) {
stopProfilerTimerIfRunningAndRecordDelta(unitOfWork, !1);
stopProfilerTimerIfRunningAndRecordIncompleteDuration(unitOfWork);
next = unitOfWork.actualDuration;
for (var child = unitOfWork.child; null !== child; )
(next += child.actualDuration), (child = child.sibling);
@@ -10074,14 +10080,14 @@ function wrapFiber(fiber) {
}
var internals$jscomp$inline_1141 = {
bundleType: 0,
version: "19.0.0-native-fb-d3d4d3a4-20240913",
version: "19.0.0-native-fb-3d95c43b-20240913",
rendererPackageName: "react-test-renderer",
currentDispatcherRef: ReactSharedInternals,
findFiberByHostInstance: function (mockNode) {
mockNode = nodeToInstanceMap.get(mockNode);
return void 0 !== mockNode ? mockNode.internalInstanceHandle : null;
},
reconcilerVersion: "19.0.0-native-fb-d3d4d3a4-20240913",
reconcilerVersion: "19.0.0-native-fb-3d95c43b-20240913",
getLaneLabelMap: function () {
for (
var map = new Map(), lane = 1, index$138 = 0;
@@ -10232,4 +10238,4 @@ exports.unstable_batchedUpdates = function (fn, a) {
flushSyncWorkAcrossRoots_impl(0, !0));
}
};
exports.version = "19.0.0-native-fb-d3d4d3a4-20240913";
exports.version = "19.0.0-native-fb-3d95c43b-20240913";
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<598e1a1554be705744125c5f6e86546f>>
* @generated SignedSource<<151f049853714f91fd46ef5a8978deb0>>
*/
"use strict";
@@ -1705,7 +1705,7 @@ __DEV__ &&
exports.useTransition = function () {
return resolveDispatcher().useTransition();
};
exports.version = "19.0.0-native-fb-d3d4d3a4-20240913";
exports.version = "19.0.0-native-fb-3d95c43b-20240913";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<b8568e853b095ed822fa12f152e3121e>>
* @generated SignedSource<<304b6c7b540179b069a45ff09f35dbe5>>
*/
"use strict";
@@ -580,4 +580,4 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactSharedInternals.H.useTransition();
};
exports.version = "19.0.0-native-fb-d3d4d3a4-20240913";
exports.version = "19.0.0-native-fb-3d95c43b-20240913";
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<92d8fbd56fb11e8c6a3aad4c04d6df3c>>
* @generated SignedSource<<09bffda39d917b825e992af0d48176ef>>
*/
"use strict";
@@ -584,7 +584,7 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactSharedInternals.H.useTransition();
};
exports.version = "19.0.0-native-fb-d3d4d3a4-20240913";
exports.version = "19.0.0-native-fb-3d95c43b-20240913";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
@@ -1 +1 @@
d3d4d3a46b014ab0f6edc443c19fcdba09105f20
3d95c43b8967d4dda1ec9a22f0d9ea4999fee8b8
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<d23230a057fe994a91ecee3cb9cf7716>>
* @generated SignedSource<<f22f4e59e1c8c1bd2c19eba25b7b92e9>>
*/
"use strict";
@@ -5918,11 +5918,18 @@ __DEV__ &&
profilerStartTime = now();
0 > fiber.actualStartTime && (fiber.actualStartTime = profilerStartTime);
}
function stopProfilerTimerIfRunningAndRecordDelta(fiber, overrideBaseTime) {
function stopProfilerTimerIfRunningAndRecordDuration(fiber) {
if (0 <= profilerStartTime) {
var elapsedTime = now() - profilerStartTime;
fiber.actualDuration += elapsedTime;
fiber.selfBaseDuration = elapsedTime;
profilerStartTime = -1;
}
}
function stopProfilerTimerIfRunningAndRecordIncompleteDuration(fiber) {
if (0 <= profilerStartTime) {
var elapsedTime = now() - profilerStartTime;
fiber.actualDuration += elapsedTime;
overrideBaseTime && (fiber.selfBaseDuration = elapsedTime);
profilerStartTime = -1;
}
}
@@ -12297,7 +12304,7 @@ __DEV__ &&
else
switch (
(JSCompiler_temp.mode & 2 &&
stopProfilerTimerIfRunningAndRecordDelta(JSCompiler_temp, !0),
stopProfilerTimerIfRunningAndRecordDuration(JSCompiler_temp),
markComponentRenderStopped(),
workInProgressSuspendedReason)
) {
@@ -12606,7 +12613,7 @@ __DEV__ &&
unitOfWork,
entangledRenderLanes
)),
stopProfilerTimerIfRunningAndRecordDelta(unitOfWork, !0))
stopProfilerTimerIfRunningAndRecordDuration(unitOfWork))
: (current = runWithFiberInDEV(
unitOfWork,
beginWork,
@@ -12665,7 +12672,7 @@ __DEV__ &&
(current = beginWork(current, unitOfWork, entangledRenderLanes));
}
isProfilingMode &&
stopProfilerTimerIfRunningAndRecordDelta(unitOfWork, !0);
stopProfilerTimerIfRunningAndRecordDuration(unitOfWork);
return current;
}
function throwAndUnwindWorkLoop(
@@ -12760,7 +12767,9 @@ __DEV__ &&
completedWork,
entangledRenderLanes
)),
stopProfilerTimerIfRunningAndRecordDelta(completedWork, !1));
stopProfilerTimerIfRunningAndRecordIncompleteDuration(
completedWork
));
if (null !== current) {
workInProgress = current;
return;
@@ -12784,7 +12793,7 @@ __DEV__ &&
return;
}
if (0 !== (unitOfWork.mode & 2)) {
stopProfilerTimerIfRunningAndRecordDelta(unitOfWork, !1);
stopProfilerTimerIfRunningAndRecordIncompleteDuration(unitOfWork);
next = unitOfWork.actualDuration;
for (var child = unitOfWork.child; null !== child; )
(next += child.actualDuration), (child = child.sibling);
@@ -17173,11 +17182,11 @@ __DEV__ &&
(function () {
var internals = {
bundleType: 1,
version: "19.0.0-native-fb-d3d4d3a4-20240913",
version: "19.0.0-native-fb-3d95c43b-20240913",
rendererPackageName: "react-native-renderer",
currentDispatcherRef: ReactSharedInternals,
findFiberByHostInstance: getInstanceFromNode,
reconcilerVersion: "19.0.0-native-fb-d3d4d3a4-20240913"
reconcilerVersion: "19.0.0-native-fb-3d95c43b-20240913"
};
null !== extraDevToolsConfig &&
(internals.rendererConfig = extraDevToolsConfig);
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<322e750c3add37d8f3b0459e45ce2320>>
* @generated SignedSource<<29f9932a8cd462c8e4d6e6a1bab1ffe7>>
*/
"use strict";
@@ -11077,11 +11077,11 @@ batchedUpdatesImpl = function (fn, a) {
var roots = new Map(),
internals$jscomp$inline_1164 = {
bundleType: 0,
version: "19.0.0-native-fb-d3d4d3a4-20240913",
version: "19.0.0-native-fb-3d95c43b-20240913",
rendererPackageName: "react-native-renderer",
currentDispatcherRef: ReactSharedInternals,
findFiberByHostInstance: getInstanceFromNode,
reconcilerVersion: "19.0.0-native-fb-d3d4d3a4-20240913"
reconcilerVersion: "19.0.0-native-fb-3d95c43b-20240913"
};
null !== extraDevToolsConfig &&
(internals$jscomp$inline_1164.rendererConfig = extraDevToolsConfig);
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<2e8b99493c3aa005334ae8baef13ae78>>
* @generated SignedSource<<22b0fd36180890c63b8c7db1f327dc65>>
*/
"use strict";
@@ -4983,11 +4983,18 @@ function startProfilerTimer(fiber) {
profilerStartTime = now();
0 > fiber.actualStartTime && (fiber.actualStartTime = profilerStartTime);
}
function stopProfilerTimerIfRunningAndRecordDelta(fiber, overrideBaseTime) {
function stopProfilerTimerIfRunningAndRecordDuration(fiber) {
if (0 <= profilerStartTime) {
var elapsedTime = now() - profilerStartTime;
fiber.actualDuration += elapsedTime;
fiber.selfBaseDuration = elapsedTime;
profilerStartTime = -1;
}
}
function stopProfilerTimerIfRunningAndRecordIncompleteDuration(fiber) {
if (0 <= profilerStartTime) {
var elapsedTime = now() - profilerStartTime;
fiber.actualDuration += elapsedTime;
overrideBaseTime && (fiber.selfBaseDuration = elapsedTime);
profilerStartTime = -1;
}
}
@@ -10203,7 +10210,7 @@ function handleThrow(root, thrownValue) {
else
switch (
(JSCompiler_temp.mode & 2 &&
stopProfilerTimerIfRunningAndRecordDelta(JSCompiler_temp, !0),
stopProfilerTimerIfRunningAndRecordDuration(JSCompiler_temp),
markComponentRenderStopped(),
workInProgressSuspendedReason)
) {
@@ -10456,7 +10463,7 @@ function performUnitOfWork(unitOfWork) {
0 !== (unitOfWork.mode & 2)
? (startProfilerTimer(unitOfWork),
(current = beginWork(current, unitOfWork, entangledRenderLanes)),
stopProfilerTimerIfRunningAndRecordDelta(unitOfWork, !0))
stopProfilerTimerIfRunningAndRecordDuration(unitOfWork))
: (current = beginWork(current, unitOfWork, entangledRenderLanes));
unitOfWork.memoizedProps = unitOfWork.pendingProps;
null === current
@@ -10504,7 +10511,7 @@ function replaySuspendedUnitOfWork(unitOfWork) {
resetWorkInProgress(next, entangledRenderLanes)),
(current = beginWork(current, next, entangledRenderLanes));
}
isProfilingMode && stopProfilerTimerIfRunningAndRecordDelta(next, !0);
isProfilingMode && stopProfilerTimerIfRunningAndRecordDuration(next);
next = current;
unitOfWork.memoizedProps = unitOfWork.pendingProps;
null === next ? completeUnitOfWork(unitOfWork) : (workInProgress = next);
@@ -10588,7 +10595,7 @@ function completeUnitOfWork(unitOfWork) {
? (current = completeWork(current, completedWork, entangledRenderLanes))
: (startProfilerTimer(completedWork),
(current = completeWork(current, completedWork, entangledRenderLanes)),
stopProfilerTimerIfRunningAndRecordDelta(completedWork, !1));
stopProfilerTimerIfRunningAndRecordIncompleteDuration(completedWork));
if (null !== current) {
workInProgress = current;
return;
@@ -10611,7 +10618,7 @@ function unwindUnitOfWork(unitOfWork, skipSiblings) {
return;
}
if (0 !== (unitOfWork.mode & 2)) {
stopProfilerTimerIfRunningAndRecordDelta(unitOfWork, !1);
stopProfilerTimerIfRunningAndRecordIncompleteDuration(unitOfWork);
next = unitOfWork.actualDuration;
for (var child = unitOfWork.child; null !== child; )
(next += child.actualDuration), (child = child.sibling);
@@ -11766,11 +11773,11 @@ batchedUpdatesImpl = function (fn, a) {
var roots = new Map(),
internals$jscomp$inline_1249 = {
bundleType: 0,
version: "19.0.0-native-fb-d3d4d3a4-20240913",
version: "19.0.0-native-fb-3d95c43b-20240913",
rendererPackageName: "react-native-renderer",
currentDispatcherRef: ReactSharedInternals,
findFiberByHostInstance: getInstanceFromNode,
reconcilerVersion: "19.0.0-native-fb-d3d4d3a4-20240913"
reconcilerVersion: "19.0.0-native-fb-3d95c43b-20240913"
};
null !== extraDevToolsConfig &&
(internals$jscomp$inline_1249.rendererConfig = extraDevToolsConfig);
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<da7c512452f201bb369ca465a2bed8bd>>
* @generated SignedSource<<8eef9cb3f1219e888f66f19585d81895>>
*/
"use strict";
@@ -6142,11 +6142,18 @@ __DEV__ &&
profilerStartTime = now();
0 > fiber.actualStartTime && (fiber.actualStartTime = profilerStartTime);
}
function stopProfilerTimerIfRunningAndRecordDelta(fiber, overrideBaseTime) {
function stopProfilerTimerIfRunningAndRecordDuration(fiber) {
if (0 <= profilerStartTime) {
var elapsedTime = now() - profilerStartTime;
fiber.actualDuration += elapsedTime;
fiber.selfBaseDuration = elapsedTime;
profilerStartTime = -1;
}
}
function stopProfilerTimerIfRunningAndRecordIncompleteDuration(fiber) {
if (0 <= profilerStartTime) {
var elapsedTime = now() - profilerStartTime;
fiber.actualDuration += elapsedTime;
overrideBaseTime && (fiber.selfBaseDuration = elapsedTime);
profilerStartTime = -1;
}
}
@@ -12665,7 +12672,7 @@ __DEV__ &&
else
switch (
(JSCompiler_temp.mode & 2 &&
stopProfilerTimerIfRunningAndRecordDelta(JSCompiler_temp, !0),
stopProfilerTimerIfRunningAndRecordDuration(JSCompiler_temp),
markComponentRenderStopped(),
workInProgressSuspendedReason)
) {
@@ -12974,7 +12981,7 @@ __DEV__ &&
unitOfWork,
entangledRenderLanes
)),
stopProfilerTimerIfRunningAndRecordDelta(unitOfWork, !0))
stopProfilerTimerIfRunningAndRecordDuration(unitOfWork))
: (current = runWithFiberInDEV(
unitOfWork,
beginWork,
@@ -13033,7 +13040,7 @@ __DEV__ &&
(current = beginWork(current, unitOfWork, entangledRenderLanes));
}
isProfilingMode &&
stopProfilerTimerIfRunningAndRecordDelta(unitOfWork, !0);
stopProfilerTimerIfRunningAndRecordDuration(unitOfWork);
return current;
}
function throwAndUnwindWorkLoop(
@@ -13128,7 +13135,9 @@ __DEV__ &&
completedWork,
entangledRenderLanes
)),
stopProfilerTimerIfRunningAndRecordDelta(completedWork, !1));
stopProfilerTimerIfRunningAndRecordIncompleteDuration(
completedWork
));
if (null !== current) {
workInProgress = current;
return;
@@ -13152,7 +13161,7 @@ __DEV__ &&
return;
}
if (0 !== (unitOfWork.mode & 2)) {
stopProfilerTimerIfRunningAndRecordDelta(unitOfWork, !1);
stopProfilerTimerIfRunningAndRecordIncompleteDuration(unitOfWork);
next = unitOfWork.actualDuration;
for (var child = unitOfWork.child; null !== child; )
(next += child.actualDuration), (child = child.sibling);
@@ -17399,11 +17408,11 @@ __DEV__ &&
shouldSuspendImpl = newShouldSuspendImpl;
};
var isomorphicReactPackageVersion = React.version;
if ("19.0.0-native-fb-d3d4d3a4-20240913" !== isomorphicReactPackageVersion)
if ("19.0.0-native-fb-3d95c43b-20240913" !== isomorphicReactPackageVersion)
throw Error(
'Incompatible React versions: The "react" and "react-native-renderer" packages must have the exact same version. Instead got:\n - react: ' +
(isomorphicReactPackageVersion +
"\n - react-native-renderer: 19.0.0-native-fb-d3d4d3a4-20240913\nLearn more: https://react.dev/warnings/version-mismatch")
"\n - react-native-renderer: 19.0.0-native-fb-3d95c43b-20240913\nLearn more: https://react.dev/warnings/version-mismatch")
);
if (
"function" !==
@@ -17429,11 +17438,11 @@ __DEV__ &&
(function () {
var internals = {
bundleType: 1,
version: "19.0.0-native-fb-d3d4d3a4-20240913",
version: "19.0.0-native-fb-3d95c43b-20240913",
rendererPackageName: "react-native-renderer",
currentDispatcherRef: ReactSharedInternals,
findFiberByHostInstance: getInstanceFromTag,
reconcilerVersion: "19.0.0-native-fb-d3d4d3a4-20240913"
reconcilerVersion: "19.0.0-native-fb-3d95c43b-20240913"
};
null !== extraDevToolsConfig &&
(internals.rendererConfig = extraDevToolsConfig);
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<b81309e2daf7536e37c679cebc59aec8>>
* @generated SignedSource<<c491bc7d6b0b98eedcce79f44d645a2f>>
*/
"use strict";
@@ -11205,11 +11205,11 @@ function updateContainer(element, container, parentComponent, callback) {
return lane;
}
var isomorphicReactPackageVersion = React.version;
if ("19.0.0-native-fb-d3d4d3a4-20240913" !== isomorphicReactPackageVersion)
if ("19.0.0-native-fb-3d95c43b-20240913" !== isomorphicReactPackageVersion)
throw Error(
'Incompatible React versions: The "react" and "react-native-renderer" packages must have the exact same version. Instead got:\n - react: ' +
(isomorphicReactPackageVersion +
"\n - react-native-renderer: 19.0.0-native-fb-d3d4d3a4-20240913\nLearn more: https://react.dev/warnings/version-mismatch")
"\n - react-native-renderer: 19.0.0-native-fb-3d95c43b-20240913\nLearn more: https://react.dev/warnings/version-mismatch")
);
if (
"function" !==
@@ -11258,11 +11258,11 @@ batchedUpdatesImpl = function (fn, a) {
var roots = new Map(),
internals$jscomp$inline_1230 = {
bundleType: 0,
version: "19.0.0-native-fb-d3d4d3a4-20240913",
version: "19.0.0-native-fb-3d95c43b-20240913",
rendererPackageName: "react-native-renderer",
currentDispatcherRef: ReactSharedInternals,
findFiberByHostInstance: getInstanceFromTag,
reconcilerVersion: "19.0.0-native-fb-d3d4d3a4-20240913"
reconcilerVersion: "19.0.0-native-fb-3d95c43b-20240913"
};
null !== extraDevToolsConfig &&
(internals$jscomp$inline_1230.rendererConfig = extraDevToolsConfig);
@@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<e95d542def8b49e35fbe42f8d849241c>>
* @generated SignedSource<<b299b153fe03ee1bccb9bdde4e375c4d>>
*/
"use strict";
@@ -5272,11 +5272,18 @@ function startProfilerTimer(fiber) {
profilerStartTime = now();
0 > fiber.actualStartTime && (fiber.actualStartTime = profilerStartTime);
}
function stopProfilerTimerIfRunningAndRecordDelta(fiber, overrideBaseTime) {
function stopProfilerTimerIfRunningAndRecordDuration(fiber) {
if (0 <= profilerStartTime) {
var elapsedTime = now() - profilerStartTime;
fiber.actualDuration += elapsedTime;
fiber.selfBaseDuration = elapsedTime;
profilerStartTime = -1;
}
}
function stopProfilerTimerIfRunningAndRecordIncompleteDuration(fiber) {
if (0 <= profilerStartTime) {
var elapsedTime = now() - profilerStartTime;
fiber.actualDuration += elapsedTime;
overrideBaseTime && (fiber.selfBaseDuration = elapsedTime);
profilerStartTime = -1;
}
}
@@ -10634,7 +10641,7 @@ function handleThrow(root, thrownValue) {
else
switch (
(JSCompiler_temp.mode & 2 &&
stopProfilerTimerIfRunningAndRecordDelta(JSCompiler_temp, !0),
stopProfilerTimerIfRunningAndRecordDuration(JSCompiler_temp),
markComponentRenderStopped(),
workInProgressSuspendedReason)
) {
@@ -10887,7 +10894,7 @@ function performUnitOfWork(unitOfWork) {
0 !== (unitOfWork.mode & 2)
? (startProfilerTimer(unitOfWork),
(current = beginWork(current, unitOfWork, entangledRenderLanes)),
stopProfilerTimerIfRunningAndRecordDelta(unitOfWork, !0))
stopProfilerTimerIfRunningAndRecordDuration(unitOfWork))
: (current = beginWork(current, unitOfWork, entangledRenderLanes));
unitOfWork.memoizedProps = unitOfWork.pendingProps;
null === current
@@ -10935,7 +10942,7 @@ function replaySuspendedUnitOfWork(unitOfWork) {
resetWorkInProgress(next, entangledRenderLanes)),
(current = beginWork(current, next, entangledRenderLanes));
}
isProfilingMode && stopProfilerTimerIfRunningAndRecordDelta(next, !0);
isProfilingMode && stopProfilerTimerIfRunningAndRecordDuration(next);
next = current;
unitOfWork.memoizedProps = unitOfWork.pendingProps;
null === next ? completeUnitOfWork(unitOfWork) : (workInProgress = next);
@@ -11019,7 +11026,7 @@ function completeUnitOfWork(unitOfWork) {
? (current = completeWork(current, completedWork, entangledRenderLanes))
: (startProfilerTimer(completedWork),
(current = completeWork(current, completedWork, entangledRenderLanes)),
stopProfilerTimerIfRunningAndRecordDelta(completedWork, !1));
stopProfilerTimerIfRunningAndRecordIncompleteDuration(completedWork));
if (null !== current) {
workInProgress = current;
return;
@@ -11042,7 +11049,7 @@ function unwindUnitOfWork(unitOfWork, skipSiblings) {
return;
}
if (0 !== (unitOfWork.mode & 2)) {
stopProfilerTimerIfRunningAndRecordDelta(unitOfWork, !1);
stopProfilerTimerIfRunningAndRecordIncompleteDuration(unitOfWork);
next = unitOfWork.actualDuration;
for (var child = unitOfWork.child; null !== child; )
(next += child.actualDuration), (child = child.sibling);
@@ -11895,11 +11902,11 @@ function updateContainer(element, container, parentComponent, callback) {
return lane;
}
var isomorphicReactPackageVersion = React.version;
if ("19.0.0-native-fb-d3d4d3a4-20240913" !== isomorphicReactPackageVersion)
if ("19.0.0-native-fb-3d95c43b-20240913" !== isomorphicReactPackageVersion)
throw Error(
'Incompatible React versions: The "react" and "react-native-renderer" packages must have the exact same version. Instead got:\n - react: ' +
(isomorphicReactPackageVersion +
"\n - react-native-renderer: 19.0.0-native-fb-d3d4d3a4-20240913\nLearn more: https://react.dev/warnings/version-mismatch")
"\n - react-native-renderer: 19.0.0-native-fb-3d95c43b-20240913\nLearn more: https://react.dev/warnings/version-mismatch")
);
if (
"function" !==
@@ -11948,11 +11955,11 @@ batchedUpdatesImpl = function (fn, a) {
var roots = new Map(),
internals$jscomp$inline_1315 = {
bundleType: 0,
version: "19.0.0-native-fb-d3d4d3a4-20240913",
version: "19.0.0-native-fb-3d95c43b-20240913",
rendererPackageName: "react-native-renderer",
currentDispatcherRef: ReactSharedInternals,
findFiberByHostInstance: getInstanceFromTag,
reconcilerVersion: "19.0.0-native-fb-d3d4d3a4-20240913"
reconcilerVersion: "19.0.0-native-fb-3d95c43b-20240913"
};
null !== extraDevToolsConfig &&
(internals$jscomp$inline_1315.rendererConfig = extraDevToolsConfig);