Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable delta computation on code block node #7282

Merged
merged 18 commits into from
Oct 20, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions src/DynamoCore/Engine/EngineController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -364,15 +364,22 @@ private bool VerifyGraphSyncData(IEnumerable<NodeModel> nodes)
nodes.Where(n => n.NeedsForceExecution)
.Select(n => n.GUID));

if (reExecuteNodesIds.Any())
var codeBlockNodes = new HashSet<Guid>(
nodes.Where(n => n is CodeBlockNodeModel).Select(n => n.GUID));

if (reExecuteNodesIds.Any() || codeBlockNodes.Any())
{
for (int i = 0; i < graphSyncdata.ModifiedSubtrees.Count; ++i)
{
var st = graphSyncdata.ModifiedSubtrees[i];
if (reExecuteNodesIds.Contains(st.GUID))
var forceExecution = reExecuteNodesIds.Contains(st.GUID);
var isCodeBlockNode = codeBlockNodes.Contains(st.GUID);

if (forceExecution || isCodeBlockNode)
{
Subtree newSt = new Subtree(st.AstNodes, st.GUID);
newSt.ForceExecution = true;
newSt.ForceExecution = forceExecution;
newSt.DeltaComputation = !isCodeBlockNode;
graphSyncdata.ModifiedSubtrees[i] = newSt;
}
}
Expand Down
1 change: 1 addition & 0 deletions src/Engine/ProtoAssociative/CodeGen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1961,6 +1961,7 @@ private AssociativeNode DFSEmitSplitAssign_AST(AssociativeNode node, ref List<As
{
AssociativeNode lastNode = DFSEmitSplitAssign_AST(bnode.RightNode, ref astList);
var newBNode = AstFactory.BuildBinaryExpression(bnode.LeftNode, lastNode, Operator.assign);
newBNode.OriginalAstID = bnode.OriginalAstID;

astList.Add(newBNode);
return bnode.LeftNode;
Expand Down
5 changes: 0 additions & 5 deletions src/Engine/ProtoCore/Parser/AssociativeAST.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2076,11 +2076,6 @@ public class BinaryExpressionNode : AssociativeNode
public bool isSSAPointerAssignment { get; set; }
public bool IsFirstIdentListNode { get; set; }

// These properties are used only for the GraphUI ProtoAST
public uint Guid { get; set; }
//private uint splitFromUID = 0;
//public uint SplitFromUID { get { return splitFromUID; } set { splitFromUID = value; } }

public BinaryExpressionNode(AssociativeNode left = null, AssociativeNode right = null, Operator optr = Operator.none)
{
isSSAAssignment = false;
Expand Down
Loading