@@ -215,15 +215,15 @@ of warm objects.
215
215
Two more abstractions are introduced to support functions and conditional
216
216
expressions:
217
217
218
- - __ Fun(e, V, C)__ : A abstract function value where ` e ` is the code, ` V ` is the
218
+ - __ Fun(e, V, C)__ : An abstract function value where ` e ` is the code, ` V ` is the
219
219
abstract value for ` this ` inside the function body and the function is located
220
220
inside the class ` C ` .
221
221
222
222
- __ Refset(Vs)__ : A set of abstract values ` Vs ` .
223
223
224
224
## Rules
225
225
226
- With the established principles and design goals, following rules are imposed:
226
+ With the established principles and design goals, the following rules are imposed:
227
227
228
228
1 . The field access ` e.f ` or method call ` e.m() ` is illegal if ` e ` is _ cold_ .
229
229
@@ -234,14 +234,14 @@ With the established principles and design goals, following rules are imposed:
234
234
3 . In an assignment ` o.x = e ` , the expression ` e ` must be _ effectively hot_ .
235
235
236
236
This is how monotonicity is enforced in the system. Note that in an
237
- initialization ` val f: T = e ` , the expression ` e ` may point to an non-hot
237
+ initialization ` val f: T = e ` , the expression ` e ` may point to a non-hot
238
238
value.
239
239
240
240
4 . Arguments to method calls must be _ effectively hot_ .
241
241
242
242
Escape of ` this ` in the constructor is commonly regarded as an anti-pattern.
243
243
244
- However, escape of ` this ` as constructor arguments are allowed, to support
244
+ However, escape of ` this ` as argument to another constructor is allowed, to support
245
245
creation of cyclic data structures. The checker will ensure that the escaped
246
246
non-initialized object is not used, i.e. calling methods or accessing fields
247
247
on the escaped object is not allowed.
@@ -250,7 +250,7 @@ With the established principles and design goals, following rules are imposed:
250
250
the method call ` Some.apply(e) ` will be interpreted as ` new Some(e) ` , thus
251
251
is valid even if ` e ` is not hot.
252
252
253
- Another exception too this rule is parametric method calls. For example, in
253
+ Another exception to this rule is parametric method calls. For example, in
254
254
` List.apply(e) ` , the argument ` e ` may be non-hot. If that is the case, the
255
255
result value of the parametric method call is taken as _ cold_ .
256
256
@@ -277,18 +277,18 @@ With the established principles and design goals, following rules are imposed:
277
277
The variable ` Vargs ` represents values of ` args ` with non-hot values widened
278
278
to ` Cold ` .
279
279
280
- The widening is motivated to finitize the abstract domain and ensure
281
- terimination of the initialization check.
280
+ The motivation for the widening is to finitize the abstract domain and ensure
281
+ termination of the initialization check.
282
282
283
- 9 . The scrutinee in pattern match, the values in return and throw statements must be _ effectively hot_ .
283
+ 9 . The scrutinee in a pattern match and the values in return and throw statements must be _ effectively hot_ .
284
284
285
285
A value ` v ` is _ effectively hot_ if any of the following is true:
286
286
287
287
- ` v ` is ` Hot ` .
288
- - ` v ` is ` ThisRef ` and all fields of the underlying object are initialized .
288
+ - ` v ` is ` ThisRef ` and all fields of the underlying object are assigned .
289
289
- ` v ` is ` Warm[C] { outer = V, ctor, args = Vs } ` and
290
290
1 . ` C ` does not contain inner classes;
291
- 2 . Calling any method on ` v ` encounters no errors and the method return value is _ effectively hot_ ;
291
+ 2 . Calling any method on ` v ` encounters no initialization errors and the method return value is _ effectively hot_ ;
292
292
3 . Each field of ` v ` is _ effectively hot_ .
293
293
- ` v ` is ` Fun(e, V, C) ` and calling the function encounters no errors and the
294
294
function return value is _ effectively hot_ .
0 commit comments