summaryrefslogtreecommitdiff
path: root/src/FunsAnalysis.ml
diff options
context:
space:
mode:
authorSon Ho2022-09-22 17:52:27 +0200
committerSon Ho2022-09-22 17:52:27 +0200
commitc8ccd864e1fa6de3241d9dba184cf8ee4101e421 (patch)
tree3651d70ab5a9236d9b7c4ae85520d74442fa964c /src/FunsAnalysis.ml
parentf106fd4ad0a221611c840bf0af0b1c2ff23f3d0f (diff)
Make minor cleanup
Diffstat (limited to '')
-rw-r--r--src/FunsAnalysis.ml10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/FunsAnalysis.ml b/src/FunsAnalysis.ml
index 2aebc144..615f45b3 100644
--- a/src/FunsAnalysis.ml
+++ b/src/FunsAnalysis.ml
@@ -92,25 +92,25 @@ let analyze_module (m : llbc_module) (funs_map : fun_decl FunDeclId.Map.t)
end
in
(* Sanity check: global bodies don't contain stateful calls *)
- assert ((not f.is_global_body) || not !stateful);
+ assert ((not f.is_global_decl_body) || not !stateful);
match f.body with
| None ->
(* Opaque function: we consider they fail by default *)
obj#may_fail true;
- stateful := (not f.is_global_body) && use_state
+ stateful := (not f.is_global_decl_body) && use_state
| Some body -> obj#visit_statement () body.body
in
List.iter visit_fun d;
(* We need to know if the declaration group contains a global - note that
* groups containing globals contain exactly one declaration *)
- let is_global_body = List.exists (fun f -> f.is_global_body) d in
- assert ((not is_global_body) || List.length d == 1);
+ let is_global_decl_body = List.exists (fun f -> f.is_global_decl_body) d in
+ assert ((not is_global_decl_body) || List.length d == 1);
(* We ignore on purpose functions that cannot fail and consider they *can*
* 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.
* However, we do keep the result of the analysis for global bodies.
* *)
- can_fail := (not is_global_body) || !can_fail;
+ can_fail := (not is_global_decl_body) || !can_fail;
{ can_fail = !can_fail; stateful = !stateful; divergent = !divergent }
in