예제 #1
0
        public void visitFunction(Function f)
        {
            DFGNode high;
            DFGNode low;

            high = _dfg.high;
            low  = _dfg.low;
            if (_isVerification)
            {
                high = DFGNode.generateHigh();
                low  = DFGNode.generateLow();
            }
            else
            {
                high = _dfg.high;
                low  = _dfg.low;
            }

            DFGVisitor fv = new DFGVisitor(f.body, f.formalParams, high, low, _componentFunctionGraphs, _deferredInvocations, _currentComponent, _isVerification);
            Dictionary <Identifier, DFG> functionList = _componentFunctionGraphs[_currentComponent];

            // if function has no return, add a ghost return
            if (fv.dfg.returnNode == null)
            {
                fv.dfg.addReturn();
            }

            functionList.Add(f.name.identifier, fv.dfg);
        }
예제 #2
0
 public DeferredInvocation(Invocation i, DFGNode invNode, DFGVisitor dfgv, Identifier inComp)
 {
     visitor        = dfgv;
     invocation     = i;
     invocationNode = invNode;
     inComponent    = inComp;
 }