mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Update base for Update on "[compiler] Type provider infra for tests"
[ghstack-poisoned]
This commit is contained in:
+6
-6
@@ -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) {
|
||||
|
||||
+2
-6
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user