Skip to content

Commit 1aecc3f

Browse files
committed
Fix typos
1 parent 41ea7f6 commit 1aecc3f

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

docs/_docs/reference/other-new-features/safe-initialization.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -179,8 +179,8 @@ For example, if the arguments to an `new`-expression are transitively
179179
initialized, so is the result. If the receiver and arguments in a method call
180180
are transitively initialized, so is the result.
181181

182-
Local reasoning about initialization is the key to give rise to a fast
183-
initialization checker, as it avoids whole-program analysis.
182+
Local reasoning about initialization gives rise to a fast initialization
183+
checker, as it avoids whole-program analysis.
184184

185185
The principle of authority goes hand-in-hand with monotonicity: the principle
186186
of monotonicity stipulates that initialization states cannot go backwards, while
@@ -254,20 +254,21 @@ With the established principles and design goals, following rules are imposed:
254254
`List.apply(e)`, the argument `e` may be non-hot. If that is the case, the
255255
result value of the parametric method call is taken as _cold_.
256256

257-
5. Method calls on hot values with effectively hot arguments product hot results.
257+
5. Method calls on hot values with effectively hot arguments produce hot results.
258258

259259
This rule is assured by local reasoning about initialization.
260260

261261
6. Method calls on `ThisRef` and warm values will be resolved statically and the
262-
method bodies will be checked.
262+
corresponding method bodies are checked.
263263

264264
7. In a new expression `new p.C(args)`, if the values of `p` and `args` are
265265
effectively hot, then the result value is also hot.
266266

267267
This is assured by local reasoning about initialization.
268268

269269
8. In a new expression `new p.C(args)`, if any value of `p` and `args` is not
270-
effectively hot, then the result value takes the form `Warm[C] { outer = Vp, args = Vargs }`.
270+
effectively hot, then the result value takes the form `Warm[C] { outer = Vp, args = Vargs }`. The initialization code for the class `C` is checked again to make
271+
sure the non-hot values are used properly.
271272

272273
In the above, `Vp` is the widened value of `p` --- the widening happens if `p`
273274
is a warm value `Warm[D] { outer = V, args }` and we widen it to

0 commit comments

Comments
 (0)