Skip to content

Commit d8ec1f6

Browse files
committed
Make enableBigIntSupport a dynamic flag for Meta (#28617)
Make enableBigIntSupport a dynamic flag for Meta Should be an easy launch, but let's make this a dynamic flag to be safe. DiffTrain build for commit 5a75f9e.
1 parent 859d9b8 commit d8ec1f6

File tree

10 files changed

+80
-52
lines changed

10 files changed

+80
-52
lines changed

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

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

1313
"use strict";
@@ -26,7 +26,7 @@ if (__DEV__) {
2626
}
2727
var dynamicFlagsUntyped = require("ReactNativeInternalFeatureFlags");
2828

29-
var ReactVersion = "18.3.0-canary-0cb590d3";
29+
var ReactVersion = "18.3.0-canary-03d7b9fb";
3030

3131
// ATTENTION
3232
// When adding new symbols to this file,
@@ -495,6 +495,7 @@ if (__DEV__) {
495495
// the exports object every time a flag is read.
496496

497497
var enableAsyncActions = dynamicFlags.enableAsyncActions,
498+
enableBigIntSupport = dynamicFlags.enableBigIntSupport,
498499
enableComponentStackLocations =
499500
dynamicFlags.enableComponentStackLocations,
500501
enableRenderableContext = dynamicFlags.enableRenderableContext;
@@ -2326,9 +2327,10 @@ if (__DEV__) {
23262327
invokeCallback = true;
23272328
} else {
23282329
switch (type) {
2329-
case "bigint": {
2330-
break;
2331-
}
2330+
case "bigint":
2331+
if (!enableBigIntSupport) {
2332+
break;
2333+
}
23322334

23332335
// fallthrough for enabled BigInt support
23342336

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

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

1313
"use strict";
@@ -84,6 +84,7 @@ assign(pureComponentPrototype, Component.prototype);
8484
pureComponentPrototype.isPureReactComponent = !0;
8585
var isArrayImpl = Array.isArray,
8686
enableAsyncActions = dynamicFlagsUntyped.enableAsyncActions,
87+
enableBigIntSupport = dynamicFlagsUntyped.enableBigIntSupport,
8788
enableRenderableContext = dynamicFlagsUntyped.enableRenderableContext,
8889
ReactCurrentDispatcher = { current: null },
8990
ReactCurrentCache = { current: null },
@@ -241,6 +242,8 @@ function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {
241242
if (null === children) invokeCallback = !0;
242243
else
243244
switch (type) {
245+
case "bigint":
246+
if (!enableBigIntSupport) break;
244247
case "string":
245248
case "number":
246249
invokeCallback = !0;
@@ -637,4 +640,4 @@ exports.useSyncExternalStore = function (
637640
exports.useTransition = function () {
638641
return ReactCurrentDispatcher.current.useTransition();
639642
};
640-
exports.version = "18.3.0-canary-7aaa8ba7";
643+
exports.version = "18.3.0-canary-eb8844c8";

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

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

1313
"use strict";
@@ -87,6 +87,7 @@ assign(pureComponentPrototype, Component.prototype);
8787
pureComponentPrototype.isPureReactComponent = !0;
8888
var isArrayImpl = Array.isArray,
8989
enableAsyncActions = dynamicFlagsUntyped.enableAsyncActions,
90+
enableBigIntSupport = dynamicFlagsUntyped.enableBigIntSupport,
9091
enableRenderableContext = dynamicFlagsUntyped.enableRenderableContext,
9192
ReactCurrentDispatcher = { current: null },
9293
ReactCurrentCache = { current: null },
@@ -208,6 +209,8 @@ function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {
208209
if (null === children) invokeCallback = !0;
209210
else
210211
switch (type) {
212+
case "bigint":
213+
if (!enableBigIntSupport) break;
211214
case "string":
212215
case "number":
213216
invokeCallback = !0;
@@ -633,7 +636,7 @@ exports.useSyncExternalStore = function (
633636
exports.useTransition = function () {
634637
return ReactCurrentDispatcher.current.useTransition();
635638
};
636-
exports.version = "18.3.0-canary-a838a519";
639+
exports.version = "18.3.0-canary-c7ee9f3a";
637640
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
638641
"function" ===
639642
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
5c65b27587c0507d66a84e055de948fc62d471d4
1+
5a75f9e78544fa6d052aff7fe99607e48f35b979

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

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

1313
"use strict";
@@ -2979,6 +2979,7 @@ to return true:wantsResponderID| |
29792979
consoleManagedByDevToolsDuringStrictMode =
29802980
dynamicFlags.consoleManagedByDevToolsDuringStrictMode,
29812981
enableAsyncActions = dynamicFlags.enableAsyncActions,
2982+
enableBigIntSupport = dynamicFlags.enableBigIntSupport,
29822983
enableComponentStackLocations =
29832984
dynamicFlags.enableComponentStackLocations,
29842985
enableDeferRootSchedulingToMicrotask =
@@ -2999,7 +3000,6 @@ to return true:wantsResponderID| |
29993000
var transitionLaneExpirationMs = 5000;
30003001
var enableLazyContextPropagation = false;
30013002
var enableLegacyHidden = false;
3002-
var enableBigIntSupport = false; // Flow magic to verify the exports of this file match the original version.
30033003

30043004
var NoFlags$1 =
30053005
/* */
@@ -9337,7 +9337,7 @@ to return true:wantsResponderID| |
93379337
if (
93389338
(typeof newChild === "string" && newChild !== "") ||
93399339
typeof newChild === "number" ||
9340-
enableBigIntSupport
9340+
(enableBigIntSupport && typeof newChild === "bigint")
93419341
) {
93429342
// Text nodes don't have keys. If the previous node is implicitly keyed
93439343
// we can continue to replace it without aborting even if it is not a text
@@ -9472,7 +9472,7 @@ to return true:wantsResponderID| |
94729472
if (
94739473
(typeof newChild === "string" && newChild !== "") ||
94749474
typeof newChild === "number" ||
9475-
enableBigIntSupport
9475+
(enableBigIntSupport && typeof newChild === "bigint")
94769476
) {
94779477
// Text nodes don't have keys. If the previous node is implicitly keyed
94789478
// we can continue to replace it without aborting even if it is not a text
@@ -9599,7 +9599,7 @@ to return true:wantsResponderID| |
95999599
if (
96009600
(typeof newChild === "string" && newChild !== "") ||
96019601
typeof newChild === "number" ||
9602-
enableBigIntSupport
9602+
(enableBigIntSupport && typeof newChild === "bigint")
96039603
) {
96049604
// Text nodes don't have keys, so we neither have to check the old nor
96059605
// new node for the key. If both are text nodes, they match.
@@ -10448,7 +10448,7 @@ to return true:wantsResponderID| |
1044810448
if (
1044910449
(typeof newChild === "string" && newChild !== "") ||
1045010450
typeof newChild === "number" ||
10451-
enableBigIntSupport
10451+
(enableBigIntSupport && typeof newChild === "bigint")
1045210452
) {
1045310453
return placeSingleChild(
1045410454
reconcileSingleTextNode(
@@ -29869,7 +29869,7 @@ to return true:wantsResponderID| |
2986929869
return root;
2987029870
}
2987129871

29872-
var ReactVersion = "18.3.0-canary-c2c47a0a";
29872+
var ReactVersion = "18.3.0-canary-cfa61256";
2987329873

2987429874
function createPortal$1(
2987529875
children,

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

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<326a6635966e3df8781c0829648b9ca6>>
10+
* @generated SignedSource<<9c870bda750533d8b9982dc8f016f24a>>
1111
*/
1212

1313
"use strict";
@@ -1270,6 +1270,7 @@ var alwaysThrottleDisappearingFallbacks =
12701270
consoleManagedByDevToolsDuringStrictMode =
12711271
dynamicFlagsUntyped.consoleManagedByDevToolsDuringStrictMode,
12721272
enableAsyncActions = dynamicFlagsUntyped.enableAsyncActions,
1273+
enableBigIntSupport = dynamicFlagsUntyped.enableBigIntSupport,
12731274
enableComponentStackLocations =
12741275
dynamicFlagsUntyped.enableComponentStackLocations,
12751276
enableDeferRootSchedulingToMicrotask =
@@ -3163,7 +3164,8 @@ function createChildReconciler(shouldTrackSideEffects) {
31633164
function createChild(returnFiber, newChild, lanes) {
31643165
if (
31653166
("string" === typeof newChild && "" !== newChild) ||
3166-
"number" === typeof newChild
3167+
"number" === typeof newChild ||
3168+
(enableBigIntSupport && "bigint" === typeof newChild)
31673169
)
31683170
return (
31693171
(newChild = createFiberFromText(
@@ -3231,7 +3233,8 @@ function createChildReconciler(shouldTrackSideEffects) {
32313233
var key = null !== oldFiber ? oldFiber.key : null;
32323234
if (
32333235
("string" === typeof newChild && "" !== newChild) ||
3234-
"number" === typeof newChild
3236+
"number" === typeof newChild ||
3237+
(enableBigIntSupport && "bigint" === typeof newChild)
32353238
)
32363239
return null !== key
32373240
? null
@@ -3283,7 +3286,8 @@ function createChildReconciler(shouldTrackSideEffects) {
32833286
) {
32843287
if (
32853288
("string" === typeof newChild && "" !== newChild) ||
3286-
"number" === typeof newChild
3289+
"number" === typeof newChild ||
3290+
(enableBigIntSupport && "bigint" === typeof newChild)
32873291
)
32883292
return (
32893293
(existingChildren = existingChildren.get(newIdx) || null),
@@ -3663,7 +3667,8 @@ function createChildReconciler(shouldTrackSideEffects) {
36633667
throwOnInvalidObjectType(returnFiber, newChild);
36643668
}
36653669
return ("string" === typeof newChild && "" !== newChild) ||
3666-
"number" === typeof newChild
3670+
"number" === typeof newChild ||
3671+
(enableBigIntSupport && "bigint" === typeof newChild)
36673672
? ((newChild = "" + newChild),
36683673
null !== currentFirstChild && 6 === currentFirstChild.tag
36693674
? (deleteRemainingChildren(returnFiber, currentFirstChild.sibling),
@@ -10634,7 +10639,7 @@ var roots = new Map(),
1063410639
devToolsConfig$jscomp$inline_1103 = {
1063510640
findFiberByHostInstance: getInstanceFromNode,
1063610641
bundleType: 0,
10637-
version: "18.3.0-canary-84fae7b6",
10642+
version: "18.3.0-canary-c9259216",
1063810643
rendererPackageName: "react-native-renderer",
1063910644
rendererConfig: {
1064010645
getInspectorDataForInstance: getInspectorDataForInstance,
@@ -10677,7 +10682,7 @@ var internals$jscomp$inline_1330 = {
1067710682
scheduleRoot: null,
1067810683
setRefreshHandler: null,
1067910684
getCurrentFiber: null,
10680-
reconcilerVersion: "18.3.0-canary-84fae7b6"
10685+
reconcilerVersion: "18.3.0-canary-c9259216"
1068110686
};
1068210687
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
1068310688
var hook$jscomp$inline_1331 = __REACT_DEVTOOLS_GLOBAL_HOOK__;

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

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

1313
"use strict";
@@ -1274,6 +1274,7 @@ var alwaysThrottleDisappearingFallbacks =
12741274
consoleManagedByDevToolsDuringStrictMode =
12751275
dynamicFlagsUntyped.consoleManagedByDevToolsDuringStrictMode,
12761276
enableAsyncActions = dynamicFlagsUntyped.enableAsyncActions,
1277+
enableBigIntSupport = dynamicFlagsUntyped.enableBigIntSupport,
12771278
enableComponentStackLocations =
12781279
dynamicFlagsUntyped.enableComponentStackLocations,
12791280
enableDeferRootSchedulingToMicrotask =
@@ -3287,7 +3288,8 @@ function createChildReconciler(shouldTrackSideEffects) {
32873288
function createChild(returnFiber, newChild, lanes) {
32883289
if (
32893290
("string" === typeof newChild && "" !== newChild) ||
3290-
"number" === typeof newChild
3291+
"number" === typeof newChild ||
3292+
(enableBigIntSupport && "bigint" === typeof newChild)
32913293
)
32923294
return (
32933295
(newChild = createFiberFromText(
@@ -3355,7 +3357,8 @@ function createChildReconciler(shouldTrackSideEffects) {
33553357
var key = null !== oldFiber ? oldFiber.key : null;
33563358
if (
33573359
("string" === typeof newChild && "" !== newChild) ||
3358-
"number" === typeof newChild
3360+
"number" === typeof newChild ||
3361+
(enableBigIntSupport && "bigint" === typeof newChild)
33593362
)
33603363
return null !== key
33613364
? null
@@ -3407,7 +3410,8 @@ function createChildReconciler(shouldTrackSideEffects) {
34073410
) {
34083411
if (
34093412
("string" === typeof newChild && "" !== newChild) ||
3410-
"number" === typeof newChild
3413+
"number" === typeof newChild ||
3414+
(enableBigIntSupport && "bigint" === typeof newChild)
34113415
)
34123416
return (
34133417
(existingChildren = existingChildren.get(newIdx) || null),
@@ -3787,7 +3791,8 @@ function createChildReconciler(shouldTrackSideEffects) {
37873791
throwOnInvalidObjectType(returnFiber, newChild);
37883792
}
37893793
return ("string" === typeof newChild && "" !== newChild) ||
3790-
"number" === typeof newChild
3794+
"number" === typeof newChild ||
3795+
(enableBigIntSupport && "bigint" === typeof newChild)
37913796
? ((newChild = "" + newChild),
37923797
null !== currentFirstChild && 6 === currentFirstChild.tag
37933798
? (deleteRemainingChildren(returnFiber, currentFirstChild.sibling),
@@ -11340,7 +11345,7 @@ var roots = new Map(),
1134011345
devToolsConfig$jscomp$inline_1184 = {
1134111346
findFiberByHostInstance: getInstanceFromNode,
1134211347
bundleType: 0,
11343-
version: "18.3.0-canary-5e58d686",
11348+
version: "18.3.0-canary-12ec6062",
1134411349
rendererPackageName: "react-native-renderer",
1134511350
rendererConfig: {
1134611351
getInspectorDataForInstance: getInspectorDataForInstance,
@@ -11396,7 +11401,7 @@ var roots = new Map(),
1139611401
scheduleRoot: null,
1139711402
setRefreshHandler: null,
1139811403
getCurrentFiber: null,
11399-
reconcilerVersion: "18.3.0-canary-5e58d686"
11404+
reconcilerVersion: "18.3.0-canary-12ec6062"
1140011405
});
1140111406
exports.createPortal = function (children, containerTag) {
1140211407
return createPortal$1(

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

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

1313
"use strict";
@@ -2690,6 +2690,7 @@ to return true:wantsResponderID| |
26902690
consoleManagedByDevToolsDuringStrictMode =
26912691
dynamicFlags.consoleManagedByDevToolsDuringStrictMode,
26922692
enableAsyncActions = dynamicFlags.enableAsyncActions,
2693+
enableBigIntSupport = dynamicFlags.enableBigIntSupport,
26932694
enableComponentStackLocations =
26942695
dynamicFlags.enableComponentStackLocations,
26952696
enableDeferRootSchedulingToMicrotask =
@@ -2708,7 +2709,6 @@ to return true:wantsResponderID| |
27082709
var transitionLaneExpirationMs = 5000;
27092710
var enableLazyContextPropagation = false;
27102711
var enableLegacyHidden = false;
2711-
var enableBigIntSupport = false; // Flow magic to verify the exports of this file match the original version.
27122712

27132713
// ATTENTION
27142714
// When adding new symbols to this file,
@@ -9608,7 +9608,7 @@ to return true:wantsResponderID| |
96089608
if (
96099609
(typeof newChild === "string" && newChild !== "") ||
96109610
typeof newChild === "number" ||
9611-
enableBigIntSupport
9611+
(enableBigIntSupport && typeof newChild === "bigint")
96129612
) {
96139613
// Text nodes don't have keys. If the previous node is implicitly keyed
96149614
// we can continue to replace it without aborting even if it is not a text
@@ -9743,7 +9743,7 @@ to return true:wantsResponderID| |
97439743
if (
97449744
(typeof newChild === "string" && newChild !== "") ||
97459745
typeof newChild === "number" ||
9746-
enableBigIntSupport
9746+
(enableBigIntSupport && typeof newChild === "bigint")
97479747
) {
97489748
// Text nodes don't have keys. If the previous node is implicitly keyed
97499749
// we can continue to replace it without aborting even if it is not a text
@@ -9870,7 +9870,7 @@ to return true:wantsResponderID| |
98709870
if (
98719871
(typeof newChild === "string" && newChild !== "") ||
98729872
typeof newChild === "number" ||
9873-
enableBigIntSupport
9873+
(enableBigIntSupport && typeof newChild === "bigint")
98749874
) {
98759875
// Text nodes don't have keys, so we neither have to check the old nor
98769876
// new node for the key. If both are text nodes, they match.
@@ -10719,7 +10719,7 @@ to return true:wantsResponderID| |
1071910719
if (
1072010720
(typeof newChild === "string" && newChild !== "") ||
1072110721
typeof newChild === "number" ||
10722-
enableBigIntSupport
10722+
(enableBigIntSupport && typeof newChild === "bigint")
1072310723
) {
1072410724
return placeSingleChild(
1072510725
reconcileSingleTextNode(
@@ -30309,7 +30309,7 @@ to return true:wantsResponderID| |
3030930309
return root;
3031030310
}
3031130311

30312-
var ReactVersion = "18.3.0-canary-ce5a79d0";
30312+
var ReactVersion = "18.3.0-canary-f4bcb4ec";
3031330313

3031430314
function createPortal$1(
3031530315
children,

0 commit comments

Comments
 (0)