Skip to content

Commit c731a9f

Browse files
mdparkerGeod24
authored andcommitted
Revision pass on intro page
1 parent 6c4e7a5 commit c731a9f

File tree

1 file changed

+27
-26
lines changed

1 file changed

+27
-26
lines changed

spec/intro.dd

Lines changed: 27 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ $(H2 Phases of Compilation)
1515
$(P The process of compiling is divided into multiple phases. Each phase is
1616
independent of subsequent phases. For example, the scanner is not affected by
1717
the semantic analyzer. This separation of passes makes language tools like
18-
syntax directed editors relatively easy to create. It is also possible to
18+
syntax-directed editors relatively easy to create. It is also possible to
1919
compress D source by storing it in $(SINGLEQUOTE tokenized) form.)
2020

2121
$(OL
2222
$(LI $(B source character set)$(BR)
2323

24-
The source file is checked to see which encoding it is using,
24+
The source file is checked to determine its encoding
2525
and the appropriate scanner is loaded. 7-bit ASCII and UTF
2626
encodings are accepted.
2727
)
@@ -34,7 +34,7 @@ $(OL
3434

3535
$(LI $(B lexical analysis)$(BR)
3636

37-
The source file is divided up into a sequence of tokens.
37+
The source file is divided into a sequence of tokens.
3838
$(DDSUBLINK spec/lex, specialtokens, Special tokens)
3939
are replaced with other tokens.
4040
$(GLINK_LEX SpecialTokenSequence)s
@@ -49,27 +49,27 @@ $(OL
4949
$(LI $(B semantic analysis)$(BR)
5050

5151
The syntax trees are traversed to declare variables, load symbol tables, assign
52-
types, and in general determine the meaning of the program.
52+
types, and determine the meaning of the program.
5353
)
5454

5555
$(LI $(B optimization)$(BR)
5656

57-
Optimization is an optional pass that tries to rewrite the program
58-
in a semantically equivalent, but faster executing, version.
57+
Optimization is an optional pass that attempts to rewrite the program
58+
in a semantically equivalent, more performant, version.
5959
)
6060

6161
$(LI $(B code generation)$(BR)
6262

6363
Instructions are selected from the target architecture to implement
6464
the semantics of the program. The typical result will be
65-
an object file, suitable for input to a linker.
65+
an object file suitable for input to a linker.
6666
)
6767
)
6868

6969

7070
$(H2 Memory Model)
7171

72-
$(P A $(I byte) is the fundamental unit of storage. Each byte has 8 bits, and is stored at
72+
$(P The $(I byte) is the fundamental unit of storage. Each byte has 8 bits and is stored at
7373
a unique address. A $(I memory location) is a sequence of one or more bytes of the exact size
7474
required to hold a scalar type. Multiple threads can access separate memory locations
7575
without interference.
@@ -78,30 +78,31 @@ $(H2 Memory Model)
7878
$(P Memory locations come in three groups:)
7979

8080
$(OL
81-
$(LI $(I Thread local memory locations) are accessible from only one thread at a time.)
81+
$(LI $(I Thread-local memory locations) are accessible from only one thread at a time.)
8282
$(LI $(I Immutable memory locations) cannot be written to during their lifetime. Immutable
8383
memory locations can be read from by multiple threads without synchronization.)
8484
$(LI $(I Shared memory locations) are accessible from multiple threads.)
8585
)
8686

87-
$(UNDEFINED_BEHAVIOR Allowing multiple threads to access a thread local memory
87+
$(UNDEFINED_BEHAVIOR Allowing multiple threads to access a thread-local memory
8888
location results in undefined behavior.)
8989

9090
$(UNDEFINED_BEHAVIOR Writing to an immutable memory location during its lifetime
9191
results in undefined behavior.)
9292

93-
$(UNDEFINED_BEHAVIOR Unless synchronized, writing to a shared memory location in
94-
one thread while other threads read or write to it results in undefined behavior.)
93+
$(UNDEFINED_BEHAVIOR Writing to a shared memory location in
94+
one thread while one or more additional threads read from or write to the same location is
95+
undefined behavior unless all of the reads and writes are synchronized.)
9596

96-
$(P Execution of a single thread on thread local and immutable memory locations
97-
is $(I sequentially consistent). This means the result of the operations
97+
$(P Execution of a single thread on thread-local and immutable memory locations
98+
is $(I sequentially consistent). This means the collective result of the operations
9899
is the same as if they were executed in the same order that the operations appear in the program.
99100
)
100101

101-
$(P A memory location can be transferred from thread local to immutable or shared
102+
$(P A memory location can be transferred from thread-local to immutable or shared
102103
if there is only one reference to the location.)
103104

104-
$(P A memory location can be transferred from shared to immutable or thread local
105+
$(P A memory location can be transferred from shared to immutable or thread-local
105106
if there is only one reference to the location.)
106107

107108
$(P A memory location can be temporarily transferred from shared to local if
@@ -111,7 +112,7 @@ $(H2 Memory Model)
111112

112113
$(H2 Object Model)
113114

114-
$(P An $(I object) is created when one of the following is executed:
115+
$(P An $(I object) is created in the following circumstances:
115116
)
116117

117118
$(UL
@@ -122,22 +123,22 @@ $(H2 Object Model)
122123
)
123124

124125
$(P An object spans a sequence of memory locations which may or may not
125-
be contiguous. It exists during construction, its lifetime, and destruction.
126-
Each object has a type, which is determined either statically or by runtime
126+
be contiguous. Its lifetime encompasses construction, destruction, and the period in between.
127+
Each object has a type which is determined either statically or by runtime
127128
type information.
128-
The memory locations may include any combination of thread local, immutable, or
129-
shared memory locations.
129+
The object's memory locations may include any combination of thread-local, immutable, or
130+
shared.
130131
)
131132

132-
$(P Objects can be composed into a $(I composed object). The objects that make up
133-
the composed object are $(I subobjects). An object that is not the subobject
133+
$(P Objects can be composed into a $(I composed object). Objects that make up
134+
a composed object are $(I subobjects). An object that is not the subobject
134135
of another object is a $(I complete object). The lifetime of a subobject
135-
is always within the lifetime of its complete object.
136+
is always within the lifetime of the complete object to which it belongs.
136137
)
137138

138139
$(P An object's address is the address of the first byte of the first memory
139-
location for that object. Object addresses are distinct from each other
140-
unless one of the objects is nested within the other.
140+
location for that object. Object addresses are distinct unless one
141+
object is nested within the other.
141142
)
142143

143144
$(SPEC_SUBNAV_NEXT lex, Lexical)

0 commit comments

Comments
 (0)