copied mono-api-diff.cs from mono-2-2 branch so new patch can be applied and history...
[mono.git] / mcs / class / Mono.Cecil / Mono.Cecil.Metadata / MetadataRowReader.cs
index 00628acb6b4431b668876641b748a4c1ad7909b6..c8b537459157374d5799e067f068d467a2570a75 100644 (file)
@@ -5,7 +5,7 @@
 //   Jb Evain (jbevain@gmail.com)
 //
 // Generated by /CodeGen/cecil-gen.rb do not edit
-// Thu Feb 22 14:39:38 CET 2007
+// Sat Feb 16 23:24:17 +0100 2008
 //
 // (C) 2005 Jb Evain
 //
 
 namespace Mono.Cecil.Metadata {
 
+       using System;
        using System.Collections;
        using System.IO;
 
        using Mono.Cecil.Binary;
 
-       class MetadataRowReader : BaseMetadataRowVisitor {
+       sealed class MetadataRowReader : BaseMetadataRowVisitor {
 
                MetadataTableReader m_mtrv;
                BinaryReader m_binaryReader;
                MetadataRoot m_metadataRoot;
-               IDictionary m_ciCache;
+
+               Utilities.TableRowCounter m_counter;
+               int [] m_ciCache;
 
                int m_blobHeapIdxSz;
                int m_stringsHeapIdxSz;
@@ -52,7 +55,8 @@ namespace Mono.Cecil.Metadata {
                        m_mtrv = mtrv;
                        m_binaryReader = mtrv.GetReader ();
                        m_metadataRoot = mtrv.GetMetadataRoot ();
-                       m_ciCache = new Hashtable ();
+                       m_ciCache = new int [13];
+                       m_counter = new Utilities.TableRowCounter (m_mtrv.GetNumberOfRows);
                }
 
                int GetIndexSize (int rid)
@@ -62,8 +66,7 @@ namespace Mono.Cecil.Metadata {
 
                int GetCodedIndexSize (CodedIndex ci)
                {
-                       return Utilities.GetCodedIndexSize (ci,
-                               new Utilities.TableRowCounter (m_mtrv.GetNumberOfRows), m_ciCache);
+                       return Utilities.GetCodedIndexSize (ci, m_counter, m_ciCache);
                }
 
                uint ReadByIndexSize (int size)