Commit graph

54799 commits

Author SHA1 Message Date
Samir Jindel
70f455351d [kernel] Add field for instantiate-to-bounds algorithm in TypeParameter.
Change-Id: Idd1859b378080f01dc5d5078ee0960021c1689b6
Reviewed-on: https://dart-review.googlesource.com/48424
Reviewed-by: Régis Crelier <regis@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2018-03-27 22:26:07 +00:00
Terry Lucas
bc75856e54 Update getClientRects, removed xtab, removed bogus entry in dom.json,
expose ServiceWorker, removed query and queryAll from in dart:html,
added constructor to MessageChannel and removed getCssCanvasContext.

Fixed all tests using query and queryAll.

Fixes https://github.com/dart-lang/sdk/issues/25664
Fixes https://github.com/dart-lang/sdk/issues/26349
Fixes https://github.com/dart-lang/sdk/issues/32323
Fixes https://github.com/dart-lang/sdk/issues/32659
Fixes https://github.com/dart-lang/sdk/issues/32675

R=kevmoo@google.com

Change-Id: I687471e80b8fe9c7040673113f424dbaab7c64d4
Reviewed-on: https://dart-review.googlesource.com/48381
Commit-Queue: Terry Lucas <terry@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
2018-03-27 20:45:33 +00:00
Sigmund Cherem
f9e12f1116 step 3 of ??: ignore old options from old FE
* preserve-comments: unused, only used for source-mirrors & dartdoc long long ago
* preserve-uris: ignored, mirrors-only flag
* allow-native-extensions: error, was only used for analyze-only with the old FE

Change-Id: Ic93c31edf188cdab3aa658c13018a432baf14742
Reviewed-on: https://dart-review.googlesource.com/48457
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2018-03-27 20:18:37 +00:00
Sigmund Cherem
c0fa4e2fe3 step 2 of ??: remove unnecessary pattern in -m option
Change-Id: I58757a0988c2275a617e2fa13903de66585b8dd4
Reviewed-on: https://dart-review.googlesource.com/48454
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2018-03-27 20:18:32 +00:00
Sigmund Cherem
51867f28a2 step 1 of ??: cleaning up options...
* remove serialization options
* remove checks that are only for the old FE (e.g. checks about imply compilation and --analyze-*)

Change-Id: I148025a7158340339bba4205f3b961b3c9902e47
Reviewed-on: https://dart-review.googlesource.com/48453
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2018-03-27 20:18:26 +00:00
Ben Konyi
e305117519 [ VM / Flutter ] Replaced NO_RETRY_EXPECTED with VOID_TEMP_FAILURE_RETRY in console_posix.cc:69.
Change-Id: Iaa5772476bfc81b01a646b16a9d8280ef0edf788
Reviewed-on: https://dart-review.googlesource.com/48465
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2018-03-27 19:15:22 +00:00
Konstantin Shcheglov
28c4de8207 Resynthesize more expressions in ExprBuilder.
One thing that occurred to me is that maybe we don't need precise
resynthesis of some expressions, e.g. `a is T`, because it does not
have dependencies, and has known type. Thoughts?

We already kind of went this way by not serializing arguments of
invocations with type arguments, and cascades.

OTOH, it might be simplier to resynthesize where it is easy.

R=brianwilkerson@google.com, paulberry@google.com

Bug: https://github.com/dart-lang/sdk/issues/32525
Change-Id: I742b1adc6ae22d8743ef127af7d6a33446e53449
Reviewed-on: https://dart-review.googlesource.com/48466
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-03-27 18:54:23 +00:00
Brian Wilkerson
d3295ded48 Remove the SORT_MEMBERS refactoring from the spec
Change-Id: Ic8b8135f22d8c3c07d4ded661ac43d2d5105dc3f
Reviewed-on: https://dart-review.googlesource.com/48464
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-03-27 16:37:44 +00:00
Janice Collins
f386b367a5 Update dartdoc to v0.18.0 and tag library categories.
Bug: https://github.com/dart-lang/sdk/issues/32297
Change-Id: Id99c98c1b908c5a4b42594cd7e73cd92e089bbca
Reviewed-on: https://dart-review.googlesource.com/48450
Commit-Queue: Janice Collins <jcollins@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2018-03-27 16:19:34 +00:00
Paul Berry
7df4235587 Make _ConstExprBuilder re-usable.
This CL moves _ConstExprBuilder to its own file, renames it to
ExprBuilder (so that it can be re-used for non-const expressions), and
begins adding support for expression types that can appear in
non-const expressions.

It also introduces an expr_builder_test.dart file to make testing of
ExprBuilder easier.

See #32674.

Change-Id: I5a3d91408c51770ee8f70621032a2f0767eaea55
Reviewed-on: https://dart-review.googlesource.com/48462
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-03-27 15:49:35 +00:00
Samir Jindel
eeba621943 [kernel/vm] Build NSM forwarders for getters and setters.
They are necessary for performing type-checks.

Change-Id: Ie30f0617488730d920c00229fb2ec358cc8d6c4b
Reviewed-on: https://dart-review.googlesource.com/48421
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2018-03-27 14:40:04 +00:00
Dmitry Stefantsov
c3872eedf8 [fasta] Generate noSuchMethod forwarders for abstract setters
Change-Id: Ic5bcb318c156a5e8716ced8ba9d2826f73c84a4d
Reviewed-on: https://dart-review.googlesource.com/48425
Reviewed-by: Samir Jindel <sjindel@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
2018-03-27 13:25:35 +00:00
Johnni Winther
36c2a71fcf Handle FutureOr in RuntimeTypeNeed/Checks computations.
Change-Id: I3b5b3f3feb665ff2f34b0975fb0062515a7b6ffd
Reviewed-on: https://dart-review.googlesource.com/48400
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-03-27 08:03:32 +00:00
Jenny Messerly
192b4621ba Fix DDC shadowing bug with named arguments and async functions.
Change-Id: I4c01ab03bc02d0e533b6d27d43e824aad5d32fea
Reviewed-on: https://dart-review.googlesource.com/48458
Reviewed-by: Vijay Menon <vsm@google.com>
2018-03-27 00:34:46 +00:00
Jenny Messerly
a914cac65e fix #32481, DDK signatures for mock members induced by nSM
This bug prevented various DDK features from working correctly at
runtime, such as tearoffs, dynamic call checking, generic methods, and
parameter type checks.

This was fixed for DDC in https://dart.googlesource.com/sdk/+/40738b8884e584f8b6fce26b71e9692c0067db18

Change-Id: I91fd12b3c167341c692d8d3e7ad2217dd78d2950
Reviewed-on: https://dart-review.googlesource.com/45964
Commit-Queue: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
2018-03-27 00:25:32 +00:00
Ben Konyi
6e0f2f4e47 [ VM / Dart 2 ] Fixed StackOverflow tests.
Made modifications to the original VM flow graph builder so the token
position for the top frame of the overflow stack is the same as the
token position of the method (before we pointed to the opening '{' or
'=>').

Change-Id: I5c878fc238898e2fea197ea80ed4e320adca9439
Reviewed-on: https://dart-review.googlesource.com/48448
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2018-03-26 23:47:11 +00:00
Ben Konyi
a7e3c2e365 [ VM / Dart 2 ] Fixed strong-mode issue in Native SendPort tests.
Change-Id: I37a437d338d67095038130981b5fa947e0425b9d
Reviewed-on: https://dart-review.googlesource.com/48452
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2018-03-26 22:42:02 +00:00
Samir Jindel
83c5778345 [kernel/vm] Cleanup NSM forwarding.
Change-Id: Ia2077d2752fbeb45da7d1051cdab0c16d67377d0
Reviewed-on: https://dart-review.googlesource.com/48420
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2018-03-26 22:34:02 +00:00
Konstantin Shcheglov
0f7622d945 Remove 'stateful' option from the 'Extract Widget' refactoring.
There is already a Quick Assist to convert StatelessWidget to StatefulWidget,
and duplicating implementation is not very nice.

R=brianwilkerson@google.com, devoncarew@google.com

Change-Id: Iacbe58c9d05359ec96a86affc774c83532f7456f
Reviewed-on: https://dart-review.googlesource.com/48451
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-03-26 22:18:42 +00:00
Sigmund Cherem
5d7820e68a Simplify option processing
Using immutable options objects was nice, but it came with a tax every time we added or modified
options (often having to edit 5 locations). I'm now using a mutable object and
default values are inline with the field declaration.

Change-Id: I92768f0ff50a4140271dc0ebfa3b615c94a57e4d
Reviewed-on: https://dart-review.googlesource.com/48446
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2018-03-26 21:55:32 +00:00
Sam Rawlins
301b5a1f16 Remove Maps; move _fillMapWith* methods to MapBase
Fixes #31843

Bug: https://github.com/dart-lang/sdk/issues/31843
Change-Id: I02c544c921951f4a50421205dc1f25997cbecd6e
Reviewed-on: https://dart-review.googlesource.com/39880
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2018-03-26 21:23:21 +00:00
pq
742ddd104a Pull in Linter 0.1.46
* performance fixes for library prefix testing (`library_prefixes`)
* new `avoid_bool_literals_in_conditional_expressions` lint
* new `prefer_equal_for_default_values` lint
* new `avoid_private_typedef_functions` lint
* new `avoid_single_cascade_in_expression_statements` lint

Change-Id: I4abd83e6b8e269eab992dcea2f227f0f1f805fa0
Reviewed-on: https://dart-review.googlesource.com/48449
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-03-26 20:47:56 +00:00
Paul Berry
b4e176b570 Adjust timeout for reanalyze_concurrent_test.dart.
Change-Id: Ic1cb4aa69cfeec14109b9503db140f85fcfab06b
Reviewed-on: https://dart-review.googlesource.com/48445
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2018-03-26 20:20:52 +00:00
Konstantin Shcheglov
8d1a0749b9 Create parameters only for unique referenced elements.
R=brianwilkerson@google.com

Change-Id: I1aad38c68454016846601b861432695eb6632242
Reviewed-on: https://dart-review.googlesource.com/48444
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-03-26 19:17:18 +00:00
Konstantin Shcheglov
cde2d81676 Check for name conflict in 'Extract Widget' refactoring.
R=brianwilkerson@google.com

Change-Id: Ifa620eafa32e4c2ce8b062328b562d6991ddfa0b
Reviewed-on: https://dart-review.googlesource.com/48442
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-03-26 18:54:38 +00:00
Paul Berry
af4ec9b4a3 More refactoring in preparation for #32525
This CL makes the following changes:

- Extracts the implementation of ClassElementImpl.getNamedConstructor
  to a static method so that it can be re-used by
  ClassElementForLink_Class.

- Adds a UnitResynthesizerMixin class so that unit resynthesis methods
  can be shared between the resynthesizer and the linker.

Change-Id: I694d6fef511b5bb734ea78095834d6c68e22bf63
Reviewed-on: https://dart-review.googlesource.com/48380
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-03-26 17:39:59 +00:00
Brian Wilkerson
824f123a8d Clean up some hints
Change-Id: If20a9f76cfa50f7977182b1a613ed74e508fed97
Reviewed-on: https://dart-review.googlesource.com/48441
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-03-26 17:39:18 +00:00
Alexander Markov
e3b9c2860e [vm/kernel/aot] Fix representation of SuperPropertySet in TFA summaries
This CL fixes TFA summary collector to use right-hand side value as the
result of SuperPropertySet expression instead of result of setter invocation.

Change-Id: Ie2388387645eeec95096ab797e2718b7e031131b
Reviewed-on: https://dart-review.googlesource.com/48300
Reviewed-by: Martin Kustermann <kustermann@google.com>
2018-03-26 16:41:25 +00:00
Johnni Winther
1c8c84fcfd Update kernel impact to match Dart 2 semantics.
Change-Id: Ia360bc42bd52ca9d81224a3ab1c4e4571451638f
Reviewed-on: https://dart-review.googlesource.com/48280
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-03-26 13:42:05 +00:00
Johnni Winther
5271cc4e81 Support FutureOr at runtime
Change-Id: I6d442ac160739490c2591367055aaa0ba0c00047
Reviewed-on: https://dart-review.googlesource.com/48143
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-03-26 12:54:58 +00:00
Dmitry Stefantsov
174fe69a62 [fasta] Move condition checks for some build steps inside the steps
Change-Id: I18f1561fcacc06937ae5719486a8dd524b1d16e7
Reviewed-on: https://dart-review.googlesource.com/48140
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
2018-03-26 09:09:35 +00:00
Paul Berry
761980b44a Rework typesWithImplicitTypeArguments as an expando.
An expando is a better conceptual fit, since we are using
typesWithImplicitTypeArguments as a substitute for adding a new
property to every DartType object.  Using an expando rather than an
identity set also has the advantage of interacting better with the
garbage collector, since the expando only has weak references to its
keys.

Change-Id: I39f538bd40b5ef264d637dbc8fafc11194ae27fa
Reviewed-on: https://dart-review.googlesource.com/48321
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-03-26 08:35:55 +00:00
Konstantin Shcheglov
b0f3cd9022 'Extract Widget' should be available on the names of instance creation too.
R=brianwilkerson@google.com

Change-Id: I1a6c35a4d420da1663501d08e9032281c294c368
Reviewed-on: https://dart-review.googlesource.com/48341
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-03-26 00:17:24 +00:00
Konstantin Shcheglov
633b2ccb38 Add 'isWidgetClass' and 'stateClassName' to FlutterOutline.
R=brianwilkerson@google.com, devoncarew@google.com

Change-Id: Idf7a986a67321b3ed33bb5d3bd4c139fac995474
Reviewed-on: https://dart-review.googlesource.com/48260
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-03-25 20:22:26 +00:00
Dan Rubel
e260a01272 Replace skipTypeReferenceOpt with computeType part 1
This CL modifies class member parsing to replace one use of skipTypeReferenceOpt
and parseType with a more efficient call to computeType. In addition, it updates
computeType to detect when a builtIn is used as a type and improves recovery
of invalid operator declarations.

Change-Id: Idbe96584ef3c2e72faf91037668421bb0f1055d0
Reviewed-on: https://dart-review.googlesource.com/48221
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-03-25 20:03:34 +00:00
Brian Wilkerson
c3d5537d38 Gracefully handle an invalid .packages file (issue 32560)
Change-Id: I1ff97c92b4e3ae17a0169f47e360d8e28d2e2524
Reviewed-on: https://dart-review.googlesource.com/48340
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-03-25 19:20:54 +00:00
Brian Wilkerson
db6e377e6d Make analysis_server_client Dart 2 safe
Change-Id: Iab06cb5b779599a1a107fa6fdf832345950fa84c
Reviewed-on: https://dart-review.googlesource.com/48322
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-03-25 15:20:36 +00:00
Brian Wilkerson
d06dbb2ba8 Make most of the server Dart 2 safe
Change-Id: Ic9e8ea2557d01c05caedc126486778865af0396d
Reviewed-on: https://dart-review.googlesource.com/48262
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2018-03-24 15:33:53 +00:00
Brian Wilkerson
7e53bb0689 Add hint for optional new/const to hover
Change-Id: Id1df68e3446d24bceb96f13c92c721fafa63c859
Reviewed-on: https://dart-review.googlesource.com/48266
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-03-24 14:54:23 +00:00
Brian Wilkerson
39395f911b Send type parameters for functions in outlines
Change-Id: Ie11d739a41408903390ac2c1434d05fd7dccca0e
Reviewed-on: https://dart-review.googlesource.com/48267
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-03-24 14:54:13 +00:00
Paul Berry
ca47fd7ef2 Allow type propagation to be disabled in StaticTypeAnalyzer.
I intend to re-use StaticTypeAnalyzer for performing type inference
during summary linking as part of fixing #32525.  Allowing type
propagation to be disabled will allow the linker to do less work, and
avoid the need to implement the type-propagation-related element
methods in the linker's reduced element model.

There should be no functional change with this CL, since
StaticTypeAnalyzer is not used in linking yet.

Change-Id: I5f644e9869ab89dee21b03a3a54bf809926142f5
Reviewed-on: https://dart-review.googlesource.com/48082
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-03-24 11:20:53 +00:00
Paul Berry
ebd06f7b37 Make it easier for element model logic to be shared with linker.
I intend to fix #32525 by re-using resolver code to perform type
inference during summary linking.  This will require the linker's
stripped down element model to be filled out more completely.  To
avoid code duplication, I need to first refactor some of the existing
element logic so that it can be re-used by linker code.

This CL makes the following changes:

- LibraryElementImpl._unlinkedDefiningUnit is made non-private so that
  the linker will be able to implement it.

- The logic for building a set of import elements from a summary is
  moved to a reusable static method.

- The logic for building a set of prefix elements from import elements
  is moved to a reusable static method.

- In resynthesize.dart, abstract base classes are created for
  _LibraryResynthesizer, _ReferenceInfo, and _UnitResynthesizer.

- Also in resynthesize.dart, mixins are created to allow re-use of
  some of the implementation logic in _LibraryResynthesizerContext and
  _LibraryResynthesizer.

Change-Id: I34cde04f4aac291e216004e861d6ac354d551c1c
Reviewed-on: https://dart-review.googlesource.com/48081
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-03-24 11:20:25 +00:00
Emily Fortuna
f0b1485aa6 Update test status with added test for generic method apply function.
TBR=sra

Change-Id: I5f9d829e805bbced29299463c1ebdd0dc87b972c
Reviewed-on: https://dart-review.googlesource.com/48320
Reviewed-by: Emily Fortuna <efortuna@google.com>
2018-03-24 00:24:24 +00:00
Johnni Winther
e6636a5c34 Fix error in function subtyping
Change-Id: I5ccc4e2823c1dcdb84929f9fc0216822808d522a
Reviewed-on: https://dart-review.googlesource.com/48281
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2018-03-23 23:49:49 +00:00
Sigmund Cherem
c033e064bd Fix server.plaform definition for dart:js
This is so we correctly answer `const bool.fromEnvironment("dart.library.js")`
as true when --categories=Server is passed to the compiler.

Change-Id: Id12a0af65905fabc23ef5a1cd3e5fd837bc8b766
Reviewed-on: https://dart-review.googlesource.com/48265
Reviewed-by: Emily Fortuna <efortuna@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2018-03-23 23:44:49 +00:00
Emily Fortuna
239bb84f71 Added test for function.apply with generic functions.
Change-Id: I759fdc435f3200005760296ffb5289f195c6cf0d
Reviewed-on: https://dart-review.googlesource.com/48261
Commit-Queue: Emily Fortuna <efortuna@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2018-03-23 23:33:29 +00:00
Alexander Markov
7386d7b5ec Revert "[vm/kernel/aot] Tree shaking based on results of TFA"
This reverts commit 06ebf884db.

Reason for revert: buildbot failures.

Change-Id: Ie6b33061cad80ae3b20b773cc435d64a755620fc
Reviewed-on: https://dart-review.googlesource.com/48263
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2018-03-23 22:57:19 +00:00
Lasse R.H. Nielsen
289a3d2799 Remove ~/ special casing in static type system.
The "special case" text just says that the return type of `~/` on `int` is `int`, which is also its declared type, so the text isn't necessary.

Bug: http://dartbug/com/15650
Change-Id: Iba7fcc621e27dcba24dfdede2a0960f2f5ecd2f9
Reviewed-on: https://dart-review.googlesource.com/48144
Reviewed-by: Erik Ernst <eernst@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
2018-03-23 22:39:29 +00:00
Alexander Markov
06ebf884db [vm/kernel/aot] Tree shaking based on results of TFA
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>
2018-03-23 22:21:39 +00:00
Siva Annamalai
2f68e82526 Revert "Allow to output full component via computeDelta"
This reverts commit f9c7a4a22d.

Reason for revert: This CL breaks the restart functionality in Flutter, when we restart we end up with an empty app.dill file (60 bytes).

Original change's description:
> Allow to output full component via computeDelta
> 
> This CL allows users of the incremental compiler to ask for a computeDelta
> call to include the full Component in the output,
> basically turning the incremental compiler into a batch compiler.
> 
> This CL furthermore changes the frontend_server (in pkg/vm) to use this
> functionality.
> 
> This change - used in flutter - takes the time it takes to run
> `flutter test` in `packages/flutter` from ~8 minutes 30 seconds to
> ~2 minutes 30 seconds (on my machine).
> 
> Change-Id: Ia185d28da1f97b0be5dad8814cd01a8f13482724
> Reviewed-on: https://dart-review.googlesource.com/47020
> Commit-Queue: Jens Johansen <jensj@google.com>
> Reviewed-by: Peter von der Ahé <ahe@google.com>
> Reviewed-by: Vyacheslav Egorov <vegorov@google.com>

TBR=ahe@google.com,vegorov@google.com,jensj@google.com

Change-Id: I5ff39f9d78319413f4bbb7800e24bf27ab4ada9c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/48240
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2018-03-23 21:20:30 +00:00