Beispiel #1
0
 public UtcNodeFactory(CompilerTypeSystemContext context, CompilationModuleGroup compilationModuleGroup, string outputFile)
     : base(context, compilationModuleGroup)
 {
     CreateHostedNodeCaches();
     CompilationUnitPrefix = Path.GetFileNameWithoutExtension(outputFile);
     ThreadStaticsIndex    = new ThreadStaticsIndexNode(CompilationUnitPrefix);
 }
Beispiel #2
0
 public UtcNodeFactory(
     CompilerTypeSystemContext context,
     CompilationModuleGroup compilationModuleGroup,
     IEnumerable <ModuleDesc> inputModules,
     IEnumerable <ModuleDesc> inputMetadataOnlyAssemblies,
     string metadataFile,
     string outputFile,
     UTCNameMangler nameMangler,
     bool buildMRT,
     bool emitStackTraceMetadata,
     bool disableExceptionMessages,
     bool allowInvokeThunks,
     DictionaryLayoutProvider dictionaryLayoutProvider,
     ImportedNodeProvider importedNodeProvider)
     : base(context,
            compilationModuleGroup,
            PickMetadataManager(context, compilationModuleGroup, inputModules, inputMetadataOnlyAssemblies, metadataFile, emitStackTraceMetadata, disableExceptionMessages, allowInvokeThunks),
            NewEmptyInteropStubManager(context, compilationModuleGroup),
            nameMangler,
            new AttributeDrivenLazyGenericsPolicy(),
            null,
            dictionaryLayoutProvider,
            importedNodeProvider)
 {
     CreateHostedNodeCaches();
     CompilationUnitPrefix = nameMangler.CompilationUnitPrefix;
     ThreadStaticsIndex    = new ThreadStaticsIndexNode(nameMangler.GetCurrentModuleTlsIndexPrefix());
     targetPrefix          = context.Target.Architecture == TargetArchitecture.X86 ? "_" : "";
     TLSDirectory          = new ThreadStaticsDirectoryNode(targetPrefix);
     TlsStart       = new ExternSymbolNode(targetPrefix + "_tls_start");
     TlsEnd         = new ExternSymbolNode(targetPrefix + "_tls_end");
     LoopHijackFlag = new LoopHijackFlagNode();
     this.buildMRT  = buildMRT;
 }
Beispiel #3
0
 public UtcNodeFactory(CompilerTypeSystemContext context, CompilationModuleGroup compilationModuleGroup, IEnumerable <ModuleDesc> inputModules, string metadataFile, string outputFile, UTCNameMangler nameMangler)
     : base(context, compilationModuleGroup, PickMetadataManager(context, compilationModuleGroup, inputModules, metadataFile), nameMangler)
 {
     CreateHostedNodeCaches();
     CompilationUnitPrefix = nameMangler.CompilationUnitPrefix;
     ThreadStaticsIndex    = new ThreadStaticsIndexNode(nameMangler.GetCurrentModuleTlsIndexPrefix());
     targetPrefix          = context.Target.Architecture == TargetArchitecture.X86 ? "_" : "";
     TLSDirectory          = new ThreadStaticsDirectoryNode(targetPrefix);
     TlsStart = new ExternSymbolNode(targetPrefix + "_tls_start");
     TlsEnd   = new ExternSymbolNode(targetPrefix + "_tls_end");
 }
Beispiel #4
0
 public ISymbolNode TypeThreadStaticsIndexSymbol(TypeDesc type)
 {
     if (CompilationModuleGroup.ContainsType(type))
     {
         return(ThreadStaticsIndex);
     }
     else
     {
         return(ExternSymbol(ThreadStaticsIndexNode.GetMangledName((NameMangler as UTCNameMangler).GetImportedTlsIndexPrefix())));
     }
 }
Beispiel #5
0
 public UtcNodeFactory(CompilerTypeSystemContext context, CompilationModuleGroup compilationModuleGroup, IEnumerable <ModuleDesc> inputModules, string metadataFile, string outputFile)
     : base(context, compilationModuleGroup, PickMetadataManager(context, compilationModuleGroup, inputModules, metadataFile))
 {
     CreateHostedNodeCaches();
     CompilationUnitPrefix    = Path.GetFileNameWithoutExtension(outputFile);
     ThreadStaticsIndex       = new ThreadStaticsIndexNode(CompilationUnitPrefix);
     ThreadStaticsStartOffset = new ThreadStaticsStartNode();
     targetPrefix             = context.Target.Architecture == TargetArchitecture.X86 ? "_" : "";
     TLSDirectory             = new ThreadStaticsDirectoryNode(targetPrefix);
     TlsStart = new ExternSymbolNode(targetPrefix + "_tls_start");
     TlsEnd   = new ExternSymbolNode(targetPrefix + "_tls_end");
 }
Beispiel #6
0
 public UtcNodeFactory(CompilerTypeSystemContext context, CompilationModuleGroup compilationModuleGroup, IEnumerable <ModuleDesc> inputModules, string metadataFile, string outputFile, UTCNameMangler nameMangler, bool buildMRT)
     : base(context, compilationModuleGroup, PickMetadataManager(context, compilationModuleGroup, inputModules, metadataFile), NewEmptyInteropStubManager(context, compilationModuleGroup), nameMangler, new AttributeDrivenLazyGenericsPolicy(), null, new UtcDictionaryLayoutProvider())
 {
     CreateHostedNodeCaches();
     CompilationUnitPrefix = nameMangler.CompilationUnitPrefix;
     ThreadStaticsIndex    = new ThreadStaticsIndexNode(nameMangler.GetCurrentModuleTlsIndexPrefix());
     targetPrefix          = context.Target.Architecture == TargetArchitecture.X86 ? "_" : "";
     TLSDirectory          = new ThreadStaticsDirectoryNode(targetPrefix);
     TlsStart      = new ExternSymbolNode(targetPrefix + "_tls_start");
     TlsEnd        = new ExternSymbolNode(targetPrefix + "_tls_end");
     this.buildMRT = buildMRT;
 }
Beispiel #7
0
 public ISortableSymbolNode TypeThreadStaticsIndexSymbol(TypeDesc type)
 {
     if (CompilationModuleGroup.ContainsType(type))
     {
         return(ThreadStaticsIndex);
     }
     else if (CompilationModuleGroup.ShouldReferenceThroughImportTable(type))
     {
         return(_importedThreadStaticsIndices.GetOrAdd((MetadataType)type));
     }
     else
     {
         return(ExternSymbol(ThreadStaticsIndexNode.GetMangledName((NameMangler as UTCNameMangler).GetImportedTlsIndexPrefix())));
     }
 }