diff --git a/compiler/packages/babel-plugin-react-compiler/src/Inference/InferReferenceEffects.ts b/compiler/packages/babel-plugin-react-compiler/src/Inference/InferReferenceEffects.ts index 2d838be7b8351..8aa82469bdec4 100644 --- a/compiler/packages/babel-plugin-react-compiler/src/Inference/InferReferenceEffects.ts +++ b/compiler/packages/babel-plugin-react-compiler/src/Inference/InferReferenceEffects.ts @@ -14,7 +14,6 @@ import { CallExpression, Effect, FunctionEffect, - FunctionExpression, GeneratedSource, HIRFunction, IdentifierId, @@ -36,7 +35,6 @@ import { import {FunctionSignature} from '../HIR/ObjectShape'; import { printIdentifier, - printInstruction, printMixedHIR, printPlace, printSourceLocation, @@ -468,10 +466,12 @@ class InferenceState { this.#env.config.enableTransitivelyFreezeFunctionExpressions ) { if (value.kind === 'FunctionExpression') { - // We want to freeze the captured values, not mark the operands - // themselves as frozen. There could be mutations that occur - // before the freeze we are processing, and it would be invalid - // to overwrite those mutations as a freeze. + /* + * We want to freeze the captured values, not mark the operands + * themselves as frozen. There could be mutations that occur + * before the freeze we are processing, and it would be invalid + * to overwrite those mutations as a freeze. + */ for (const operand of eachInstructionValueOperand(value)) { const operandValues = this.#variables.get(operand.identifier.id); if (operandValues !== undefined) { diff --git a/compiler/packages/babel-plugin-react-compiler/src/Validation/ValidatePreservedManualMemoization.ts b/compiler/packages/babel-plugin-react-compiler/src/Validation/ValidatePreservedManualMemoization.ts index 3548b75236e59..7af4aaaccd7ab 100644 --- a/compiler/packages/babel-plugin-react-compiler/src/Validation/ValidatePreservedManualMemoization.ts +++ b/compiler/packages/babel-plugin-react-compiler/src/Validation/ValidatePreservedManualMemoization.ts @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import {CompilerError, Effect, ErrorSeverity, printReactiveFunction} from '..'; +import {CompilerError, Effect, ErrorSeverity} from '..'; import { DeclarationId, GeneratedSource, @@ -23,11 +23,7 @@ import { ScopeId, SourceLocation, } from '../HIR'; -import { - printFunction, - printIdentifier, - printManualMemoDependency, -} from '../HIR/PrintHIR'; +import {printIdentifier, printManualMemoDependency} from '../HIR/PrintHIR'; import {eachInstructionValueOperand} from '../HIR/visitors'; import {collectMaybeMemoDependencies} from '../Inference/DropManualMemoization'; import {