Beispiel #1
0
        /// <summary>
        /// Compiles the method.
        /// </summary>
        /// <param name="method">The method.</param>
        /// <param name="basicBlocks">The basic blocks.</param>
        /// <param name="threadID">The thread identifier.</param>
        public void CompileMethod(MosaMethod method, BasicBlocks basicBlocks, int threadID = 0)
        {
            PostCompilerTraceEvent(CompilerEvent.CompilingMethod, method.FullName, threadID);

            var pipeline = GetOrCreateMethodStagePipeline(threadID);

            var methodCompiler = new MethodCompiler(this, method, basicBlocks, threadID)
            {
                Pipeline = pipeline
            };

            methodCompiler.Compile();

            PostCompilerTraceEvent(CompilerEvent.CompiledMethod, method.FullName, threadID);

            CompilerTrace.PostMethodCompiled(method);
        }
Beispiel #2
0
        /// <summary>
        /// Compiles the method.
        /// </summary>
        /// <param name="method">The method.</param>
        /// <param name="basicBlocks">The basic blocks.</param>
        /// <param name="threadID">The thread identifier.</param>
        public void CompileMethod(MosaMethod method, BasicBlocks basicBlocks, int threadID = 0)
        {
            PostEvent(CompilerEvent.MethodCompileStart, method.FullName, threadID);

            var pipeline = GetOrCreateMethodStagePipeline(threadID);

            var methodCompiler = new MethodCompiler(this, method, basicBlocks, threadID)
            {
                Pipeline = pipeline
            };

            methodCompiler.Compile();

            PostEvent(CompilerEvent.MethodCompileEnd, method.FullName, threadID);

            CompilerHooks.NotifyMethodCompiled?.Invoke(method);
        }