Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
lambda-rust
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Service Desk
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Iris
lambda-rust
Commits
d922e56c
Commit
d922e56c
authored
8 years ago
by
Ralf Jung
Browse files
Options
Downloads
Patches
Plain Diff
comments
parent
fc6ca1fe
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
theories/typing/lib/rc/rc.v
+5
-5
5 additions, 5 deletions
theories/typing/lib/rc/rc.v
with
5 additions
and
5 deletions
theories/typing/lib/rc/rc.v
+
5
−
5
View file @
d922e56c
...
...
@@ -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'"
];;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment