From ce7ad73cd819306fa68c23277b88c1ad571442f6 Mon Sep 17 00:00:00 2001 From: Son Ho Date: Fri, 17 Dec 2021 18:54:13 +0100 Subject: Update reborrow_shared --- src/Interpreter.ml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/Interpreter.ml b/src/Interpreter.ml index 90638d96..cb883768 100644 --- a/src/Interpreter.ml +++ b/src/Interpreter.ml @@ -1455,7 +1455,14 @@ let reborrow_shared (original_bid : V.BorrowId.id) (new_bid : V.BorrowId.id) V.ASharedLoan (bids', v, av)) else super#visit_ASharedLoan env bids v av - method! visit_AIgnoredSharedLoan _ _ = raise Unimplemented + method! visit_AIgnoredSharedLoan env asb = + (* Check if the set of abstract shared borrows contains the borrow + * we want to duplicate *) + if borrow_in_asb original_bid asb then ( + set_ref (); + let asb = V.AsbBorrow new_bid :: asb in + V.AIgnoredSharedLoan asb) + else super#visit_AIgnoredSharedLoan env asb end in -- cgit v1.2.3