Esempio n. 1
0
 public override void GenerateDependencyGraph(DependencyTracker tracker)
 {
     base.GenerateDependencyGraph(tracker);
     if (Optr == ProtoCore.DSASM.Operator.assign)
     {
         //so do we set dependency between LeftNode and '=' or LeftNode and RightNode : may be later is better
         if (AssignNodeDependencyEnabled)
         {
             //if we have enabled the '=' node to be a part of depencency, then we already handled RHS as a contingent
             //so skip it
             tracker.AddNode(LeftNode);
             tracker.AddDirectContingent(LeftNode, this);
             tracker.AddDirectDependent(this, LeftNode);
         }
         else
         {
             //if(AssignNodeDependencyEnabledLame)
             //{
             //    tracker.AddDirectContingent(this, RightNode);  //? still keep in dependency?
             //    tracker.AddDirectContingent(LeftNode, RightNode);
             //}
             tracker.AddNode(RightNode);
             tracker.AddNode(LeftNode);
             tracker.AddDirectContingent(LeftNode, RightNode);
             tracker.AddDirectDependent(RightNode, LeftNode);
             RightNode.GenerateDependencyGraph(tracker);
         }
     }
 }
Esempio n. 2
0
        public virtual void GenerateDependencyGraph(DependencyTracker tracker)
        {
            tracker.AddNode(this);//get rid of this later

            IEnumerable <Node> contingents = getContingents();

            foreach (Node node in contingents)
            {
                tracker.AddNode(node);
                if (node == null)
                {
                    continue;
                }
                tracker.AddDirectContingent(this, node);
                tracker.AddDirectDependent(node, this);
                node.GenerateDependencyGraph(tracker);
            }
        }
Esempio n. 3
0
 public override void GenerateDependencyGraph(DependencyTracker tracker)
 {
     base.GenerateDependencyGraph(tracker);
     if (Optr == ProtoCore.DSASM.Operator.assign)
     {
         //so do we set dependency between LeftNode and '=' or LeftNode and RightNode : may be later is better
         if (AssignNodeDependencyEnabled)
         {
             //if we have enabled the '=' node to be a part of depencency, then we already handled RHS as a contingent
             //so skip it
             tracker.AddNode(LeftNode);
             tracker.AddDirectContingent(LeftNode, this);
             tracker.AddDirectDependent(this, LeftNode);
         }
         else
         {
             //if(AssignNodeDependencyEnabledLame)
             //{
             //    tracker.AddDirectContingent(this, RightNode);  //? still keep in dependency?
             //    tracker.AddDirectContingent(LeftNode, RightNode); 
             //}
             tracker.AddNode(RightNode);
             tracker.AddNode(LeftNode);
             tracker.AddDirectContingent(LeftNode, RightNode);
             tracker.AddDirectDependent(RightNode, LeftNode);
             RightNode.GenerateDependencyGraph(tracker);
         }
     }
 }
Esempio n. 4
0
        public virtual void GenerateDependencyGraph(DependencyTracker tracker)
        {
            tracker.AddNode(this);//get rid of this later

            IEnumerable<Node> contingents = getContingents();
            
            foreach (Node node in contingents)
            {
                tracker.AddNode(node);
                if (node == null)
                    continue;
                tracker.AddDirectContingent(this, node);
                tracker.AddDirectDependent(node, this);
                node.GenerateDependencyGraph(tracker);
            }
        }