Ejemplo n.º 1
0
 internal AnnotatedMethod(ParameterValues paramVals, ReferenceBTValue ret)
 {
     this.ParamVals = paramVals;
     this.ReturnValue = ret;
     this.ControllingVisitor = null;
 }
Ejemplo n.º 2
0
 internal AnnotatingVisitor(AnnotatedAssemblyHolder holder, AnnotatedMethod method, ControllingVisitor cVisitor, UpAndDownNodes upDownNodes)
     : base(holder.GraphProcessor, 0)
 {
     this.holder = holder;
     this.cVisitor = cVisitor;
     this.upDownNodes = upDownNodes;
     this.ret = method.ReturnValue;
 }
Ejemplo n.º 3
0
        internal static MethodBodyBlock AnnotateMethod(AnnotatedAssemblyHolder holder, AnnotatedMethod method)
        {
            MethodBodyBlock mbbDown = holder.SourceHolder[method.SourceMethod];
            MethodBodyBlock mbbUp = mbbDown.Clone() as MethodBodyBlock;

            UpAndDownNodes upDownNodes = new UpAndDownNodes();
            State state = new State(mbbUp.Variables.Count);
            for(int i = 0; i < mbbUp.Variables.ParameterMapper.Count; i++)
            {
                Variable var = mbbUp.Variables.ParameterMapper[i];
                state.Pool[var] = new Location(var.Type);
                state.Pool[var].Val = (method.ParamVals[i].Val as ReferenceBTValue).ToStack(var.Type);
            }
            upDownNodes.SetUpAndDownNode(mbbDown, state, mbbUp);

            AnnotatingVisitor aVisitor;
            LiftingVisitor lVisitor;
            ControllingVisitor cVisitor = new ControllingVisitor(holder, method, upDownNodes, mbbUp, out aVisitor, out lVisitor);
            aVisitor.AddTask(mbbUp, state);

            return mbbUp;
        }
Ejemplo n.º 4
0
 internal LiftingVisitor(AnnotatedAssemblyHolder holder, ControllingVisitor cVisitor, AnnotatingVisitor aVisitor, UpAndDownNodes upDownNodes)
     : base(holder.GraphProcessor, 1)
 {
     this.cVisitor = cVisitor;
     this.aVisitor = aVisitor;
     this.upDownNodes = upDownNodes;
 }