Skip to content
Snippets Groups Projects
Commit 814c4cac authored by Kilyan Le Gallic's avatar Kilyan Le Gallic
Browse files

[wp] Reduced number of calls to String.concat to remove non-necessary buffer allocations

parent 5a9d5ea4
No related branches found
No related tags found
No related merge requests found
...@@ -58,18 +58,21 @@ let construct_acsl_name (id : W.Ident.ident) = ...@@ -58,18 +58,21 @@ let construct_acsl_name (id : W.Ident.ident) =
let (paths,name,scopes) = T.restore_path id in let (paths,name,scopes) = T.restore_path id in
match List.rev scopes with match List.rev scopes with
| (t::q) -> | (t::q) ->
let modscopes = "::" ^ name ^ "::" ^ (String.concat "::" (List.rev_append q [(of_infix t)])) in let modscopes = List.rev_append q [(of_infix t)] in
(String.concat "::" paths) ^ modscopes String.concat "::" (paths @ name::modscopes)
| [] -> "" | [] -> ""
(* For debug only*) (* For debug only*)
let pp_id fmt (id: W.Ident.ident) = let pp_id fmt (id: W.Ident.ident) =
Format.pp_print_string fmt id.id_string Format.pp_print_string fmt id.id_string
(* For debug only*)
let pp_tys fmt (tys: W.Ty.tysymbol) = let pp_tys fmt (tys: W.Ty.tysymbol) =
W.Pretty.print_ty_decl fmt tys W.Pretty.print_ty_decl fmt tys
(* For debug only*)
let pp_ls fmt ls = let pp_ls fmt ls =
W.Pretty.print_ls fmt ls W.Pretty.print_ls fmt ls
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment