コード例 #1
0
ファイル: FunctionBodyGenerator.cs プロジェクト: nobikik9/kju
 public FunctionBodyGenerator(
     ILabelFactory labelFactory,
     ReadWriteGenerator readWriteGenerator,
     PrologueEpilogueGenerator prologueEpilogueGenerator,
     CallGenerator callGenerator)
 {
     this.labelFactory              = labelFactory;
     this.readWriteGenerator        = readWriteGenerator;
     this.prologueEpilogueGenerator = prologueEpilogueGenerator;
     this.callGenerator             = callGenerator;
 }
コード例 #2
0
ファイル: FunctionBodyGenerator.cs プロジェクト: nobikik9/kju
 public GenerateProcess(
     ILabelFactory labelFactory,
     ReadWriteGenerator readWriteGenerator,
     PrologueEpilogueGenerator prologueEpilogueGenerator,
     CallGenerator callGenerator,
     Function.Function function)
 {
     this.labelFactory              = labelFactory;
     this.readWriteGenerator        = readWriteGenerator;
     this.prologueEpilogueGenerator = prologueEpilogueGenerator;
     this.callGenerator             = callGenerator;
     this.function = function;
 }
コード例 #3
0
        public FunctionGenerator ConstructGenerator()
        {
            var labelIdGuidGenerator         = new LabelIdGuidGenerator();
            var labelFactory                 = new LabelFactory(labelIdGuidGenerator);
            var variableAccessGraphGenerator = new VariableAccessGraphGeneratorFactory().GetGenerator();
            var temporaryVariablesExtractor  = new TemporaryVariablesExtractor.TemporaryVariablesExtractor();
            var readWriteGenerator           = new ReadWriteGenerator();
            var callingSiblingFinder         = new CallingSiblingFinder.CallingSiblingFinder();
            var callGenerator                = new CallGenerator.CallGenerator(labelFactory, callingSiblingFinder, readWriteGenerator);
            var prologueEpilogueGenerator    = new PrologueEpilogueGenerator(labelFactory, callGenerator, readWriteGenerator);
            var functionBodyGenerator        = new BodyGenerator.FunctionBodyGenerator(
                labelFactory,
                readWriteGenerator,
                prologueEpilogueGenerator,
                callGenerator);

            return(new FunctionGenerator(
                       variableAccessGraphGenerator,
                       temporaryVariablesExtractor,
                       functionBodyGenerator));
        }