Skip to content

Commit 3131770

Browse files
committed
[Fizz] Fork Fizz instruction set for inline script and external runtime (#25862)
~~[Fizz] Duplicate completeBoundaryWithStyles to not reference globals~~ ## Summary Follow-up / cleanup PR to #25437 - `completeBoundaryWithStylesInlineLocals` is used by the Fizz external runtime, which bundles together all Fizz instruction functions (and is able to reference / rename `completeBoundary` and `resourceMap` as locals). - `completeBoundaryWithStylesInlineGlobals` is used by the Fizz inline script writer, which sends Fizz instruction functions on an as-needed basis. This version needs to reference `completeBoundary($RC)` and `resourceMap($RM)` as globals. Ideally, Closure would take care of inlining a shared implementation, but I couldn't figure out a zero-overhead inline due to lack of an `@inline` compiler directive. It seems that Closure thinks that a shared `completeBoundaryWithStyles` is too large and will always keep it as a separate function. I've also tried currying / writing a higher order function (`getCompleteBoundaryWithStyles`) with no luck ## How did you test this change? - generated Fizz inline instructions should be unchanged - bundle size for unstable_external_runtime should be slightly smaller (due to lack of globals) - `ReactDOMFizzServer-test.js` and `ReactDOMFloat-test.js` should be unaffected DiffTrain build for [0b97441](0b97441) [View git log for this commit](https://github.com/facebook/react/commits/0b974418c9a56f6c560298560265dcf4b65784bc)
1 parent 9f85d07 commit 3131770

29 files changed

+47
-47
lines changed

compiled/facebook-www/REVISION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
5379b6123f171bb48cc8a9c435c11ccb9f8ff0e7
1+
0b974418c9a56f6c560298560265dcf4b65784bc
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
5379b6123f171bb48cc8a9c435c11ccb9f8ff0e7
1+
0b974418c9a56f6c560298560265dcf4b65784bc

compiled/facebook-www/React-dev.classic.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ if (
2727
}
2828
"use strict";
2929

30-
var ReactVersion = "18.3.0-www-classic-5379b6123-20230105";
30+
var ReactVersion = "18.3.0-www-classic-0b974418c-20230106";
3131

3232
// ATTENTION
3333
// When adding new symbols to this file,

compiled/facebook-www/React-dev.modern.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ if (
2727
}
2828
"use strict";
2929

30-
var ReactVersion = "18.3.0-www-modern-5379b6123-20230105";
30+
var ReactVersion = "18.3.0-www-modern-0b974418c-20230106";
3131

3232
// ATTENTION
3333
// When adding new symbols to this file,

compiled/facebook-www/React-prod.classic.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -643,4 +643,4 @@ exports.useSyncExternalStore = function(
643643
);
644644
};
645645
exports.useTransition = useTransition;
646-
exports.version = "18.3.0-www-classic-5379b6123-20230105";
646+
exports.version = "18.3.0-www-classic-0b974418c-20230106";

compiled/facebook-www/React-prod.modern.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -635,4 +635,4 @@ exports.useSyncExternalStore = function(
635635
);
636636
};
637637
exports.useTransition = useTransition;
638-
exports.version = "18.3.0-www-modern-5379b6123-20230105";
638+
exports.version = "18.3.0-www-modern-0b974418c-20230106";

compiled/facebook-www/React-profiling.classic.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -654,7 +654,7 @@ exports.useSyncExternalStore = function(
654654
);
655655
};
656656
exports.useTransition = useTransition;
657-
exports.version = "18.3.0-www-classic-5379b6123-20230105";
657+
exports.version = "18.3.0-www-classic-0b974418c-20230106";
658658

659659
/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
660660
if (

compiled/facebook-www/React-profiling.modern.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -646,7 +646,7 @@ exports.useSyncExternalStore = function(
646646
);
647647
};
648648
exports.useTransition = useTransition;
649-
exports.version = "18.3.0-www-modern-5379b6123-20230105";
649+
exports.version = "18.3.0-www-modern-0b974418c-20230106";
650650

651651
/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
652652
if (

compiled/facebook-www/ReactART-dev.classic.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ function _assertThisInitialized(self) {
6969
return self;
7070
}
7171

72-
var ReactVersion = "18.3.0-www-classic-5379b6123-20230105";
72+
var ReactVersion = "18.3.0-www-classic-0b974418c-20230106";
7373

7474
var LegacyRoot = 0;
7575
var ConcurrentRoot = 1;

compiled/facebook-www/ReactART-dev.modern.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ function _assertThisInitialized(self) {
6969
return self;
7070
}
7171

72-
var ReactVersion = "18.3.0-www-modern-5379b6123-20230105";
72+
var ReactVersion = "18.3.0-www-modern-0b974418c-20230106";
7373

7474
var LegacyRoot = 0;
7575
var ConcurrentRoot = 1;

compiled/facebook-www/ReactART-prod.classic.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9804,7 +9804,7 @@ var slice = Array.prototype.slice,
98049804
return null;
98059805
},
98069806
bundleType: 0,
9807-
version: "18.3.0-www-classic-5379b6123-20230105",
9807+
version: "18.3.0-www-classic-0b974418c-20230106",
98089808
rendererPackageName: "react-art"
98099809
};
98109810
var internals$jscomp$inline_1319 = {
@@ -9835,7 +9835,7 @@ var internals$jscomp$inline_1319 = {
98359835
scheduleRoot: null,
98369836
setRefreshHandler: null,
98379837
getCurrentFiber: null,
9838-
reconcilerVersion: "18.3.0-next-5379b6123-20230105"
9838+
reconcilerVersion: "18.3.0-next-0b974418c-20230106"
98399839
};
98409840
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
98419841
var hook$jscomp$inline_1320 = __REACT_DEVTOOLS_GLOBAL_HOOK__;

compiled/facebook-www/ReactART-prod.modern.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9471,7 +9471,7 @@ var slice = Array.prototype.slice,
94719471
return null;
94729472
},
94739473
bundleType: 0,
9474-
version: "18.3.0-www-modern-5379b6123-20230105",
9474+
version: "18.3.0-www-modern-0b974418c-20230106",
94759475
rendererPackageName: "react-art"
94769476
};
94779477
var internals$jscomp$inline_1310 = {
@@ -9502,7 +9502,7 @@ var internals$jscomp$inline_1310 = {
95029502
scheduleRoot: null,
95039503
setRefreshHandler: null,
95049504
getCurrentFiber: null,
9505-
reconcilerVersion: "18.3.0-next-5379b6123-20230105"
9505+
reconcilerVersion: "18.3.0-next-0b974418c-20230106"
95069506
};
95079507
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
95089508
var hook$jscomp$inline_1311 = __REACT_DEVTOOLS_GLOBAL_HOOK__;

compiled/facebook-www/ReactDOM-dev.classic.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42689,7 +42689,7 @@ function createFiberRoot(
4268942689
return root;
4269042690
}
4269142691

42692-
var ReactVersion = "18.3.0-www-classic-5379b6123-20230105";
42692+
var ReactVersion = "18.3.0-www-classic-0b974418c-20230106";
4269342693

4269442694
function createPortal(
4269542695
children,

compiled/facebook-www/ReactDOM-dev.modern.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42413,7 +42413,7 @@ function createFiberRoot(
4241342413
return root;
4241442414
}
4241542415

42416-
var ReactVersion = "18.3.0-www-modern-5379b6123-20230105";
42416+
var ReactVersion = "18.3.0-www-modern-0b974418c-20230106";
4241742417

4241842418
function createPortal(
4241942419
children,

compiled/facebook-www/ReactDOM-prod.classic.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15554,7 +15554,7 @@ Internals.Events = [
1555415554
var devToolsConfig$jscomp$inline_1751 = {
1555515555
findFiberByHostInstance: getClosestInstanceFromNode,
1555615556
bundleType: 0,
15557-
version: "18.3.0-www-classic-5379b6123-20230105",
15557+
version: "18.3.0-www-classic-0b974418c-20230106",
1555815558
rendererPackageName: "react-dom"
1555915559
};
1556015560
var internals$jscomp$inline_2135 = {
@@ -15584,7 +15584,7 @@ var internals$jscomp$inline_2135 = {
1558415584
scheduleRoot: null,
1558515585
setRefreshHandler: null,
1558615586
getCurrentFiber: null,
15587-
reconcilerVersion: "18.3.0-next-5379b6123-20230105"
15587+
reconcilerVersion: "18.3.0-next-0b974418c-20230106"
1558815588
};
1558915589
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
1559015590
var hook$jscomp$inline_2136 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -15826,4 +15826,4 @@ exports.unstable_renderSubtreeIntoContainer = function(
1582615826
);
1582715827
};
1582815828
exports.unstable_runWithPriority = runWithPriority;
15829-
exports.version = "18.3.0-next-5379b6123-20230105";
15829+
exports.version = "18.3.0-next-0b974418c-20230106";

compiled/facebook-www/ReactDOM-prod.modern.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15115,7 +15115,7 @@ Internals.Events = [
1511515115
var devToolsConfig$jscomp$inline_1719 = {
1511615116
findFiberByHostInstance: getClosestInstanceFromNode,
1511715117
bundleType: 0,
15118-
version: "18.3.0-www-modern-5379b6123-20230105",
15118+
version: "18.3.0-www-modern-0b974418c-20230106",
1511915119
rendererPackageName: "react-dom"
1512015120
};
1512115121
var internals$jscomp$inline_2110 = {
@@ -15146,7 +15146,7 @@ var internals$jscomp$inline_2110 = {
1514615146
scheduleRoot: null,
1514715147
setRefreshHandler: null,
1514815148
getCurrentFiber: null,
15149-
reconcilerVersion: "18.3.0-next-5379b6123-20230105"
15149+
reconcilerVersion: "18.3.0-next-0b974418c-20230106"
1515015150
};
1515115151
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
1515215152
var hook$jscomp$inline_2111 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -15334,4 +15334,4 @@ exports.unstable_flushControlled = function(fn) {
1533415334
}
1533515335
};
1533615336
exports.unstable_runWithPriority = runWithPriority;
15337-
exports.version = "18.3.0-next-5379b6123-20230105";
15337+
exports.version = "18.3.0-next-0b974418c-20230106";

compiled/facebook-www/ReactDOM-profiling.classic.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16324,7 +16324,7 @@ Internals.Events = [
1632416324
var devToolsConfig$jscomp$inline_1825 = {
1632516325
findFiberByHostInstance: getClosestInstanceFromNode,
1632616326
bundleType: 0,
16327-
version: "18.3.0-www-classic-5379b6123-20230105",
16327+
version: "18.3.0-www-classic-0b974418c-20230106",
1632816328
rendererPackageName: "react-dom"
1632916329
};
1633016330
(function(internals) {
@@ -16368,7 +16368,7 @@ var devToolsConfig$jscomp$inline_1825 = {
1636816368
scheduleRoot: null,
1636916369
setRefreshHandler: null,
1637016370
getCurrentFiber: null,
16371-
reconcilerVersion: "18.3.0-next-5379b6123-20230105"
16371+
reconcilerVersion: "18.3.0-next-0b974418c-20230106"
1637216372
});
1637316373
assign(Internals, {
1637416374
ReactBrowserEventEmitter: {
@@ -16597,7 +16597,7 @@ exports.unstable_renderSubtreeIntoContainer = function(
1659716597
);
1659816598
};
1659916599
exports.unstable_runWithPriority = runWithPriority;
16600-
exports.version = "18.3.0-next-5379b6123-20230105";
16600+
exports.version = "18.3.0-next-0b974418c-20230106";
1660116601

1660216602
/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
1660316603
if (

compiled/facebook-www/ReactDOM-profiling.modern.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15875,7 +15875,7 @@ Internals.Events = [
1587515875
var devToolsConfig$jscomp$inline_1793 = {
1587615876
findFiberByHostInstance: getClosestInstanceFromNode,
1587715877
bundleType: 0,
15878-
version: "18.3.0-www-modern-5379b6123-20230105",
15878+
version: "18.3.0-www-modern-0b974418c-20230106",
1587915879
rendererPackageName: "react-dom"
1588015880
};
1588115881
(function(internals) {
@@ -15920,7 +15920,7 @@ var devToolsConfig$jscomp$inline_1793 = {
1592015920
scheduleRoot: null,
1592115921
setRefreshHandler: null,
1592215922
getCurrentFiber: null,
15923-
reconcilerVersion: "18.3.0-next-5379b6123-20230105"
15923+
reconcilerVersion: "18.3.0-next-0b974418c-20230106"
1592415924
});
1592515925
exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = Internals;
1592615926
exports.createPortal = function(children, container) {
@@ -16095,7 +16095,7 @@ exports.unstable_flushControlled = function(fn) {
1609516095
}
1609616096
};
1609716097
exports.unstable_runWithPriority = runWithPriority;
16098-
exports.version = "18.3.0-next-5379b6123-20230105";
16098+
exports.version = "18.3.0-next-0b974418c-20230106";
1609916099

1610016100
/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
1610116101
if (

compiled/facebook-www/ReactDOMServer-dev.classic.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ if (__DEV__) {
1919
var React = require("react");
2020
var ReactDOM = require("react-dom");
2121

22-
var ReactVersion = "18.3.0-www-classic-5379b6123-20230105";
22+
var ReactVersion = "18.3.0-www-classic-0b974418c-20230106";
2323

2424
// This refers to a WWW module.
2525
var warningWWW = require("warning");

compiled/facebook-www/ReactDOMServer-dev.modern.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ if (__DEV__) {
1919
var React = require("react");
2020
var ReactDOM = require("react-dom");
2121

22-
var ReactVersion = "18.3.0-www-modern-5379b6123-20230105";
22+
var ReactVersion = "18.3.0-www-modern-0b974418c-20230106";
2323

2424
// This refers to a WWW module.
2525
var warningWWW = require("warning");

compiled/facebook-www/ReactDOMServer-prod.classic.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3633,4 +3633,4 @@ exports.renderToString = function(children, options) {
36333633
'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server'
36343634
);
36353635
};
3636-
exports.version = "18.3.0-www-classic-5379b6123-20230105";
3636+
exports.version = "18.3.0-www-classic-0b974418c-20230106";

compiled/facebook-www/ReactDOMServer-prod.modern.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3546,4 +3546,4 @@ exports.renderToString = function(children, options) {
35463546
'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server'
35473547
);
35483548
};
3549-
exports.version = "18.3.0-www-modern-5379b6123-20230105";
3549+
exports.version = "18.3.0-www-modern-0b974418c-20230106";

compiled/facebook-www/ReactDOMTesting-dev.classic.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31199,7 +31199,7 @@ function createFiberRoot(
3119931199
return root;
3120031200
}
3120131201

31202-
var ReactVersion = "18.3.0-www-classic-5379b6123-20230105";
31202+
var ReactVersion = "18.3.0-www-classic-0b974418c-20230106";
3120331203

3120431204
function createPortal(
3120531205
children,

compiled/facebook-www/ReactDOMTesting-dev.modern.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38501,7 +38501,7 @@ function createFiberRoot(
3850138501
return root;
3850238502
}
3850338503

38504-
var ReactVersion = "18.3.0-www-modern-5379b6123-20230105";
38504+
var ReactVersion = "18.3.0-www-modern-0b974418c-20230106";
3850538505

3850638506
function createPortal(
3850738507
children,

compiled/facebook-www/ReactDOMTesting-prod.classic.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11328,7 +11328,7 @@ Internals.Events = [
1132811328
var devToolsConfig$jscomp$inline_1519 = {
1132911329
findFiberByHostInstance: getClosestInstanceFromNode,
1133011330
bundleType: 0,
11331-
version: "18.3.0-www-classic-5379b6123-20230105",
11331+
version: "18.3.0-www-classic-0b974418c-20230106",
1133211332
rendererPackageName: "react-dom"
1133311333
};
1133411334
var internals$jscomp$inline_2048 = {
@@ -11358,7 +11358,7 @@ var internals$jscomp$inline_2048 = {
1135811358
scheduleRoot: null,
1135911359
setRefreshHandler: null,
1136011360
getCurrentFiber: null,
11361-
reconcilerVersion: "18.3.0-next-5379b6123-20230105"
11361+
reconcilerVersion: "18.3.0-next-0b974418c-20230106"
1136211362
};
1136311363
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
1136411364
var hook$jscomp$inline_2049 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -14847,4 +14847,4 @@ exports.unstable_renderSubtreeIntoContainer = function(
1484714847
);
1484814848
};
1484914849
exports.unstable_runWithPriority = runWithPriority;
14850-
exports.version = "18.3.0-next-5379b6123-20230105";
14850+
exports.version = "18.3.0-next-0b974418c-20230106";

compiled/facebook-www/ReactDOMTesting-prod.modern.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13967,7 +13967,7 @@ Internals.Events = [
1396713967
var devToolsConfig$jscomp$inline_1674 = {
1396813968
findFiberByHostInstance: getClosestInstanceFromNode,
1396913969
bundleType: 0,
13970-
version: "18.3.0-www-modern-5379b6123-20230105",
13970+
version: "18.3.0-www-modern-0b974418c-20230106",
1397113971
rendererPackageName: "react-dom"
1397213972
};
1397313973
var internals$jscomp$inline_2073 = {
@@ -13998,7 +13998,7 @@ var internals$jscomp$inline_2073 = {
1399813998
scheduleRoot: null,
1399913999
setRefreshHandler: null,
1400014000
getCurrentFiber: null,
14001-
reconcilerVersion: "18.3.0-next-5379b6123-20230105"
14001+
reconcilerVersion: "18.3.0-next-0b974418c-20230106"
1400214002
};
1400314003
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
1400414004
var hook$jscomp$inline_2074 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -14321,4 +14321,4 @@ exports.unstable_flushControlled = function(fn) {
1432114321
}
1432214322
};
1432314323
exports.unstable_runWithPriority = runWithPriority;
14324-
exports.version = "18.3.0-next-5379b6123-20230105";
14324+
exports.version = "18.3.0-next-0b974418c-20230106";

compiled/facebook-www/ReactTestRenderer-dev.classic.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23898,7 +23898,7 @@ function createFiberRoot(
2389823898
return root;
2389923899
}
2390023900

23901-
var ReactVersion = "18.3.0-www-classic-5379b6123-20230105";
23901+
var ReactVersion = "18.3.0-www-classic-0b974418c-20230106";
2390223902

2390323903
// Might add PROFILE later.
2390423904

compiled/facebook-www/ReactTestRenderer-dev.modern.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23898,7 +23898,7 @@ function createFiberRoot(
2389823898
return root;
2389923899
}
2390023900

23901-
var ReactVersion = "18.3.0-www-modern-5379b6123-20230105";
23901+
var ReactVersion = "18.3.0-www-modern-0b974418c-20230106";
2390223902

2390323903
// Might add PROFILE later.
2390423904

compiled/facebook-www/unstable_server-external-runtime.js

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)