/// <summary> /// Enqueues the child nodes. /// </summary> /// <param name="node">The node.</param> private void enqueueChildNodes(CollectorNode node) { foreach (var childNode in node.ChildNodes) { collectorNodesQueue.AddLast(childNode); } }
/// <summary> /// Processes the variables. /// </summary> /// <param name="stackLevel">The stack level.</param> /// <param name="node">The node.</param> private void processVariables(int stackLevel, CollectorNode node) { if (node.HasUndefinedChildren) { IWriteableIndexContainer writeableVariableContainer = Structure.GetWriteableStackContext(stackLevel).WriteableVariables; foreach (var newChild in node.UndefinedChildren) { string childName = newChild.Item1; MemoryCollectorNode childNode = newChild.Item2; MemoryIndex index = VariableIndex.Create(childName, stackLevel); childNode.TargetIndex = index; writeableVariableContainer.AddIndex(childName, index); } } enqueueChildNodes(node); }