Example #1
0
        protected internal override void VisitBranch(Branch node, object data)
        {
            if (node.Next == node.Alt)
                SiftSerials(node,data);
            else
            {
                BasicBlock basicBlock = data as BasicBlock;
                basicBlock.AddNode(node);

                if (node.Next.Options.ContainsOption(BasicBlock.BASIC_BLOCK_OPTION))
                    basicBlock.AddNextBasicBlock(node.Next.Options[BasicBlock.BASIC_BLOCK_OPTION] as BasicBlock);
                else
                {
                    BasicBlock nextBlock = createBasicBlock();
                    basicBlock.AddNextBasicBlock(nextBlock);
                    AddTask(node.Next,nextBlock);
                }

                if (node.Alt.Options.ContainsOption(BasicBlock.BASIC_BLOCK_OPTION))
                    basicBlock.AddNextBasicBlock(node.Alt.Options[BasicBlock.BASIC_BLOCK_OPTION] as BasicBlock);
                else
                {
                    BasicBlock altBlock = createBasicBlock();
                    basicBlock.AddNextBasicBlock(altBlock);
                    AddTask(node.Alt,altBlock);
                }
            }
        }
Example #2
0
 protected internal override void VisitBranch(Branch node, object data)
 {
     StackTypes stack = data as StackTypes;
     Verifier.ProcessBrTrueFalse(stack);
     AddTask(node.Next,stack);
     AddTask(node.Alt, stack.Clone());
 }
Example #3
0
 protected internal virtual void VisitBranch(Branch node, object data)
 {
     throw new NodeNotSupportedException(node);
 }
Example #4
0
 protected override void VisitBranch(Branch upNode, object o)
 {
     State state = o as State;
     BTValue val = state.Stack.Pop() as BTValue;
     Annotation.SetNodeBTType(upNode, val.BTType);
 }
Example #5
0
 protected override void VisitBranch(Branch upNode, object o)
 {
     DepthContainer cnt = o as DepthContainer;
     cnt.Depth += 1;
 }
Example #6
0
 protected internal override void VisitBranch(Branch node, object data)
 {
     if(node.Alt.PrevArray.Count > 1  &&  Stack(node.Alt).Count != 0)
     {
       generator.Emit(OpCodes.Stloc, GetBoolVar());
         DumpStack(Stack(node.Alt));
       generator.Emit(OpCodes.Ldloc, GetBoolVar());
         wasDumpedFlag = true;
         wasDumped[node.Alt] = true;
         wasDumped[node.Next] = true;
     }
     //if(node.Condition)
     generator.Emit(OpCodes.Brtrue, GetLabel(node.Alt));
     //else
     //	generator.Emit(OpCodes.Brfalse, GetLabel(node.Alt));
     AddTask(node.Alt,null);
     AddTask(node.Next,null);
 }