Commit 04c4f83d authored by Pietro Abate's avatar Pietro Abate

[r2005-07-29 15:04:16 by afrisch] Don't fail on trivially ok runtime checks

Original author: afrisch
Date: 2005-07-29 15:04:16+00:00
parent d9b6d684
......@@ -126,9 +126,10 @@ let rec simplify = function
| [] -> assert false
let check d v =
assert(d.fail_code >= 0);
let (code,_) = Run_dispatch.run_dispatcher d v in
if code == d.fail_code then (ignore (run_disp [] d v); assert false)
if (d.fail_code < 0) then ()
else
let (code,_) = Run_dispatch.run_dispatcher d v in
if code == d.fail_code then (ignore (run_disp [] d v); assert false)
let explain d v =
try check d v; None
......
......@@ -1288,7 +1288,6 @@ module Compile = struct
(fun (i : int) (rhs : unit rhs) ->
match rhs with
| Fail -> assert (!code < 0); code := i | _ -> ()) rhs;
assert(!code >= 0);
prepare_checker !code d;
if (!code >= 0) then prepare_checker !code d;
d
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment