From ba8f011189283dc591732b77fc3608fb996cc699 Mon Sep 17 00:00:00 2001 From: Aparajit Pratap Date: Thu, 7 Dec 2023 21:48:48 -0500 Subject: [PATCH] add code comments --- src/Engine/ProtoAssociative/CodeGen_SSA.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Engine/ProtoAssociative/CodeGen_SSA.cs b/src/Engine/ProtoAssociative/CodeGen_SSA.cs index 9629d77b6b4..2958837dfc1 100644 --- a/src/Engine/ProtoAssociative/CodeGen_SSA.cs +++ b/src/Engine/ProtoAssociative/CodeGen_SSA.cs @@ -275,6 +275,10 @@ private List BuildSSA(List astList, ProtoCore. BinaryExpressionNode bnode = (node as BinaryExpressionNode); int generatedUID = ProtoCore.DSASM.Constants.kInvalidIndex; + // Skip SSA for input ASTs that are first assigned null such as this: + // a = null; (update "a") => a = ; + // SSA would break up the null AST into two assignments, which then breaks update: + // a = null; (SSA) => temp = null; a = temp; if (context.applySSATransform && core.Options.GenerateSSA && !bnode.IsInputExpression) { int ssaID = ProtoCore.DSASM.Constants.kInvalidIndex;