Skip to content
Snippets Groups Projects
Commit c4a577f0 authored by David Bühler's avatar David Bühler
Browse files

[Eva] In recursion.ml, uses Cil.copyVarinfo instead of makeVarinfo.

parent 5c40a23c
No related branches found
No related tags found
No related merge requests found
...@@ -126,18 +126,9 @@ module VarStack = ...@@ -126,18 +126,9 @@ module VarStack =
let size = 9 let size = 9
end) end)
let copy_variable depth varinfo = let copy_variable fundec depth varinfo =
let name = Format.asprintf "\\copy<%s>[%i]" varinfo.vname depth let name = Format.asprintf "\\copy<%s>[%i]" varinfo.vname depth in
and typ = varinfo.vtype let v = Cil.copyVarinfo varinfo name in
and source = true
and temp = varinfo.vtemp
and referenced = varinfo.vreferenced
and ghost = varinfo.vghost
and loc = varinfo.vdecl in
Cil.makeVarinfo ~source ~temp ~referenced ~ghost ~loc false false name typ
let copy_fresh_variable fundec depth varinfo =
let v = copy_variable depth varinfo in
Cil.refresh_local_name fundec v; Cil.refresh_local_name fundec v;
v v
...@@ -147,7 +138,7 @@ let make_stack (kf, depth) = ...@@ -147,7 +138,7 @@ let make_stack (kf, depth) =
with Kernel_function.No_Definition -> assert false with Kernel_function.No_Definition -> assert false
in in
let vars = Kernel_function.(get_formals kf @ get_locals kf) in let vars = Kernel_function.(get_formals kf @ get_locals kf) in
let copy v = v, copy_fresh_variable fundec depth v in let copy v = v, copy_variable fundec depth v in
List.map copy vars List.map copy vars
let get_stack kf depth = VarStack.memo make_stack (kf, depth) let get_stack kf depth = VarStack.memo make_stack (kf, depth)
......
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