From 9d4f9b78b10dd0debf8af2ff5eb8faa4cdeaf7d2 Mon Sep 17 00:00:00 2001 From: Mofei Zhang Date: Tue, 25 Jun 2024 16:06:21 -0400 Subject: [PATCH] [compiler][ez] PrintHIR prints optional flag for debugging Adding the equivalent of [PrintReactiveFunction:OptionalExpression](https://github.com/facebook/react/blob/f5d2feb4f069a36140d5e605f5eebc52badcc214/compiler/packages/babel-plugin-react-compiler/src/ReactiveScopes/PrintReactiveFunction.ts#L218) to `PrintHIR`. ghstack-source-id: 5b175f6f62f72a867a00c52c4f825fd396d450a9 Pull Request resolved: https://github.com/facebook/react/pull/30078 --- .../packages/babel-plugin-react-compiler/src/HIR/PrintHIR.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/packages/babel-plugin-react-compiler/src/HIR/PrintHIR.ts b/compiler/packages/babel-plugin-react-compiler/src/HIR/PrintHIR.ts index 443a2522ee18b..df7d2698f4b29 100644 --- a/compiler/packages/babel-plugin-react-compiler/src/HIR/PrintHIR.ts +++ b/compiler/packages/babel-plugin-react-compiler/src/HIR/PrintHIR.ts @@ -194,7 +194,7 @@ export function printTerminal(terminal: Terminal): Array | string { break; } case "optional": { - value = `[${terminal.id}] Optional test:bb${terminal.test} fallthrough=bb${terminal.fallthrough}`; + value = `[${terminal.id}] Optional (optional=${terminal.optional}) test:bb${terminal.test} fallthrough=bb${terminal.fallthrough}`; break; } case "throw": {