diff --git a/compiler/packages/babel-plugin-react-forget/src/HIR/BuildHIR.ts b/compiler/packages/babel-plugin-react-forget/src/HIR/BuildHIR.ts index 0404b02d03..5987809e51 100644 --- a/compiler/packages/babel-plugin-react-forget/src/HIR/BuildHIR.ts +++ b/compiler/packages/babel-plugin-react-forget/src/HIR/BuildHIR.ts @@ -76,6 +76,7 @@ export function lower( kind: "Identifier", identifier: builder.resolveBinding(ref), effect: Effect.Unknown, + reactive: false, loc: ref.loc ?? GeneratedSource, }); } @@ -106,6 +107,7 @@ export function lower( kind: "Identifier", identifier, effect: Effect.Unknown, + reactive: false, loc: param.node.loc ?? GeneratedSource, }; params.push(place); @@ -118,6 +120,7 @@ export function lower( kind: "Identifier", identifier: builder.makeTemporary(), effect: Effect.Unknown, + reactive: false, loc: param.node.loc ?? GeneratedSource, }; params.push(place); @@ -133,6 +136,7 @@ export function lower( kind: "Identifier", identifier: builder.makeTemporary(), effect: Effect.Unknown, + reactive: false, loc: param.node.loc ?? GeneratedSource, }; params.push({ @@ -403,6 +407,7 @@ function lowerStatement( effect: Effect.Unknown, identifier, kind: "Identifier", + reactive: false, loc: id.node.loc ?? GeneratedSource, }; lowerValueToTemporary(builder, { @@ -790,6 +795,7 @@ function lowerStatement( effect: Effect.Unknown, identifier, kind: "Identifier", + reactive: false, loc: id.node.loc ?? GeneratedSource, }; if (builder.isContextIdentifier(id)) { @@ -1158,6 +1164,7 @@ function lowerStatement( kind: "Identifier", identifier: builder.makeTemporary(), effect: Effect.Unknown, + reactive: false, loc: handlerBindingPath.node.loc ?? GeneratedSource, }; lowerValueToTemporary(builder, { @@ -3021,6 +3028,7 @@ function lowerIdentifier( kind: "Identifier", identifier: identifier, effect: Effect.Unknown, + reactive: false, loc: exprLoc, }; return place; @@ -3034,6 +3042,7 @@ function buildTemporaryPlace(builder: HIRBuilder, loc: SourceLocation): Place { kind: "Identifier", identifier: builder.makeTemporary(), effect: Effect.Unknown, + reactive: false, loc, }; return place; @@ -3087,6 +3096,7 @@ function lowerIdentifierForAssignment( kind: "Identifier", identifier: identifier, effect: Effect.Unknown, + reactive: false, loc, }; return place; diff --git a/compiler/packages/babel-plugin-react-forget/src/HIR/HIR.ts b/compiler/packages/babel-plugin-react-forget/src/HIR/HIR.ts index d7fcaa41e0..c805555a36 100644 --- a/compiler/packages/babel-plugin-react-forget/src/HIR/HIR.ts +++ b/compiler/packages/babel-plugin-react-forget/src/HIR/HIR.ts @@ -877,6 +877,7 @@ export type Place = { kind: "Identifier"; identifier: Identifier; effect: Effect; + reactive: boolean; loc: SourceLocation; }; diff --git a/compiler/packages/babel-plugin-react-forget/src/HIR/MergeConsecutiveBlocks.ts b/compiler/packages/babel-plugin-react-forget/src/HIR/MergeConsecutiveBlocks.ts index 666346c289..da9587aea3 100644 --- a/compiler/packages/babel-plugin-react-forget/src/HIR/MergeConsecutiveBlocks.ts +++ b/compiler/packages/babel-plugin-react-forget/src/HIR/MergeConsecutiveBlocks.ts @@ -75,6 +75,7 @@ export function mergeConsecutiveBlocks(fn: HIRFunction): void { kind: "Identifier", identifier: phi.id, effect: Effect.ConditionallyMutate, + reactive: false, loc: GeneratedSource, }, value: { @@ -83,6 +84,7 @@ export function mergeConsecutiveBlocks(fn: HIRFunction): void { kind: "Identifier", identifier: operand, effect: Effect.Read, + reactive: false, loc: GeneratedSource, }, loc: GeneratedSource, diff --git a/compiler/packages/babel-plugin-react-forget/src/Inference/DropManualMemoization.ts b/compiler/packages/babel-plugin-react-forget/src/Inference/DropManualMemoization.ts index ee2d8ea515..b7f3653d58 100644 --- a/compiler/packages/babel-plugin-react-forget/src/Inference/DropManualMemoization.ts +++ b/compiler/packages/babel-plugin-react-forget/src/Inference/DropManualMemoization.ts @@ -58,6 +58,7 @@ export function dropManualMemoization(func: HIRFunction): void { kind: "Identifier", identifier: fn.identifier, effect: Effect.Unknown, + reactive: false, loc: instr.value.loc, }, loc: instr.value.loc, diff --git a/compiler/packages/babel-plugin-react-forget/src/Inference/InlineImmediatelyInvokedFunctionExpressions.ts b/compiler/packages/babel-plugin-react-forget/src/Inference/InlineImmediatelyInvokedFunctionExpressions.ts index 9735f94d20..8a42ca8441 100644 --- a/compiler/packages/babel-plugin-react-forget/src/Inference/InlineImmediatelyInvokedFunctionExpressions.ts +++ b/compiler/packages/babel-plugin-react-forget/src/Inference/InlineImmediatelyInvokedFunctionExpressions.ts @@ -226,6 +226,7 @@ function rewriteBlock( type: makeType(), }, kind: "Identifier", + reactive: false, loc: terminal.loc, }, value: { @@ -265,6 +266,7 @@ function declareTemporary( type: makeType(), }, kind: "Identifier", + reactive: false, loc: GeneratedSource, }, value: {