Files
sdk/pkg/compiler/lib/src/common
Stephen Adams 62987736e8 [dart2js] Add --experiment-unreachable-throw
If a method appears unreachable because a parameter is inferred
'[empty]', compile the body to a throw.

Playing with the flag found some cases where the inferrer was not
inferring parameters because the call sites are not visible in Kernel.
The first example is _isTestViaProperty, which is referenced as a raw
function. To fix this we consider RAW_DART_FUNCTION_REF to escape the
function. The inputs are now inferred to be TOP, and we can remove the
dynamic entry checks with 'trust' annotations.

Other cases are functions that are injected into generators by a
JavaScript-level transform. Annotate these to prevent bad codegen.



Change-Id: I991fe85936ffde6fc2c794f753171df141dde8f3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/162822
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2020-09-16 01:46:42 +00:00
..
2020-06-19 16:34:13 +00:00