Changes between Version 97 and Version 98 of IR2


Ignore:
Timestamp:
05/13/21 15:04:47 (5 years ago)
Author:
siegel
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • IR2

    v97 v98  
    247247* Comparisons likes `==` and `<` return a `$bool` (not an int, like C).
    248248* Every object holds a value of its declared type, always.   There is no notion of "trap representation", as in C.
    249 * Evaluation of an expression always results in a value of the type of that expressions.  There are no "exceptions".
     249* Evaluation of an expression always results in a value of the type of that expression.  There are no "exceptions".
    250250* For some operations, the result of applying the operation on certain inputs in unspecified.  We say those applications are "unsafe".   The result of an unsafe operation is unspecified, but will result in some value of the appropriate type.   If an application is not unsafe, it is "safe".
    251251* For every operation, there is a way to determine if performing that operation is safe.  Hence an assertion on a certain expression can be checked before performing the operation.   Examples:
    252   * `a+b`, for the $int, $real, or float types: always safe
     252  * `a+b`, for the $int, $real, or float types: always safe, assuming `a` and `b` are defined.  Will will assume all objects are defined from now on.
    253253  * `a/b`: `b!=0`
    254254  * `p+i` (pointer arithmetic): `$summable(p, i)`