Esempio n. 1
0
        public static void Start()
        {
            IRenderer renderer = new Renderer();

            IInputProvider inputProvider = new InputProvider();

            IEngine engine = new GVREngine(renderer, inputProvider);

            IFieldInitialization fieldInitialization = new FieldInitialization();

            engine.Start(fieldInitialization);
        }
Esempio n. 2
0
        public void Execute()
        {
            var disassembler = new Backend.Transformations.Disassembler(host, methodDefinition, sourceLocationProvider);
            var methodBody   = disassembler.Execute();

            MethodBody = methodBody;

            var cfAnalysis = new ControlFlowAnalysis(methodBody);

            ControlFlowGraph = cfAnalysis.GenerateExceptionalControlFlow();

            var splitter = new WebAnalysis(ControlFlowGraph, methodBody.MethodDefinition);

            splitter.Analyze();
            splitter.Transform();

            methodBody.UpdateVariables();

            var typeAnalysis = new TypeInferenceAnalysis(ControlFlowGraph, methodBody.MethodDefinition.Type);

            typeAnalysis.Analyze();

            //var forwardCopyAnalysis = new ForwardCopyPropagationAnalysis(Traverser.CFG);
            //forwardCopyAnalysis.Analyze();
            //forwardCopyAnalysis.Transform(methodBody);

            //var backwardCopyAnalysis = new BackwardCopyPropagationAnalysis(Traverser.CFG);
            //backwardCopyAnalysis.Analyze();
            //backwardCopyAnalysis.Transform(methodBody);

            // TinyBCT transformations

            var fieldInitialization = new FieldInitialization(methodBody);

            fieldInitialization.Transform();

            if (!Settings.AddressesEnabled())
            {
                var refAlias = new RefAlias(methodBody);
                refAlias.Transform();
            }

            // execute this after RefAlias!
            var immutableArguments = new ImmutableArguments(methodBody);

            immutableArguments.Transform();

            methodBody.RemoveUnusedLabels();
        }
Esempio n. 3
0
 static void Main(string[] args)
 {
     FieldInitialization.Run();
     ArrayInitialization.Run();
 }