Exemplo n.º 1
0
 public string ResolveStringToSlot(string str)
 {
     if (stringSlots == null)
     {
         // String slots are only used as object fields
         stringSlots = new SlotAllocation <string>(env.DebugMode, NameFlavor.Identifier, FriendlyStringName);
         // Collect statistincs on string literals
         var stringStats = new StringStats();
         stringStats.Collect(env.Global, assemblyDef, typeDef);
         // Setup slots for shared strings
         foreach (var kv in stringStats)
         {
             if (kv.Value == StringBindScope.Type)
             {
                 stringSlots.Add(kv.Key);
             }
         }
     }
     return(stringSlots.HasSlot(str) ? stringSlots.For(ctxt, str) : null);
 }
Exemplo n.º 2
0
 public string ResolvePropertyToSlot(CST.QualifiedMemberName name)
 {
     return(propSlots.For(ctxt, name));
 }
Exemplo n.º 3
0
 public string ResolveEventToSlot(CST.QualifiedMemberName name)
 {
     return(eventSlots.For(ctxt, name));
 }
Exemplo n.º 4
0
 public string ResolveFieldToSlot(CST.QualifiedMemberName name)
 {
     return(fieldSlots.For(ctxt, name));
 }
Exemplo n.º 5
0
 public string ResolveMethodToSlot(CST.QualifiedMemberName name)
 {
     return(methodSlots.For(ctxt, name));
 }
Exemplo n.º 6
0
 public string ResolveAssemblyReferenceToSlot(CST.AssemblyName assemblyName)
 {
     return(referencedAssemblies.For(ctxt, assemblyName));
 }
Exemplo n.º 7
0
 public string ResolveTypeDefinitionToSlot(CST.TypeName name)
 {
     return(types.For(ctxt, name));
 }