diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-dev.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-dev.js index 83fd1d18b4..7f26bbf3a8 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-dev.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-dev.js @@ -1579,7 +1579,7 @@ function createLaneMap(initial) { return laneMap; } -function markRootUpdated(root, updateLane, eventTime) { +function markRootUpdated(root, updateLane) { root.pendingLanes |= updateLane; // If there are any suspended transitions, it's possible this new update // could unblock them. Clear the suspended lanes so that we can try rendering // them again. @@ -1597,12 +1597,6 @@ function markRootUpdated(root, updateLane, eventTime) { root.suspendedLanes = NoLanes; root.pingedLanes = NoLanes; } - - var eventTimes = root.eventTimes; - var index = laneToIndex(updateLane); // We can always overwrite an existing timestamp because we prefer the most - // recent event, and we assume time is monotonically increasing. - - eventTimes[index] = eventTime; } function markRootSuspended$1(root, suspendedLanes) { root.suspendedLanes |= suspendedLanes; @@ -1632,7 +1626,6 @@ function markRootFinished(root, remainingLanes) { root.entangledLanes &= remainingLanes; root.errorRecoveryDisabledLanes &= remainingLanes; var entanglements = root.entanglements; - var eventTimes = root.eventTimes; var expirationTimes = root.expirationTimes; var hiddenUpdates = root.hiddenUpdates; // Clear the lanes that no longer have pending work @@ -1642,7 +1635,6 @@ function markRootFinished(root, remainingLanes) { var index = pickArbitraryLaneIndex(lanes); var lane = 1 << index; entanglements[index] = NoLanes; - eventTimes[index] = NoTimestamp; expirationTimes[index] = NoTimestamp; var hiddenUpdatesForLane = hiddenUpdates[index]; @@ -7098,7 +7090,7 @@ function forceStoreRerender(fiber) { var root = enqueueConcurrentRenderForLane(fiber, SyncLane); if (root !== null) { - scheduleUpdateOnFiber(root, fiber, SyncLane, NoTimestamp); + scheduleUpdateOnFiber(root, fiber, SyncLane); } } @@ -7606,8 +7598,7 @@ function refreshCache(fiber, seedKey, seedValue) { var root = enqueueUpdate(provider, refreshUpdate, lane); if (root !== null) { - var eventTime = requestEventTime(); - scheduleUpdateOnFiber(root, provider, lane, eventTime); + scheduleUpdateOnFiber(root, provider, lane); entangleTransitions(root, provider, lane); } // TODO: If a refresh never commits, the new cache created here must be // released. A simple case is start refreshing a cache boundary, but then @@ -7663,8 +7654,7 @@ function dispatchReducerAction(fiber, queue, action) { var root = enqueueConcurrentHookUpdate(fiber, queue, update, lane); if (root !== null) { - var eventTime = requestEventTime(); - scheduleUpdateOnFiber(root, fiber, lane, eventTime); + scheduleUpdateOnFiber(root, fiber, lane); entangleTransitionUpdate(root, queue, lane); } } @@ -7745,8 +7735,7 @@ function dispatchSetState(fiber, queue, action) { var root = enqueueConcurrentHookUpdate(fiber, queue, update, lane); if (root !== null) { - var eventTime = requestEventTime(); - scheduleUpdateOnFiber(root, fiber, lane, eventTime); + scheduleUpdateOnFiber(root, fiber, lane); entangleTransitionUpdate(root, queue, lane); } } @@ -9091,8 +9080,7 @@ var classComponentUpdater = { var root = enqueueUpdate(fiber, update, lane); if (root !== null) { - var eventTime = requestEventTime(); - scheduleUpdateOnFiber(root, fiber, lane, eventTime); + scheduleUpdateOnFiber(root, fiber, lane); entangleTransitions(root, fiber, lane); } }, @@ -9114,8 +9102,7 @@ var classComponentUpdater = { var root = enqueueUpdate(fiber, update, lane); if (root !== null) { - var eventTime = requestEventTime(); - scheduleUpdateOnFiber(root, fiber, lane, eventTime); + scheduleUpdateOnFiber(root, fiber, lane); entangleTransitions(root, fiber, lane); } }, @@ -9137,8 +9124,7 @@ var classComponentUpdater = { var root = enqueueUpdate(fiber, update, lane); if (root !== null) { - var eventTime = requestEventTime(); - scheduleUpdateOnFiber(root, fiber, lane, eventTime); + scheduleUpdateOnFiber(root, fiber, lane); entangleTransitions(root, fiber, lane); } } @@ -12604,16 +12590,9 @@ function updateDehydratedSuspenseComponent( // Intentionally mutating since this render will get interrupted. This // is one of the very rare times where we mutate the current tree // during the render phase. - suspenseState.retryLane = attemptHydrationAtLane; // TODO: Ideally this would inherit the event time of the current render - - var eventTime = NoTimestamp; + suspenseState.retryLane = attemptHydrationAtLane; enqueueConcurrentRenderForLane(current, attemptHydrationAtLane); - scheduleUpdateOnFiber( - root, - current, - attemptHydrationAtLane, - eventTime - ); // Throw a special object that signals to the work loop that it should + scheduleUpdateOnFiber(root, current, attemptHydrationAtLane); // Throw a special object that signals to the work loop that it should // interrupt the current render. // // Because we're inside a React-only execution stack, we don't @@ -17555,7 +17534,7 @@ function detachOffscreenInstance(instance) { if (root !== null) { instance._pendingVisibility |= OffscreenDetached; - scheduleUpdateOnFiber(root, fiber, SyncLane, NoTimestamp); + scheduleUpdateOnFiber(root, fiber, SyncLane); } } function attachOffscreenInstance(instance) { @@ -17576,7 +17555,7 @@ function attachOffscreenInstance(instance) { if (root !== null) { instance._pendingVisibility &= ~OffscreenDetached; - scheduleUpdateOnFiber(root, fiber, SyncLane, NoTimestamp); + scheduleUpdateOnFiber(root, fiber, SyncLane); } } @@ -19866,11 +19845,7 @@ var isFlushingPassiveEffects = false; var didScheduleUpdateDuringPassiveEffects = false; var NESTED_PASSIVE_UPDATE_LIMIT = 50; var nestedPassiveUpdateCount = 0; -var rootWithPassiveNestedUpdates = null; // If two updates are scheduled within the same event, we should treat their -// event times as simultaneous, even if the actual clock time has advanced -// between the first and second call. - -var currentEventTime = NoTimestamp; +var rootWithPassiveNestedUpdates = null; var currentEventTransitionLane = NoLanes; var isRunningInsertionEffect = false; function getWorkInProgressRoot() { @@ -19882,20 +19857,6 @@ function getWorkInProgressRootRenderLanes() { function isWorkLoopSuspendedOnData() { return workInProgressSuspendedReason === SuspendedOnData; } -function requestEventTime() { - if ((executionContext & (RenderContext | CommitContext)) !== NoContext) { - // We're inside React, so it's fine to read the actual time. - return now$1(); - } // We're not inside React, so we may be in the middle of a browser event. - - if (currentEventTime !== NoTimestamp) { - // Use the same start time for all updates until we enter React again. - return currentEventTime; - } // This is the first update since React yielded. Compute a new start time. - - currentEventTime = now$1(); - return currentEventTime; -} function requestUpdateLane(fiber) { // Special cases var mode = fiber.mode; @@ -19979,7 +19940,7 @@ function requestRetryLane(fiber) { return claimNextRetryLane(); } -function scheduleUpdateOnFiber(root, fiber, lane, eventTime) { +function scheduleUpdateOnFiber(root, fiber, lane) { { if (isRunningInsertionEffect) { error("useInsertionEffect must not schedule updates."); @@ -20005,7 +19966,7 @@ function scheduleUpdateOnFiber(root, fiber, lane, eventTime) { markRootSuspended(root, workInProgressRootRenderLanes); } // Mark that the root has a pending update. - markRootUpdated(root, lane, eventTime); + markRootUpdated(root, lane); if ( (executionContext & RenderContext) !== NoLanes && @@ -20071,10 +20032,8 @@ function isUnsafeClassRenderPhaseUpdate(fiber) { function performConcurrentWorkOnRoot(root, didTimeout) { { resetNestedUpdateFlag(); - } // Since we know we're in a React event, we can clear the current - // event time. The next update will compute a new event time. + } - currentEventTime = NoTimestamp; currentEventTransitionLane = NoLanes; if ((executionContext & (RenderContext | CommitContext)) !== NoContext) { @@ -22095,10 +22054,9 @@ function captureCommitPhaseErrorOnRoot(rootFiber, sourceFiber, error) { var errorInfo = createCapturedValueAtFiber(error, sourceFiber); var update = createRootErrorUpdate(rootFiber, errorInfo, SyncLane); var root = enqueueUpdate(rootFiber, update, SyncLane); - var eventTime = requestEventTime(); if (root !== null) { - markRootUpdated(root, SyncLane, eventTime); + markRootUpdated(root, SyncLane); ensureRootIsScheduled(root); } } @@ -22134,10 +22092,9 @@ function captureCommitPhaseError(sourceFiber, nearestMountedAncestor, error$1) { var errorInfo = createCapturedValueAtFiber(error$1, sourceFiber); var update = createClassErrorUpdate(fiber, errorInfo, SyncLane); var root = enqueueUpdate(fiber, update, SyncLane); - var eventTime = requestEventTime(); if (root !== null) { - markRootUpdated(root, SyncLane, eventTime); + markRootUpdated(root, SyncLane); ensureRootIsScheduled(root); } @@ -22256,11 +22213,10 @@ function retryTimedOutBoundary(boundaryFiber, retryLane) { retryLane = requestRetryLane(boundaryFiber); } // TODO: Special case idle priority? - var eventTime = requestEventTime(); var root = enqueueConcurrentRenderForLane(boundaryFiber, retryLane); if (root !== null) { - markRootUpdated(root, retryLane, eventTime); + markRootUpdated(root, retryLane); ensureRootIsScheduled(root); } } @@ -22912,7 +22868,7 @@ function scheduleFibersWithFamiliesRecursively( var root = enqueueConcurrentRenderForLane(fiber, SyncLane); if (root !== null) { - scheduleUpdateOnFiber(root, fiber, SyncLane, NoTimestamp); + scheduleUpdateOnFiber(root, fiber, SyncLane); } } @@ -23700,7 +23656,6 @@ function FiberRootNode( this.next = null; this.callbackNode = null; this.callbackPriority = NoLane; - this.eventTimes = createLaneMap(NoLanes); this.expirationTimes = createLaneMap(NoTimestamp); this.pendingLanes = NoLanes; this.suspendedLanes = NoLanes; @@ -23797,7 +23752,7 @@ function createFiberRoot( return root; } -var ReactVersion = "18.3.0-next-0b931f90e-20230411"; +var ReactVersion = "18.3.0-next-58742c21b-20230411"; // Might add PROFILE later. @@ -23905,8 +23860,7 @@ function updateContainer(element, container, parentComponent, callback) { var root = enqueueUpdate(current$1, update, lane); if (root !== null) { - var eventTime = requestEventTime(); - scheduleUpdateOnFiber(root, current$1, lane, eventTime); + scheduleUpdateOnFiber(root, current$1, lane); entangleTransitions(root, current$1, lane); } @@ -24070,7 +24024,7 @@ var setSuspenseHandler = null; var root = enqueueConcurrentRenderForLane(fiber, SyncLane); if (root !== null) { - scheduleUpdateOnFiber(root, fiber, SyncLane, NoTimestamp); + scheduleUpdateOnFiber(root, fiber, SyncLane); } } }; @@ -24091,7 +24045,7 @@ var setSuspenseHandler = null; var root = enqueueConcurrentRenderForLane(fiber, SyncLane); if (root !== null) { - scheduleUpdateOnFiber(root, fiber, SyncLane, NoTimestamp); + scheduleUpdateOnFiber(root, fiber, SyncLane); } } }; @@ -24112,7 +24066,7 @@ var setSuspenseHandler = null; var root = enqueueConcurrentRenderForLane(fiber, SyncLane); if (root !== null) { - scheduleUpdateOnFiber(root, fiber, SyncLane, NoTimestamp); + scheduleUpdateOnFiber(root, fiber, SyncLane); } } }; // Support DevTools props for function components, forwardRef, memo, host components, etc. @@ -24127,7 +24081,7 @@ var setSuspenseHandler = null; var root = enqueueConcurrentRenderForLane(fiber, SyncLane); if (root !== null) { - scheduleUpdateOnFiber(root, fiber, SyncLane, NoTimestamp); + scheduleUpdateOnFiber(root, fiber, SyncLane); } }; @@ -24141,7 +24095,7 @@ var setSuspenseHandler = null; var root = enqueueConcurrentRenderForLane(fiber, SyncLane); if (root !== null) { - scheduleUpdateOnFiber(root, fiber, SyncLane, NoTimestamp); + scheduleUpdateOnFiber(root, fiber, SyncLane); } }; @@ -24155,7 +24109,7 @@ var setSuspenseHandler = null; var root = enqueueConcurrentRenderForLane(fiber, SyncLane); if (root !== null) { - scheduleUpdateOnFiber(root, fiber, SyncLane, NoTimestamp); + scheduleUpdateOnFiber(root, fiber, SyncLane); } }; @@ -24163,7 +24117,7 @@ var setSuspenseHandler = null; var root = enqueueConcurrentRenderForLane(fiber, SyncLane); if (root !== null) { - scheduleUpdateOnFiber(root, fiber, SyncLane, NoTimestamp); + scheduleUpdateOnFiber(root, fiber, SyncLane); } }; diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-prod.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-prod.js index 6444526baf..d1f5c9a742 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-prod.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-prod.js @@ -466,13 +466,10 @@ function createLaneMap(initial) { for (var laneMap = [], i = 0; 31 > i; i++) laneMap.push(initial); return laneMap; } -function markRootUpdated(root, updateLane, eventTime) { +function markRootUpdated(root, updateLane) { root.pendingLanes |= updateLane; 536870912 !== updateLane && ((root.suspendedLanes = 0), (root.pingedLanes = 0)); - root = root.eventTimes; - updateLane = 31 - clz32(updateLane); - root[updateLane] = eventTime; } function markRootFinished(root, remainingLanes) { var noLongerPendingLanes = root.pendingLanes & ~remainingLanes; @@ -484,13 +481,11 @@ function markRootFinished(root, remainingLanes) { root.entangledLanes &= remainingLanes; root.errorRecoveryDisabledLanes &= remainingLanes; remainingLanes = root.entanglements; - var eventTimes = root.eventTimes, - expirationTimes = root.expirationTimes; + var expirationTimes = root.expirationTimes; for (root = root.hiddenUpdates; 0 < noLongerPendingLanes; ) { var index$4 = 31 - clz32(noLongerPendingLanes), lane = 1 << index$4; remainingLanes[index$4] = 0; - eventTimes[index$4] = -1; expirationTimes[index$4] = -1; var hiddenUpdatesForLane = root[index$4]; if (null !== hiddenUpdatesForLane) @@ -2319,7 +2314,7 @@ function checkIfSnapshotChanged(inst) { } function forceStoreRerender(fiber) { var root = enqueueConcurrentRenderForLane(fiber, 2); - null !== root && scheduleUpdateOnFiber(root, fiber, 2, -1); + null !== root && scheduleUpdateOnFiber(root, fiber, 2); } function mountState(initialState) { var hook = mountWorkInProgressHook(); @@ -2477,11 +2472,9 @@ function refreshCache(fiber) { var lane = requestUpdateLane(provider); fiber = createUpdate(lane); var root = enqueueUpdate(provider, fiber, lane); - if (null !== root) { - var eventTime = requestEventTime(); - scheduleUpdateOnFiber(root, provider, lane, eventTime); - entangleTransitions(root, provider, lane); - } + null !== root && + (scheduleUpdateOnFiber(root, provider, lane), + entangleTransitions(root, provider, lane)); provider = { cache: createCache() }; fiber.payload = provider; return; @@ -2498,16 +2491,13 @@ function dispatchReducerAction(fiber, queue, action) { eagerState: null, next: null }; - if (isRenderPhaseUpdate(fiber)) enqueueRenderPhaseUpdate(queue, action); - else if ( - (enqueueUpdate$1(fiber, queue, action, lane), - (action = getRootForUpdatedFiber(fiber)), - null !== action) - ) { - var eventTime = requestEventTime(); - scheduleUpdateOnFiber(action, fiber, lane, eventTime); - entangleTransitionUpdate(action, queue, lane); - } + isRenderPhaseUpdate(fiber) + ? enqueueRenderPhaseUpdate(queue, action) + : (enqueueUpdate$1(fiber, queue, action, lane), + (action = getRootForUpdatedFiber(fiber)), + null !== action && + (scheduleUpdateOnFiber(action, fiber, lane), + entangleTransitionUpdate(action, queue, lane))); } function dispatchSetState(fiber, queue, action) { var lane = requestUpdateLane(fiber), @@ -2542,8 +2532,7 @@ function dispatchSetState(fiber, queue, action) { enqueueUpdate$1(fiber, queue, update, lane); action = getRootForUpdatedFiber(fiber); null !== action && - ((update = requestEventTime()), - scheduleUpdateOnFiber(action, fiber, lane, update), + (scheduleUpdateOnFiber(action, fiber, lane), entangleTransitionUpdate(action, queue, lane)); } } @@ -2809,8 +2798,7 @@ var classComponentUpdater = { void 0 !== callback && null !== callback && (update.callback = callback); payload = enqueueUpdate(inst, update, lane); null !== payload && - ((callback = requestEventTime()), - scheduleUpdateOnFiber(payload, inst, lane, callback), + (scheduleUpdateOnFiber(payload, inst, lane), entangleTransitions(payload, inst, lane)); }, enqueueReplaceState: function (inst, payload, callback) { @@ -2822,8 +2810,7 @@ var classComponentUpdater = { void 0 !== callback && null !== callback && (update.callback = callback); payload = enqueueUpdate(inst, update, lane); null !== payload && - ((callback = requestEventTime()), - scheduleUpdateOnFiber(payload, inst, lane, callback), + (scheduleUpdateOnFiber(payload, inst, lane), entangleTransitions(payload, inst, lane)); }, enqueueForceUpdate: function (inst, callback) { @@ -2834,8 +2821,7 @@ var classComponentUpdater = { void 0 !== callback && null !== callback && (update.callback = callback); callback = enqueueUpdate(inst, update, lane); null !== callback && - ((update = requestEventTime()), - scheduleUpdateOnFiber(callback, inst, lane, update), + (scheduleUpdateOnFiber(callback, inst, lane), entangleTransitions(callback, inst, lane)); } }; @@ -3816,7 +3802,7 @@ function updateDehydratedSuspenseComponent( throw ( ((suspenseState.retryLane = didSuspend), enqueueConcurrentRenderForLane(current, didSuspend), - scheduleUpdateOnFiber(nextProps, current, didSuspend, -1), + scheduleUpdateOnFiber(nextProps, current, didSuspend), SelectiveHydrationException) ); } @@ -6402,15 +6388,7 @@ var PossiblyWeakMap = "function" === typeof WeakMap ? WeakMap : Map, pendingPassiveTransitions = null, nestedUpdateCount = 0, rootWithNestedUpdates = null, - currentEventTime = -1, currentEventTransitionLane = 0; -function requestEventTime() { - return 0 !== (executionContext & 6) - ? now() - : -1 !== currentEventTime - ? currentEventTime - : (currentEventTime = now()); -} function requestUpdateLane(fiber) { if (0 === (fiber.mode & 1)) return 2; if (0 !== (executionContext & 2) && 0 !== workInProgressRootRenderLanes) @@ -6424,14 +6402,14 @@ function requestUpdateLane(fiber) { fiber = currentUpdatePriority; return 0 !== fiber ? fiber : 32; } -function scheduleUpdateOnFiber(root, fiber, lane, eventTime) { +function scheduleUpdateOnFiber(root, fiber, lane) { if ( (root === workInProgressRoot && 2 === workInProgressSuspendedReason) || null !== root.cancelPendingCommit ) prepareFreshStack(root, 0), markRootSuspended(root, workInProgressRootRenderLanes); - markRootUpdated(root, lane, eventTime); + markRootUpdated(root, lane); if (0 === (executionContext & 2) || root !== workInProgressRoot) root === workInProgressRoot && (0 === (executionContext & 2) && @@ -6446,7 +6424,6 @@ function scheduleUpdateOnFiber(root, fiber, lane, eventTime) { flushSyncWorkAcrossRoots_impl(!0)); } function performConcurrentWorkOnRoot(root, didTimeout) { - currentEventTime = -1; currentEventTransitionLane = 0; if (0 !== (executionContext & 6)) throw Error("Should not already be working."); @@ -7403,10 +7380,8 @@ function captureCommitPhaseErrorOnRoot(rootFiber, sourceFiber, error) { sourceFiber = createCapturedValueAtFiber(error, sourceFiber); sourceFiber = createRootErrorUpdate(rootFiber, sourceFiber, 2); rootFiber = enqueueUpdate(rootFiber, sourceFiber, 2); - sourceFiber = requestEventTime(); null !== rootFiber && - (markRootUpdated(rootFiber, 2, sourceFiber), - ensureRootIsScheduled(rootFiber)); + (markRootUpdated(rootFiber, 2), ensureRootIsScheduled(rootFiber)); } function captureCommitPhaseError(sourceFiber, nearestMountedAncestor, error) { if (3 === sourceFiber.tag) @@ -7440,9 +7415,8 @@ function captureCommitPhaseError(sourceFiber, nearestMountedAncestor, error) { sourceFiber, 2 ); - sourceFiber = requestEventTime(); null !== nearestMountedAncestor && - (markRootUpdated(nearestMountedAncestor, 2, sourceFiber), + (markRootUpdated(nearestMountedAncestor, 2), ensureRootIsScheduled(nearestMountedAncestor)); break; } @@ -7484,10 +7458,9 @@ function pingSuspendedRoot(root, wakeable, pingedLanes) { function retryTimedOutBoundary(boundaryFiber, retryLane) { 0 === retryLane && (retryLane = 0 === (boundaryFiber.mode & 1) ? 2 : claimNextRetryLane()); - var eventTime = requestEventTime(); boundaryFiber = enqueueConcurrentRenderForLane(boundaryFiber, retryLane); null !== boundaryFiber && - (markRootUpdated(boundaryFiber, retryLane, eventTime), + (markRootUpdated(boundaryFiber, retryLane), ensureRootIsScheduled(boundaryFiber)); } function retryDehydratedSuspenseBoundary(boundaryFiber) { @@ -8154,7 +8127,7 @@ function createFiberFromOffscreen(pendingProps, mode, lanes, key) { var root = enqueueConcurrentRenderForLane(fiber, 2); null !== root && ((primaryChildInstance._pendingVisibility |= 2), - scheduleUpdateOnFiber(root, fiber, 2, -1)); + scheduleUpdateOnFiber(root, fiber, 2)); } }, attach: function () { @@ -8167,7 +8140,7 @@ function createFiberFromOffscreen(pendingProps, mode, lanes, key) { var root = enqueueConcurrentRenderForLane(fiber, 2); null !== root && ((primaryChildInstance._pendingVisibility &= -3), - scheduleUpdateOnFiber(root, fiber, 2, -1)); + scheduleUpdateOnFiber(root, fiber, 2)); } } }; @@ -8216,7 +8189,6 @@ function FiberRootNode( this.cancelPendingCommit = null; this.callbackPriority = 0; - this.eventTimes = createLaneMap(0); this.expirationTimes = createLaneMap(-1); this.entangledLanes = this.errorRecoveryDisabledLanes = @@ -8327,8 +8299,7 @@ function updateContainer(element, container, parentComponent, callback) { null !== callback && (container.callback = callback); element = enqueueUpdate(current, container, lane); null !== element && - ((callback = requestEventTime()), - scheduleUpdateOnFiber(element, current, lane, callback), + (scheduleUpdateOnFiber(element, current, lane), entangleTransitions(element, current, lane)); return lane; } @@ -8639,7 +8610,7 @@ var devToolsConfig$jscomp$inline_1021 = { throw Error("TestRenderer does not support findFiberByHostInstance()"); }, bundleType: 0, - version: "18.3.0-next-0b931f90e-20230411", + version: "18.3.0-next-58742c21b-20230411", rendererPackageName: "react-test-renderer" }; var internals$jscomp$inline_1204 = { @@ -8670,7 +8641,7 @@ var internals$jscomp$inline_1204 = { scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "18.3.0-next-0b931f90e-20230411" + reconcilerVersion: "18.3.0-next-58742c21b-20230411" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { var hook$jscomp$inline_1205 = __REACT_DEVTOOLS_GLOBAL_HOOK__; diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-profiling.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-profiling.js index ed5a5e3044..07cf716715 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-profiling.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-profiling.js @@ -484,13 +484,10 @@ function createLaneMap(initial) { for (var laneMap = [], i = 0; 31 > i; i++) laneMap.push(initial); return laneMap; } -function markRootUpdated(root, updateLane, eventTime) { +function markRootUpdated(root, updateLane) { root.pendingLanes |= updateLane; 536870912 !== updateLane && ((root.suspendedLanes = 0), (root.pingedLanes = 0)); - root = root.eventTimes; - updateLane = 31 - clz32(updateLane); - root[updateLane] = eventTime; } function markRootFinished(root, remainingLanes) { var noLongerPendingLanes = root.pendingLanes & ~remainingLanes; @@ -502,13 +499,11 @@ function markRootFinished(root, remainingLanes) { root.entangledLanes &= remainingLanes; root.errorRecoveryDisabledLanes &= remainingLanes; remainingLanes = root.entanglements; - var eventTimes = root.eventTimes, - expirationTimes = root.expirationTimes; + var expirationTimes = root.expirationTimes; for (root = root.hiddenUpdates; 0 < noLongerPendingLanes; ) { var index$4 = 31 - clz32(noLongerPendingLanes), lane = 1 << index$4; remainingLanes[index$4] = 0; - eventTimes[index$4] = -1; expirationTimes[index$4] = -1; var hiddenUpdatesForLane = root[index$4]; if (null !== hiddenUpdatesForLane) @@ -2337,7 +2332,7 @@ function checkIfSnapshotChanged(inst) { } function forceStoreRerender(fiber) { var root = enqueueConcurrentRenderForLane(fiber, 2); - null !== root && scheduleUpdateOnFiber(root, fiber, 2, -1); + null !== root && scheduleUpdateOnFiber(root, fiber, 2); } function mountState(initialState) { var hook = mountWorkInProgressHook(); @@ -2495,11 +2490,9 @@ function refreshCache(fiber) { var lane = requestUpdateLane(provider); fiber = createUpdate(lane); var root = enqueueUpdate(provider, fiber, lane); - if (null !== root) { - var eventTime = requestEventTime(); - scheduleUpdateOnFiber(root, provider, lane, eventTime); - entangleTransitions(root, provider, lane); - } + null !== root && + (scheduleUpdateOnFiber(root, provider, lane), + entangleTransitions(root, provider, lane)); provider = { cache: createCache() }; fiber.payload = provider; return; @@ -2516,16 +2509,13 @@ function dispatchReducerAction(fiber, queue, action) { eagerState: null, next: null }; - if (isRenderPhaseUpdate(fiber)) enqueueRenderPhaseUpdate(queue, action); - else if ( - (enqueueUpdate$1(fiber, queue, action, lane), - (action = getRootForUpdatedFiber(fiber)), - null !== action) - ) { - var eventTime = requestEventTime(); - scheduleUpdateOnFiber(action, fiber, lane, eventTime); - entangleTransitionUpdate(action, queue, lane); - } + isRenderPhaseUpdate(fiber) + ? enqueueRenderPhaseUpdate(queue, action) + : (enqueueUpdate$1(fiber, queue, action, lane), + (action = getRootForUpdatedFiber(fiber)), + null !== action && + (scheduleUpdateOnFiber(action, fiber, lane), + entangleTransitionUpdate(action, queue, lane))); } function dispatchSetState(fiber, queue, action) { var lane = requestUpdateLane(fiber), @@ -2560,8 +2550,7 @@ function dispatchSetState(fiber, queue, action) { enqueueUpdate$1(fiber, queue, update, lane); action = getRootForUpdatedFiber(fiber); null !== action && - ((update = requestEventTime()), - scheduleUpdateOnFiber(action, fiber, lane, update), + (scheduleUpdateOnFiber(action, fiber, lane), entangleTransitionUpdate(action, queue, lane)); } } @@ -2889,8 +2878,7 @@ var classComponentUpdater = { void 0 !== callback && null !== callback && (update.callback = callback); payload = enqueueUpdate(inst, update, lane); null !== payload && - ((callback = requestEventTime()), - scheduleUpdateOnFiber(payload, inst, lane, callback), + (scheduleUpdateOnFiber(payload, inst, lane), entangleTransitions(payload, inst, lane)); }, enqueueReplaceState: function (inst, payload, callback) { @@ -2902,8 +2890,7 @@ var classComponentUpdater = { void 0 !== callback && null !== callback && (update.callback = callback); payload = enqueueUpdate(inst, update, lane); null !== payload && - ((callback = requestEventTime()), - scheduleUpdateOnFiber(payload, inst, lane, callback), + (scheduleUpdateOnFiber(payload, inst, lane), entangleTransitions(payload, inst, lane)); }, enqueueForceUpdate: function (inst, callback) { @@ -2914,8 +2901,7 @@ var classComponentUpdater = { void 0 !== callback && null !== callback && (update.callback = callback); callback = enqueueUpdate(inst, update, lane); null !== callback && - ((update = requestEventTime()), - scheduleUpdateOnFiber(callback, inst, lane, update), + (scheduleUpdateOnFiber(callback, inst, lane), entangleTransitions(callback, inst, lane)); } }; @@ -3910,7 +3896,7 @@ function updateDehydratedSuspenseComponent( throw ( ((suspenseState.retryLane = didSuspend), enqueueConcurrentRenderForLane(current, didSuspend), - scheduleUpdateOnFiber(nextProps, current, didSuspend, -1), + scheduleUpdateOnFiber(nextProps, current, didSuspend), SelectiveHydrationException) ); } @@ -6741,15 +6727,7 @@ var PossiblyWeakMap = "function" === typeof WeakMap ? WeakMap : Map, pendingPassiveTransitions = null, nestedUpdateCount = 0, rootWithNestedUpdates = null, - currentEventTime = -1, currentEventTransitionLane = 0; -function requestEventTime() { - return 0 !== (executionContext & 6) - ? now$1() - : -1 !== currentEventTime - ? currentEventTime - : (currentEventTime = now$1()); -} function requestUpdateLane(fiber) { if (0 === (fiber.mode & 1)) return 2; if (0 !== (executionContext & 2) && 0 !== workInProgressRootRenderLanes) @@ -6763,14 +6741,14 @@ function requestUpdateLane(fiber) { fiber = currentUpdatePriority; return 0 !== fiber ? fiber : 32; } -function scheduleUpdateOnFiber(root, fiber, lane, eventTime) { +function scheduleUpdateOnFiber(root, fiber, lane) { if ( (root === workInProgressRoot && 2 === workInProgressSuspendedReason) || null !== root.cancelPendingCommit ) prepareFreshStack(root, 0), markRootSuspended(root, workInProgressRootRenderLanes); - markRootUpdated(root, lane, eventTime); + markRootUpdated(root, lane); if (0 === (executionContext & 2) || root !== workInProgressRoot) root === workInProgressRoot && (0 === (executionContext & 2) && @@ -6786,7 +6764,6 @@ function scheduleUpdateOnFiber(root, fiber, lane, eventTime) { } function performConcurrentWorkOnRoot(root, didTimeout) { nestedUpdateScheduled = currentUpdateIsNested = !1; - currentEventTime = -1; currentEventTransitionLane = 0; if (0 !== (executionContext & 6)) throw Error("Should not already be working."); @@ -7811,10 +7788,8 @@ function captureCommitPhaseErrorOnRoot(rootFiber, sourceFiber, error) { sourceFiber = createCapturedValueAtFiber(error, sourceFiber); sourceFiber = createRootErrorUpdate(rootFiber, sourceFiber, 2); rootFiber = enqueueUpdate(rootFiber, sourceFiber, 2); - sourceFiber = requestEventTime(); null !== rootFiber && - (markRootUpdated(rootFiber, 2, sourceFiber), - ensureRootIsScheduled(rootFiber)); + (markRootUpdated(rootFiber, 2), ensureRootIsScheduled(rootFiber)); } function captureCommitPhaseError(sourceFiber, nearestMountedAncestor, error) { if (3 === sourceFiber.tag) @@ -7848,9 +7823,8 @@ function captureCommitPhaseError(sourceFiber, nearestMountedAncestor, error) { sourceFiber, 2 ); - sourceFiber = requestEventTime(); null !== nearestMountedAncestor && - (markRootUpdated(nearestMountedAncestor, 2, sourceFiber), + (markRootUpdated(nearestMountedAncestor, 2), ensureRootIsScheduled(nearestMountedAncestor)); break; } @@ -7892,10 +7866,9 @@ function pingSuspendedRoot(root, wakeable, pingedLanes) { function retryTimedOutBoundary(boundaryFiber, retryLane) { 0 === retryLane && (retryLane = 0 === (boundaryFiber.mode & 1) ? 2 : claimNextRetryLane()); - var eventTime = requestEventTime(); boundaryFiber = enqueueConcurrentRenderForLane(boundaryFiber, retryLane); null !== boundaryFiber && - (markRootUpdated(boundaryFiber, retryLane, eventTime), + (markRootUpdated(boundaryFiber, retryLane), ensureRootIsScheduled(boundaryFiber)); } function retryDehydratedSuspenseBoundary(boundaryFiber) { @@ -8578,7 +8551,7 @@ function createFiberFromOffscreen(pendingProps, mode, lanes, key) { var root = enqueueConcurrentRenderForLane(fiber, 2); null !== root && ((primaryChildInstance._pendingVisibility |= 2), - scheduleUpdateOnFiber(root, fiber, 2, -1)); + scheduleUpdateOnFiber(root, fiber, 2)); } }, attach: function () { @@ -8591,7 +8564,7 @@ function createFiberFromOffscreen(pendingProps, mode, lanes, key) { var root = enqueueConcurrentRenderForLane(fiber, 2); null !== root && ((primaryChildInstance._pendingVisibility &= -3), - scheduleUpdateOnFiber(root, fiber, 2, -1)); + scheduleUpdateOnFiber(root, fiber, 2)); } } }; @@ -8640,7 +8613,6 @@ function FiberRootNode( this.cancelPendingCommit = null; this.callbackPriority = 0; - this.eventTimes = createLaneMap(0); this.expirationTimes = createLaneMap(-1); this.entangledLanes = this.errorRecoveryDisabledLanes = @@ -8753,8 +8725,7 @@ function updateContainer(element, container, parentComponent, callback) { null !== callback && (container.callback = callback); element = enqueueUpdate(current, container, lane); null !== element && - ((callback = requestEventTime()), - scheduleUpdateOnFiber(element, current, lane, callback), + (scheduleUpdateOnFiber(element, current, lane), entangleTransitions(element, current, lane)); return lane; } @@ -9065,7 +9036,7 @@ var devToolsConfig$jscomp$inline_1063 = { throw Error("TestRenderer does not support findFiberByHostInstance()"); }, bundleType: 0, - version: "18.3.0-next-0b931f90e-20230411", + version: "18.3.0-next-58742c21b-20230411", rendererPackageName: "react-test-renderer" }; var internals$jscomp$inline_1245 = { @@ -9096,7 +9067,7 @@ var internals$jscomp$inline_1245 = { scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "18.3.0-next-0b931f90e-20230411" + reconcilerVersion: "18.3.0-next-58742c21b-20230411" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { var hook$jscomp$inline_1246 = __REACT_DEVTOOLS_GLOBAL_HOOK__; diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/React-dev.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/React-dev.js index 75cfa6120d..522b8d9e8c 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/React-dev.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/React-dev.js @@ -27,7 +27,7 @@ if ( } "use strict"; -var ReactVersion = "18.3.0-next-0b931f90e-20230411"; +var ReactVersion = "18.3.0-next-58742c21b-20230411"; // ATTENTION // When adding new symbols to this file, diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/React-prod.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/React-prod.js index c2d7608f89..3bf87bb452 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/React-prod.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/React-prod.js @@ -639,4 +639,4 @@ exports.useSyncExternalStore = function ( ); }; exports.useTransition = useTransition; -exports.version = "18.3.0-next-0b931f90e-20230411"; +exports.version = "18.3.0-next-58742c21b-20230411"; diff --git a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/React-profiling.js b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/React-profiling.js index 1309468f31..d91b276b10 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/React-profiling.js +++ b/compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/React-profiling.js @@ -642,7 +642,7 @@ exports.useSyncExternalStore = function ( ); }; exports.useTransition = useTransition; -exports.version = "18.3.0-next-0b931f90e-20230411"; +exports.version = "18.3.0-next-58742c21b-20230411"; /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */ if ( diff --git a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/REVISION b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/REVISION index 3133e22f42..5aaf076169 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/REVISION +++ b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/REVISION @@ -1 +1 @@ -0b931f90e8964183f08ac328e7350d847abb08f9 +58742c21b8c3237e8b66c7df4e200504846a01ae diff --git a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-dev.fb.js b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-dev.fb.js index f877a3e5c0..d87be11825 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-dev.fb.js +++ b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-dev.fb.js @@ -4508,7 +4508,7 @@ function createLaneMap(initial) { return laneMap; } -function markRootUpdated(root, updateLane, eventTime) { +function markRootUpdated(root, updateLane) { root.pendingLanes |= updateLane; // If there are any suspended transitions, it's possible this new update // could unblock them. Clear the suspended lanes so that we can try rendering // them again. @@ -4526,12 +4526,6 @@ function markRootUpdated(root, updateLane, eventTime) { root.suspendedLanes = NoLanes; root.pingedLanes = NoLanes; } - - var eventTimes = root.eventTimes; - var index = laneToIndex(updateLane); // We can always overwrite an existing timestamp because we prefer the most - // recent event, and we assume time is monotonically increasing. - - eventTimes[index] = eventTime; } function markRootSuspended$1(root, suspendedLanes) { root.suspendedLanes |= suspendedLanes; @@ -4564,7 +4558,6 @@ function markRootFinished(root, remainingLanes) { root.entangledLanes &= remainingLanes; root.errorRecoveryDisabledLanes &= remainingLanes; var entanglements = root.entanglements; - var eventTimes = root.eventTimes; var expirationTimes = root.expirationTimes; var hiddenUpdates = root.hiddenUpdates; // Clear the lanes that no longer have pending work @@ -4574,7 +4567,6 @@ function markRootFinished(root, remainingLanes) { var index = pickArbitraryLaneIndex(lanes); var lane = 1 << index; entanglements[index] = NoLanes; - eventTimes[index] = NoTimestamp; expirationTimes[index] = NoTimestamp; var hiddenUpdatesForLane = hiddenUpdates[index]; @@ -11199,7 +11191,7 @@ function forceStoreRerender(fiber) { var root = enqueueConcurrentRenderForLane(fiber, SyncLane); if (root !== null) { - scheduleUpdateOnFiber(root, fiber, SyncLane, NoTimestamp); + scheduleUpdateOnFiber(root, fiber, SyncLane); } } @@ -11779,8 +11771,7 @@ function dispatchReducerAction(fiber, queue, action) { var root = enqueueConcurrentHookUpdate(fiber, queue, update, lane); if (root !== null) { - var eventTime = requestEventTime(); - scheduleUpdateOnFiber(root, fiber, lane, eventTime); + scheduleUpdateOnFiber(root, fiber, lane); entangleTransitionUpdate(root, queue, lane); } } @@ -11863,8 +11854,7 @@ function dispatchSetState(fiber, queue, action) { var root = enqueueConcurrentHookUpdate(fiber, queue, update, lane); if (root !== null) { - var eventTime = requestEventTime(); - scheduleUpdateOnFiber(root, fiber, lane, eventTime); + scheduleUpdateOnFiber(root, fiber, lane); entangleTransitionUpdate(root, queue, lane); } } @@ -13204,8 +13194,7 @@ var classComponentUpdater = { var root = enqueueUpdate(fiber, update, lane); if (root !== null) { - var eventTime = requestEventTime(); - scheduleUpdateOnFiber(root, fiber, lane, eventTime); + scheduleUpdateOnFiber(root, fiber, lane); entangleTransitions(root, fiber, lane); } @@ -13231,8 +13220,7 @@ var classComponentUpdater = { var root = enqueueUpdate(fiber, update, lane); if (root !== null) { - var eventTime = requestEventTime(); - scheduleUpdateOnFiber(root, fiber, lane, eventTime); + scheduleUpdateOnFiber(root, fiber, lane); entangleTransitions(root, fiber, lane); } @@ -13258,8 +13246,7 @@ var classComponentUpdater = { var root = enqueueUpdate(fiber, update, lane); if (root !== null) { - var eventTime = requestEventTime(); - scheduleUpdateOnFiber(root, fiber, lane, eventTime); + scheduleUpdateOnFiber(root, fiber, lane); entangleTransitions(root, fiber, lane); } @@ -16723,16 +16710,9 @@ function updateDehydratedSuspenseComponent( // Intentionally mutating since this render will get interrupted. This // is one of the very rare times where we mutate the current tree // during the render phase. - suspenseState.retryLane = attemptHydrationAtLane; // TODO: Ideally this would inherit the event time of the current render - - var eventTime = NoTimestamp; + suspenseState.retryLane = attemptHydrationAtLane; enqueueConcurrentRenderForLane(current, attemptHydrationAtLane); - scheduleUpdateOnFiber( - root, - current, - attemptHydrationAtLane, - eventTime - ); // Throw a special object that signals to the work loop that it should + scheduleUpdateOnFiber(root, current, attemptHydrationAtLane); // Throw a special object that signals to the work loop that it should // interrupt the current render. // // Because we're inside a React-only execution stack, we don't @@ -21035,7 +21015,7 @@ function detachOffscreenInstance(instance) { if (root !== null) { instance._pendingVisibility |= OffscreenDetached; - scheduleUpdateOnFiber(root, fiber, SyncLane, NoTimestamp); + scheduleUpdateOnFiber(root, fiber, SyncLane); } } function attachOffscreenInstance(instance) { @@ -21056,7 +21036,7 @@ function attachOffscreenInstance(instance) { if (root !== null) { instance._pendingVisibility &= ~OffscreenDetached; - scheduleUpdateOnFiber(root, fiber, SyncLane, NoTimestamp); + scheduleUpdateOnFiber(root, fiber, SyncLane); } } @@ -22962,11 +22942,7 @@ var isFlushingPassiveEffects = false; var didScheduleUpdateDuringPassiveEffects = false; var NESTED_PASSIVE_UPDATE_LIMIT = 50; var nestedPassiveUpdateCount = 0; -var rootWithPassiveNestedUpdates = null; // If two updates are scheduled within the same event, we should treat their -// event times as simultaneous, even if the actual clock time has advanced -// between the first and second call. - -var currentEventTime = NoTimestamp; +var rootWithPassiveNestedUpdates = null; var currentEventTransitionLane = NoLanes; var isRunningInsertionEffect = false; function getWorkInProgressRoot() { @@ -22978,20 +22954,6 @@ function getWorkInProgressRootRenderLanes() { function isWorkLoopSuspendedOnData() { return workInProgressSuspendedReason === SuspendedOnData; } -function requestEventTime() { - if ((executionContext & (RenderContext | CommitContext)) !== NoContext) { - // We're inside React, so it's fine to read the actual time. - return now$1(); - } // We're not inside React, so we may be in the middle of a browser event. - - if (currentEventTime !== NoTimestamp) { - // Use the same start time for all updates until we enter React again. - return currentEventTime; - } // This is the first update since React yielded. Compute a new start time. - - currentEventTime = now$1(); - return currentEventTime; -} function requestUpdateLane(fiber) { // Special cases var mode = fiber.mode; @@ -23075,7 +23037,7 @@ function requestRetryLane(fiber) { return claimNextRetryLane(); } -function scheduleUpdateOnFiber(root, fiber, lane, eventTime) { +function scheduleUpdateOnFiber(root, fiber, lane) { { if (isRunningInsertionEffect) { error("useInsertionEffect must not schedule updates."); @@ -23101,7 +23063,7 @@ function scheduleUpdateOnFiber(root, fiber, lane, eventTime) { markRootSuspended(root, workInProgressRootRenderLanes); } // Mark that the root has a pending update. - markRootUpdated(root, lane, eventTime); + markRootUpdated(root, lane); if ( (executionContext & RenderContext) !== NoLanes && @@ -23175,10 +23137,8 @@ function isUnsafeClassRenderPhaseUpdate(fiber) { function performConcurrentWorkOnRoot(root, didTimeout) { { resetNestedUpdateFlag(); - } // Since we know we're in a React event, we can clear the current - // event time. The next update will compute a new event time. + } - currentEventTime = NoTimestamp; currentEventTransitionLane = NoLanes; if ((executionContext & (RenderContext | CommitContext)) !== NoContext) { @@ -25253,10 +25213,9 @@ function captureCommitPhaseErrorOnRoot(rootFiber, sourceFiber, error) { var errorInfo = createCapturedValueAtFiber(error, sourceFiber); var update = createRootErrorUpdate(rootFiber, errorInfo, SyncLane); var root = enqueueUpdate(rootFiber, update, SyncLane); - var eventTime = requestEventTime(); if (root !== null) { - markRootUpdated(root, SyncLane, eventTime); + markRootUpdated(root, SyncLane); ensureRootIsScheduled(root); } } @@ -25292,10 +25251,9 @@ function captureCommitPhaseError(sourceFiber, nearestMountedAncestor, error$1) { var errorInfo = createCapturedValueAtFiber(error$1, sourceFiber); var update = createClassErrorUpdate(fiber, errorInfo, SyncLane); var root = enqueueUpdate(fiber, update, SyncLane); - var eventTime = requestEventTime(); if (root !== null) { - markRootUpdated(root, SyncLane, eventTime); + markRootUpdated(root, SyncLane); ensureRootIsScheduled(root); } @@ -25421,11 +25379,10 @@ function retryTimedOutBoundary(boundaryFiber, retryLane) { retryLane = requestRetryLane(boundaryFiber); } // TODO: Special case idle priority? - var eventTime = requestEventTime(); var root = enqueueConcurrentRenderForLane(boundaryFiber, retryLane); if (root !== null) { - markRootUpdated(root, retryLane, eventTime); + markRootUpdated(root, retryLane); ensureRootIsScheduled(root); } } @@ -26159,7 +26116,7 @@ function scheduleFibersWithFamiliesRecursively( var root = enqueueConcurrentRenderForLane(fiber, SyncLane); if (root !== null) { - scheduleUpdateOnFiber(root, fiber, SyncLane, NoTimestamp); + scheduleUpdateOnFiber(root, fiber, SyncLane); } } @@ -27013,7 +26970,6 @@ function FiberRootNode( this.next = null; this.callbackNode = null; this.callbackPriority = NoLane; - this.eventTimes = createLaneMap(NoLanes); this.expirationTimes = createLaneMap(NoTimestamp); this.pendingLanes = NoLanes; this.suspendedLanes = NoLanes; @@ -27103,7 +27059,7 @@ function createFiberRoot( return root; } -var ReactVersion = "18.3.0-next-0b931f90e-20230411"; +var ReactVersion = "18.3.0-next-58742c21b-20230411"; function createPortal$1( children, @@ -27309,8 +27265,7 @@ function updateContainer(element, container, parentComponent, callback) { var root = enqueueUpdate(current$1, update, lane); if (root !== null) { - var eventTime = requestEventTime(); - scheduleUpdateOnFiber(root, current$1, lane, eventTime); + scheduleUpdateOnFiber(root, current$1, lane); entangleTransitions(root, current$1, lane); } @@ -27474,7 +27429,7 @@ var setSuspenseHandler = null; var root = enqueueConcurrentRenderForLane(fiber, SyncLane); if (root !== null) { - scheduleUpdateOnFiber(root, fiber, SyncLane, NoTimestamp); + scheduleUpdateOnFiber(root, fiber, SyncLane); } } }; @@ -27495,7 +27450,7 @@ var setSuspenseHandler = null; var root = enqueueConcurrentRenderForLane(fiber, SyncLane); if (root !== null) { - scheduleUpdateOnFiber(root, fiber, SyncLane, NoTimestamp); + scheduleUpdateOnFiber(root, fiber, SyncLane); } } }; @@ -27516,7 +27471,7 @@ var setSuspenseHandler = null; var root = enqueueConcurrentRenderForLane(fiber, SyncLane); if (root !== null) { - scheduleUpdateOnFiber(root, fiber, SyncLane, NoTimestamp); + scheduleUpdateOnFiber(root, fiber, SyncLane); } } }; // Support DevTools props for function components, forwardRef, memo, host components, etc. @@ -27531,7 +27486,7 @@ var setSuspenseHandler = null; var root = enqueueConcurrentRenderForLane(fiber, SyncLane); if (root !== null) { - scheduleUpdateOnFiber(root, fiber, SyncLane, NoTimestamp); + scheduleUpdateOnFiber(root, fiber, SyncLane); } }; @@ -27545,7 +27500,7 @@ var setSuspenseHandler = null; var root = enqueueConcurrentRenderForLane(fiber, SyncLane); if (root !== null) { - scheduleUpdateOnFiber(root, fiber, SyncLane, NoTimestamp); + scheduleUpdateOnFiber(root, fiber, SyncLane); } }; @@ -27559,7 +27514,7 @@ var setSuspenseHandler = null; var root = enqueueConcurrentRenderForLane(fiber, SyncLane); if (root !== null) { - scheduleUpdateOnFiber(root, fiber, SyncLane, NoTimestamp); + scheduleUpdateOnFiber(root, fiber, SyncLane); } }; @@ -27567,7 +27522,7 @@ var setSuspenseHandler = null; var root = enqueueConcurrentRenderForLane(fiber, SyncLane); if (root !== null) { - scheduleUpdateOnFiber(root, fiber, SyncLane, NoTimestamp); + scheduleUpdateOnFiber(root, fiber, SyncLane); } }; diff --git a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-prod.fb.js b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-prod.fb.js index 4ea9362c47..4d53dce510 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-prod.fb.js +++ b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-prod.fb.js @@ -1508,13 +1508,10 @@ function createLaneMap(initial) { for (var laneMap = [], i = 0; 31 > i; i++) laneMap.push(initial); return laneMap; } -function markRootUpdated(root, updateLane, eventTime) { +function markRootUpdated(root, updateLane) { root.pendingLanes |= updateLane; 536870912 !== updateLane && ((root.suspendedLanes = 0), (root.pingedLanes = 0)); - root = root.eventTimes; - updateLane = 31 - clz32(updateLane); - root[updateLane] = eventTime; } function markRootFinished(root, remainingLanes) { var noLongerPendingLanes = root.pendingLanes & ~remainingLanes; @@ -1526,13 +1523,11 @@ function markRootFinished(root, remainingLanes) { root.entangledLanes &= remainingLanes; root.errorRecoveryDisabledLanes &= remainingLanes; remainingLanes = root.entanglements; - var eventTimes = root.eventTimes, - expirationTimes = root.expirationTimes; + var expirationTimes = root.expirationTimes; for (root = root.hiddenUpdates; 0 < noLongerPendingLanes; ) { var index$5 = 31 - clz32(noLongerPendingLanes), lane = 1 << index$5; remainingLanes[index$5] = 0; - eventTimes[index$5] = -1; expirationTimes[index$5] = -1; var hiddenUpdatesForLane = root[index$5]; if (null !== hiddenUpdatesForLane) @@ -3814,7 +3809,7 @@ function checkIfSnapshotChanged(inst) { } function forceStoreRerender(fiber) { var root = enqueueConcurrentRenderForLane(fiber, 2); - null !== root && scheduleUpdateOnFiber(root, fiber, 2, -1); + null !== root && scheduleUpdateOnFiber(root, fiber, 2); } function mountState(initialState) { var hook = mountWorkInProgressHook(); @@ -3970,16 +3965,13 @@ function dispatchReducerAction(fiber, queue, action) { eagerState: null, next: null }; - if (isRenderPhaseUpdate(fiber)) enqueueRenderPhaseUpdate(queue, action); - else if ( - (enqueueUpdate$1(fiber, queue, action, lane), - (action = getRootForUpdatedFiber(fiber)), - null !== action) - ) { - var eventTime = requestEventTime(); - scheduleUpdateOnFiber(action, fiber, lane, eventTime); - entangleTransitionUpdate(action, queue, lane); - } + isRenderPhaseUpdate(fiber) + ? enqueueRenderPhaseUpdate(queue, action) + : (enqueueUpdate$1(fiber, queue, action, lane), + (action = getRootForUpdatedFiber(fiber)), + null !== action && + (scheduleUpdateOnFiber(action, fiber, lane), + entangleTransitionUpdate(action, queue, lane))); } function dispatchSetState(fiber, queue, action) { var lane = requestUpdateLane(fiber), @@ -4014,8 +4006,7 @@ function dispatchSetState(fiber, queue, action) { enqueueUpdate$1(fiber, queue, update, lane); action = getRootForUpdatedFiber(fiber); null !== action && - ((update = requestEventTime()), - scheduleUpdateOnFiber(action, fiber, lane, update), + (scheduleUpdateOnFiber(action, fiber, lane), entangleTransitionUpdate(action, queue, lane)); } } @@ -4289,8 +4280,7 @@ var classComponentUpdater = { void 0 !== callback && null !== callback && (update.callback = callback); payload = enqueueUpdate(inst, update, lane); null !== payload && - ((callback = requestEventTime()), - scheduleUpdateOnFiber(payload, inst, lane, callback), + (scheduleUpdateOnFiber(payload, inst, lane), entangleTransitions(payload, inst, lane)); }, enqueueReplaceState: function (inst, payload, callback) { @@ -4302,8 +4292,7 @@ var classComponentUpdater = { void 0 !== callback && null !== callback && (update.callback = callback); payload = enqueueUpdate(inst, update, lane); null !== payload && - ((callback = requestEventTime()), - scheduleUpdateOnFiber(payload, inst, lane, callback), + (scheduleUpdateOnFiber(payload, inst, lane), entangleTransitions(payload, inst, lane)); }, enqueueForceUpdate: function (inst, callback) { @@ -4314,8 +4303,7 @@ var classComponentUpdater = { void 0 !== callback && null !== callback && (update.callback = callback); callback = enqueueUpdate(inst, update, lane); null !== callback && - ((update = requestEventTime()), - scheduleUpdateOnFiber(callback, inst, lane, update), + (scheduleUpdateOnFiber(callback, inst, lane), entangleTransitions(callback, inst, lane)); } }; @@ -5315,7 +5303,7 @@ function updateDehydratedSuspenseComponent( throw ( ((suspenseState.retryLane = didSuspend), enqueueConcurrentRenderForLane(current, didSuspend), - scheduleUpdateOnFiber(nextProps, current, didSuspend, -1), + scheduleUpdateOnFiber(nextProps, current, didSuspend), SelectiveHydrationException) ); } @@ -6692,7 +6680,7 @@ function detachOffscreenInstance(instance) { var root = enqueueConcurrentRenderForLane(fiber, 2); null !== root && ((instance._pendingVisibility |= 2), - scheduleUpdateOnFiber(root, fiber, 2, -1)); + scheduleUpdateOnFiber(root, fiber, 2)); } } function attachOffscreenInstance(instance) { @@ -6705,7 +6693,7 @@ function attachOffscreenInstance(instance) { var root = enqueueConcurrentRenderForLane(fiber, 2); null !== root && ((instance._pendingVisibility &= -3), - scheduleUpdateOnFiber(root, fiber, 2, -1)); + scheduleUpdateOnFiber(root, fiber, 2)); } } function attachSuspenseRetryListeners(finishedWork, wakeables) { @@ -7507,15 +7495,7 @@ var PossiblyWeakMap = "function" === typeof WeakMap ? WeakMap : Map, pendingPassiveEffectsLanes = 0, nestedUpdateCount = 0, rootWithNestedUpdates = null, - currentEventTime = -1, currentEventTransitionLane = 0; -function requestEventTime() { - return 0 !== (executionContext & 6) - ? now() - : -1 !== currentEventTime - ? currentEventTime - : (currentEventTime = now()); -} function requestUpdateLane(fiber) { if (0 === (fiber.mode & 1)) return 2; if (0 !== (executionContext & 2) && 0 !== workInProgressRootRenderLanes) @@ -7542,14 +7522,14 @@ function requestUpdateLane(fiber) { } return fiber; } -function scheduleUpdateOnFiber(root, fiber, lane, eventTime) { +function scheduleUpdateOnFiber(root, fiber, lane) { if ( (root === workInProgressRoot && 2 === workInProgressSuspendedReason) || null !== root.cancelPendingCommit ) prepareFreshStack(root, 0), markRootSuspended(root, workInProgressRootRenderLanes); - markRootUpdated(root, lane, eventTime); + markRootUpdated(root, lane); if (0 === (executionContext & 2) || root !== workInProgressRoot) root === workInProgressRoot && (0 === (executionContext & 2) && @@ -7564,7 +7544,6 @@ function scheduleUpdateOnFiber(root, fiber, lane, eventTime) { flushSyncWorkAcrossRoots_impl(!0)); } function performConcurrentWorkOnRoot(root, didTimeout) { - currentEventTime = -1; currentEventTransitionLane = 0; if (0 !== (executionContext & 6)) throw Error("Should not already be working."); @@ -8467,10 +8446,8 @@ function captureCommitPhaseErrorOnRoot(rootFiber, sourceFiber, error) { sourceFiber = createCapturedValueAtFiber(error, sourceFiber); sourceFiber = createRootErrorUpdate(rootFiber, sourceFiber, 2); rootFiber = enqueueUpdate(rootFiber, sourceFiber, 2); - sourceFiber = requestEventTime(); null !== rootFiber && - (markRootUpdated(rootFiber, 2, sourceFiber), - ensureRootIsScheduled(rootFiber)); + (markRootUpdated(rootFiber, 2), ensureRootIsScheduled(rootFiber)); } function captureCommitPhaseError(sourceFiber, nearestMountedAncestor, error) { if (3 === sourceFiber.tag) @@ -8504,9 +8481,8 @@ function captureCommitPhaseError(sourceFiber, nearestMountedAncestor, error) { sourceFiber, 2 ); - sourceFiber = requestEventTime(); null !== nearestMountedAncestor && - (markRootUpdated(nearestMountedAncestor, 2, sourceFiber), + (markRootUpdated(nearestMountedAncestor, 2), ensureRootIsScheduled(nearestMountedAncestor)); break; } @@ -8548,10 +8524,9 @@ function pingSuspendedRoot(root, wakeable, pingedLanes) { function retryTimedOutBoundary(boundaryFiber, retryLane) { 0 === retryLane && (retryLane = 0 === (boundaryFiber.mode & 1) ? 2 : claimNextRetryLane()); - var eventTime = requestEventTime(); boundaryFiber = enqueueConcurrentRenderForLane(boundaryFiber, retryLane); null !== boundaryFiber && - (markRootUpdated(boundaryFiber, retryLane, eventTime), + (markRootUpdated(boundaryFiber, retryLane), ensureRootIsScheduled(boundaryFiber)); } function retryDehydratedSuspenseBoundary(boundaryFiber) { @@ -9303,7 +9278,6 @@ function FiberRootNode( this.cancelPendingCommit = null; this.callbackPriority = 0; - this.eventTimes = createLaneMap(0); this.expirationTimes = createLaneMap(-1); this.entangledLanes = this.errorRecoveryDisabledLanes = @@ -9400,8 +9374,7 @@ function updateContainer(element, container, parentComponent, callback) { null !== callback && (container.callback = callback); element = enqueueUpdate(current, container, lane); null !== element && - ((callback = requestEventTime()), - scheduleUpdateOnFiber(element, current, lane, callback), + (scheduleUpdateOnFiber(element, current, lane), entangleTransitions(element, current, lane)); return lane; } @@ -9506,7 +9479,7 @@ var roots = new Map(), devToolsConfig$jscomp$inline_1045 = { findFiberByHostInstance: getInstanceFromNode, bundleType: 0, - version: "18.3.0-next-0b931f90e-20230411", + version: "18.3.0-next-58742c21b-20230411", rendererPackageName: "react-native-renderer", rendererConfig: { getInspectorDataForViewTag: function () { @@ -9548,7 +9521,7 @@ var internals$jscomp$inline_1274 = { scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "18.3.0-next-0b931f90e-20230411" + reconcilerVersion: "18.3.0-next-58742c21b-20230411" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { var hook$jscomp$inline_1275 = __REACT_DEVTOOLS_GLOBAL_HOOK__; diff --git a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-profiling.fb.js b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-profiling.fb.js index 64d4c3ca3f..87cc87c10a 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-profiling.fb.js +++ b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-profiling.fb.js @@ -1606,13 +1606,10 @@ function createLaneMap(initial) { for (var laneMap = [], i = 0; 31 > i; i++) laneMap.push(initial); return laneMap; } -function markRootUpdated(root, updateLane, eventTime) { +function markRootUpdated(root, updateLane) { root.pendingLanes |= updateLane; 536870912 !== updateLane && ((root.suspendedLanes = 0), (root.pingedLanes = 0)); - root = root.eventTimes; - updateLane = 31 - clz32(updateLane); - root[updateLane] = eventTime; } function markRootFinished(root, remainingLanes) { var noLongerPendingLanes = root.pendingLanes & ~remainingLanes; @@ -1624,13 +1621,11 @@ function markRootFinished(root, remainingLanes) { root.entangledLanes &= remainingLanes; root.errorRecoveryDisabledLanes &= remainingLanes; remainingLanes = root.entanglements; - var eventTimes = root.eventTimes, - expirationTimes = root.expirationTimes; + var expirationTimes = root.expirationTimes; for (root = root.hiddenUpdates; 0 < noLongerPendingLanes; ) { var index$6 = 31 - clz32(noLongerPendingLanes), lane = 1 << index$6; remainingLanes[index$6] = 0; - eventTimes[index$6] = -1; expirationTimes[index$6] = -1; var hiddenUpdatesForLane = root[index$6]; if (null !== hiddenUpdatesForLane) @@ -3942,7 +3937,7 @@ function checkIfSnapshotChanged(inst) { } function forceStoreRerender(fiber) { var root = enqueueConcurrentRenderForLane(fiber, 2); - null !== root && scheduleUpdateOnFiber(root, fiber, 2, -1); + null !== root && scheduleUpdateOnFiber(root, fiber, 2); } function mountState(initialState) { var hook = mountWorkInProgressHook(); @@ -4098,16 +4093,13 @@ function dispatchReducerAction(fiber, queue, action) { eagerState: null, next: null }; - if (isRenderPhaseUpdate(fiber)) enqueueRenderPhaseUpdate(queue, action); - else if ( - (enqueueUpdate$1(fiber, queue, action, lane), - (action = getRootForUpdatedFiber(fiber)), - null !== action) - ) { - var eventTime = requestEventTime(); - scheduleUpdateOnFiber(action, fiber, lane, eventTime); - entangleTransitionUpdate(action, queue, lane); - } + isRenderPhaseUpdate(fiber) + ? enqueueRenderPhaseUpdate(queue, action) + : (enqueueUpdate$1(fiber, queue, action, lane), + (action = getRootForUpdatedFiber(fiber)), + null !== action && + (scheduleUpdateOnFiber(action, fiber, lane), + entangleTransitionUpdate(action, queue, lane))); markStateUpdateScheduled(fiber, lane); } function dispatchSetState(fiber, queue, action) { @@ -4143,8 +4135,7 @@ function dispatchSetState(fiber, queue, action) { enqueueUpdate$1(fiber, queue, update, lane); action = getRootForUpdatedFiber(fiber); null !== action && - ((update = requestEventTime()), - scheduleUpdateOnFiber(action, fiber, lane, update), + (scheduleUpdateOnFiber(action, fiber, lane), entangleTransitionUpdate(action, queue, lane)); } markStateUpdateScheduled(fiber, lane); @@ -4481,8 +4472,7 @@ var classComponentUpdater = { void 0 !== callback && null !== callback && (update.callback = callback); payload = enqueueUpdate(inst, update, lane); null !== payload && - ((callback = requestEventTime()), - scheduleUpdateOnFiber(payload, inst, lane, callback), + (scheduleUpdateOnFiber(payload, inst, lane), entangleTransitions(payload, inst, lane)); markStateUpdateScheduled(inst, lane); }, @@ -4495,8 +4485,7 @@ var classComponentUpdater = { void 0 !== callback && null !== callback && (update.callback = callback); payload = enqueueUpdate(inst, update, lane); null !== payload && - ((callback = requestEventTime()), - scheduleUpdateOnFiber(payload, inst, lane, callback), + (scheduleUpdateOnFiber(payload, inst, lane), entangleTransitions(payload, inst, lane)); markStateUpdateScheduled(inst, lane); }, @@ -4508,8 +4497,7 @@ var classComponentUpdater = { void 0 !== callback && null !== callback && (update.callback = callback); callback = enqueueUpdate(inst, update, lane); null !== callback && - ((update = requestEventTime()), - scheduleUpdateOnFiber(callback, inst, lane, update), + (scheduleUpdateOnFiber(callback, inst, lane), entangleTransitions(callback, inst, lane)); null !== injectedProfilingHooks && "function" === typeof injectedProfilingHooks.markForceUpdateScheduled && @@ -5535,7 +5523,7 @@ function updateDehydratedSuspenseComponent( throw ( ((suspenseState.retryLane = didSuspend), enqueueConcurrentRenderForLane(current, didSuspend), - scheduleUpdateOnFiber(nextProps, current, didSuspend, -1), + scheduleUpdateOnFiber(nextProps, current, didSuspend), SelectiveHydrationException) ); } @@ -7145,7 +7133,7 @@ function detachOffscreenInstance(instance) { var root = enqueueConcurrentRenderForLane(fiber, 2); null !== root && ((instance._pendingVisibility |= 2), - scheduleUpdateOnFiber(root, fiber, 2, -1)); + scheduleUpdateOnFiber(root, fiber, 2)); } } function attachOffscreenInstance(instance) { @@ -7158,7 +7146,7 @@ function attachOffscreenInstance(instance) { var root = enqueueConcurrentRenderForLane(fiber, 2); null !== root && ((instance._pendingVisibility &= -3), - scheduleUpdateOnFiber(root, fiber, 2, -1)); + scheduleUpdateOnFiber(root, fiber, 2)); } } function attachSuspenseRetryListeners(finishedWork, wakeables) { @@ -8036,15 +8024,7 @@ var PossiblyWeakMap = "function" === typeof WeakMap ? WeakMap : Map, pendingPassiveProfilerEffects = [], nestedUpdateCount = 0, rootWithNestedUpdates = null, - currentEventTime = -1, currentEventTransitionLane = 0; -function requestEventTime() { - return 0 !== (executionContext & 6) - ? now$1() - : -1 !== currentEventTime - ? currentEventTime - : (currentEventTime = now$1()); -} function requestUpdateLane(fiber) { if (0 === (fiber.mode & 1)) return 2; if (0 !== (executionContext & 2) && 0 !== workInProgressRootRenderLanes) @@ -8071,14 +8051,14 @@ function requestUpdateLane(fiber) { } return fiber; } -function scheduleUpdateOnFiber(root, fiber, lane, eventTime) { +function scheduleUpdateOnFiber(root, fiber, lane) { if ( (root === workInProgressRoot && 2 === workInProgressSuspendedReason) || null !== root.cancelPendingCommit ) prepareFreshStack(root, 0), markRootSuspended(root, workInProgressRootRenderLanes); - markRootUpdated(root, lane, eventTime); + markRootUpdated(root, lane); if (0 === (executionContext & 2) || root !== workInProgressRoot) isDevToolsPresent && addFiberToLanesMap(root, fiber, lane), root === workInProgressRoot && @@ -8095,7 +8075,6 @@ function scheduleUpdateOnFiber(root, fiber, lane, eventTime) { } function performConcurrentWorkOnRoot(root, didTimeout) { nestedUpdateScheduled = currentUpdateIsNested = !1; - currentEventTime = -1; currentEventTransitionLane = 0; if (0 !== (executionContext & 6)) throw Error("Should not already be working."); @@ -9142,10 +9121,8 @@ function captureCommitPhaseErrorOnRoot(rootFiber, sourceFiber, error) { sourceFiber = createCapturedValueAtFiber(error, sourceFiber); sourceFiber = createRootErrorUpdate(rootFiber, sourceFiber, 2); rootFiber = enqueueUpdate(rootFiber, sourceFiber, 2); - sourceFiber = requestEventTime(); null !== rootFiber && - (markRootUpdated(rootFiber, 2, sourceFiber), - ensureRootIsScheduled(rootFiber)); + (markRootUpdated(rootFiber, 2), ensureRootIsScheduled(rootFiber)); } function captureCommitPhaseError(sourceFiber, nearestMountedAncestor, error) { if (3 === sourceFiber.tag) @@ -9179,9 +9156,8 @@ function captureCommitPhaseError(sourceFiber, nearestMountedAncestor, error) { sourceFiber, 2 ); - sourceFiber = requestEventTime(); null !== nearestMountedAncestor && - (markRootUpdated(nearestMountedAncestor, 2, sourceFiber), + (markRootUpdated(nearestMountedAncestor, 2), ensureRootIsScheduled(nearestMountedAncestor)); break; } @@ -9224,10 +9200,9 @@ function pingSuspendedRoot(root, wakeable, pingedLanes) { function retryTimedOutBoundary(boundaryFiber, retryLane) { 0 === retryLane && (retryLane = 0 === (boundaryFiber.mode & 1) ? 2 : claimNextRetryLane()); - var eventTime = requestEventTime(); boundaryFiber = enqueueConcurrentRenderForLane(boundaryFiber, retryLane); null !== boundaryFiber && - (markRootUpdated(boundaryFiber, retryLane, eventTime), + (markRootUpdated(boundaryFiber, retryLane), ensureRootIsScheduled(boundaryFiber)); } function retryDehydratedSuspenseBoundary(boundaryFiber) { @@ -10005,7 +9980,6 @@ function FiberRootNode( this.cancelPendingCommit = null; this.callbackPriority = 0; - this.eventTimes = createLaneMap(0); this.expirationTimes = createLaneMap(-1); this.entangledLanes = this.errorRecoveryDisabledLanes = @@ -10109,8 +10083,7 @@ function updateContainer(element, container, parentComponent, callback) { null !== callback && (container.callback = callback); element = enqueueUpdate(current, container, lane); null !== element && - ((callback = requestEventTime()), - scheduleUpdateOnFiber(element, current, lane, callback), + (scheduleUpdateOnFiber(element, current, lane), entangleTransitions(element, current, lane)); return lane; } @@ -10215,7 +10188,7 @@ var roots = new Map(), devToolsConfig$jscomp$inline_1123 = { findFiberByHostInstance: getInstanceFromNode, bundleType: 0, - version: "18.3.0-next-0b931f90e-20230411", + version: "18.3.0-next-58742c21b-20230411", rendererPackageName: "react-native-renderer", rendererConfig: { getInspectorDataForViewTag: function () { @@ -10270,7 +10243,7 @@ var roots = new Map(), scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "18.3.0-next-0b931f90e-20230411" + reconcilerVersion: "18.3.0-next-58742c21b-20230411" }); exports.createPortal = function (children, containerTag) { return createPortal$1( diff --git a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-dev.fb.js b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-dev.fb.js index bdbffc2bdb..05b2d766ed 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-dev.fb.js +++ b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-dev.fb.js @@ -5369,7 +5369,7 @@ function createLaneMap(initial) { return laneMap; } -function markRootUpdated(root, updateLane, eventTime) { +function markRootUpdated(root, updateLane) { root.pendingLanes |= updateLane; // If there are any suspended transitions, it's possible this new update // could unblock them. Clear the suspended lanes so that we can try rendering // them again. @@ -5387,12 +5387,6 @@ function markRootUpdated(root, updateLane, eventTime) { root.suspendedLanes = NoLanes; root.pingedLanes = NoLanes; } - - var eventTimes = root.eventTimes; - var index = laneToIndex(updateLane); // We can always overwrite an existing timestamp because we prefer the most - // recent event, and we assume time is monotonically increasing. - - eventTimes[index] = eventTime; } function markRootSuspended$1(root, suspendedLanes) { root.suspendedLanes |= suspendedLanes; @@ -5425,7 +5419,6 @@ function markRootFinished(root, remainingLanes) { root.entangledLanes &= remainingLanes; root.errorRecoveryDisabledLanes &= remainingLanes; var entanglements = root.entanglements; - var eventTimes = root.eventTimes; var expirationTimes = root.expirationTimes; var hiddenUpdates = root.hiddenUpdates; // Clear the lanes that no longer have pending work @@ -5435,7 +5428,6 @@ function markRootFinished(root, remainingLanes) { var index = pickArbitraryLaneIndex(lanes); var lane = 1 << index; entanglements[index] = NoLanes; - eventTimes[index] = NoTimestamp; expirationTimes[index] = NoTimestamp; var hiddenUpdatesForLane = hiddenUpdates[index]; @@ -11515,7 +11507,7 @@ function forceStoreRerender(fiber) { var root = enqueueConcurrentRenderForLane(fiber, SyncLane); if (root !== null) { - scheduleUpdateOnFiber(root, fiber, SyncLane, NoTimestamp); + scheduleUpdateOnFiber(root, fiber, SyncLane); } } @@ -12095,8 +12087,7 @@ function dispatchReducerAction(fiber, queue, action) { var root = enqueueConcurrentHookUpdate(fiber, queue, update, lane); if (root !== null) { - var eventTime = requestEventTime(); - scheduleUpdateOnFiber(root, fiber, lane, eventTime); + scheduleUpdateOnFiber(root, fiber, lane); entangleTransitionUpdate(root, queue, lane); } } @@ -12179,8 +12170,7 @@ function dispatchSetState(fiber, queue, action) { var root = enqueueConcurrentHookUpdate(fiber, queue, update, lane); if (root !== null) { - var eventTime = requestEventTime(); - scheduleUpdateOnFiber(root, fiber, lane, eventTime); + scheduleUpdateOnFiber(root, fiber, lane); entangleTransitionUpdate(root, queue, lane); } } @@ -13520,8 +13510,7 @@ var classComponentUpdater = { var root = enqueueUpdate(fiber, update, lane); if (root !== null) { - var eventTime = requestEventTime(); - scheduleUpdateOnFiber(root, fiber, lane, eventTime); + scheduleUpdateOnFiber(root, fiber, lane); entangleTransitions(root, fiber, lane); } @@ -13547,8 +13536,7 @@ var classComponentUpdater = { var root = enqueueUpdate(fiber, update, lane); if (root !== null) { - var eventTime = requestEventTime(); - scheduleUpdateOnFiber(root, fiber, lane, eventTime); + scheduleUpdateOnFiber(root, fiber, lane); entangleTransitions(root, fiber, lane); } @@ -13574,8 +13562,7 @@ var classComponentUpdater = { var root = enqueueUpdate(fiber, update, lane); if (root !== null) { - var eventTime = requestEventTime(); - scheduleUpdateOnFiber(root, fiber, lane, eventTime); + scheduleUpdateOnFiber(root, fiber, lane); entangleTransitions(root, fiber, lane); } @@ -17039,16 +17026,9 @@ function updateDehydratedSuspenseComponent( // Intentionally mutating since this render will get interrupted. This // is one of the very rare times where we mutate the current tree // during the render phase. - suspenseState.retryLane = attemptHydrationAtLane; // TODO: Ideally this would inherit the event time of the current render - - var eventTime = NoTimestamp; + suspenseState.retryLane = attemptHydrationAtLane; enqueueConcurrentRenderForLane(current, attemptHydrationAtLane); - scheduleUpdateOnFiber( - root, - current, - attemptHydrationAtLane, - eventTime - ); // Throw a special object that signals to the work loop that it should + scheduleUpdateOnFiber(root, current, attemptHydrationAtLane); // Throw a special object that signals to the work loop that it should // interrupt the current render. // // Because we're inside a React-only execution stack, we don't @@ -21489,7 +21469,7 @@ function detachOffscreenInstance(instance) { if (root !== null) { instance._pendingVisibility |= OffscreenDetached; - scheduleUpdateOnFiber(root, fiber, SyncLane, NoTimestamp); + scheduleUpdateOnFiber(root, fiber, SyncLane); } } function attachOffscreenInstance(instance) { @@ -21510,7 +21490,7 @@ function attachOffscreenInstance(instance) { if (root !== null) { instance._pendingVisibility &= ~OffscreenDetached; - scheduleUpdateOnFiber(root, fiber, SyncLane, NoTimestamp); + scheduleUpdateOnFiber(root, fiber, SyncLane); } } @@ -23475,11 +23455,7 @@ var isFlushingPassiveEffects = false; var didScheduleUpdateDuringPassiveEffects = false; var NESTED_PASSIVE_UPDATE_LIMIT = 50; var nestedPassiveUpdateCount = 0; -var rootWithPassiveNestedUpdates = null; // If two updates are scheduled within the same event, we should treat their -// event times as simultaneous, even if the actual clock time has advanced -// between the first and second call. - -var currentEventTime = NoTimestamp; +var rootWithPassiveNestedUpdates = null; var currentEventTransitionLane = NoLanes; var isRunningInsertionEffect = false; function getWorkInProgressRoot() { @@ -23491,20 +23467,6 @@ function getWorkInProgressRootRenderLanes() { function isWorkLoopSuspendedOnData() { return workInProgressSuspendedReason === SuspendedOnData; } -function requestEventTime() { - if ((executionContext & (RenderContext | CommitContext)) !== NoContext) { - // We're inside React, so it's fine to read the actual time. - return now$1(); - } // We're not inside React, so we may be in the middle of a browser event. - - if (currentEventTime !== NoTimestamp) { - // Use the same start time for all updates until we enter React again. - return currentEventTime; - } // This is the first update since React yielded. Compute a new start time. - - currentEventTime = now$1(); - return currentEventTime; -} function requestUpdateLane(fiber) { // Special cases var mode = fiber.mode; @@ -23588,7 +23550,7 @@ function requestRetryLane(fiber) { return claimNextRetryLane(); } -function scheduleUpdateOnFiber(root, fiber, lane, eventTime) { +function scheduleUpdateOnFiber(root, fiber, lane) { { if (isRunningInsertionEffect) { error("useInsertionEffect must not schedule updates."); @@ -23614,7 +23576,7 @@ function scheduleUpdateOnFiber(root, fiber, lane, eventTime) { markRootSuspended(root, workInProgressRootRenderLanes); } // Mark that the root has a pending update. - markRootUpdated(root, lane, eventTime); + markRootUpdated(root, lane); if ( (executionContext & RenderContext) !== NoLanes && @@ -23688,10 +23650,8 @@ function isUnsafeClassRenderPhaseUpdate(fiber) { function performConcurrentWorkOnRoot(root, didTimeout) { { resetNestedUpdateFlag(); - } // Since we know we're in a React event, we can clear the current - // event time. The next update will compute a new event time. + } - currentEventTime = NoTimestamp; currentEventTransitionLane = NoLanes; if ((executionContext & (RenderContext | CommitContext)) !== NoContext) { @@ -25766,10 +25726,9 @@ function captureCommitPhaseErrorOnRoot(rootFiber, sourceFiber, error) { var errorInfo = createCapturedValueAtFiber(error, sourceFiber); var update = createRootErrorUpdate(rootFiber, errorInfo, SyncLane); var root = enqueueUpdate(rootFiber, update, SyncLane); - var eventTime = requestEventTime(); if (root !== null) { - markRootUpdated(root, SyncLane, eventTime); + markRootUpdated(root, SyncLane); ensureRootIsScheduled(root); } } @@ -25805,10 +25764,9 @@ function captureCommitPhaseError(sourceFiber, nearestMountedAncestor, error$1) { var errorInfo = createCapturedValueAtFiber(error$1, sourceFiber); var update = createClassErrorUpdate(fiber, errorInfo, SyncLane); var root = enqueueUpdate(fiber, update, SyncLane); - var eventTime = requestEventTime(); if (root !== null) { - markRootUpdated(root, SyncLane, eventTime); + markRootUpdated(root, SyncLane); ensureRootIsScheduled(root); } @@ -25934,11 +25892,10 @@ function retryTimedOutBoundary(boundaryFiber, retryLane) { retryLane = requestRetryLane(boundaryFiber); } // TODO: Special case idle priority? - var eventTime = requestEventTime(); var root = enqueueConcurrentRenderForLane(boundaryFiber, retryLane); if (root !== null) { - markRootUpdated(root, retryLane, eventTime); + markRootUpdated(root, retryLane); ensureRootIsScheduled(root); } } @@ -26672,7 +26629,7 @@ function scheduleFibersWithFamiliesRecursively( var root = enqueueConcurrentRenderForLane(fiber, SyncLane); if (root !== null) { - scheduleUpdateOnFiber(root, fiber, SyncLane, NoTimestamp); + scheduleUpdateOnFiber(root, fiber, SyncLane); } } @@ -27526,7 +27483,6 @@ function FiberRootNode( this.next = null; this.callbackNode = null; this.callbackPriority = NoLane; - this.eventTimes = createLaneMap(NoLanes); this.expirationTimes = createLaneMap(NoTimestamp); this.pendingLanes = NoLanes; this.suspendedLanes = NoLanes; @@ -27616,7 +27572,7 @@ function createFiberRoot( return root; } -var ReactVersion = "18.3.0-next-0b931f90e-20230411"; +var ReactVersion = "18.3.0-next-58742c21b-20230411"; function createPortal$1( children, @@ -27822,8 +27778,7 @@ function updateContainer(element, container, parentComponent, callback) { var root = enqueueUpdate(current$1, update, lane); if (root !== null) { - var eventTime = requestEventTime(); - scheduleUpdateOnFiber(root, current$1, lane, eventTime); + scheduleUpdateOnFiber(root, current$1, lane); entangleTransitions(root, current$1, lane); } @@ -27987,7 +27942,7 @@ var setSuspenseHandler = null; var root = enqueueConcurrentRenderForLane(fiber, SyncLane); if (root !== null) { - scheduleUpdateOnFiber(root, fiber, SyncLane, NoTimestamp); + scheduleUpdateOnFiber(root, fiber, SyncLane); } } }; @@ -28008,7 +27963,7 @@ var setSuspenseHandler = null; var root = enqueueConcurrentRenderForLane(fiber, SyncLane); if (root !== null) { - scheduleUpdateOnFiber(root, fiber, SyncLane, NoTimestamp); + scheduleUpdateOnFiber(root, fiber, SyncLane); } } }; @@ -28029,7 +27984,7 @@ var setSuspenseHandler = null; var root = enqueueConcurrentRenderForLane(fiber, SyncLane); if (root !== null) { - scheduleUpdateOnFiber(root, fiber, SyncLane, NoTimestamp); + scheduleUpdateOnFiber(root, fiber, SyncLane); } } }; // Support DevTools props for function components, forwardRef, memo, host components, etc. @@ -28044,7 +27999,7 @@ var setSuspenseHandler = null; var root = enqueueConcurrentRenderForLane(fiber, SyncLane); if (root !== null) { - scheduleUpdateOnFiber(root, fiber, SyncLane, NoTimestamp); + scheduleUpdateOnFiber(root, fiber, SyncLane); } }; @@ -28058,7 +28013,7 @@ var setSuspenseHandler = null; var root = enqueueConcurrentRenderForLane(fiber, SyncLane); if (root !== null) { - scheduleUpdateOnFiber(root, fiber, SyncLane, NoTimestamp); + scheduleUpdateOnFiber(root, fiber, SyncLane); } }; @@ -28072,7 +28027,7 @@ var setSuspenseHandler = null; var root = enqueueConcurrentRenderForLane(fiber, SyncLane); if (root !== null) { - scheduleUpdateOnFiber(root, fiber, SyncLane, NoTimestamp); + scheduleUpdateOnFiber(root, fiber, SyncLane); } }; @@ -28080,7 +28035,7 @@ var setSuspenseHandler = null; var root = enqueueConcurrentRenderForLane(fiber, SyncLane); if (root !== null) { - scheduleUpdateOnFiber(root, fiber, SyncLane, NoTimestamp); + scheduleUpdateOnFiber(root, fiber, SyncLane); } }; diff --git a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-prod.fb.js b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-prod.fb.js index 0be1e4025e..f7662c6c97 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-prod.fb.js +++ b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-prod.fb.js @@ -1890,13 +1890,10 @@ function createLaneMap(initial) { for (var laneMap = [], i = 0; 31 > i; i++) laneMap.push(initial); return laneMap; } -function markRootUpdated(root, updateLane, eventTime) { +function markRootUpdated(root, updateLane) { root.pendingLanes |= updateLane; 536870912 !== updateLane && ((root.suspendedLanes = 0), (root.pingedLanes = 0)); - root = root.eventTimes; - updateLane = 31 - clz32(updateLane); - root[updateLane] = eventTime; } function markRootFinished(root, remainingLanes) { var noLongerPendingLanes = root.pendingLanes & ~remainingLanes; @@ -1908,13 +1905,11 @@ function markRootFinished(root, remainingLanes) { root.entangledLanes &= remainingLanes; root.errorRecoveryDisabledLanes &= remainingLanes; remainingLanes = root.entanglements; - var eventTimes = root.eventTimes, - expirationTimes = root.expirationTimes; + var expirationTimes = root.expirationTimes; for (root = root.hiddenUpdates; 0 < noLongerPendingLanes; ) { var index$7 = 31 - clz32(noLongerPendingLanes), lane = 1 << index$7; remainingLanes[index$7] = 0; - eventTimes[index$7] = -1; expirationTimes[index$7] = -1; var hiddenUpdatesForLane = root[index$7]; if (null !== hiddenUpdatesForLane) @@ -3904,7 +3899,7 @@ function checkIfSnapshotChanged(inst) { } function forceStoreRerender(fiber) { var root = enqueueConcurrentRenderForLane(fiber, 2); - null !== root && scheduleUpdateOnFiber(root, fiber, 2, -1); + null !== root && scheduleUpdateOnFiber(root, fiber, 2); } function mountState(initialState) { var hook = mountWorkInProgressHook(); @@ -4060,16 +4055,13 @@ function dispatchReducerAction(fiber, queue, action) { eagerState: null, next: null }; - if (isRenderPhaseUpdate(fiber)) enqueueRenderPhaseUpdate(queue, action); - else if ( - (enqueueUpdate$1(fiber, queue, action, lane), - (action = getRootForUpdatedFiber(fiber)), - null !== action) - ) { - var eventTime = requestEventTime(); - scheduleUpdateOnFiber(action, fiber, lane, eventTime); - entangleTransitionUpdate(action, queue, lane); - } + isRenderPhaseUpdate(fiber) + ? enqueueRenderPhaseUpdate(queue, action) + : (enqueueUpdate$1(fiber, queue, action, lane), + (action = getRootForUpdatedFiber(fiber)), + null !== action && + (scheduleUpdateOnFiber(action, fiber, lane), + entangleTransitionUpdate(action, queue, lane))); } function dispatchSetState(fiber, queue, action) { var lane = requestUpdateLane(fiber), @@ -4104,8 +4096,7 @@ function dispatchSetState(fiber, queue, action) { enqueueUpdate$1(fiber, queue, update, lane); action = getRootForUpdatedFiber(fiber); null !== action && - ((update = requestEventTime()), - scheduleUpdateOnFiber(action, fiber, lane, update), + (scheduleUpdateOnFiber(action, fiber, lane), entangleTransitionUpdate(action, queue, lane)); } } @@ -4379,8 +4370,7 @@ var classComponentUpdater = { void 0 !== callback && null !== callback && (update.callback = callback); payload = enqueueUpdate(inst, update, lane); null !== payload && - ((callback = requestEventTime()), - scheduleUpdateOnFiber(payload, inst, lane, callback), + (scheduleUpdateOnFiber(payload, inst, lane), entangleTransitions(payload, inst, lane)); }, enqueueReplaceState: function (inst, payload, callback) { @@ -4392,8 +4382,7 @@ var classComponentUpdater = { void 0 !== callback && null !== callback && (update.callback = callback); payload = enqueueUpdate(inst, update, lane); null !== payload && - ((callback = requestEventTime()), - scheduleUpdateOnFiber(payload, inst, lane, callback), + (scheduleUpdateOnFiber(payload, inst, lane), entangleTransitions(payload, inst, lane)); }, enqueueForceUpdate: function (inst, callback) { @@ -4404,8 +4393,7 @@ var classComponentUpdater = { void 0 !== callback && null !== callback && (update.callback = callback); callback = enqueueUpdate(inst, update, lane); null !== callback && - ((update = requestEventTime()), - scheduleUpdateOnFiber(callback, inst, lane, update), + (scheduleUpdateOnFiber(callback, inst, lane), entangleTransitions(callback, inst, lane)); } }; @@ -5395,7 +5383,7 @@ function updateDehydratedSuspenseComponent( throw ( ((suspenseState.retryLane = didSuspend), enqueueConcurrentRenderForLane(current, didSuspend), - scheduleUpdateOnFiber(nextProps, current, didSuspend, -1), + scheduleUpdateOnFiber(nextProps, current, didSuspend), SelectiveHydrationException) ); } @@ -6774,7 +6762,7 @@ function detachOffscreenInstance(instance) { var root = enqueueConcurrentRenderForLane(fiber, 2); null !== root && ((instance._pendingVisibility |= 2), - scheduleUpdateOnFiber(root, fiber, 2, -1)); + scheduleUpdateOnFiber(root, fiber, 2)); } } function attachOffscreenInstance(instance) { @@ -6787,7 +6775,7 @@ function attachOffscreenInstance(instance) { var root = enqueueConcurrentRenderForLane(fiber, 2); null !== root && ((instance._pendingVisibility &= -3), - scheduleUpdateOnFiber(root, fiber, 2, -1)); + scheduleUpdateOnFiber(root, fiber, 2)); } } function attachSuspenseRetryListeners(finishedWork, wakeables) { @@ -7772,15 +7760,7 @@ var PossiblyWeakMap = "function" === typeof WeakMap ? WeakMap : Map, pendingPassiveEffectsLanes = 0, nestedUpdateCount = 0, rootWithNestedUpdates = null, - currentEventTime = -1, currentEventTransitionLane = 0; -function requestEventTime() { - return 0 !== (executionContext & 6) - ? now() - : -1 !== currentEventTime - ? currentEventTime - : (currentEventTime = now()); -} function requestUpdateLane(fiber) { if (0 === (fiber.mode & 1)) return 2; if (0 !== (executionContext & 2) && 0 !== workInProgressRootRenderLanes) @@ -7794,14 +7774,14 @@ function requestUpdateLane(fiber) { fiber = currentUpdatePriority; return 0 !== fiber ? fiber : 32; } -function scheduleUpdateOnFiber(root, fiber, lane, eventTime) { +function scheduleUpdateOnFiber(root, fiber, lane) { if ( (root === workInProgressRoot && 2 === workInProgressSuspendedReason) || null !== root.cancelPendingCommit ) prepareFreshStack(root, 0), markRootSuspended(root, workInProgressRootRenderLanes); - markRootUpdated(root, lane, eventTime); + markRootUpdated(root, lane); if (0 === (executionContext & 2) || root !== workInProgressRoot) root === workInProgressRoot && (0 === (executionContext & 2) && @@ -7816,7 +7796,6 @@ function scheduleUpdateOnFiber(root, fiber, lane, eventTime) { flushSyncWorkAcrossRoots_impl(!0)); } function performConcurrentWorkOnRoot(root, didTimeout) { - currentEventTime = -1; currentEventTransitionLane = 0; if (0 !== (executionContext & 6)) throw Error("Should not already be working."); @@ -8719,10 +8698,8 @@ function captureCommitPhaseErrorOnRoot(rootFiber, sourceFiber, error) { sourceFiber = createCapturedValueAtFiber(error, sourceFiber); sourceFiber = createRootErrorUpdate(rootFiber, sourceFiber, 2); rootFiber = enqueueUpdate(rootFiber, sourceFiber, 2); - sourceFiber = requestEventTime(); null !== rootFiber && - (markRootUpdated(rootFiber, 2, sourceFiber), - ensureRootIsScheduled(rootFiber)); + (markRootUpdated(rootFiber, 2), ensureRootIsScheduled(rootFiber)); } function captureCommitPhaseError(sourceFiber, nearestMountedAncestor, error) { if (3 === sourceFiber.tag) @@ -8756,9 +8733,8 @@ function captureCommitPhaseError(sourceFiber, nearestMountedAncestor, error) { sourceFiber, 2 ); - sourceFiber = requestEventTime(); null !== nearestMountedAncestor && - (markRootUpdated(nearestMountedAncestor, 2, sourceFiber), + (markRootUpdated(nearestMountedAncestor, 2), ensureRootIsScheduled(nearestMountedAncestor)); break; } @@ -8800,10 +8776,9 @@ function pingSuspendedRoot(root, wakeable, pingedLanes) { function retryTimedOutBoundary(boundaryFiber, retryLane) { 0 === retryLane && (retryLane = 0 === (boundaryFiber.mode & 1) ? 2 : claimNextRetryLane()); - var eventTime = requestEventTime(); boundaryFiber = enqueueConcurrentRenderForLane(boundaryFiber, retryLane); null !== boundaryFiber && - (markRootUpdated(boundaryFiber, retryLane, eventTime), + (markRootUpdated(boundaryFiber, retryLane), ensureRootIsScheduled(boundaryFiber)); } function retryDehydratedSuspenseBoundary(boundaryFiber) { @@ -9555,7 +9530,6 @@ function FiberRootNode( this.cancelPendingCommit = null; this.callbackPriority = 0; - this.eventTimes = createLaneMap(0); this.expirationTimes = createLaneMap(-1); this.entangledLanes = this.errorRecoveryDisabledLanes = @@ -9652,8 +9626,7 @@ function updateContainer(element, container, parentComponent, callback) { null !== callback && (container.callback = callback); element = enqueueUpdate(current, container, lane); null !== element && - ((callback = requestEventTime()), - scheduleUpdateOnFiber(element, current, lane, callback), + (scheduleUpdateOnFiber(element, current, lane), entangleTransitions(element, current, lane)); return lane; } @@ -9765,7 +9738,7 @@ var roots = new Map(), devToolsConfig$jscomp$inline_1100 = { findFiberByHostInstance: getInstanceFromTag, bundleType: 0, - version: "18.3.0-next-0b931f90e-20230411", + version: "18.3.0-next-58742c21b-20230411", rendererPackageName: "react-native-renderer", rendererConfig: { getInspectorDataForViewTag: function () { @@ -9807,7 +9780,7 @@ var internals$jscomp$inline_1343 = { scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "18.3.0-next-0b931f90e-20230411" + reconcilerVersion: "18.3.0-next-58742c21b-20230411" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { var hook$jscomp$inline_1344 = __REACT_DEVTOOLS_GLOBAL_HOOK__; diff --git a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.fb.js b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.fb.js index 6781954ae5..95ca65b263 100644 --- a/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.fb.js +++ b/compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.fb.js @@ -1988,13 +1988,10 @@ function createLaneMap(initial) { for (var laneMap = [], i = 0; 31 > i; i++) laneMap.push(initial); return laneMap; } -function markRootUpdated(root, updateLane, eventTime) { +function markRootUpdated(root, updateLane) { root.pendingLanes |= updateLane; 536870912 !== updateLane && ((root.suspendedLanes = 0), (root.pingedLanes = 0)); - root = root.eventTimes; - updateLane = 31 - clz32(updateLane); - root[updateLane] = eventTime; } function markRootFinished(root, remainingLanes) { var noLongerPendingLanes = root.pendingLanes & ~remainingLanes; @@ -2006,13 +2003,11 @@ function markRootFinished(root, remainingLanes) { root.entangledLanes &= remainingLanes; root.errorRecoveryDisabledLanes &= remainingLanes; remainingLanes = root.entanglements; - var eventTimes = root.eventTimes, - expirationTimes = root.expirationTimes; + var expirationTimes = root.expirationTimes; for (root = root.hiddenUpdates; 0 < noLongerPendingLanes; ) { var index$8 = 31 - clz32(noLongerPendingLanes), lane = 1 << index$8; remainingLanes[index$8] = 0; - eventTimes[index$8] = -1; expirationTimes[index$8] = -1; var hiddenUpdatesForLane = root[index$8]; if (null !== hiddenUpdatesForLane) @@ -4032,7 +4027,7 @@ function checkIfSnapshotChanged(inst) { } function forceStoreRerender(fiber) { var root = enqueueConcurrentRenderForLane(fiber, 2); - null !== root && scheduleUpdateOnFiber(root, fiber, 2, -1); + null !== root && scheduleUpdateOnFiber(root, fiber, 2); } function mountState(initialState) { var hook = mountWorkInProgressHook(); @@ -4188,16 +4183,13 @@ function dispatchReducerAction(fiber, queue, action) { eagerState: null, next: null }; - if (isRenderPhaseUpdate(fiber)) enqueueRenderPhaseUpdate(queue, action); - else if ( - (enqueueUpdate$1(fiber, queue, action, lane), - (action = getRootForUpdatedFiber(fiber)), - null !== action) - ) { - var eventTime = requestEventTime(); - scheduleUpdateOnFiber(action, fiber, lane, eventTime); - entangleTransitionUpdate(action, queue, lane); - } + isRenderPhaseUpdate(fiber) + ? enqueueRenderPhaseUpdate(queue, action) + : (enqueueUpdate$1(fiber, queue, action, lane), + (action = getRootForUpdatedFiber(fiber)), + null !== action && + (scheduleUpdateOnFiber(action, fiber, lane), + entangleTransitionUpdate(action, queue, lane))); markStateUpdateScheduled(fiber, lane); } function dispatchSetState(fiber, queue, action) { @@ -4233,8 +4225,7 @@ function dispatchSetState(fiber, queue, action) { enqueueUpdate$1(fiber, queue, update, lane); action = getRootForUpdatedFiber(fiber); null !== action && - ((update = requestEventTime()), - scheduleUpdateOnFiber(action, fiber, lane, update), + (scheduleUpdateOnFiber(action, fiber, lane), entangleTransitionUpdate(action, queue, lane)); } markStateUpdateScheduled(fiber, lane); @@ -4571,8 +4562,7 @@ var classComponentUpdater = { void 0 !== callback && null !== callback && (update.callback = callback); payload = enqueueUpdate(inst, update, lane); null !== payload && - ((callback = requestEventTime()), - scheduleUpdateOnFiber(payload, inst, lane, callback), + (scheduleUpdateOnFiber(payload, inst, lane), entangleTransitions(payload, inst, lane)); markStateUpdateScheduled(inst, lane); }, @@ -4585,8 +4575,7 @@ var classComponentUpdater = { void 0 !== callback && null !== callback && (update.callback = callback); payload = enqueueUpdate(inst, update, lane); null !== payload && - ((callback = requestEventTime()), - scheduleUpdateOnFiber(payload, inst, lane, callback), + (scheduleUpdateOnFiber(payload, inst, lane), entangleTransitions(payload, inst, lane)); markStateUpdateScheduled(inst, lane); }, @@ -4598,8 +4587,7 @@ var classComponentUpdater = { void 0 !== callback && null !== callback && (update.callback = callback); callback = enqueueUpdate(inst, update, lane); null !== callback && - ((update = requestEventTime()), - scheduleUpdateOnFiber(callback, inst, lane, update), + (scheduleUpdateOnFiber(callback, inst, lane), entangleTransitions(callback, inst, lane)); null !== injectedProfilingHooks && "function" === typeof injectedProfilingHooks.markForceUpdateScheduled && @@ -5615,7 +5603,7 @@ function updateDehydratedSuspenseComponent( throw ( ((suspenseState.retryLane = didSuspend), enqueueConcurrentRenderForLane(current, didSuspend), - scheduleUpdateOnFiber(nextProps, current, didSuspend, -1), + scheduleUpdateOnFiber(nextProps, current, didSuspend), SelectiveHydrationException) ); } @@ -7226,7 +7214,7 @@ function detachOffscreenInstance(instance) { var root = enqueueConcurrentRenderForLane(fiber, 2); null !== root && ((instance._pendingVisibility |= 2), - scheduleUpdateOnFiber(root, fiber, 2, -1)); + scheduleUpdateOnFiber(root, fiber, 2)); } } function attachOffscreenInstance(instance) { @@ -7239,7 +7227,7 @@ function attachOffscreenInstance(instance) { var root = enqueueConcurrentRenderForLane(fiber, 2); null !== root && ((instance._pendingVisibility &= -3), - scheduleUpdateOnFiber(root, fiber, 2, -1)); + scheduleUpdateOnFiber(root, fiber, 2)); } } function attachSuspenseRetryListeners(finishedWork, wakeables) { @@ -8301,15 +8289,7 @@ var PossiblyWeakMap = "function" === typeof WeakMap ? WeakMap : Map, pendingPassiveProfilerEffects = [], nestedUpdateCount = 0, rootWithNestedUpdates = null, - currentEventTime = -1, currentEventTransitionLane = 0; -function requestEventTime() { - return 0 !== (executionContext & 6) - ? now$1() - : -1 !== currentEventTime - ? currentEventTime - : (currentEventTime = now$1()); -} function requestUpdateLane(fiber) { if (0 === (fiber.mode & 1)) return 2; if (0 !== (executionContext & 2) && 0 !== workInProgressRootRenderLanes) @@ -8323,14 +8303,14 @@ function requestUpdateLane(fiber) { fiber = currentUpdatePriority; return 0 !== fiber ? fiber : 32; } -function scheduleUpdateOnFiber(root, fiber, lane, eventTime) { +function scheduleUpdateOnFiber(root, fiber, lane) { if ( (root === workInProgressRoot && 2 === workInProgressSuspendedReason) || null !== root.cancelPendingCommit ) prepareFreshStack(root, 0), markRootSuspended(root, workInProgressRootRenderLanes); - markRootUpdated(root, lane, eventTime); + markRootUpdated(root, lane); if (0 === (executionContext & 2) || root !== workInProgressRoot) isDevToolsPresent && addFiberToLanesMap(root, fiber, lane), root === workInProgressRoot && @@ -8347,7 +8327,6 @@ function scheduleUpdateOnFiber(root, fiber, lane, eventTime) { } function performConcurrentWorkOnRoot(root, didTimeout) { nestedUpdateScheduled = currentUpdateIsNested = !1; - currentEventTime = -1; currentEventTransitionLane = 0; if (0 !== (executionContext & 6)) throw Error("Should not already be working."); @@ -9394,10 +9373,8 @@ function captureCommitPhaseErrorOnRoot(rootFiber, sourceFiber, error) { sourceFiber = createCapturedValueAtFiber(error, sourceFiber); sourceFiber = createRootErrorUpdate(rootFiber, sourceFiber, 2); rootFiber = enqueueUpdate(rootFiber, sourceFiber, 2); - sourceFiber = requestEventTime(); null !== rootFiber && - (markRootUpdated(rootFiber, 2, sourceFiber), - ensureRootIsScheduled(rootFiber)); + (markRootUpdated(rootFiber, 2), ensureRootIsScheduled(rootFiber)); } function captureCommitPhaseError(sourceFiber, nearestMountedAncestor, error) { if (3 === sourceFiber.tag) @@ -9431,9 +9408,8 @@ function captureCommitPhaseError(sourceFiber, nearestMountedAncestor, error) { sourceFiber, 2 ); - sourceFiber = requestEventTime(); null !== nearestMountedAncestor && - (markRootUpdated(nearestMountedAncestor, 2, sourceFiber), + (markRootUpdated(nearestMountedAncestor, 2), ensureRootIsScheduled(nearestMountedAncestor)); break; } @@ -9476,10 +9452,9 @@ function pingSuspendedRoot(root, wakeable, pingedLanes) { function retryTimedOutBoundary(boundaryFiber, retryLane) { 0 === retryLane && (retryLane = 0 === (boundaryFiber.mode & 1) ? 2 : claimNextRetryLane()); - var eventTime = requestEventTime(); boundaryFiber = enqueueConcurrentRenderForLane(boundaryFiber, retryLane); null !== boundaryFiber && - (markRootUpdated(boundaryFiber, retryLane, eventTime), + (markRootUpdated(boundaryFiber, retryLane), ensureRootIsScheduled(boundaryFiber)); } function retryDehydratedSuspenseBoundary(boundaryFiber) { @@ -10257,7 +10232,6 @@ function FiberRootNode( this.cancelPendingCommit = null; this.callbackPriority = 0; - this.eventTimes = createLaneMap(0); this.expirationTimes = createLaneMap(-1); this.entangledLanes = this.errorRecoveryDisabledLanes = @@ -10361,8 +10335,7 @@ function updateContainer(element, container, parentComponent, callback) { null !== callback && (container.callback = callback); element = enqueueUpdate(current, container, lane); null !== element && - ((callback = requestEventTime()), - scheduleUpdateOnFiber(element, current, lane, callback), + (scheduleUpdateOnFiber(element, current, lane), entangleTransitions(element, current, lane)); return lane; } @@ -10474,7 +10447,7 @@ var roots = new Map(), devToolsConfig$jscomp$inline_1178 = { findFiberByHostInstance: getInstanceFromTag, bundleType: 0, - version: "18.3.0-next-0b931f90e-20230411", + version: "18.3.0-next-58742c21b-20230411", rendererPackageName: "react-native-renderer", rendererConfig: { getInspectorDataForViewTag: function () { @@ -10529,7 +10502,7 @@ var roots = new Map(), scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "18.3.0-next-0b931f90e-20230411" + reconcilerVersion: "18.3.0-next-58742c21b-20230411" }); exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = { computeComponentStackForErrorReporting: function (reactTag) {