Exemplo n.º 1
0
 public void VisitUndefinedCollectorNode(UndefinedCollectorNode node)
 {
     if (node.IsCollected)
     {
         collectUndefinedCollectorNode(node);
     }
     else
     {
         continueUndefinedCollectorNode(node);
     }
 }
Exemplo n.º 2
0
        protected override void collectUndefinedCollectorNode(UndefinedCollectorNode node)
        {
            PathModifications.GetOrCreateModification(node.TargetIndex).SetCollectedIndex();

            if (node.IsMust || ForceStrongWrite)
            {
                AddOperation(new UndefinedMustAssignOperation(this, node.TargetIndex, memoryEntryCollector.RootNode, AssignAliasesIntoCollectedIndexes));
            }
            else
            {
                AddOperation(new UndefinedMayAssignOperation(this, node.TargetIndex, memoryEntryCollector.RootNode, AssignAliasesIntoCollectedIndexes));
            }
        }
Exemplo n.º 3
0
        /// <summary>
        /// Continues the undefined collector node.
        /// </summary>
        /// <param name="node">The node.</param>
        protected void continueUndefinedCollectorNode(UndefinedCollectorNode node)
        {
            Structure.NewIndex(node.TargetIndex);

            HashSet <Value> values = new HashSet <Value>();

            testAndCreateImplicitArray(node, values);
            testAndCreateImplicitObject(node, values);
            testAndCreateUndefinedChildren(node);

            if (!node.IsMust)
            {
                values.Add(Snapshot.UndefinedValue);
            }

            Data.SetMemoryEntry(node.TargetIndex, Snapshot.CreateMemoryEntry(values));

            enqueueLocationChildNodes(node);
        }
Exemplo n.º 4
0
 /// <summary>
 /// Perform custom assign operation on undefined node.
 /// </summary>
 /// <param name="node">The node.</param>
 protected abstract void collectUndefinedCollectorNode(UndefinedCollectorNode node);
Exemplo n.º 5
0
 protected override void collectUndefinedCollectorNode(UndefinedCollectorNode node)
 {
     storeAliasIndex(node);
     continueUndefinedCollectorNode(node);
 }