All fixes are related to the requirement that a concrete class must
implement its entire interface or have a non-trivial noSuchMethod
implementation.
Change-Id: I015e0565e5dd9cfa324c38bb43696e365c58329a
Reviewed-on: https://dart-review.googlesource.com/51880
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
* Preserve empty lines in the file header.
* Add empty entry to the tool's newly created sections.
* Remove extra empty line at the end of the file.
Change-Id: I271583774d5f5497025a9d85bcadf8b0b9e39e81
Reviewed-on: https://dart-review.googlesource.com/37600
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: William Hesse <whesse@google.com>
Note that this is a multi-test, which is helpful in order to make it visible which situations are covered and which ones are not, but when it all works it would make sense to just run everything in one step, in order to get better performance.
Change-Id: Ifab94f7ad369a7c76bab3337eabf2ddd22821b04
Reviewed-on: https://dart-review.googlesource.com/47882
Commit-Queue: Erik Ernst <eernst@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
This CL adds tree shaking transformation into TFA transformer, replacing
simple DropMethodBodiesVisitor. In addition to removing bodies of
unreachable members, tree shaker is able to remove unused classes, typedefs
and member declarations, and replace unreachable calls with 'throw'.
Total(CodeSize) of flutter_gallery in --release mode
before: 11,671,369
after: 11,499,694
https://github.com/dart-lang/sdk/issues/30480
Change-Id: I966cf222eb9725b7a75dd193ac479436b9b9b4c3
Reviewed-on: https://dart-review.googlesource.com/46942
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
When inferring const or new for expressions that aren't required to be const,
Fasta always choses new. That's not correct, and this is a short-term work
around to avoid introducing a breaking change in the future. The plan is to
implement this feature correctly, but that will require more time than we have
right now.
Originally submitted by ahe@google.com. Added: status file fixes.
Change-Id: I2d70bd2488de6b69fcd5546c1f4654dfbbb30b7f
Reviewed-on: https://dart-review.googlesource.com/46340
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
The test language_2/vm/precompiled_static_initializer_test times out
on kernel/precompiler/debug bots. This test enables uncontrollable inlining
which results in a huge amount of code to precompile. Most probably,
it started to time-out because type flow analysis, which was enabled in
https://github.com/dart-lang/sdk/commit/d58887eaf6cb8460e2283d8531bbd8c0611a146d,
does more devirtualization and provides more opportunities for inlining.
Change-Id: I915132f81529cc967f62f9546d16a60cb4e8aed7
Reviewed-on: https://dart-review.googlesource.com/46303
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
This bug prevented various DDC features from working correctly at
runtime, such as tearoffs, dynamic call checking, generic methods, and
parameter type checks.
Change-Id: I02cd27abbcb1d5f42b9d4ac504c7dd8bc80c866a
Reviewed-on: https://dart-review.googlesource.com/45960
Reviewed-by: Vijay Menon <vsm@google.com>
As tests/language_2/tearoff_dynamic_test.dart shows, it is perfectly
valid to take a tear-off of an instance method from null, and then call
hashCode from such tear-off.
The implementation of hashCode for closures, Closure::ComputeHash()
was calling Instance::Cast(receiver) which asserts for null.
This code is revised to allow null receiver.
Change-Id: I85cc7abf25aab99590b53403904e8bac25328308
Reviewed-on: https://dart-review.googlesource.com/45749
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
This CL changes the handling of writeContext (for complex
assignments), returnOrYieldContext (for closures), expectedType (for
ensureAssignable), and receiverType (for findInterfaceMember) so that
they no longer use `null` to represent a context; they use UnknownType
or DynamicType as appropriate.
It also changes the handling of expectedType (for ensureAssignable) so
that it does not require the type to be known. That makes this CL
simpler and paves the way for fixing #31792.
Change-Id: Ib1be06182f9a9e9f77a9eb81f5daf2364de0f3a7
Reviewed-on: https://dart-review.googlesource.com/44800
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
In the VM, TypeRef (extending AbstractType) did _not_ implement
error(), meaning that callong error() on such a type would call it in
AbstractType which basically just says `UNREACHABLE();`.
This fixes the issue.
Change-Id: I6cb9ebe8f814296db8383c187c880f367b096312
Reviewed-on: https://dart-review.googlesource.com/44420
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Régis Crelier <regis@google.com>