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>
Remove HInstructions related to old rti.
Some methods are still called 'fooNewRti'. These will be renamed 'foo'
at the very end of removing old rti.
Change-Id: I36fcc9d2d5bc19988e26fa5014c895f54b88900c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150276
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
The biggest impact is removing the orphaned HInterceptors for all the
call instructions lowered to other instructions. (The SSA is much
easier to read with this noise immediately removed!)
I have seen no code differences except one or two pieces of dead code
like `[];` that must have become dead on the last simplify pass after
the last DCE pass.
I am experimenting in another CL with some algebraic rewrites and
simplification of bit operations to target some weak code. This change
makes the rewrites work much better.
Change-Id: I057269d44abb44916255a48b36761bb719b73eaa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150267
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Stephen Adams <sra@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>
Conceptually, this makes sense because a type is not intrinsically top
or bottom or raw, but only in the context of a type system. This also
makes these predicates much more maintainable and puts them in a form
identical to the one at the RTI level.
Change-Id: I83154a82cef6cbaa9c4d0f27cb95f01473c1e015
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149049
Commit-Queue: Mayank Patke <fishythefish@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
We were passing arguments as just a `Map` and forcing the Message to
handle the String conversion, but the caller is much better equipped to
do it and prevents the dynamic typing.
Change-Id: Icc4ab91edf233b81a64aa3b03462b541349fa751
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149048
Reviewed-by: Sigmund Cherem <sigmund@google.com>
This is a temporary workaround. The `dart:html` library contains type
annotations based on the chrome IDL, but it doesn't consider browser
compatibility or whether an API is only supported on some contexts.
We can revert this as soon as `dart:html` is sound again.
See https://github.com/dart-lang/sdk/issues/41960 for details.
Change-Id: Ia92e8821adc8e3fab8cd8e08327a282c133962ca
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148622
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Use the collector to distribute lazy statics to OutputUnits. This is
much faster than filtering the lazy statics for each OutputUnit.
Code emitter times (most of difference in 'build program')
CM: 94s --> 58s
CMSS: 209s --> 72s
Change-Id: Ib1b71290c71c62810d902e9be1c48ee9985273eb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148620
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
ImportSets do not need to store the list of members of the set as it
is available implicitly on the canonical construction path. All that
is required is a back-pointer to traverse the canonical path from the
end (i.e. ImportSet).
This reduces the memory required by DeferredLoadTask by O(N).
Change-Id: Id23ce91d4aa01a74cd0f9ff4246dc56b65db1bf9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148184
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Null-out DeferredLoadTask.importSets to free up all the ImportSets.
DeferredLoadTask
-> ImportSetLattice
-> ImportSet({})
-> all other ImportSets via transitions.
Change-Id: I552b4a37396277b9a43a6a823622ec2d7a542848
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148226
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
For some types it makes sense to distinguish between nullability as a
property of including null and the declared nullability, such as for
type-parameter types and FutureOr types. This CL introduces the
separation between the two concepts. The plan is to use that when
implementing FutureOrType.
Bug: https://github.com/dart-lang/sdk/issues/40123
Change-Id: I90b45bea768e89c213d021d360a481d38377c682
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/147903
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
- Fix unwrapException to ensure it never returns null.
- Wrap `null` (from JavaScript) if necessary.
- Move `saveStackTrace` to top-level function to avoid closure allocation
- Force inferrer type for unwrapException to non-null to avoid tests
at 'on Object' clauses.
Change-Id: I6e2ae2722420f14f73e75c2f3d4bdb56544db66e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/147841
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Stephen Adams <sra@google.com>