The single-entry / single-exit patterns of the CFG prevent inlined
throw statements and throw expressions from having exit edges like a
statement-level throw. If the join block is not reachable on one path
of a diamond, the condition can be substituted as if the join is on
the other path.
Change-Id: I9cc1058b4ca0cab892db7f1197141c5157d2bc5b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/180724
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
Index bounds checks are now added as part of lowering `[]`, `[]=` and
`removeLast()` rather that being added later in a separate pass.
To know when to add checks, new trust/check annotations have been
added:
@pragma('dart2js:index-bounds:trust')
@pragma('dart2js:index-bounds:check')
These default according to the `--trust-primitives` command-line
option.
In order to consult the annotations, the enclosing context of the
method call is tracked. This allows annotations to be applied correctly
when several methods with different annotations are inlined.
Change-Id: I22e1acf90b85ad0d100766b85a50095ced9815e9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171632
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>