Skip to content

Commit 13a2e78

Browse files
committed
[compiler] Fix fbt for the ∞th time (facebook#34865)
We now do a single pass over the HIR, building up two data structures: * One tracks values that are known macro tags or macro calls. * One tracks operands of macro-related instructions so that we can later group them. After building up these data structures, we do a pass over the latter structure. For each macro call instruction, we recursively traverse its operands to ensure they're in the same scope. Thus, something like `fbt('hello' + fbt.param(foo(), "..."))` will correctly merge the fbt call, the `+` binary expression, the `fbt.param()` call, and `foo()` into a single scope. --- [//]: # (BEGIN SAPLING FOOTER) Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/facebook/react/pull/34865). * facebook#34855 * __->__ facebook#34865 DiffTrain build for [85f415e](facebook@85f415e)
1 parent 8a20e66 commit 13a2e78

26 files changed

+2277
-2215
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.3.0-native-fb-ead92181-20251010
1+
19.3.0-native-fb-85f415e3-20251015

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOM-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<<9f3ab4670a4723f82922d24b09ba1cd5>>
10+
* @generated SignedSource<<bcac84fc6bd4caf074214f912bd50ea7>>
1111
*/
1212

1313
"use strict";
@@ -404,5 +404,5 @@ __DEV__ &&
404404
exports.useFormStatus = function () {
405405
return resolveDispatcher().useHostTransitionStatus();
406406
};
407-
exports.version = "19.3.0-native-fb-ead92181-20251010";
407+
exports.version = "19.3.0-native-fb-85f415e3-20251015";
408408
})();

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOM-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<<728aa41ae2a4b4f9cff04df4fb808f06>>
10+
* @generated SignedSource<<00f76fffc00ad20f389bca1c709a22cc>>
1111
*/
1212

1313
"use strict";
@@ -203,4 +203,4 @@ exports.useFormState = function (action, initialState, permalink) {
203203
exports.useFormStatus = function () {
204204
return ReactSharedInternals.H.useHostTransitionStatus();
205205
};
206-
exports.version = "19.3.0-native-fb-ead92181-20251010";
206+
exports.version = "19.3.0-native-fb-85f415e3-20251015";

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOM-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<<728aa41ae2a4b4f9cff04df4fb808f06>>
10+
* @generated SignedSource<<00f76fffc00ad20f389bca1c709a22cc>>
1111
*/
1212

1313
"use strict";
@@ -203,4 +203,4 @@ exports.useFormState = function (action, initialState, permalink) {
203203
exports.useFormStatus = function () {
204204
return ReactSharedInternals.H.useHostTransitionStatus();
205205
};
206-
exports.version = "19.3.0-native-fb-ead92181-20251010";
206+
exports.version = "19.3.0-native-fb-85f415e3-20251015";

0 commit comments

Comments
 (0)