diff options
author | Escherichia | 2024-03-12 15:02:17 +0100 |
---|---|---|
committer | Escherichia | 2024-03-28 14:59:01 +0100 |
commit | a64fdc8b1be70de43afe35ff788ba3240318daac (patch) | |
tree | 779601c91a6f034ed3e53c9d139eb9b6fdab1ba2 /compiler/InterpreterLoopsMatchCtxs.ml | |
parent | 65f7deb0043949049129c6a8e490d151b555fa16 (diff) |
WIP Beginning working on better errors: began replacing raise (Failure) and assert by craise and cassert. Does not compile yet, still need to propagate the meta variable where it's relevant
Diffstat (limited to '')
-rw-r--r-- | compiler/InterpreterLoopsMatchCtxs.ml | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/InterpreterLoopsMatchCtxs.ml b/compiler/InterpreterLoopsMatchCtxs.ml index dd7bd7a7..67c1155c 100644 --- a/compiler/InterpreterLoopsMatchCtxs.ml +++ b/compiler/InterpreterLoopsMatchCtxs.ml @@ -14,6 +14,7 @@ open InterpreterUtils open InterpreterBorrowsCore open InterpreterBorrows open InterpreterLoopsCore +open Errors module S = SynthesizeSymbolic (** The local logger *) @@ -1400,7 +1401,7 @@ let ctxs_are_equivalent (fixed_ids : ids_sets) (ctx0 : eval_ctx) (match_ctxs check_equivalent fixed_ids lookup_shared_value lookup_shared_value ctx0 ctx1) -let prepare_match_ctx_with_target (config : config) (loop_id : LoopId.id) +let prepare_match_ctx_with_target (meta : Meta.meta) (config : config) (loop_id : LoopId.id) (fixed_ids : ids_sets) (src_ctx : eval_ctx) : cm_fun = fun cf tgt_ctx -> (* Debug *) @@ -1599,7 +1600,7 @@ let match_ctx_with_target (config : config) (loop_id : LoopId.id) let fixed_ids = ids_sets_empty_borrows_loans fixed_ids in let open InterpreterBorrowsCore in let lookup_shared_loan lid ctx : typed_value = - match snd (lookup_loan ek_all lid ctx) with + match snd (lookup_loan meta ek_all lid ctx) with | Concrete (VSharedLoan (_, v)) -> v | Abstract (ASharedLoan (_, v, _)) -> v | _ -> raise (Failure "Unreachable") |