Skip to content

Commit 03205d9

Browse files
committed
[Fiber] Set profiler values to doubles (#30942)
At some point this trick was added to initialize the value first to NaN and then replace them with zeros and negative ones. This is to address the issue noted in #14365 where these hidden classes can be initialized to SMIs at first and then deopt when we realize they're actually doubles. However, this fix has been long broken and has deopted the profiling build for years because closure compiler optimizes out the first write. I'm not sure because I haven't A/B-tested this in the JIT yet but I think we can use negative zero and -1.1 as the initial values instead since they're not simple integers. Negative zero `===` zero (but not Object.is) so is the same as far as our code is concerned. The negative value is just `< 0` comparisons. DiffTrain build for commit 94e4aca.
1 parent f9e2396 commit 03205d9

14 files changed

+126
-126
lines changed

compiled-rn/VERSION_NATIVE_FB

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
19.0.0-native-fb-d6cb4e77-20240911
1+
19.0.0-native-fb-94e4acaa-20240913

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-dev.js

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<e451863b4c89eb019d943e9dc124fab6>>
10+
* @generated SignedSource<<7a44af74badbc39b3911200f0c8f1ea4>>
1111
*/
1212

1313
"use strict";
@@ -6735,8 +6735,8 @@ __DEV__ &&
67356735
(nextProps.childLanes = 0),
67366736
(nextProps.pendingProps = primaryChildProps),
67376737
workInProgress.mode & 2 &&
6738-
((nextProps.actualDuration = 0),
6739-
(nextProps.actualStartTime = -1),
6738+
((nextProps.actualDuration = -0),
6739+
(nextProps.actualStartTime = -1.1),
67406740
(nextProps.selfBaseDuration = didSuspend.selfBaseDuration),
67416741
(nextProps.treeBaseDuration = didSuspend.treeBaseDuration)),
67426742
(workInProgress.deletions = null))
@@ -6830,10 +6830,10 @@ __DEV__ &&
68306830
? ((progressedPrimaryFragment.childLanes = 0),
68316831
(progressedPrimaryFragment.pendingProps = primaryChildren),
68326832
workInProgress.mode & 2 &&
6833-
((progressedPrimaryFragment.actualDuration = 0),
6834-
(progressedPrimaryFragment.actualStartTime = -1),
6835-
(progressedPrimaryFragment.selfBaseDuration = 0),
6836-
(progressedPrimaryFragment.treeBaseDuration = 0)))
6833+
((progressedPrimaryFragment.actualDuration = -0),
6834+
(progressedPrimaryFragment.actualStartTime = -1.1),
6835+
(progressedPrimaryFragment.selfBaseDuration = -0),
6836+
(progressedPrimaryFragment.treeBaseDuration = -0)))
68376837
: (progressedPrimaryFragment = createFiberFromOffscreen(
68386838
primaryChildren,
68396839
mode,
@@ -12359,9 +12359,9 @@ __DEV__ &&
1235912359
this.deletions = null;
1236012360
this.childLanes = this.lanes = 0;
1236112361
this.alternate = null;
12362-
this.actualDuration = 0;
12363-
this.actualStartTime = -1;
12364-
this.treeBaseDuration = this.selfBaseDuration = 0;
12362+
this.actualDuration = -0;
12363+
this.actualStartTime = -1.1;
12364+
this.treeBaseDuration = this.selfBaseDuration = -0;
1236512365
this._debugOwner = this._debugInfo = null;
1236612366
this._debugNeedsRemount = !1;
1236712367
this._debugHookTypes = null;
@@ -12394,8 +12394,8 @@ __DEV__ &&
1239412394
(workInProgress.flags = 0),
1239512395
(workInProgress.subtreeFlags = 0),
1239612396
(workInProgress.deletions = null),
12397-
(workInProgress.actualDuration = 0),
12398-
(workInProgress.actualStartTime = -1));
12397+
(workInProgress.actualDuration = -0),
12398+
(workInProgress.actualStartTime = -1.1));
1239912399
workInProgress.flags = current.flags & 31457280;
1240012400
workInProgress.childLanes = current.childLanes;
1240112401
workInProgress.lanes = current.lanes;
@@ -15122,11 +15122,11 @@ __DEV__ &&
1512215122
(function () {
1512315123
var internals = {
1512415124
bundleType: 1,
15125-
version: "19.0.0-native-fb-d6cb4e77-20240911",
15125+
version: "19.0.0-native-fb-94e4acaa-20240913",
1512615126
rendererPackageName: "react-test-renderer",
1512715127
currentDispatcherRef: ReactSharedInternals,
1512815128
findFiberByHostInstance: getInstanceFromNode,
15129-
reconcilerVersion: "19.0.0-native-fb-d6cb4e77-20240911"
15129+
reconcilerVersion: "19.0.0-native-fb-94e4acaa-20240913"
1513015130
};
1513115131
internals.overrideHookState = overrideHookState;
1513215132
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -15271,5 +15271,5 @@ __DEV__ &&
1527115271
flushSyncWorkAcrossRoots_impl(0, !0));
1527215272
}
1527315273
};
15274-
exports.version = "19.0.0-native-fb-d6cb4e77-20240911";
15274+
exports.version = "19.0.0-native-fb-94e4acaa-20240913";
1527515275
})();

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-prod.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<f40189845b438d8110c357b6c25d5b01>>
10+
* @generated SignedSource<<79c30664ec056acbff09d56e15b605d0>>
1111
*/
1212

1313
"use strict";
@@ -9488,14 +9488,14 @@ function wrapFiber(fiber) {
94889488
}
94899489
var internals$jscomp$inline_1266 = {
94909490
bundleType: 0,
9491-
version: "19.0.0-native-fb-d6cb4e77-20240911",
9491+
version: "19.0.0-native-fb-94e4acaa-20240913",
94929492
rendererPackageName: "react-test-renderer",
94939493
currentDispatcherRef: ReactSharedInternals,
94949494
findFiberByHostInstance: function (mockNode) {
94959495
mockNode = nodeToInstanceMap.get(mockNode);
94969496
return void 0 !== mockNode ? mockNode.internalInstanceHandle : null;
94979497
},
9498-
reconcilerVersion: "19.0.0-native-fb-d6cb4e77-20240911"
9498+
reconcilerVersion: "19.0.0-native-fb-94e4acaa-20240913"
94999499
};
95009500
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
95019501
var hook$jscomp$inline_1267 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -9631,4 +9631,4 @@ exports.unstable_batchedUpdates = function (fn, a) {
96319631
flushSyncWorkAcrossRoots_impl(0, !0));
96329632
}
96339633
};
9634-
exports.version = "19.0.0-native-fb-d6cb4e77-20240911";
9634+
exports.version = "19.0.0-native-fb-94e4acaa-20240913";

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-test-renderer/cjs/ReactTestRenderer-profiling.js

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<4153f4020f989abe56d39fd033419f88>>
10+
* @generated SignedSource<<1b967cee52d371092874f9ae20a82460>>
1111
*/
1212

1313
"use strict";
@@ -4908,8 +4908,8 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) {
49084908
(nextProps.childLanes = 0),
49094909
(nextProps.pendingProps = primaryChildProps),
49104910
workInProgress.mode & 2 &&
4911-
((nextProps.actualDuration = 0),
4912-
(nextProps.actualStartTime = -1),
4911+
((nextProps.actualDuration = -0),
4912+
(nextProps.actualStartTime = -1.1),
49134913
(nextProps.selfBaseDuration = didSuspend.selfBaseDuration),
49144914
(nextProps.treeBaseDuration = didSuspend.treeBaseDuration)),
49154915
(workInProgress.deletions = null))
@@ -5002,10 +5002,10 @@ function mountSuspenseFallbackChildren(
50025002
? ((progressedPrimaryFragment.childLanes = 0),
50035003
(progressedPrimaryFragment.pendingProps = primaryChildren),
50045004
workInProgress.mode & 2 &&
5005-
((progressedPrimaryFragment.actualDuration = 0),
5006-
(progressedPrimaryFragment.actualStartTime = -1),
5007-
(progressedPrimaryFragment.selfBaseDuration = 0),
5008-
(progressedPrimaryFragment.treeBaseDuration = 0)))
5005+
((progressedPrimaryFragment.actualDuration = -0),
5006+
(progressedPrimaryFragment.actualStartTime = -1.1),
5007+
(progressedPrimaryFragment.selfBaseDuration = -0),
5008+
(progressedPrimaryFragment.treeBaseDuration = -0)))
50095009
: (progressedPrimaryFragment = createFiberFromOffscreen(
50105010
primaryChildren,
50115011
mode,
@@ -9400,9 +9400,9 @@ function FiberNode(tag, pendingProps, key, mode) {
94009400
this.deletions = null;
94019401
this.childLanes = this.lanes = 0;
94029402
this.alternate = null;
9403-
this.actualDuration = 0;
9404-
this.actualStartTime = -1;
9405-
this.treeBaseDuration = this.selfBaseDuration = 0;
9403+
this.actualDuration = -0;
9404+
this.actualStartTime = -1.1;
9405+
this.treeBaseDuration = this.selfBaseDuration = -0;
94069406
}
94079407
function createFiberImplClass(tag, pendingProps, key, mode) {
94089408
return new FiberNode(tag, pendingProps, key, mode);
@@ -9430,8 +9430,8 @@ function createWorkInProgress(current, pendingProps) {
94309430
(workInProgress.flags = 0),
94319431
(workInProgress.subtreeFlags = 0),
94329432
(workInProgress.deletions = null),
9433-
(workInProgress.actualDuration = 0),
9434-
(workInProgress.actualStartTime = -1));
9433+
(workInProgress.actualDuration = -0),
9434+
(workInProgress.actualStartTime = -1.1));
94359435
workInProgress.flags = current.flags & 31457280;
94369436
workInProgress.childLanes = current.childLanes;
94379437
workInProgress.lanes = current.lanes;
@@ -10076,14 +10076,14 @@ function wrapFiber(fiber) {
1007610076
}
1007710077
var internals$jscomp$inline_1141 = {
1007810078
bundleType: 0,
10079-
version: "19.0.0-native-fb-d6cb4e77-20240911",
10079+
version: "19.0.0-native-fb-94e4acaa-20240913",
1008010080
rendererPackageName: "react-test-renderer",
1008110081
currentDispatcherRef: ReactSharedInternals,
1008210082
findFiberByHostInstance: function (mockNode) {
1008310083
mockNode = nodeToInstanceMap.get(mockNode);
1008410084
return void 0 !== mockNode ? mockNode.internalInstanceHandle : null;
1008510085
},
10086-
reconcilerVersion: "19.0.0-native-fb-d6cb4e77-20240911",
10086+
reconcilerVersion: "19.0.0-native-fb-94e4acaa-20240913",
1008710087
getLaneLabelMap: function () {
1008810088
for (
1008910089
var map = new Map(), lane = 1, index$138 = 0;
@@ -10234,4 +10234,4 @@ exports.unstable_batchedUpdates = function (fn, a) {
1023410234
flushSyncWorkAcrossRoots_impl(0, !0));
1023510235
}
1023610236
};
10237-
exports.version = "19.0.0-native-fb-d6cb4e77-20240911";
10237+
exports.version = "19.0.0-native-fb-94e4acaa-20240913";

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-dev.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<3572332ee88914125f03e6a38c654311>>
10+
* @generated SignedSource<<311f6e22a22d12061756c8044a0696a3>>
1111
*/
1212

1313
"use strict";
@@ -1705,7 +1705,7 @@ __DEV__ &&
17051705
exports.useTransition = function () {
17061706
return resolveDispatcher().useTransition();
17071707
};
1708-
exports.version = "19.0.0-native-fb-d6cb4e77-20240911";
1708+
exports.version = "19.0.0-native-fb-94e4acaa-20240913";
17091709
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
17101710
"function" ===
17111711
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-prod.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<63fc6c060e52371c9110bd053c67cfc7>>
10+
* @generated SignedSource<<22d627e46625db555a755a27eabe5462>>
1111
*/
1212

1313
"use strict";
@@ -580,4 +580,4 @@ exports.useSyncExternalStore = function (
580580
exports.useTransition = function () {
581581
return ReactSharedInternals.H.useTransition();
582582
};
583-
exports.version = "19.0.0-native-fb-d6cb4e77-20240911";
583+
exports.version = "19.0.0-native-fb-94e4acaa-20240913";

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react/cjs/React-profiling.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<aeb3eef922e3e81e87789c16c91e1e4d>>
10+
* @generated SignedSource<<587bcb4d44e630fb36fd55546d100d27>>
1111
*/
1212

1313
"use strict";
@@ -584,7 +584,7 @@ exports.useSyncExternalStore = function (
584584
exports.useTransition = function () {
585585
return ReactSharedInternals.H.useTransition();
586586
};
587-
exports.version = "19.0.0-native-fb-d6cb4e77-20240911";
587+
exports.version = "19.0.0-native-fb-94e4acaa-20240913";
588588
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
589589
"function" ===
590590
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
d6cb4e771341ff82489c00f4907990cb8a75696b
1+
94e4acaa1477e65cac02ba86058cde0afe4c8f1f

compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-dev.fb.js

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<e8a281e0fd560a8c3232577221baad11>>
10+
* @generated SignedSource<<6915bfcd70d5ce8d293a14bbc3286788>>
1111
*/
1212

1313
"use strict";
@@ -7698,8 +7698,8 @@ __DEV__ &&
76987698
(nextProps.childLanes = 0),
76997699
(nextProps.pendingProps = primaryChildProps),
77007700
workInProgress.mode & 2 &&
7701-
((nextProps.actualDuration = 0),
7702-
(nextProps.actualStartTime = -1),
7701+
((nextProps.actualDuration = -0),
7702+
(nextProps.actualStartTime = -1.1),
77037703
(nextProps.selfBaseDuration = didSuspend.selfBaseDuration),
77047704
(nextProps.treeBaseDuration = didSuspend.treeBaseDuration)),
77057705
(workInProgress.deletions = null))
@@ -7793,10 +7793,10 @@ __DEV__ &&
77937793
? ((progressedPrimaryFragment.childLanes = 0),
77947794
(progressedPrimaryFragment.pendingProps = primaryChildren),
77957795
workInProgress.mode & 2 &&
7796-
((progressedPrimaryFragment.actualDuration = 0),
7797-
(progressedPrimaryFragment.actualStartTime = -1),
7798-
(progressedPrimaryFragment.selfBaseDuration = 0),
7799-
(progressedPrimaryFragment.treeBaseDuration = 0)))
7796+
((progressedPrimaryFragment.actualDuration = -0),
7797+
(progressedPrimaryFragment.actualStartTime = -1.1),
7798+
(progressedPrimaryFragment.selfBaseDuration = -0),
7799+
(progressedPrimaryFragment.treeBaseDuration = -0)))
78007800
: (progressedPrimaryFragment = createFiberFromOffscreen(
78017801
primaryChildren,
78027802
mode,
@@ -13536,9 +13536,9 @@ __DEV__ &&
1353613536
this.deletions = null;
1353713537
this.childLanes = this.lanes = 0;
1353813538
this.alternate = null;
13539-
this.actualDuration = 0;
13540-
this.actualStartTime = -1;
13541-
this.treeBaseDuration = this.selfBaseDuration = 0;
13539+
this.actualDuration = -0;
13540+
this.actualStartTime = -1.1;
13541+
this.treeBaseDuration = this.selfBaseDuration = -0;
1354213542
this._debugOwner = this._debugInfo = null;
1354313543
this._debugNeedsRemount = !1;
1354413544
this._debugHookTypes = null;
@@ -13574,10 +13574,10 @@ __DEV__ &&
1357413574
key: key,
1357513575
pendingProps: pendingProps,
1357613576
mode: mode,
13577-
actualDuration: 0,
13578-
actualStartTime: -1,
13579-
selfBaseDuration: 0,
13580-
treeBaseDuration: 0,
13577+
actualDuration: -0,
13578+
actualStartTime: -1.1,
13579+
selfBaseDuration: -0,
13580+
treeBaseDuration: -0,
1358113581
_debugInfo: null,
1358213582
_debugOwner: null,
1358313583
_debugNeedsRemount: !1,
@@ -13613,8 +13613,8 @@ __DEV__ &&
1361313613
(workInProgress.flags = 0),
1361413614
(workInProgress.subtreeFlags = 0),
1361513615
(workInProgress.deletions = null),
13616-
(workInProgress.actualDuration = 0),
13617-
(workInProgress.actualStartTime = -1));
13616+
(workInProgress.actualDuration = -0),
13617+
(workInProgress.actualStartTime = -1.1));
1361813618
workInProgress.flags = current.flags & 31457280;
1361913619
workInProgress.childLanes = current.childLanes;
1362013620
workInProgress.lanes = current.lanes;
@@ -17127,11 +17127,11 @@ __DEV__ &&
1712717127
(function () {
1712817128
var internals = {
1712917129
bundleType: 1,
17130-
version: "19.0.0-native-fb-d6cb4e77-20240911",
17130+
version: "19.0.0-native-fb-94e4acaa-20240913",
1713117131
rendererPackageName: "react-native-renderer",
1713217132
currentDispatcherRef: ReactSharedInternals,
1713317133
findFiberByHostInstance: getInstanceFromNode,
17134-
reconcilerVersion: "19.0.0-native-fb-d6cb4e77-20240911"
17134+
reconcilerVersion: "19.0.0-native-fb-94e4acaa-20240913"
1713517135
};
1713617136
null !== extraDevToolsConfig &&
1713717137
(internals.rendererConfig = extraDevToolsConfig);

compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/implementations/ReactFabric-prod.fb.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<e4d37d23766c0d4bad1032f7498dd59e>>
10+
* @generated SignedSource<<4df305484f484525a38e23f4b70a2a3a>>
1111
*/
1212

1313
"use strict";
@@ -11045,11 +11045,11 @@ batchedUpdatesImpl = function (fn, a) {
1104511045
var roots = new Map(),
1104611046
internals$jscomp$inline_1157 = {
1104711047
bundleType: 0,
11048-
version: "19.0.0-native-fb-d6cb4e77-20240911",
11048+
version: "19.0.0-native-fb-94e4acaa-20240913",
1104911049
rendererPackageName: "react-native-renderer",
1105011050
currentDispatcherRef: ReactSharedInternals,
1105111051
findFiberByHostInstance: getInstanceFromNode,
11052-
reconcilerVersion: "19.0.0-native-fb-d6cb4e77-20240911"
11052+
reconcilerVersion: "19.0.0-native-fb-94e4acaa-20240913"
1105311053
};
1105411054
null !== extraDevToolsConfig &&
1105511055
(internals$jscomp$inline_1157.rendererConfig = extraDevToolsConfig);

0 commit comments

Comments
 (0)