コード例 #1
0
ファイル: jit-dasm.cs プロジェクト: erozenfeld/jitutils
        public static int Main(string[] args)
        {
            // Error count will be returned.  Start at 0 - this will be incremented
            // based on the error counts derived from the DisasmEngine executions.
            int errorCount = 0;

            // Parse and store comand line options.
            var config = new Config(args);

            // Stop to attach a debugger if desired.
            if (config.WaitForDebugger)
            {
                WaitForDebugger();
            }

            // Builds assemblyInfoList on jitdasm

            List <AssemblyInfo> assemblyWorkList = GenerateAssemblyWorklist(config);

            // The disasm engine encapsulates a particular set of diffs.  An engine is
            // produced with a given code generator and assembly list, which then produces
            // a set of disasm outputs.

            DisasmEngine crossgenDisasm = new DisasmEngine(config.CrossgenExecutable, config, config.RootPath, assemblyWorkList);

            crossgenDisasm.GenerateAsm();

            if (crossgenDisasm.ErrorCount > 0)
            {
                Console.Error.WriteLine("{0} errors compiling set.", crossgenDisasm.ErrorCount);
                errorCount += crossgenDisasm.ErrorCount;
            }

            return(errorCount);
        }
コード例 #2
0
ファイル: jit-dasm.cs プロジェクト: russellhadley/jitutils
        public static int Main(string[] args)
        {
            // Error count will be returned.  Start at 0 - this will be incremented
            // based on the error counts derived from the DisasmEngine executions.
            int errorCount = 0;

            // Parse and store comand line options.
            var config = new Config(args);

            // Stop to attach a debugger if desired.
            if (config.WaitForDebugger)
            {
                WaitForDebugger();
            }

            // Builds assemblyInfoList on mcgdiff
            List <AssemblyInfo> assemblyWorkList = GenerateAssemblyWorklist(config);

            // The disasm engine encapsulates a particular set of diffs.  An engine is
            // produced with a given code generator and assembly list, which then produces
            // a set of disasm outputs

            if (config.GenerateBaseline)
            {
                string taggedPath = null;
                if (config.DoFileOutput)
                {
                    string tag = "base";
                    if (config.HasTag)
                    {
                        tag = config.Tag;
                    }

                    taggedPath = Path.Combine(config.RootPath, tag);
                }

                DisasmEngine baseDisasm = new DisasmEngine(config.BaseExecutable, config, taggedPath, assemblyWorkList);
                baseDisasm.GenerateAsm();

                if (baseDisasm.ErrorCount > 0)
                {
                    Console.WriteLine("{0} errors compiling base set.", baseDisasm.ErrorCount);
                    errorCount += baseDisasm.ErrorCount;
                }
            }

            if (config.GenerateDiff)
            {
                string taggedPath = null;
                if (config.DoFileOutput)
                {
                    string tag = "diff";
                    if (config.HasTag)
                    {
                        tag = config.Tag;
                    }

                    taggedPath = Path.Combine(config.RootPath, tag);
                }

                DisasmEngine diffDisasm = new DisasmEngine(config.DiffExecutable, config, taggedPath, assemblyWorkList);
                diffDisasm.GenerateAsm();

                if (diffDisasm.ErrorCount > 0)
                {
                    Console.WriteLine("{0} errors compiling diff set.", diffDisasm.ErrorCount);
                    errorCount += diffDisasm.ErrorCount;
                }
            }

            return(errorCount);
        }
コード例 #3
0
ファイル: mcgdiff.cs プロジェクト: russellhadley/mcgutils
        public static int Main(string[] args)
        {
            // Error count will be returned.  Start at 0 - this will be incremented
            // based on the error counts derived from the DisasmEngine executions.
            int errorCount = 0;

            // Parse and store comand line options.
            var config = new Config(args);

            // Stop to attach a debugger if desired.
            if (config.WaitForDebugger)
            {
                WaitForDebugger();
            }

            // Builds assemblyInfoList on mcgdiff
            List<AssemblyInfo> assemblyWorkList = GenerateAssemblyWorklist(config);

            // The disasm engine encapsulates a particular set of diffs.  An engine is
            // produced with a given code generator and assembly list, which then produces
            // a set of disasm outputs

            if (config.GenerateBaseline)
            {
                string taggedPath = null;
                if (config.DoFileOutput)
                {
                    string tag = "base";
                    if (config.HasTag)
                    {
                        tag = config.Tag;
                    }

                    taggedPath = Path.Combine(config.RootPath, tag);
                }

                DisasmEngine baseDisasm = new DisasmEngine(config.BaseExecutable, config, taggedPath, assemblyWorkList);
                baseDisasm.GenerateAsm();

                if (baseDisasm.ErrorCount > 0)
                {
                    Console.WriteLine("{0} errors compiling base set.", baseDisasm.ErrorCount);
                    errorCount += baseDisasm.ErrorCount;
                }
            }

            if (config.GenerateDiff)
            {
                string taggedPath = null;
                if (config.DoFileOutput)
                {
                    string tag = "diff";
                    if (config.HasTag)
                    {
                        tag = config.Tag;
                    }

                    taggedPath = Path.Combine(config.RootPath, tag);
                }

                DisasmEngine diffDisasm = new DisasmEngine(config.DiffExecutable, config, taggedPath, assemblyWorkList);
                diffDisasm.GenerateAsm();

                if (diffDisasm.ErrorCount > 0)
                {
                    Console.WriteLine("{0} errors compiling diff set.", diffDisasm.ErrorCount);
                    errorCount += diffDisasm.ErrorCount;
                }
            }

            return errorCount;
        }