예제 #1
0
파일: LiveRunner.cs 프로젝트: maajor/Dynamo
 public List<AssociativeNode> GetDeltaASTList(GraphSyncData syncData)
 {
     csData = new ChangeSetData();
     List<AssociativeNode> finalDeltaAstList = new List<AssociativeNode>();
     finalDeltaAstList.AddRange(GetDeltaAstListDeleted(syncData.DeletedSubtrees));
     finalDeltaAstList.AddRange(GetDeltaAstListAdded(syncData.AddedSubtrees));
     finalDeltaAstList.AddRange(GetDeltaAstListModified(syncData.ModifiedSubtrees));
     csData.ContainsDeltaAST = finalDeltaAstList.Count > 0;
     return finalDeltaAstList;
 }
예제 #2
0
파일: LiveRunner.cs 프로젝트: maajor/Dynamo
        private void ApplyChangeSetModified(ChangeSetData changeSet)
        {
            ClearModifiedNestedBlocks(changeSet.ModifiedNestedLangBlock);

            DeactivateGraphnodes(changeSet.RemovedBinaryNodesFromModification);

            // Set new value for modified ASTs
            SetValueForModifiedNodes(changeSet.ModifiedNodesForRuntimeSetValue);
            
            // Undefine a function that was removed 
            UndefineFunctions(changeSet.RemovedFunctionDefNodesFromModification);

            // Mark all graphnodes dependent on the removed function as dirty
            ProtoCore.AssociativeEngine.Utils.MarkGraphNodesDirtyFromFunctionRedef(runtimeCore, changeSet.RemovedFunctionDefNodesFromModification);

            // Mark all graphnodes dependent on the modified functions as dirty
            ProtoCore.AssociativeEngine.Utils.MarkGraphNodesDirtyFromFunctionRedef(runtimeCore, changeSet.ModifiedFunctions);
        }
예제 #3
0
파일: LiveRunner.cs 프로젝트: maajor/Dynamo
        private void ApplyChangeSetForceExecute(ChangeSetData changeSet)
        {
            // Check if there are nodes to force execute
            if (changeSet.ForceExecuteASTList.Count > 0)
            {
                // Mark all graphnodes dirty which are associated with the force exec ASTs
                ProtoCore.AssociativeGraph.GraphNode firstDirtyNode = ProtoCore.AssociativeEngine.Utils.MarkGraphNodesDirtyAtGlobalScope
(runtimeCore, changeSet.ForceExecuteASTList);
                Validity.Assert(firstDirtyNode != null);

                // If the only ASTs to execute are force exec, then set the entrypoint here.
                // Otherwise the entrypoint is set by the code generator when the new ASTs are compiled
                if (!changeSet.ContainsDeltaAST)
                {
                    runtimeCore.SetStartPC(firstDirtyNode.updateBlock.startpc);
                }
            }
        }
예제 #4
0
파일: LiveRunner.cs 프로젝트: maajor/Dynamo
 public void Apply(ProtoCore.Core core, RuntimeCore runtimeCore, ChangeSetData changeSet)
 {
     Validity.Assert(null != changeSet);
     this.core = core;
     this.runtimeCore = runtimeCore;
     ApplyChangeSetDeleted(changeSet);
     ApplyChangeSetModified(changeSet);
     ApplyChangeSetForceExecute(changeSet);
 }
예제 #5
0
파일: LiveRunner.cs 프로젝트: maajor/Dynamo
 private void ApplyChangeSetDeleted(ChangeSetData changeSet)
 {
     DeactivateGraphnodes(changeSet.DeletedBinaryExprASTNodes);
     UndefineFunctions(changeSet.DeletedFunctionDefASTNodes);
 }
예제 #6
0
        public List<AssociativeNode> GetDeltaASTList(GraphSyncData syncData)
        {
            UpdateAstCache(syncData);
            csData = new ChangeSetData();
            List<AssociativeNode> finalDeltaAstList = new List<AssociativeNode>();
            finalDeltaAstList.AddRange(GetDeltaAstListDeleted(syncData.DeletedSubtrees));
            finalDeltaAstList.AddRange(GetDeltaAstListAdded(syncData.AddedSubtrees));
            finalDeltaAstList.AddRange(GetDeltaAstListModified(syncData.ModifiedSubtrees));

            return finalDeltaAstList;
        }
예제 #7
0
 private void ApplyChangeSetModified(ChangeSetData changeSet)
 {
     ClearModifiedNestedBlocks(changeSet.ModifiedNestedLangBlock);
     DeactivateGraphnodes(changeSet.RemovedBinaryNodesFromModification);
     UndefineFunctions(changeSet.RemovedFunctionDefNodesFromModification);
     // Mark all graphnodes dependent on the modified functions as dirty
     ProtoCore.AssociativeEngine.Utils.MarkGraphNodesDirtyFromFunctionRedef(core, changeSet.ModifiedFunctions);
 }
예제 #8
0
 private void ApplyChangeSetForceExecute(ChangeSetData changeSet)
 {
     // Mark all graphnodes dirty which are associated with the force exec ASTs
     ProtoCore.AssociativeEngine.Utils.MarkGraphNodesDirty(core, changeSet.ForceExecuteASTList);
 }
예제 #9
0
 private void ApplyChangeSetDeleted(ChangeSetData changeSet)
 {
     MarkGraphNodesInactive(changeSet.DeletedBinaryExprASTNodes);
     UndefineFunctions(changeSet.DeletedFunctionDefASTNodes);
 }
예제 #10
0
        public List<AssociativeNode> GetDeltaASTList(GraphSyncData syncData)
        {
            csData = new ChangeSetData();
            var finalDeltaAstList = new List<AssociativeNode>();

            var deletedDeltaAsts = GetDeltaAstListDeleted(syncData.DeletedSubtrees);
            finalDeltaAstList.AddRange(deletedDeltaAsts);

            var addedDeltaAsts = GetDeltaAstListAdded(syncData.AddedSubtrees);
            finalDeltaAstList.AddRange(addedDeltaAsts);

            var modifiedDeltaAsts = GetDeltaAstListModified(syncData.ModifiedSubtrees);
            finalDeltaAstList.AddRange(modifiedDeltaAsts);

            csData.ContainsDeltaAST = finalDeltaAstList.Any();
            return finalDeltaAstList;
        }
예제 #11
0
 private void ApplyChangeSetDeleted(ChangeSetData changeSet)
 {
     DeactivateGraphnodes(changeSet.DeletedBinaryExprASTNodes);
     UndefineFunctions(changeSet.DeletedFunctionDefASTNodes);
     ProtoCore.AssociativeEngine.Utils.MarkGraphNodesDirtyFromFunctionRedef(runtimeCore, changeSet.DeletedFunctionDefASTNodes);
 }
예제 #12
0
 public void Apply(ProtoCore.Core core, ChangeSetData changeSet)
 {
     Validity.Assert(null != changeSet);
     this.core = core;
     ApplyChangeSetDeleted(changeSet);
     ApplyChangeSetModified(changeSet);
 }