Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
pub
frama-c
Commits
f3ca3696
Commit
f3ca3696
authored
Aug 02, 2019
by
Julien Signoles
Browse files
optimize Gmp.init_t a bit
parent
facfd007
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/plugins/e-acsl/gmp.ml
View file @
f3ca3696
...
...
@@ -77,19 +77,30 @@ module Q = Make(struct end)
let
init_t
()
=
Options
.
feedback
~
level
:
2
"initializing GMP types."
;
let
set_mp_t
=
object
let
set_mp_t
=
object
(
self
)
inherit
Cil
.
nopCilVisitor
(* exit after having initialized both Z.t and Q.t *)
val
mutable
visited
=
false
method
private
set
f
info
=
f
info
;
if
visited
then
raise
Exit
else
begin
visited
<-
true
;
Cil
.
SkipChildren
end
method
!
vglob
=
function
|
GType
({
torig_name
=
s
}
as
info
,
_
)
when
s
=
"__e_acsl_mpz_t"
->
Z
.
set_t
info
;
Cil
.
SkipChildren
self
#
set
Z
.
set_t
info
|
GType
({
torig_name
=
s
}
as
info
,
_
)
when
s
=
"__e_acsl_mpq_t"
->
Q
.
set_t
info
;
Cil
.
SkipChildren
self
#
set
Q
.
set_t
info
|
_
->
Cil
.
SkipChildren
end
in
Cil
.
visitCilFileSameGlobals
set_mp_t
(
Ast
.
get
()
)
try
Cil
.
visitCilFileSameGlobals
set_mp_t
(
Ast
.
get
()
)
with
Exit
->
()
(**************************************************************************)
(************************* Calls to builtins ******************************)
...
...
src/plugins/e-acsl/loops.ml
View file @
f3ca3696
...
...
@@ -309,7 +309,7 @@ let rec mk_nested_loops ~loc mk_innermost_block kf env lscope_vars =
let
stmts
,
env
=
mk_nested_loops
~
loc
mk_innermost_block
kf
env
lscope_vars'
in
(* remove logic binding now that the block is constructed *)
(* remove
the
logic binding now that the block is constructed *)
Env
.
Logic_binding
.
remove
env
lv
;
(* return *)
let_stmt
::
stmts
,
env
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment