aboutsummaryrefslogtreecommitdiffstats
path: root/debug
diff options
context:
space:
mode:
authorBernhard Schommer <bernhardschommer@gmail.com>2015-09-30 12:43:49 +0200
committerBernhard Schommer <bernhardschommer@gmail.com>2015-09-30 12:43:49 +0200
commitee76d81e0e7d8a76cd31bf0d01a532d248dca45a (patch)
treefdce17a2651794b76c7958ccdf2029bc3e6dcfff /debug
parentc0757aa180c54ff61093e8079ef58b77775ba28e (diff)
downloadcompcert-kvx-ee76d81e0e7d8a76cd31bf0d01a532d248dca45a.tar.gz
compcert-kvx-ee76d81e0e7d8a76cd31bf0d01a532d248dca45a.zip
Fixed minor issue with parameters that get put on the stack, made
the code more robust and added indentation for convertCompositeDef
Diffstat (limited to 'debug')
-rw-r--r--debug/DebugInformation.ml19
1 files changed, 8 insertions, 11 deletions
diff --git a/debug/DebugInformation.ml b/debug/DebugInformation.ml
index 3bf26e53..382845a4 100644
--- a/debug/DebugInformation.ml
+++ b/debug/DebugInformation.ml
@@ -752,16 +752,13 @@ let close_scope atom s_id lbl =
with Not_found -> ()
let start_live_range atom lbl loc =
- let old_r = try
- begin
- match Hashtbl.find var_locations atom with
- | RangeLoc old_r -> old_r
- | _ -> assert false
- end
- with Not_found -> [] in
- let n_r = { range_start = Some lbl; range_end = None; var_loc = loc } in
- open_vars := atom::!open_vars;
- Hashtbl.replace var_locations atom (RangeLoc (n_r::old_r))
+ let old_r = begin try Hashtbl.find var_locations atom with Not_found -> (RangeLoc []) end in
+ match old_r with
+ | RangeLoc old_r ->
+ let n_r = { range_start = Some lbl; range_end = None; var_loc = loc } in
+ open_vars := atom::!open_vars;
+ Hashtbl.replace var_locations atom (RangeLoc (n_r::old_r))
+ | _ -> () (* Parameter that is passed as variable *)
let end_live_range atom lbl =
try
@@ -771,7 +768,7 @@ let end_live_range atom lbl =
if n_r.range_end = None then (* We can skip non open locations *)
let n_r = {n_r with range_end = Some lbl} in
Hashtbl.replace var_locations atom (RangeLoc (n_r::old_r))
- | _ -> assert false
+ | _ -> ()
with Not_found -> ()
let stack_variable atom (sp,loc) =