When reducing the type promotion in case of assignment, the target
info wasn't correctly handling the reduction to the trivial state.
This caused an error in a following join computation.
Closes#42281
Change-Id: I2144f5401e9736308dc37147f7a5cb9ab1be8583
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150935
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
There are several problems contributing to issue 41449.
This fixes the malformed call-through stubs.
Change-Id: I90f1584f221956ee3fe4111314cba2813a16837c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150283
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
A HParameterValue can be an SSA value or a mutable local variable
accessed via HLocalFet/HLocalSet. The latter happens in code that is not
completely SSA-converted (due to exception control flow).
The main bug is that the check on a mutable-variable-mode HParameterValue
should have been on a HLocalGet of the value, and not the HParameterValue
itself. This means that a reference to the HParameterValue cannot be
replaced with a strengthening check, as that breaks the invariant that
HLocalGet/Set refer to variables. There was code in types_propagation
that tried to work around this broken invariant.
The bug (issue 42189) required
- An elided instance method parameter
- try(-catch)(-finally) to avoid complete SSA-conversion
- -O0 to avoid optimizing away the check early with inferred types
The first attempt at a fix was to not check the elided parameter at all
since the default value is statically checked. This is still worthwhile.
Bug: 42189
Change-Id: Idd5e2b1485eba4950a36d1e4ff57ebe35e4c98a0
Fixed: 42189
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150171
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Stephen Adams <sra@google.com>