Skip to content

Commit d5c9223

Browse files
authored
Merge pull request #2800 from kubo39/visible-ob
Make ob visible merged-on-behalf-of: Nicholas Wilson <thewilsonator@users.noreply.github.com>
2 parents 6557de2 + be16be1 commit d5c9223

File tree

5 files changed

+17
-15
lines changed

5 files changed

+17
-15
lines changed

posix.mak

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ SPEC_ROOT=$(addprefix spec/, \
322322
const3 function operatoroverloading template template-mixin contracts \
323323
version traits errors unittest garbage float iasm ddoc \
324324
interfaceToC cpp_interface objc_interface portability entity memory-safe-d \
325-
abi simd betterc)
325+
abi simd betterc ob)
326326
SPEC_DD=$(addsuffix .dd,$(SPEC_ROOT))
327327

328328
CHANGELOG_FILES:=$(basename $(subst _pre.dd,.dd,$(wildcard changelog/*.dd)))

spec/betterc.dd

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,7 @@ $(OL
128128
)
129129

130130

131-
132-
$(SPEC_SUBNAV_PREV simd, Vector Extensions)
131+
$(SPEC_SUBNAV_PREV_NEXT simd, Vector Extensions, ob, Live Functions)
133132

134133
)
135134

spec/ob.dd

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ $(H2 Ownership/Borrowing)
6565

6666
$(P Tracking the ownership status of a pointer can be safely extended by adding the
6767
capability of temporarilly $(I borrowing) ownership of a pointer from the $(I owner).
68-
The $(owner) can no longer use the pointer as long as the $(I borrower) is still
68+
The $(I owner) can no longer use the pointer as long as the $(I borrower) is still
6969
using the pointer value (i.e. is $(I live)). Once the $(I borrower) is no longer
7070
$(I live), the $(I owner) and resume using it. Only one $(I borrower) can be live
7171
at any point.
@@ -109,7 +109,7 @@ $(P It will not detect attempts to dereference `null` pointers or possibly
109109
of annotating a type as a non-`null` pointer.
110110
)
111111

112-
$(H4 Tracked Pointers)
112+
$(H3 Tracked Pointers)
113113

114114
$(P The only pointers that are tracked are those declared in the `@live` function
115115
as `this`, function parameters or local variables. Variables from other
@@ -120,7 +120,7 @@ Parameters that are `const` are not tracked.
120120
)
121121

122122

123-
$(H4 Pointer States)
123+
$(H3 Pointer States)
124124

125125
$(P Each tracked pointer is in one of the following states:
126126
)
@@ -163,7 +163,7 @@ must not be a pointer to mutable.
163163
)
164164
)
165165

166-
$(H4 Lifetimes)
166+
$(H3 Lifetimes)
167167

168168
$(P The lifetime of a Borrowed or Readonly pointer value starts when it is
169169
assigned a value from an Owner or another Borrowed pointer, and ends at
@@ -174,7 +174,7 @@ $(P This is also known as $(I Non-Lexical Lifetimes).
174174
)
175175

176176

177-
$(H4 Pointer State Transitions)
177+
$(H3 Pointer State Transitions)
178178

179179
$(P A pointer changes its state when one of these operations is done to it:
180180
)
@@ -214,7 +214,7 @@ $(LI merging of control flow reconciles the state of each variable based on the
214214
states they have from each edge)
215215
)
216216

217-
$(H4 Borrowers can be Owners)
217+
$(H3 Borrowers can be Owners)
218218

219219
$(P Borrowers are considered Owners if they are initialized from other than
220220
a pointer.
@@ -229,7 +229,7 @@ a pointer.
229229

230230
---
231231

232-
$(H4 Exceptions)
232+
$(H3 Exceptions)
233233

234234
$(P The analysis assumes no exceptions are thrown.
235235
)
@@ -258,12 +258,12 @@ $(P One solution is to use `scope(exit)`:
258258
$(P or use RAII objects or call only `nothrow` functions.
259259
)
260260

261-
$(H4 Lazy Parameters)
261+
$(H3 Lazy Parameters)
262262

263263
$(P Lazy parameters are not considered.
264264
)
265265

266-
$(H4 Mixing Memory Pools)
266+
$(H3 Mixing Memory Pools)
267267

268268
$(P Conflation of different memory pools:
269269
)
@@ -298,12 +298,14 @@ vfree(p); // type mismatch
298298
$(P and perhaps disabling implicit conversions to `void*` in `@live` functions.
299299
)
300300

301-
$(H4 Variadic Function Arguments)
301+
$(H3 Variadic Function Arguments)
302302

303303
$(P Arguments to variadic functions (such as `printf`) are considered to be consumed.
304304
)
305305

306+
$(SPEC_SUBNAV_PREV betterc, Better C)
306307
)
307308

308309
Macros:
310+
CHAPTER=41
309311
TITLE=Live Functions

spec/spec.dd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ $(TOC Table of Contents,
5353
$(A memory-safe-d.html, Memory Safety),
5454
$(A abi.html, Application Binary Interface),
5555
$(A simd.html, Vector Extensions),
56-
$(A betterc.html, Better C)
56+
$(A betterc.html, Better C),
5757
$(A ob.html, Live Functions)
5858
))
5959
)

spec/spec.ddoc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,8 @@ $(SUBNAV_TEMPLATE
9696
$(ROOT_DIR)spec/memory-safe-d.html, Memory Safety,
9797
$(ROOT_DIR)spec/abi.html, Application Binary Interface,
9898
$(ROOT_DIR)spec/simd.html, Vector Extensions,
99-
$(ROOT_DIR)spec/betterc.html, Better C
99+
$(ROOT_DIR)spec/betterc.html, Better C,
100+
$(ROOT_DIR)spec/ob.html, Live Functions
100101
)
101102
)
102103
)

0 commit comments

Comments
 (0)