anchor.diff:  
   
   
  -
  
positive.code: let OpenILModuleReader infile opts = 
  
     try 
          let mmap = MMapChannel.OpenIn infile
          let modul,ilAssemblyRefs,pdb = genOpenBinaryReader infile (MMap mmap) opts
          { modul = modul; 
            ilAssemblyRefs=ilAssemblyRefs;
            dispose = (fun () -> 
              mmap.Close();
              ClosePdbReader pdb) }
      with :? System.DllNotFoundException ->
          let stream = FileSystem.FileStreamReadShim infile
          let is = new BinaryReader(stream)
          let cell = ref (Some is)
          let modul,ilAssemblyRefs,pdb = genOpenBinaryReader infile (Chan (infile,cell)) opts
          { modul = modul; 
            ilAssemblyRefs = ilAssemblyRefs;
            dispose = (fun () -> 
              cell := None;
              is.Close();
              ClosePdbReader pdb) }
  
  // ++GLOBAL MUTABLE STATE
  
negative.code: let logging = false
  let _ = if checking then dprintn "warning : Ilread.checking is on"
  
  let singleOfBits (x:int32) = System.BitConverter.ToSingle(System.BitConverter.GetBytes(x),0)
  let doubleOfBits (x:int64) = System.BitConverter.Int64BitsToDouble(x)
  
  //---------------------------------------------------------------------
  // Utilities.  
  //---------------------------------------------------------------------
  
  let align alignment n = ((n + alignment - 0x1) / alignment) * alignment
  
  let uncodedToken (tab:TableName) idx = ((tab.Index <<< 24) ||| idx)
  
  let i32ToUncodedToken tok  = 
      let idx = tok &&& 0xffffff
      let tab = tok >>>& 24
      (TableName.FromIndex tab,  idx)
  
  
  [<Struct>]
  type TaggedIndex<'T> = 
      val tag: 'T
      val index : int32
      new(tag,index) = { tag=tag; index=index }
  
  let uncodedTokenToTypeDefOrRefOrSpec (tab,tok) = 
      let tag =
          if tab = TableNames.TypeDef then tdor_TypeDef 
          elif tab = TableNames.TypeRef then tdor_TypeRef
          elif tab = TableNames.TypeSpec then tdor_TypeSpec
          else failwith "bad table in uncodedTokenToTypeDefOrRefOrSpec" 
      TaggedIndex(tag,tok)
  
  let uncodedTokenToMethodDefOrRef (tab,tok) = 
      let tag =
          if tab = TableNames.Method then mdor_MethodDef 
          elif tab = TableNames.MemberRef then mdor_MemberRef
          else failwith "bad table in uncodedTokenToMethodDefOrRef" 
      TaggedIndex(tag,tok)
  
  let (|TaggedIndex|) (x:TaggedIndex<'T>) = x.tag, x.index    
  let tokToTaggedIdx f nbits tok = 
      let tagmask = 
          if nbits = 1 then 1 
          elif nbits = 2 then 3 
          elif nbits = 3 then 7 
          elif nbits = 4 then 15 
             elif nbits = 5 then 31 
             else failwith "too many nbits"
      let tag = tok &&& tagmask
      let idx = tok >>>& nbits
      TaggedIndex(f tag, idx) 
         
  
  [<AbstractClass>]
  type BinaryFile() = 
      abstract ReadByte : addr:int -> byte
      abstract ReadBytes : addr:int -> int -> byte[]
      abstract ReadInt32 : addr:int -> int
      abstract ReadUInt16 : addr:int -> uint16
      abstract CountUtf8String : addr:int -> int
      abstract ReadUTF8String : addr: int -> string
  
  /// Read file from memory mapped files
  module MemoryMapping = 
  