diff options
author | Sidney Congard | 2022-07-25 14:22:52 +0200 |
---|---|---|
committer | Sidney Congard | 2022-07-25 14:22:52 +0200 |
commit | fe7949c350bb3c5e2b9990ab3594b256194c3f0b (patch) | |
tree | e96e933ffcfce797b54800b070769150b1ddb9e0 /src/FunsAnalysis.ml | |
parent | f9b324be57708e9496ca6e9ac0b7e68ffd9e7108 (diff) |
Apply minor changes from PR comments
Diffstat (limited to '')
-rw-r--r-- | src/FunsAnalysis.ml | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/src/FunsAnalysis.ml b/src/FunsAnalysis.ml index 034575c0..427175de 100644 --- a/src/FunsAnalysis.ml +++ b/src/FunsAnalysis.ml @@ -56,12 +56,6 @@ let analyze_module (m : llbc_module) (funs_map : fun_decl FunDeclId.Map.t) inherit [_] iter_statement as super method may_fail b = - (* The fail flag is disabled for globals : the global body is - * normalised into its declaration, which is always successful. - * (we check that it is successful in the extracted code: if it is - * not, it leads to a type-checking error in the generated files) - *) - if f.is_global_body then () else can_fail := !can_fail || b method! visit_Assert env a = @@ -104,11 +98,10 @@ let analyze_module (m : llbc_module) (funs_map : fun_decl FunDeclId.Map.t) (* Opaque function *) obj#may_fail true; stateful := use_state - | Some body -> obj#visit_statement () body.body); + | Some body -> obj#visit_statement () body.body) (* We ignore on purpose functions that cannot fail: the result of the analysis * is not used yet to adjust the translation so that the functions which * syntactically can't fail don't use an error monad. *) - can_fail := not f.is_global_body in List.iter visit_fun d; { can_fail = !can_fail; stateful = !stateful; divergent = !divergent } |