Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
frama-c
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pub
frama-c
Commits
814c4cac
Commit
814c4cac
authored
11 months ago
by
Kilyan Le Gallic
Browse files
Options
Downloads
Patches
Plain Diff
[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
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/plugins/wp/Why3Import.ml
+5
-2
5 additions, 2 deletions
src/plugins/wp/Why3Import.ml
with
5 additions
and
2 deletions
src/plugins/wp/Why3Import.ml
+
5
−
2
View file @
814c4cac
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment