/// <summary> /// Extends the method compiler pipeline with x86 specific stages. /// </summary> /// <param name="methodCompilerPipeline">The method compiler pipeline to extend.</param> public override void ExtendMethodCompilerPipeline(CompilerPipeline methodCompilerPipeline) { // FIXME: Create a specific code generator instance using requested feature flags. // FIXME: Add some more optimization passes, which take advantage of advanced x86 instructions // and packed operations available with SSE extensions methodCompilerPipeline.InsertAfterLast <PlatformStubStage>( new IMethodCompilerStage[] { //new CheckOperandCountStage(), new PlatformIntrinsicStage(), new LongOperandTransformationStage(), //new StopStage(), new IRTransformationStage(), new TweakTransformationStage(), new FixedRegisterAssignmentStage(), new SimpleDeadCodeRemovalStage(), new AddressModeConversionStage(), new FloatingPointStage(), }); methodCompilerPipeline.InsertAfterLast <StackLayoutStage>( new BuildStackStage() ); methodCompilerPipeline.InsertBefore <CodeGenerationStage>( new FinalTweakTransformationStage() ); methodCompilerPipeline.InsertBefore <CodeGenerationStage>( new JumpPeepholeOptimizationStage() ); }
/// <summary> /// Extends the method compiler pipeline with x86 specific stages. /// </summary> /// <param name="compilerPipeline">The method compiler pipeline to extend.</param> public override void ExtendMethodCompilerPipeline(CompilerPipeline compilerPipeline) { compilerPipeline.InsertBefore <LowerIRStage>( new IRSubstitutionStage() ); compilerPipeline.InsertAfterLast <PlatformStubStage>( new IMethodCompilerStage[] { new PlatformIntrinsicStage(), new LongOperandTransformationStage(), new IRTransformationStage(), new TweakTransformationStage(), new FixedRegisterAssignmentStage(), new SimpleDeadCodeRemovalStage(), new AddressModeConversionStage(), new FloatingPointStage(), }); compilerPipeline.InsertAfterLast <StackLayoutStage>( new BuildStackStage() ); compilerPipeline.InsertBefore <CodeGenerationStage>( new FinalTweakTransformationStage() ); compilerPipeline.InsertBefore <CodeGenerationStage>( new JumpOptimizationStage() ); }
protected override void CustomizeCompiler(BooCompiler compiler, CompilerPipeline pipeline, string[] urls) { pipeline.Insert(1, new ImplicitBaseClassCompilerStep(typeof(BooConfigReader), "Prepare", "Horn.Core.Dsl")); pipeline.InsertBefore(typeof(ProcessMethodBodiesWithDuckTyping), new RightShiftToMethodCompilerStep()); pipeline.Insert(2, new UnderscorNamingConventionsToPascalCaseCompilerStep()); pipeline.Insert(3, new UseSymbolsStep()); }
protected override void CustomizeCompiler(BooCompiler compiler, CompilerPipeline pipeline, string[] urls) { var steps = new List <ICompilerStep>(); steps.Add(new IncludeSupportStep(new PhantomDslEngine(importBuilders) { InIncludeMode = true })); if (!InIncludeMode) { steps.Add(new UnescapeNamesStep()); steps.Add(new ExpressionToTargetNameStep()); steps.Add(new ExpressionToDependencyNamesStep()); steps.Add(new ExpressionToCleanupNameStep()); steps.Add(new ExpressionToCallTargetNameStep()); steps.Add(new AutoReferenceFilesCompilerStep()); steps.Add(new TaskImportStep(importBuilders.ToArray())); steps.Add(new ImplicitBaseClassCompilerStep(typeof(PhantomBase), "Execute", typeof(UtilityFunctions).Namespace)); } steps.Reverse(); foreach (var step in steps) { pipeline.Insert(1, step); } if (!InIncludeMode) { pipeline.InsertBefore(typeof(ProcessMethodBodiesWithDuckTyping), new AutoRunAllRunnablesStep()); } compiler.Parameters.References.Add(typeof(UtilityFunctions).Assembly); }
public static CompilerPipeline AdjustBooPipeline(CompilerPipeline pipeline) { pipeline.Insert(0, new PreProcess()); pipeline.Replace(typeof(Parsing), new UnityScript.Steps.Parse()); pipeline.Replace(typeof(IntroduceGlobalNamespaces), new IntroduceUnityGlobalNamespaces()); pipeline.InsertAfter(typeof(PreErrorChecking), new ApplySemantics()); pipeline.InsertAfter(typeof(ApplySemantics), new ApplyDefaultVisibility()); pipeline.InsertBefore(typeof(ExpandDuckTypedExpressions), new ProcessAssignmentToDuckMembers()); pipeline.Replace(typeof(ProcessMethodBodiesWithDuckTyping), new ProcessUnityScriptMethods()); pipeline.InsertAfter(typeof(ProcessUnityScriptMethods), new AutoExplodeVarArgsInvocations()); pipeline.InsertAfter(typeof(ProcessUnityScriptMethods), new ProcessEvalInvocations()); pipeline.ReplaceOptional(typeof(ExpandDuckTypedExpressions), new ExpandUnityDuckTypedExpressions()); pipeline.InsertBefore(typeof(EmitAssembly), new Lint()); pipeline.InsertBefore(typeof(EmitAssembly), new EnableRawArrayIndexing()); pipeline.InsertAfter(typeof(BindBaseTypes), new CheckBaseTypes()); return(pipeline); }
protected override void CustomizeCompiler(BooCompiler compiler, CompilerPipeline pipeline, string[] urls) { pipeline.Insert(1, new ImplicitBaseClassCompilerStep(typeof(BaseOrderActionsDSL), "Prepare", //default namespaces "Rhino.DSL.Tests.SchedulingDSL")); pipeline.InsertBefore(typeof(ProcessMethodBodiesWithDuckTyping), new UnderscoreNamingConventionsToPascalCaseCompilerStep()); }
/// <summary> /// Extends the method compiler pipeline with ARMv6 specific stages. /// </summary> /// <param name="methodCompilerPipeline">The method compiler pipeline to extend.</param> public override void ExtendMethodCompilerPipeline(CompilerPipeline methodCompilerPipeline) { methodCompilerPipeline.InsertAfterLast <PlatformStubStage>( new IMethodCompilerStage[] { //new LongOperandTransformationStage(), new IRTransformationStage(), }); //methodCompilerPipeline.InsertAfterLast<CodeGenerationStage>( // new ExceptionLayoutStage() //); methodCompilerPipeline.InsertBefore <GreedyRegisterAllocatorStage>( new StopStage() ); }
/// <summary> /// Extends the method compiler pipeline with x86 specific stages. /// </summary> /// <param name="methodCompilerPipeline">The method compiler pipeline to extend.</param> public override void ExtendMethodCompilerPipeline(CompilerPipeline methodCompilerPipeline) { methodCompilerPipeline.InsertAfterLast<PlatformStubStage>( new IMethodCompilerStage[] { //new CheckOperandCountStage(), new PlatformIntrinsicStage(), new LongOperandTransformationStage(), //new StopStage(), new IRTransformationStage(), new TweakTransformationStage(), new FixedRegisterAssignmentStage(), new SimpleDeadCodeRemovalStage(), new AddressModeConversionStage(), new FloatingPointStage(), }); methodCompilerPipeline.InsertAfterLast<StackLayoutStage>( new BuildStackStage() ); methodCompilerPipeline.InsertBefore<CodeGenerationStage>( new FinalTweakTransformationStage() ); methodCompilerPipeline.InsertBefore<CodeGenerationStage>( new JumpOptimizationStage() ); }
/// <summary> /// Extends the method compiler pipeline with x86 specific stages. /// </summary> /// <param name="methodCompilerPipeline">The method compiler pipeline to extend.</param> public override void ExtendMethodCompilerPipeline(CompilerPipeline methodCompilerPipeline) { // FIXME: Create a specific code generator instance using requested feature flags. // FIXME: Add some more optimization passes, which take advantage of advanced x86 instructions // and packed operations available with SSE extensions methodCompilerPipeline.InsertAfterLast<PlatformStubStage>( new IMethodCompilerStage[] { //new CheckOperandCountStage(), new PlatformIntrinsicTransformationStage(), new LongOperandTransformationStage(), //new StopStage(), new IRTransformationStage(), new TweakTransformationStage(), new FixedRegisterAssignmentStage(), new SimpleDeadCodeRemovalStage(), new AddressModeConversionStage(), new FloatingPointStage(), }); methodCompilerPipeline.InsertAfterLast<StackLayoutStage>( new BuildStackStage() ); methodCompilerPipeline.InsertBefore<CodeGenerationStage>( new FinalTweakTransformationStage() ); methodCompilerPipeline.InsertBefore<CodeGenerationStage>( new JumpPeepholeOptimizationStage() ); }
/// <summary> /// Extends the method compiler pipeline with ARMv6 specific stages. /// </summary> /// <param name="methodCompilerPipeline">The method compiler pipeline to extend.</param> public override void ExtendMethodCompilerPipeline(CompilerPipeline methodCompilerPipeline) { methodCompilerPipeline.InsertAfterLast<PlatformStubStage>( new IMethodCompilerStage[] { //new LongOperandTransformationStage(), new IRTransformationStage(), }); //methodCompilerPipeline.InsertAfterLast<CodeGenerationStage>( // new ExceptionLayoutStage() //); methodCompilerPipeline.InsertBefore<GreedyRegisterAllocatorStage>( new StopStage() ); }