Changes between Version 92 and Version 93 of IR2


Ignore:
Timestamp:
05/12/21 16:21:21 (5 years ago)
Author:
siegel
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • IR2

    v92 v93  
    262262  * An object of array type also becomes defined when assigned a `$new` value.  In that case, the elements are also defined.
    263263  * A pointer becomes defined when assigned the result of an `$alloc`.   Each element in the newly allocated object is undefined.
    264   * Example: to determine whether it is safe to read `*(p+i)`, assert `$summable(p, i) && $valid(p+i) && $defined(*(p+i))`.  You must check (1) you can sum `p` and `i`, (2) `p+i` points to an object of the base type, so dereference is safe, and (3) the object is defined (has been assigned a value).
     264  * Example: to determine whether it is safe to read `*(p+i)`, assert `$summable(p, i) && $valid(p+i) && $defined(*(p+i))`.  You must check (1) you can sum `p` and `i`, (2) `p+i` points to an object of the base type, so dereference is safe, and (3) the object is defined (has been assigned a value).  If you aren't sure `p` and `i` have been defined, you can add `$defined(p) && $defined(i)` to the assertion.
    265265
    266266