anchor.diff:      let private mangleStaticStringArg (nm:string,v:string) = 
           nm + "=" + "\"" + v.Replace("\\", "\\\\").Replace("\"", "\\\"") + "\""
   
  -    let private tryDemangleStaticStringArg (mangledText:string) = 
  -        let pieces = splitAroundQuotationWithCount mangledText '=' 2
  -        if pieces.Length <> 2 then None else
  -        let nm = pieces.[0]
  -        let v = pieces.[1]
  -        if v.Length >= 2 then 
  -            Some(nm,v.[1..v.Length-2].Replace("\\\\","\\").Replace("\\\"","\""))
  -        else
  -            Some(nm,v)
  +    let private tryDemangleStaticStringArg (mangledText:string) =
  +        match splitAroundQuotationWithCount mangledText '=' 2 with
  +        | [| nm; v |] ->
  +            if v.Length >= 2 then
  +                Some(nm,v.[1..v.Length-2].Replace("\\\\","\\").Replace("\\\"","\""))
  +            else
  +                Some(nm,v)
  +        | _ -> None
   
       // Demangle the static parameters
       exception InvalidMangledStaticArg of string
  
positive.code:         ( ')', "RParen");
          ( ' ', "Space");
          ( '[', "LBrack");
          ( ']', "RBrack"); ]
  
      let private opCharDict = 
          let t = new Dictionary<_,_>()
          for (c,_) in opCharTranslateTable do 
              t.Add(c,1)
          t
          
      let IsOpName (n:string) =
          let rec loop i = (i < n.Length && (opCharDict.ContainsKey(n.[i]) || loop (i+1)))
          loop 0
  
      let CompileOpName =
          let t = Map.ofList opNameTable
          let t2 = Map.ofList opCharTranslateTable
          fun n -> 
              match t.TryFind(n) with 
              | Some(x) -> x 
              | None -> 
                  if IsOpName n then 
                    let mutable r = []
                    for i = 0 to String.length n - 1 do
                        let c = n.[i]
                        let c2 = match t2.TryFind(c) with Some(x) -> x | None -> string c
                        r <- c2 :: r 
                    "op_"^(String.concat "" (List.rev r))
                  else n
  
      let IsMangledOpName (n:string) = n.Length >= 3 && n.Substring(0,3) = "op_"     
                               
      let DecompileOpName = 
        let t = new Dictionary<string,string>()
        for (x,y) in opNameTable do
            t.Add(y,x)
        fun n -> 
            let mutable res = Unchecked.defaultof<_>
            if t.TryGetValue(n,&res) then 
                res
            else
                if n.StartsWith("op_",System.StringComparison.Ordinal) then 
                  let rec loop (remaining:string) = 
                      let l = remaining.Length
                      if l = 0 then Some(remaining) else
                      let choice = 
                        opCharTranslateTable |> List.tryPick (fun (a,b) -> 
                            let bl = b.Length
                            if bl <= l && remaining.Substring(0,bl) = b then 
                              Some(string a, remaining.Substring(bl,l - bl)) 
                            else None) 
                          
                      match choice with 
                      | Some (a,remaining2) -> 
                          match loop remaining2 with 
                          | None -> None
                          | Some a2 -> Some(a^a2)
                      | None -> None (* giveup *)
                  match loop (n.Substring(3,n.Length - 3)) with
                  | Some res -> res
                  | None -> n
                else n
                    
      let opNameCons = CompileOpName "::"
      let opNameNil = CompileOpName "[]"
  
negative.code: 
      let private chopStringTo (s:string) (c:char) =
          (* chopStringTo "abcdef" 'c' --> "def" *)
          match s.IndexOf c with
          | -1 -> s
          | idx ->
              let i = idx + 1
              s.Substring(i, s.Length - i)
  
      /// Try to chop "get_" or "set_" from a string
      let TryChopPropertyName (s: string) =
          // extract the logical name from any mangled name produced by MakeMemberDataAndMangledNameForMemberVal
          if s.Length <= 4 then None else
          if s.StartsWith("get_", System.StringComparison.Ordinal) ||
             s.StartsWith("set_", System.StringComparison.Ordinal)
          then Some (s.Substring(4, s.Length - 4))
          else
          let s = chopStringTo s '.'
          if s.StartsWith("get_", System.StringComparison.Ordinal) ||
             s.StartsWith("set_", System.StringComparison.Ordinal)
          then Some (s.Substring(4, s.Length - 4))
          else None
  
      /// Try to chop "get_" or "set_" from a string.
      /// If the string does not start with "get_" or "set_", this function raises an exception.
      let ChopPropertyName s =
          match TryChopPropertyName s with 
          | None -> 
              failwithf "Invalid internal property name: '%s'" s
          | Some res -> res
  
      let SplitNamesForILPath (s : string) : string list = 
          if s.StartsWith("``",System.StringComparison.Ordinal) && s.EndsWith("``",System.StringComparison.Ordinal) && s.Length > 4 then [s.Substring(2, s.Length-4)] // identifier is enclosed in `` .. ``, so it is only a single element (this is very approximate)
  