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
ee52527e
Commit
ee52527e
authored
5 years ago
by
Basile Desloges
Browse files
Options
Downloads
Patches
Plain Diff
[eacsl:codegen] Remove the moving of variables declarations from switch to upper blocks
parent
d1291507
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/plugins/e-acsl/src/project_initializer/prepare_ast.ml
+1
-12
1 addition, 12 deletions
src/plugins/e-acsl/src/project_initializer/prepare_ast.ml
src/plugins/e-acsl/src/project_initializer/prepare_ast.mli
+0
-2
0 additions, 2 deletions
src/plugins/e-acsl/src/project_initializer/prepare_ast.mli
with
1 addition
and
14 deletions
src/plugins/e-acsl/src/project_initializer/prepare_ast.ml
+
1
−
12
View file @
ee52527e
...
...
@@ -496,18 +496,7 @@ class prepare_visitor = object (self)
Annotations
.
iter_code_annot
(
fun
_
a
->
self
#
push_post_code_annot
a
)
stmt
;
(* move variables declared in the body of a switch statement to the
outer scope *)
match
stmt
.
skind
with
|
Switch
(
_
,
sw_blk
,_,_
)
->
let
new_blk
=
Cil
.
mkBlock
[
stmt
]
in
let
new_stmt
=
Cil
.
mkStmt
~
valid_sid
:
true
(
Block
new_blk
)
in
new_blk
.
blocals
<-
sw_blk
.
blocals
;
sw_blk
.
blocals
<-
[]
;
has_new_stmt_in_fundec
<-
true
;
new_stmt
|
_
->
stmt
)
stmt
)
method
!
vfunc
fundec
=
Cil
.
DoChildrenPost
...
...
This diff is collapsed.
Click to expand it.
src/plugins/e-acsl/src/project_initializer/prepare_ast.mli
+
0
−
2
View file @
ee52527e
...
...
@@ -25,8 +25,6 @@
More precisely, this module performs the following tasks:
- generating a new definition for functions with contract;
- removing term sharing;
- moving declarations of variables declared in the bodies of switch
statements to upper scopes;
- storing what is necessary to translate in [Keep_status];
- in case of temporal validity checks, adding the attribute "aligned" to
variables that are not sufficiently aligned. *)
...
...
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