Skip to content

Commit

Permalink
add show decoder in Effects docs
Browse files Browse the repository at this point in the history
  • Loading branch information
sjkelly committed May 5, 2023
1 parent 2253d30 commit 6586d1e
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions base/compiler/effects.jl
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,34 @@ analyzed method (see the implementation of `merge_effects!`). Each effect proper
initialized with `ALWAYS_TRUE`/`true` and then transitioned towards `ALWAYS_FALSE`/`false`.
Note that within the current flow-insensitive analysis design, effects detected by local
analysis on each statement usually taint the global conclusion conservatively.
## Key for `show` output of Effects:
The output represents the state of different effect properties in the following order:
1. `consistent` (`c`):
- `+c` (green): `ALWAYS_TRUE`
- `-c` (red): `ALWAYS_FALSE`
2. `effect_free` (`e`):
- `+e` (green): `ALWAYS_TRUE`
- `-e` (red): `ALWAYS_FALSE`
3. `nothrow` (`n`):
- `+n` (green): `true`
- `-n` (red): `false`
4. `terminates` (`t`):
- `+t` (green): `true`
- `-t` (red): `false`
5. `notaskstate` (`s`):
- `+s` (green): `true`
- `-s` (red): `false`
6. `inaccessiblememonly` (`m`):
- `+m` (green): `ALWAYS_TRUE`
- `-m` (red): `ALWAYS_FALSE`
7. `noinbounds` (`i`):
- `+i` (green): `true`
- `-i` (red): `false`
Additionally, if the `nonoverlayed` property is false, a red prime symbol (′) is displayed after the tuple.
"""
struct Effects
consistent::UInt8
Expand Down

0 comments on commit 6586d1e

Please sign in to comment.