Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/cecil.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjbevain <jbevain@gmail.com>2011-03-27 13:32:33 +0400
committerjbevain <jbevain@gmail.com>2011-03-27 13:32:33 +0400
commit16104a9ab0d0cc034fbe8636b754c52d2f2f76f1 (patch)
tree64e9743c6a25a626acbb89d515d126dc308245a2 /Mono.Cecil.Metadata
parent7ea463ccd0c2045a506f3cc7408b27fc3d6ed6bc (diff)
Reduce TableHeap initializer size
Diffstat (limited to 'Mono.Cecil.Metadata')
-rw-r--r--Mono.Cecil.Metadata/TableHeap.cs56
1 files changed, 8 insertions, 48 deletions
diff --git a/Mono.Cecil.Metadata/TableHeap.cs b/Mono.Cecil.Metadata/TableHeap.cs
index 40bbca8..2705c51 100644
--- a/Mono.Cecil.Metadata/TableHeap.cs
+++ b/Mono.Cecil.Metadata/TableHeap.cs
@@ -90,56 +90,16 @@ namespace Mono.Cecil.Metadata {
public long Valid;
public long Sorted;
- public static readonly Table [] TableIdentifiers = new [] {
- Table.Module,
- Table.TypeRef,
- Table.TypeDef,
- Table.FieldPtr,
- Table.Field,
- Table.MethodPtr,
- Table.Method,
- Table.ParamPtr,
- Table.Param,
- Table.InterfaceImpl,
- Table.MemberRef,
- Table.Constant,
- Table.CustomAttribute,
- Table.FieldMarshal,
- Table.DeclSecurity,
- Table.ClassLayout,
- Table.FieldLayout,
- Table.StandAloneSig,
- Table.EventMap,
- Table.EventPtr,
- Table.Event,
- Table.PropertyMap,
- Table.PropertyPtr,
- Table.Property,
- Table.MethodSemantics,
- Table.MethodImpl,
- Table.ModuleRef,
- Table.TypeSpec,
- Table.ImplMap,
- Table.FieldRVA,
- Table.EncLog,
- Table.EncMap,
- Table.Assembly,
- Table.AssemblyProcessor,
- Table.AssemblyOS,
- Table.AssemblyRef,
- Table.AssemblyRefProcessor,
- Table.AssemblyRefOS,
- Table.File,
- Table.ExportedType,
- Table.ManifestResource,
- Table.NestedClass,
- Table.GenericParam,
- Table.MethodSpec,
- Table.GenericParamConstraint,
- };
-
+ public static readonly Table [] TableIdentifiers;
public readonly TableInformation [] Tables = new TableInformation [45];
+ static TableHeap ()
+ {
+ TableIdentifiers = new Table [45];
+ for (int i = 0; i < TableIdentifiers.Length; i++)
+ TableIdentifiers [i] = (Table) i;
+ }
+
public TableInformation this [Table table] {
get { return Tables [(int) table]; }
}