Skip to content
Snippets Groups Projects
Commit d922e56c authored by Ralf Jung's avatar Ralf Jung
Browse files

comments

parent fc6ca1fe
No related branches found
No related tags found
No related merge requests found
......@@ -103,8 +103,6 @@ Section rc.
iIntros (ty E κ l tid q ?) "#LFT Hb Htok".
iMod (bor_exists with "LFT Hb") as (vl) "Hb"; first done.
iMod (bor_sep with "LFT Hb") as "[H↦ Hb]"; first done.
(* Ideally, we'd change ty_shr to say "l ↦{q} #l" in the fractured borrow,
but that would be additional work here... *)
iMod (bor_fracture (λ q, l ↦∗{q} vl)%I with "LFT H↦") as "#H↦"; first done.
destruct vl as [|[[|l'|]|][|]];
try by iMod (bor_persistent_tok with "LFT Hb Htok") as "[>[] _]".
......@@ -393,7 +391,7 @@ Section code.
let: "rc'" := !"rc" in
let: "rc''" := !"rc'" in
let: "strong" := !("rc''" + #0) in
"rc''" + #0 <- "strong" +#1;;
"rc''" + #0 <- "strong" + #1;;
"r" <- "rc''";;
delete [ #1; "rc" ];; return: ["r"].
......@@ -507,7 +505,8 @@ Section code.
Skip;;
(* Return content *)
"r" <-{ty.(ty_size),Σ 0} !("rc'" + #2);;
(* Decrement weak, and deallocate if appropriate *)
(* Decrement weak (removing the one weak ref collectively held by all
strong refs), and deallocate if weak count reached 0. *)
let: "weak" := !("rc'" + #1) in
if: "weak" = #1 then
delete [ #(2 + ty.(ty_size)); "rc'" ];;
......@@ -602,7 +601,8 @@ Section code.
if: "strong" = #1 then
(* Return content. *)
"r" <-{ty.(ty_size),Σ some} !("rc'" + #2);;
(* Decrement weak, and deallocate if appropriate *)
(* Decrement weak (removing the one weak ref collectively held by all
strong refs), and deallocate if weak count reached 0. *)
let: "weak" := !("rc'" + #1) in
if: "weak" = #1 then
delete [ #(2 + ty.(ty_size)); "rc'" ];;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment