Commit graph

56116 commits

Author SHA1 Message Date
Paul Berry ec47e524bc Switch to non-alpha versions for analyzer/front_end/kernel.
After some discussion, we decided that it's not necessary to publish
alpha versions when making non-breaking changes.  (The rationale for
publishing alpha versions is to minimize the number of breaking
changes, since breaking changes to a popular package can potentially
slow down pub's version solver, but this is not an issue for
non-breaking changes).

Change-Id: I3f4f975712af43b6b0475f2c68dc430c394454cb
Reviewed-on: https://dart-review.googlesource.com/57140
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-05-29 23:26:07 +00:00
Ryan Macnak aac0478fad [vm] Add tests for determinism of script and AppJIT snapshots.
Fix non-determinism in unused bits of RawFunction::kind_tag_.

Leave some build-time-disabled debugging aids for tracking down which parts of snapshots are non-deterministic.

Bug: https://github.com/dart-lang/sdk/issues/31427
Bug: https://github.com/dart-lang/sdk/issues/33264
Change-Id: I4e373a8886c0abd7c03b8f3b980e308bee2ef324
Reviewed-on: https://dart-review.googlesource.com/56720
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-05-29 22:59:37 +00:00
Konstantin Shcheglov 6cc7aa803a Change names/declarations tasks in AnalysisDriver sync.
Not sure why they were async, they don't call any async API themselves.

R=brianwilkerson@google.com

Change-Id: I5ba1c5124e9cf224f13b91d1fc8ecd85e4e0a206
Reviewed-on: https://dart-review.googlesource.com/57100
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-05-29 22:07:39 +00:00
Ryan Macnak c30af41b96 Reapply "[mirrors] Add IsolateMirror.loadUri."
- Forward only kImportTag requests to DFE. This restores the current handling of a kScriptTag request when loading the kernel isolate in the simulators.
 - Mark dynamic_load_test as failing in the reload stress tests (reload fails to preserve library identity).

Change-Id: Ibe6f0a3505b99736a38d566abf3b2151505d7a7e
Reviewed-on: https://dart-review.googlesource.com/56706
Reviewed-by: Siva Annamalai <asiva@google.com>
2018-05-29 22:01:01 +00:00
Paul Berry a40993a6af Observatory strong mode fix: Fix incorrect types in DebuggerStackElement.
Change-Id: Ib882fa965b3ce9af377e89cc3666cbde04d2d657
Reviewed-on: https://dart-review.googlesource.com/57004
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-05-29 21:42:06 +00:00
Paul Berry 0fdfc9aa3b Observatory strong mode fix: Add a needed implements clause.
Add a clause indicating that FunctionCallTreeNode (in
lib/src/sample_profile/sample_profile.dart) implements
M.FunctionCallTreeNode.  This allows the two types for `root`
inherited by FunctionCallTree to be consistent with each other: the
type inherited from CallTree<FunctionCallTreeNode> is
FunctionCallTreeNode whereas the type inherited from
M.FunctionCallTree is M.FunctionCallTreeNode.

Change-Id: I0b48c57f84681a7d40afadfb59c72501cfe38577
Reviewed-on: https://dart-review.googlesource.com/57002
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-05-29 21:12:29 +00:00
Paul Berry 209029ab8e Observatory strong mode fix: Pass through a type parameter in the implements clause for GuardedMock.
Change-Id: Ia28bcff6594b82bf8a45ddf79510d3bd73903d1e
Reviewed-on: https://dart-review.googlesource.com/57003
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-05-29 21:12:06 +00:00
Konstantin Shcheglov 1d323687b3 Use selection to decide whether EXTRACT_LOCAL_VARIABLE and EXTRACT_METHOD are available.
R=brianwilkerson@google.com

Bug: https://github.com/Dart-Code/Dart-Code/issues/959
Change-Id: I64af87f26bbc26527011c34194a064a01e2d263e
Reviewed-on: https://dart-review.googlesource.com/57060
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-05-29 20:33:06 +00:00
Alexander Thomas ff815d05a5 [release] Prepare changelog for 2.0.0-dev.59.0
TBR=whesse@google.com

Change-Id: Ia7266b2b27f6c623d0383450977b00fbc986c36d
Reviewed-on: https://dart-review.googlesource.com/56982
Reviewed-by: Alexander Thomas <athom@google.com>
2018-05-29 20:01:09 +00:00
Konstantin Shcheglov 17afa8ef56 Give private parameters public names for constructor.
R=brianwilkerson@google.com

Bug: https://github.com/flutter/flutter-intellij/issues/2284
Change-Id: I091c1f557266aa2442ad0fd047ca745996332f4d
Reviewed-on: https://dart-review.googlesource.com/57040
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-05-29 19:34:36 +00:00
Emily Fortuna 7b33203f8e Fixes to make hackernews run strong mode clean
Change-Id: I3ca5fcd0a4d8daf3aaca3cc39ba034a608f5f760
Reviewed-on: https://dart-review.googlesource.com/56707
Commit-Queue: Emily Fortuna <efortuna@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2018-05-29 18:58:36 +00:00
danrubel 718e1578a0 Update Analyzer AstBuilder to optionally parse function bodies
Change-Id: I4fa60b12315f1a16eb288b3431bb308d4d4f52db
Reviewed-on: https://dart-review.googlesource.com/57021
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-05-29 18:18:56 +00:00
Alexander Markov 1ca17b6d03 [vm/kernel] Recognize desugared mixin applications in dart:mirrors
Kernel mixin transformation desugars mixin applications into normal
classes. Mixed-in type is pulled into interfaces list.
However, dart:mirrors needs to know the original mixed-in type of
a mixin application.

This change solves this problem by propagating a 'isTransformedMixinApplication'
attribute of a class through kernel AST, kernel binary and VM objects
into dart:mirrors implementation.

Fixes: https://github.com/dart-lang/sdk/issues/33240
Change-Id: I98ca69294e1ad445402a5ca91d90c30447aabcb2
Reviewed-on: https://dart-review.googlesource.com/56721
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2018-05-29 18:12:26 +00:00
Konstantin Shcheglov 8b0c1f8044 Fix AstRewriteVisitor to set elements/types for instance creation nodes.
R=brianwilkerson@google.com

Bug: https://github.com/flutter/flutter/issues/17429
Change-Id: I818fabb2faf1b0ffb68957a9713a22e53db25709
Reviewed-on: https://dart-review.googlesource.com/57000
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-05-29 18:08:07 +00:00
Paul Berry 84fcf42c25 Bump analyzer version in preparation for publishing.
Change-Id: I1d794db9f086f8fb8830d7974b79653d549423c6
Reviewed-on: https://dart-review.googlesource.com/56708
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Janice Collins <jcollins@google.com>
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-05-29 17:47:46 +00:00
danrubel 96dd9d49db Update Analyzer tests to pass NonExistingSource rather than null
Change-Id: I770d50a31230e7e3fdabecf4cbffc6fee76e1fb5
Reviewed-on: https://dart-review.googlesource.com/57020
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-05-29 17:12:26 +00:00
Zach Anderson 736ddd9b0e [Observatory] Refactor observatory build to prepare for Fuchsia prebuilt
This splits create_archive.py into two steps. One that creates the .tar
and one that creates the .cc for the .tar. This way on Fuchsia, the
second step will take the prebuilt instead of building it.

Change-Id: I7f407f9e70db3135884eeeb61aa5aec3091f1fcc
Reviewed-on: https://dart-review.googlesource.com/56291
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2018-05-29 16:35:34 +00:00
Dan Rubel b7336ab443 Improve field type argument recovery
This CL improves recovery when parsing field type arguments
and adds more tests for parsing type parameters and type arguments.

Change-Id: Ib6ee4081f898d0421d90a66de84d686206a06a8f
Reviewed-on: https://dart-review.googlesource.com/56682
Commit-Queue: Dan Rubel <danrubel@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-05-29 16:30:46 +00:00
Lasse R.H. Nielsen 6bc7288e70 Fix fused UTF-8/JSON decoding.
The VM version's parser did not allow a leading BOM, and it failed to parse a top-level integer.

Added test to check this.

Fixes #33251

Bug: http://dartbug.com/33251
Change-Id: I51e429082f0e9baac81e20f73b0885922b40b0b8
Reviewed-on: https://dart-review.googlesource.com/56860
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Florian Loitsch <floitsch@google.com>
2018-05-29 12:34:25 +00:00
Alexander Thomas 2a3d1dc9ed [vm] Prepare status for app_jitk builders (#33126)
Change-Id: Iec5347b5f091b9fd6ff3c24047b011527f8b08ee
Reviewed-on: https://dart-review.googlesource.com/56802
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2018-05-29 11:43:25 +00:00
Johnni Winther 40f61d6b0b Handle Windows line ending in generate_messages_test
Change-Id: I221f421449ffc4b51916b5741b7c909a828c50cd
Reviewed-on: https://dart-review.googlesource.com/56840
Reviewed-by: Peter von der Ahé <ahe@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2018-05-29 11:03:15 +00:00
Dmitry Stefantsov 7dc4fbf5a2 [fasta] Add support for annotations on enum values
Fixes #33083

Bug: https://github.com/dart-lang/sdk/issues/33083
Change-Id: If278ee3c59489944e2e821ae48ba3cb363dbbdd1
Reviewed-on: https://dart-review.googlesource.com/56496
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
Reviewed-by: Dan Rubel <danrubel@google.com>
2018-05-29 10:41:55 +00:00
Peter von der Ahé 2514a67614 Import link.dart directly
I'd like to deprecate and remove the Link class,
as best as I can tell, it doesn't offer the same
performance benefits as I've seen on other platforms.

Fasta mostly uses "null" to represent empty lists, and
after the old dart2js front was deleted, there are few
uses remaining.

This CL makes it easier to find the remaining uses.

Change-Id: I73ac9b6b8b1bf5fed9669ae939cb3252cedbef0f
Reviewed-on: https://dart-review.googlesource.com/56781
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Peter von der Ahé <ahe@google.com>
2018-05-29 07:40:27 +00:00
Peter von der Ahé 990c85276b Avoid allocation and bottom-type on Link
Change-Id: Ib23e596edf55285cc63e3a391da3712b2bcb1224
Reviewed-on: https://dart-review.googlesource.com/56761
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2018-05-29 07:40:27 +00:00
Samir Jindel 58dc4e476d Revert "[vm] Support definition of entry-points via @pragma('vm.extern') annotations."
This reverts commit 3e50ea32b5.

Reason for revert: Severe performance regressions on many aot-v2 benchmarks.

Original change's description:
> [vm] Support definition of entry-points via @pragma('vm.extern') annotations.
> 
> The `@pragma` annotations are evaluated by the constants transformation and
> visible to TFA and the precompiler, which match on the "options" field of the
> annotation to determine whether to mark the class/procedure as a root.
> 
> This required enabling the transformation of annotation constants by default.
> 
> # Test Plan
> 
> The "vmservice_io.main" entry-point is removed from `main.cc` and annotated with
> `@pragma`. All precompiler tests will crash if "vmservice_io.main" is not
> available at runtime.
> 
> Debug/release precompiler bots are visible in "cl-linux" button.
> 
> Change-Id: I03c5d6ba7918672ed9905fcaee8dabe675a93a5d
> Reviewed-on: https://dart-review.googlesource.com/56660
> Commit-Queue: Samir Jindel <sjindel@google.com>
> Reviewed-by: Vyacheslav Egorov <vegorov@google.com>

TBR=vegorov@google.com,alexmarkov@google.com,sjindel@google.com

Change-Id: I779c17d003659129a4b3fcf284423104948f60e2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/56820
Reviewed-by: Samir Jindel <sjindel@google.com>
Commit-Queue: Samir Jindel <sjindel@google.com>
2018-05-28 19:23:16 +00:00
Erik Ernst e20189ecf5 Adjusted the instantiate-to-bound algorithm to break cycles at
every member, not just one.

Note that a fresh copy of this document with rendering is available
at https://gist.github.com/eernstg/6deffcde2cbe79f8ba499b3aac950900.

Change-Id: Ia7e3d8e2c36b254102e2c1cc5dafc4572746079d
Reviewed-on: https://dart-review.googlesource.com/43100
Commit-Queue: Erik Ernst <eernst@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2018-05-28 16:01:45 +00:00
Samir Jindel 3e50ea32b5 [vm] Support definition of entry-points via @pragma('vm.extern') annotations.
The `@pragma` annotations are evaluated by the constants transformation and
visible to TFA and the precompiler, which match on the "options" field of the
annotation to determine whether to mark the class/procedure as a root.

This required enabling the transformation of annotation constants by default.

# Test Plan

The "vmservice_io.main" entry-point is removed from `main.cc` and annotated with
`@pragma`. All precompiler tests will crash if "vmservice_io.main" is not
available at runtime.

Debug/release precompiler bots are visible in "cl-linux" button.

Change-Id: I03c5d6ba7918672ed9905fcaee8dabe675a93a5d
Reviewed-on: https://dart-review.googlesource.com/56660
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-05-28 15:13:55 +00:00
Kevin Millikin e2597dfba7 Revert "Mark normal classes that were originally mixin applications"
This reverts commit 53cd0b4af1.

The commit causes failures in the VM's precompiler because its mixin
deduplication transformation apparently needs to distinguish between
anonymous and named mixins.

Change-Id: I3861a3bf90b10f627d5fc8f0e94f117c102422d7
Reviewed-on: https://dart-review.googlesource.com/56780
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Kevin Millikin <kmillikin@google.com>
2018-05-28 12:05:46 +00:00
Alexander Thomas d28c5499fc [infra] Add support for app_jitk compiler to test.py (#33126)
* Add app_jitk configuration to test matrix.
* Skip it on non-Dart 2 test suites.

Change-Id: I05f75dbbd33d34a4acf4df1fe63104933d39d2fe
Reviewed-on: https://dart-review.googlesource.com/56113
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2018-05-28 11:54:56 +00:00
Erik Ernst 640791c922 Add example to docs/language/informal/super-bounded-types.md.
This CL adds an example to super-bounded-types.md in order to motivate
the definition of what it means for a parameterized type based on a
type alias to be super-bounded. The definition says that we must check
the actual type arguments relative to the formal type parameter
list of the given `typedef` as well as the right hand side, replacing
the formals by the given actual type arguments. The example shows that
the right hand side can be ill-bounded even though the check that we
apply based on the formal type parameter bounds (that is, the check
that we apply to class types) succeeds.

A rendered version of super-bounded-types.md corresponding to patchset
6 is available here:
https://gist.github.com/eernstg/fc12eeb23064a2578a936b443461dde4.

Change-Id: I33dc6ced592f53160bc6f933558bfface46cd329
Reviewed-on: https://dart-review.googlesource.com/56668
Commit-Queue: Erik Ernst <eernst@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2018-05-28 10:12:34 +00:00
Kevin Millikin 53cd0b4af1 Mark normal classes that were originally mixin applications
To implement dart:mirrors correctly, a backend like the VM needs to
know that a class was originally a mixin application.  Use the
`isSyntheticMixinImplementation` flag which was already there and
ignored by the VM.

Now the property is:

- if `isSyntheticMixinImplementation` is set on a class with a
  mixed-in type, then it was originally an anonymous mixin application

- if `isSyntheticMixinImplementation` is set on a normal class then it
  was originally a mixin application of some kind and the mixed-in
  type can be found as the last impelemented type

Bug: https://github.com/dart-lang/sdk/issues/33240
Change-Id: I004adc6bfe08e583efba8e511076a6c603c0c687
Reviewed-on: https://dart-review.googlesource.com/56760
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Kevin Millikin <kmillikin@google.com>
2018-05-28 09:17:34 +00:00
Johnni Winther 6b7f3d5f54 Share non-generic signatures through init.types
Change-Id: Ie132bbe805780022c91e5578c8dc4636c3c4cc8b
Reviewed-on: https://dart-review.googlesource.com/56671
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2018-05-28 07:40:24 +00:00
Brian Wilkerson b79e06630c Add a recovery test
Change-Id: Ib74d61b9999ad6640afbd64b9753d76d09eee44f
Reviewed-on: https://dart-review.googlesource.com/56711
Reviewed-by: Dan Rubel <danrubel@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-05-26 14:42:52 +00:00
Alexander Aprelev f981f09760 Revert "Clone annotations when cloning nodes that have them"
This reverts commit 75a75263d3 as it breaks Flutter

Bug: https://github.com/dart-lang/sdk/issues/33242
Change-Id: I825b0da4757f1ff9a318f8203605761d61d25e01
Reviewed-on: https://dart-review.googlesource.com/56722
Reviewed-by: Todd Volkert <tvolkert@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2018-05-26 03:16:14 +00:00
danrubel b4699ae795 Improve type parameter and type argument recovery
This improves recovery when parsing type arguments in
* top level fields and functions
* class members

and when parsing type parameters in
* top level functions
* class declaration
* class methods

Change-Id: I7dbb520d6bb39c0d13b27698658dafe580f2b16c
Reviewed-on: https://dart-review.googlesource.com/56681
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-05-26 02:25:53 +00:00
danrubel 544863fe68 Remove the no-op rewriter tests
Change-Id: I416ee350e1e7346493a3c4df3616f11d3b637d7c
Reviewed-on: https://dart-review.googlesource.com/56680
Reviewed-by: Peter von der Ahé <ahe@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-05-26 02:25:53 +00:00
Régis Crelier 4d271519a1 [VM Bigint] Fix arm64 intrinsic for _estimateQuotientDigit (loop missing jump back).
Add regression test.
Fix arm64 disassembler (was printing "unknow" instructions).
Make decoding stricter in arm64 simulator.
This fix addresses https://github.com/a14n/dart-rational/issues/19

Change-Id: I1b2ccb4bd560b588d0c4860c904cc398fba9014f
Reviewed-on: https://dart-review.googlesource.com/56740
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Régis Crelier <regis@google.com>
2018-05-26 01:19:03 +00:00
Adam Barth 57d256377c [fuchsia] Update for port API change
zx_port_wait and zx_port_queue no longer take an unused count parameter.

Change-Id: I62f03871282d076638c51527603473252821d316
Reviewed-on: https://dart-review.googlesource.com/56705
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Adam Barth <abarth@google.com>
2018-05-25 19:43:15 +00:00
Paul Berry c09e0121f7 Observatory strong mode fixes: add explicit downcasts to button onClick callbacks.
Since the downcast is explicit (using "as") the type will be checked
even in unchecked mode, so technically there is a slight risk of
breakage.  But since the callback is so near the creation of the
ButtonElement, I'm not concerned.  Also, I'm not concerned about the
performance penalty of the explicit downcast because the cost is only
paid once per user click.

Change-Id: I64fbb442985f6ba6f745f665b36a3321498025e4
Reviewed-on: https://dart-review.googlesource.com/56704
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-05-25 19:38:13 +00:00
Paul Berry a5bf688622 Observatory strong mode fix: Avoid a String/Uri type mismatch.
Change-Id: Ie4871b7467bd00e594f7df397909690461fe358a
Reviewed-on: https://dart-review.googlesource.com/56702
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-05-25 19:30:18 +00:00
Paul Berry 1b0c2f4507 Observatory strong mode fix: Add VM.target getter.
This allows code to access a VM object's target without having to
downcast it to a more specific type.

Change-Id: I42f329e205c2da0137be2440f0d3088a7137bc55
Reviewed-on: https://dart-review.googlesource.com/56703
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-05-25 19:30:08 +00:00
Paul Berry 210d175cc0 Observatory strong mode fix: Fix a callback parameter type using an explicit downcast.
For brevity we explicitly downcast the parameter type (using "as")
rather than implicitly downcasting it (by assigning to a fresh
variable).  Since this is test code, I'm not concerned about the
performance penalty of the explicit downcast.

Change-Id: I2bf1556ec11db124978c6631df8fcdd5adbc298d
Reviewed-on: https://dart-review.googlesource.com/56701
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-05-25 19:22:13 +00:00
Paul Berry 08d0dcb4b0 Observatory strong mode fixes: specify some list literal types.
In some cases we need to specify a type because the inferred type
would be too specific.  For example, in the code:

    final content = [new SampleBufferControlElement(...)];
    ...
    content.addAll([new BRElement(), ...]);

Strong mode would infer a type of `List<SampleBufferControlElement>`
for `content`, making it impossible to add other kinds of HTML
elements to the list later.  So we have to specify explicitly that the
list element type is meant to be `HTMLElement`.

In other cases we need to specify a type because the inferred type is
too general.  For example, in the code:

    Future<List<String>> complete(...) {
      var result = [];
      ...add values of type String to `result`...
      return new Future.value(result);
    }

Strong mode would infer a type of `List<dynamic>` for `result`, making
it impossible to enclose in a `Future<List<String>>`.  So we have to
specify explicitly that the list element type is meant to be `String`.

Change-Id: I1b1c884529de2775898dfff800d250cd10629811
Reviewed-on: https://dart-review.googlesource.com/56700
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-05-25 19:22:03 +00:00
Paul Berry 462e350a6a Observatory strong mode fixes: Change types of InstanceMock/Instance members.
The types now correspond in the two classes, so we avoid invalid
override errors.

Change-Id: Iceeb324e6adf7573ae39d7250184f7eb58656498
Reviewed-on: https://dart-review.googlesource.com/56021
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-05-25 19:02:03 +00:00
Erik Ernst 6ed3b162d6 Added feature specification for upper/lower bounds of top/bottom types
A rendered version can be found here, and it was updated to match
patch set 12:
https://gist.github.com/eernstg/df0d69c85724e1179835a43bf9e63adc

The issue where this topic was raised is
https://github.com/dart-lang/sdk/issues/28513.

Change-Id: I21e4df42348a51f482c42d1c29595e475823e5dc
Reviewed-on: https://dart-review.googlesource.com/53211
Commit-Queue: Erik Ernst <eernst@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2018-05-25 16:05:20 +00:00
Brian Wilkerson abed87be08 Make BodyBuilder.handleCatchBlock use FormalParameters as catchParameters.
Change-Id: Ib3523faa2a7fa122e56ecef5b9ed6c42a1a8b90d
Reviewed-on: https://dart-review.googlesource.com/56604
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Dan Rubel <danrubel@google.com>
2018-05-25 15:41:03 +00:00
Dmitry Stefantsov 5016f11c08 [fasta] Make lists of type arguments growable
Change-Id: I0a5bc5da093ad1fecdba4fc1ec8b9325f72b021a
Reviewed-on: https://dart-review.googlesource.com/56666
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
2018-05-25 13:38:32 +00:00
Brian Wilkerson 48e8b4cdbb Make Forest.forStatement take the conditionStatement rather than extracting the rightSeparator
Change-Id: I4fc8abddfc04cdde018480d7a078c46d3241b80d
Reviewed-on: https://dart-review.googlesource.com/56602
Reviewed-by: Dan Rubel <danrubel@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-05-25 13:34:13 +00:00
Paul Berry 2d527801b2 Observatory strong mode fixes: fix several type annotations.
Change-Id: I647480f1f03be1d182afe98f6aa22c43a937aba3
Reviewed-on: https://dart-review.googlesource.com/56028
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2018-05-25 12:42:11 +00:00
Paul Berry 0125a5a235 Observatory strong mode fixes: Fix callback parameter types using implicit casts.
Change-Id: I0ee40677e13f82ca94238b98dcb50188063f9260
Reviewed-on: https://dart-review.googlesource.com/56026
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-05-25 12:32:01 +00:00