コード例 #1
0
        public override void CallDispatchMerge(ProgramPointBase beforeCall, FlowOutputSet afterCall, IEnumerable <ExtensionPoint> dispatchedExtensions)
        {
            var ends = (from callOutput in dispatchedExtensions where callOutput.Graph.End.OutSet != null select callOutput.Graph.End.OutSet as ISnapshotReadonly).ToArray();

            //TODO determine correct extension type
            var callType = dispatchedExtensions.First().Type;

            switch (callType)
            {
            case ExtensionType.ParallelEval:
            case ExtensionType.ParallelInclude:
                //merging from includes behaves like usual
                //program points extend
                afterCall.Extend(ends);
                break;

            case ExtensionType.ParallelCall:
                //merging from calls needs special behaviour
                //from memory model (there are no propagation of locales e.g)
                afterCall.MergeWithCallLevel(beforeCall, ends);
                break;

            default:
                throw new NotImplementedException();
            }
        }