コード例 #1
0
ファイル: Compilation.cs プロジェクト: tijoytom/corert
        public Compilation(CompilationOptions options, CompilerTypeSystemContext context, CompilationModuleGroup compilationGroup)
        {
            _options = options;

            _nameMangler = new NameMangler(options.IsCppCodeGen);

            _typeSystemContext = context;
            _compilationModuleGroup = compilationGroup;
        }
コード例 #2
0
ファイル: Compilation.cs プロジェクト: shahid-pk/corert
        public Compilation(CompilationOptions options)
        {
            _options = options;

            _typeSystemContext = new CompilerTypeSystemContext(new TargetDetails(options.TargetArchitecture, options.TargetOS));
            _typeSystemContext.InputFilePaths = options.InputFilePaths;
            _typeSystemContext.ReferenceFilePaths = options.ReferenceFilePaths;

            _typeSystemContext.SetSystemModule(_typeSystemContext.GetModuleForSimpleName(options.SystemModuleName));

            _nameMangler = new NameMangler(this);

            _typeInitManager = new TypeInitialization();

            if (options.MultiFile)
            {
                _compilationModuleGroup = new MultiFileCompilationModuleGroup(_typeSystemContext, this);
            }
            else
            {
                _compilationModuleGroup = new SingleFileCompilationModuleGroup(_typeSystemContext, this);
            }
        }
コード例 #3
0
 public PreinitializationInfoHashtable(CompilationModuleGroup compilationGroup, ILProvider ilProvider)
 {
     _compilationGroup = compilationGroup;
     _ilProvider       = ilProvider;
 }
コード例 #4
0
        public ReadyToRunCodegenCompilationBuilder(CompilerTypeSystemContext context, CompilationModuleGroup group, string inputFilePath)
            : base(context, group, new CoreRTNameMangler())
        {
            _inputFilePath = inputFilePath;
            _inputModule   = context.GetModuleFromPath(_inputFilePath);

            // R2R field layout needs compilation group information
            ((ReadyToRunCompilerContext)context).SetCompilationGroup(group);
        }
コード例 #5
0
 public void SetCompilationGroup(CompilationModuleGroup compilationModuleGroup)
 {
     _r2rFieldLayoutAlgorithm.SetCompilationGroup(compilationModuleGroup);
 }
コード例 #6
0
 public RyuJitCompilationBuilder(CompilerTypeSystemContext context, CompilationModuleGroup group)
     : base(new RyuJitNodeFactory(context, group))
 {
 }
コード例 #7
0
 public ILScannerBuilder GetILScannerBuilder(CompilationModuleGroup compilationGroup = null)
 {
     return(new ILScannerBuilder(_context, compilationGroup ?? _compilationGroup, _nameMangler));
 }
コード例 #8
0
 private static InteropStubManager NewEmptyInteropStubManager(CompilerTypeSystemContext context, CompilationModuleGroup compilationModuleGroup)
 {
     // On Project N, the compiler doesn't generate the interop code on the fly
     return(new EmptyInteropStubManager(compilationModuleGroup, context, null));
 }
コード例 #9
0
 public RyuJitCompilationBuilder(CompilerTypeSystemContext context, CompilationModuleGroup group)
     : base(context, group,
            new CoreRTNameMangler(context.Target.IsWindows ? (NodeMangler) new WindowsNodeMangler() : (NodeMangler) new UnixNodeMangler(), false))
 {
 }
コード例 #10
0
ファイル: ILScannerBuilder.cs プロジェクト: tedd/corert
 internal ILScannerBuilder(CompilerTypeSystemContext context, CompilationModuleGroup compilationGroup, NameMangler mangler)
 {
     _context          = context;
     _compilationGroup = compilationGroup;
     _nameMangler      = mangler;
 }
コード例 #11
0
        public ReadyToRunCodegenCompilationBuilder(CompilerTypeSystemContext context, CompilationModuleGroup group, string inputFilePath)
            : base(context, group, new CoreRTNameMangler(new ReadyToRunNodeMangler(), false))
        {
            _inputFilePath           = inputFilePath;
            _devirtualizationManager = new DependencyAnalysis.ReadyToRun.DevirtualizationManager(group);

            _inputModule = context.GetModuleFromPath(_inputFilePath);
        }
コード例 #12
0
        private static MetadataManager PickMetadataManager(CompilerTypeSystemContext context, CompilationModuleGroup compilationModuleGroup, IEnumerable <ModuleDesc> inputModules, IEnumerable <ModuleDesc> inputMetadataOnlyAssemblies, string metadataFile, bool emitStackTraceMetadata, bool disableExceptionMessages, bool disableInvokeThunks)
        {
            if (metadataFile == null)
            {
                return(new EmptyMetadataManager(context));
            }
            else
            {
                // Set Policies according to passed arguments
                StackTraceEmissionPolicy stackTraceEmissionPolicy;
                if (emitStackTraceMetadata)
                {
                    stackTraceEmissionPolicy = new UtcStackTraceEmissionPolicy();
                }
                else
                {
                    stackTraceEmissionPolicy = new NoStackTraceEmissionPolicy();
                }

                ManifestResourceBlockingPolicy resourceBlockingPolicy;
                if (disableExceptionMessages)
                {
                    resourceBlockingPolicy = new FrameworkStringResourceBlockingPolicy();
                }
                else
                {
                    resourceBlockingPolicy = new NoManifestResourceBlockingPolicy();
                }

                return(new PrecomputedMetadataManager(compilationModuleGroup, context, FindMetadataDescribingModuleInInputSet(inputModules), inputModules, inputMetadataOnlyAssemblies, ReadBytesFromFile(metadataFile), stackTraceEmissionPolicy, resourceBlockingPolicy, disableInvokeThunks));
            }
        }
コード例 #13
0
ファイル: EmptyMetadataManager.cs プロジェクト: tedd/corert
 public EmptyMetadataManager(CompilationModuleGroup group, CompilerTypeSystemContext typeSystemContext)
     : base(group, typeSystemContext, new FullyBlockedMetadataPolicy(), new NoStackTraceEmissionPolicy())
 {
 }
コード例 #14
0
ファイル: MetadataManager.cs プロジェクト: weshaggard/corert
 public MetadataManager(CompilationModuleGroup compilationModuleGroup, CompilerTypeSystemContext typeSystemContext, MetadataBlockingPolicy blockingPolicy)
 {
     _compilationModuleGroup = compilationModuleGroup;
     _typeSystemContext      = typeSystemContext;
     _blockingPolicy         = blockingPolicy;
 }
コード例 #15
0
 private static MetadataManager PickMetadataManager(CompilerTypeSystemContext context, CompilationModuleGroup compilationModuleGroup, IEnumerable <ModuleDesc> inputModules, IEnumerable <ModuleDesc> inputMetadataOnlyAssemblies, string metadataFile)
 {
     if (metadataFile == null)
     {
         return(new EmptyMetadataManager(context));
     }
     else
     {
         return(new PrecomputedMetadataManager(compilationModuleGroup, context, FindMetadataDescribingModuleInInputSet(inputModules), inputModules, inputMetadataOnlyAssemblies, ReadBytesFromFile(metadataFile), new UtcStackTraceEmissionPolicy(), new NoManifestResourceBlockingPolicy()));
     }
 }
コード例 #16
0
 public PreinitializationManager(TypeSystemContext context, CompilationModuleGroup compilationGroup, ILProvider ilprovider, bool enableInterpreter)
 {
     _supportsLazyCctors = context.SystemModule.GetType("System.Runtime.CompilerServices", "ClassConstructorRunner", throwIfNotFound: false) != null;
     _preinitHashTable   = new PreinitializationInfoHashtable(compilationGroup, ilprovider);
     _enableInterpreter  = enableInterpreter;
 }
コード例 #17
0
 public MetadataManager(CompilationModuleGroup compilationModuleGroup, CompilerTypeSystemContext typeSystemContext)
 {
     _compilationModuleGroup = compilationModuleGroup;
     _typeSystemContext      = typeSystemContext;
 }
コード例 #18
0
 public InteropStubManager(CompilationModuleGroup compilationModuleGroup, CompilerTypeSystemContext typeSystemContext, InteropStateManager interopStateManager)
 {
     _compilationModuleGroup = compilationModuleGroup;
     _typeSystemContext      = typeSystemContext;
     InteropStateManager     = interopStateManager;
 }
コード例 #19
0
 private static MetadataManager PickMetadataManager(CompilerTypeSystemContext context, CompilationModuleGroup compilationModuleGroup, IEnumerable <ModuleDesc> inputModules, string metadataFile)
 {
     if (metadataFile == null)
     {
         return(new EmptyMetadataManager(compilationModuleGroup, context));
     }
     else
     {
         return(new PrecomputedMetadataManager(compilationModuleGroup, context, FindMetadataDescribingModuleInInputSet(inputModules), inputModules, ReadBytesFromFile(metadataFile)));
     }
 }
 public CompilerGeneratedInteropStubManager(CompilationModuleGroup compilationModuleGroup, CompilerTypeSystemContext typeSystemContext, InteropStateManager interopStateManager) :
     base(compilationModuleGroup, typeSystemContext, interopStateManager)
 {
 }
コード例 #21
0
 public CompilationBuilder(CompilerTypeSystemContext context, CompilationModuleGroup compilationGroup)
 {
     _context          = context;
     _compilationGroup = compilationGroup;
 }
コード例 #22
0
 public WebAssemblyCodegenCompilationBuilder(CompilerTypeSystemContext context, CompilationModuleGroup group)
     : base(context, group, new CoreRTNameMangler(new WebAssemblyNodeMangler(), false))
 {
 }
コード例 #23
0
 public CppCodegenCompilationBuilder(CompilerTypeSystemContext context, CompilationModuleGroup group)
     : base(new CppCodegenNodeFactory(context, group))
 {
 }
コード例 #24
0
 public EmptyMetadataManager(CompilationModuleGroup group, CompilerTypeSystemContext typeSystemContext) : base(group, typeSystemContext)
 {
 }
コード例 #25
0
 public CompilationBuilder(CompilerTypeSystemContext context, CompilationModuleGroup compilationGroup, NameMangler nameMangler)
 {
     _context          = context;
     _compilationGroup = compilationGroup;
     _nameMangler      = nameMangler;
 }
コード例 #26
0
 public CompilerGeneratedMetadataManager(CompilationModuleGroup group, CompilerTypeSystemContext typeSystemContext) : base(group, typeSystemContext)
 {
     _metadataPolicy = new GeneratedTypesAndCodeMetadataPolicy(this);
 }
コード例 #27
0
 public CppCodegenCompilationBuilder(CompilerTypeSystemContext context, CompilationModuleGroup group)
     : base(context, group, new CoreRTNameMangler(new CppNodeMangler(), true))
 {
 }
コード例 #28
0
 public RyuJitCompilationBuilder(CompilerTypeSystemContext context, CompilationModuleGroup group)
     : base(new RyuJitNodeFactory(context, group))
 {
 }
コード例 #29
0
 public ILCache(ILProvider provider, CompilationModuleGroup compilationModuleGroup)
 {
     ILProvider = provider;
     _compilationModuleGroup = compilationModuleGroup;
 }
コード例 #30
0
        public ReadyToRunCodegenCompilationBuilder(CompilerTypeSystemContext context, CompilationModuleGroup group, IEnumerable <string> inputFiles)
            : base(context, group, new CoreRTNameMangler())
        {
            _inputFiles = inputFiles;

            // R2R field layout needs compilation group information
            ((ReadyToRunCompilerContext)context).SetCompilationGroup(group);
        }
コード例 #31
0
 public CppCodegenCompilationBuilder(CompilerTypeSystemContext context, CompilationModuleGroup group)
     : base(new CppCodegenNodeFactory(context, group))
 {
 }
コード例 #32
0
 public RyuJitCompilationBuilder(CompilerTypeSystemContext context, CompilationModuleGroup group)
     : base(context, group)
 {
 }
コード例 #33
0
 /// <summary>
 /// Set up compilation group needed for proper calculation of base class alignment in auto layout.
 /// </summary>
 /// <param name="compilationGroup"></param>
 public void SetCompilationGroup(CompilationModuleGroup compilationGroup)
 {
     _compilationGroup = compilationGroup;
 }
コード例 #34
0
ファイル: Compilation.cs プロジェクト: shenglixu/corert
        public Compilation(CompilationOptions options, CompilerTypeSystemContext context, CompilationModuleGroup compilationGroup)
        {
            _options = options;

            _nameMangler = new NameMangler(options.IsCppCodeGen);

            _typeSystemContext      = context;
            _compilationModuleGroup = compilationGroup;
        }