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
f2ab6d09
Commit
f2ab6d09
authored
6 years ago
by
Andre Maroneze
Browse files
Options
Downloads
Patches
Plain Diff
[rmtmps] remove obsoleted code
parent
3c6bc923
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/kernel_internals/typing/rmtmps.ml
+2
-32
2 additions, 32 deletions
src/kernel_internals/typing/rmtmps.ml
with
2 additions
and
32 deletions
src/kernel_internals/typing/rmtmps.ml
+
2
−
32
View file @
f2ab6d09
...
...
@@ -774,35 +774,6 @@ end
*
*)
(* regular expression matching names of uninteresting locals *)
let
uninteresting
=
let
names
=
[
(* Cil.makeTempVar *)
"__cil_tmp"
;
(* sm: I don't know where it comes from but these show up all over. *)
(* this doesn't seem to do what I wanted.. *)
"iter"
;
(* various macros in glibc's <bits/string2.h> *)
"__result"
;
"__s"
;
"__s1"
;
"__s2"
;
"__s1_len"
;
"__s2_len"
;
"__retval"
;
"__len"
;
(* various macros in glibc's <ctype.h> *)
"__c"
;
"__res"
;
(* We remove the __malloc variables *)
]
in
(* optional alpha renaming *)
let
alpha
=
"
\\
(___[0-9]+
\\
)?"
in
let
pattern
=
"
\\
("
^
(
String
.
concat
"
\\
|"
names
)
^
"
\\
)"
^
alpha
^
"$"
in
Str
.
regexp
pattern
let
label_removable
=
function
Label
(
_
,_,
user
)
->
not
user
|
Case
_
|
Default
_
->
false
...
...
@@ -853,9 +824,8 @@ let removeUnmarked isRoot ast reachable_tbl =
(* along the way, record the interesting locals that were removed *)
let
name
=
local
.
vname
in
(
Kernel
.
debug
~
dkey
"removing local: %s"
name
);
if
not
(
Str
.
string_match
uninteresting
name
0
)
then
removedLocals
:=
(
func
.
svar
.
vname
^
"::"
^
name
)
::
!
removedLocals
;
removedLocals
:=
(
func
.
svar
.
vname
^
"::"
^
name
)
::
!
removedLocals
;
false
end
else
true
in
...
...
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