Commit graph

52786 commits

Author SHA1 Message Date
Brian Wilkerson 4288625d53 Rename parseClassHeader to parseClassHeaderOpt
Change-Id: If488545e2a13ba1f452bdd17321c6065345475e5
Reviewed-on: https://dart-review.googlesource.com/30540
Reviewed-by: Dan Rubel <danrubel@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2017-12-19 18:54:46 +00:00
Brian Wilkerson 710b866cce Rename parseStuff to parseStuffOpt
Change-Id: I7f663bf8d7f0b08093bc173638f9f3e036cb277f
Reviewed-on: https://dart-review.googlesource.com/30541
Reviewed-by: Dan Rubel <danrubel@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2017-12-19 18:43:34 +00:00
Kevin Moore 11a1cd5ccc Remove version from unpublished packages
Helps with tooling – and helps avoid accidental publishing

Change-Id: I0aaa029ba737adf9a7eda565a9e620d423427fb0
Reviewed-on: https://dart-review.googlesource.com/30465
Reviewed-by: Jake Macdonald <jakemac@google.com>
2017-12-19 18:26:05 +00:00
Brian Wilkerson 3438b33745 Rename parseConditionalUris to parseConditionalUriStar
Change-Id: Iae15de8658f40b355b545b148d0e74358a9d32e1
Reviewed-on: https://dart-review.googlesource.com/30500
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Dan Rubel <danrubel@google.com>
2017-12-19 18:17:23 +00:00
Zachary Anderson 786508e5cb [GN] Try to fix dartdevc dart invocation
related #31613

Change-Id: Ib01771cc85be37469e7cd862ec3b25f35769db90
Reviewed-on: https://dart-review.googlesource.com/30502
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2017-12-19 17:59:13 +00:00
Ryan Macnak b59923de58 Partial static mode changes for vm-service tests.
Bug: https://github.com/dart-lang/sdk/issues/31587
Change-Id: I9fc7d83aab68ee2b30d71f8a3a75b74fa4dde55e
Reviewed-on: https://dart-review.googlesource.com/30390
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2017-12-19 17:45:55 +00:00
Brian Wilkerson d973fb3bca Rename parseCombinators to parseCombinatorStar
Change-Id: I5caac387a90c9a103182901ac8a1d2a3283e6440
Reviewed-on: https://dart-review.googlesource.com/30501
Reviewed-by: Dan Rubel <danrubel@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2017-12-19 17:37:16 +00:00
Sigmund Cherem 3c74884ebb Use the enclosing builder fileUri when creating classes.
This fixes a subttle bug with patching: we were incorrectly storing the origin
uri on a private class that was only defined in a patch file (it was not a
patched class).

Change-Id: I183b8240be2f452f05bc956642363e9d125d2552
Reviewed-on: https://dart-review.googlesource.com/30387
Reviewed-by: Peter von der Ahé <ahe@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2017-12-19 17:09:14 +00:00
Dan Rubel 63392bdb36 Add fasta parser import uri recovery
Change-Id: If88a4273866ef80f16f2f3fb561dc929c9b16772
Reviewed-on: https://dart-review.googlesource.com/30462
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2017-12-19 17:00:24 +00:00
Brian Wilkerson 5c43484947 Unify three very similar methods into one
Change-Id: I18fbef8abcc8192f4eb287606ff004ae824dbb5c
Reviewed-on: https://dart-review.googlesource.com/30461
Reviewed-by: Dan Rubel <danrubel@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2017-12-19 16:39:44 +00:00
Dan Rubel c2ae2137c9 Improve code completion suggestions in argument lists
This updates keyword code completion to suggest 'async', 'async*',
and 'sync' in new situations. This is necessary given that the fasta
parser recovers in a slightly different way than the analyzer parser.

Change-Id: I44cb42bc02874811df94a6586c7b9c9b5d7574c9
Reviewed-on: https://dart-review.googlesource.com/30460
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2017-12-19 16:06:52 +00:00
William Hesse 7a481b1a96 Add CHANGELOG.md section for stable patch release 1.24.3
Bug:
Change-Id: I7e087042dbb2cc20865f94a2e36724a4da9aa72c
R=floitsch@google.com
Reviewed-on: https://dart-review.googlesource.com/30341
Reviewed-by: Florian Loitsch <floitsch@google.com>
2017-12-19 15:39:33 +00:00
Peter von der Ahé 0fb21eec2f Tweak and document compile-time constant for enabling Fasta's incremental compiler
Change-Id: Icb45e579233f567319439623d67d2a683fb13514
Reviewed-on: https://dart-review.googlesource.com/30447
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Peter von der Ahé <ahe@google.com>
2017-12-19 15:23:43 +00:00
Martin Kustermann 32c4480403 [VM] Fix various issues in the VM, mainly simdbc64 related
* Fixes kernel flow graph builder to use instantiated type argumenst
    for CreateArray

  * Fixes prologue builder to mask the positon of named arguments in the
    arguments descriptor array

  * Add a SmiBitAndTOS instruction to DBC

  * Implement missing AssertSubtype DBC instruction

  * Ensure we don't use field guards in DBC mode

  * Remove incorrect assertions in LoadIndexedUnsafe/StoreIndexedUnsafe

  * Save argdesc_ in DBC simulator when calling the runtime to optimize
    a function (which can call re-entrant to Simulator via const
    evalulation)

Issue https://dart-review.googlesource.com/c/sdk/+/29581

Change-Id: Ia14b657db66f90643822b6986ec7f75f746ab0d8
Reviewed-on: https://dart-review.googlesource.com/30340
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2017-12-19 14:49:52 +00:00
Brian Wilkerson dfc356eb0a Re-order some parameter lists
Change-Id: I1b9235653d0b8f3e2cd79cf254daecaaea27d083
Reviewed-on: https://dart-review.googlesource.com/30323
Reviewed-by: Dan Rubel <danrubel@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2017-12-19 14:06:04 +00:00
Brian Wilkerson 45eb92988c Clean up one use of previous in commitType
Change-Id: I7ba3095e4bc846e20cf621a5f6f7f6a2a3423438
Reviewed-on: https://dart-review.googlesource.com/30322
Reviewed-by: Dan Rubel <danrubel@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2017-12-19 14:06:02 +00:00
Peter von der Ahé 8a68b7d91d Reuse Ticker instance
Change-Id: Iced3191870e83b3962937d967e2bea6a80187aa3
Reviewed-on: https://dart-review.googlesource.com/30446
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Peter von der Ahé <ahe@google.com>
2017-12-19 13:53:24 +00:00
Peter von der Ahé 51d4803855 Add onProblem to provide more flexible error handling
Change-Id: Iafd73e0a065a357170ec8836360644ecfef944b5
Reviewed-on: https://dart-review.googlesource.com/30443
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2017-12-19 12:06:44 +00:00
Lasse Reichstein Holst Nielsen d7e50427b3 Change wording on main functions.
Change-Id: Ib61178a8b3c4f2adfa994d00e24b3320fd7f9cfc
Reviewed-on: https://dart-review.googlesource.com/25400
Reviewed-by: Erik Ernst <eernst@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2017-12-19 11:54:22 +00:00
Johnni Winther d3f6ce4c42 Use _MemberUsage for tracking static use in resolution
- in preparation for tracking unused optional arguments of static methods

Change-Id: Iba4d8aff488f6c366b587d543b063ae742494b15
Reviewed-on: https://dart-review.googlesource.com/29981
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2017-12-19 11:12:02 +00:00
Johnni Winther 66398a511a Store CallStructure in StaticUse
- in preparation for tracking unused optional arguments of static methods

Change-Id: I8a9b1d0d9acd57256d383f880b9c602d91804486
Reviewed-on: https://dart-review.googlesource.com/29801
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2017-12-19 10:21:08 +00:00
Johnni Winther 72443f777d Add more subtype tests
Change-Id: I674d4cf0b1e522d99b5247b725156ed8446620bd
Reviewed-on: https://dart-review.googlesource.com/29583
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2017-12-19 10:07:55 +00:00
Peter von der Ahé 8e127b4e53 Average incremental_perf benchmark over 8 loops
Closes https://github.com/dart-lang/sdk/issues/31675

Change-Id: Ida8d1b626cc4e3375f8f9f1d5b4626756ff16edc
Reviewed-on: https://dart-review.googlesource.com/30181
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Peter von der Ahé <ahe@google.com>
2017-12-19 08:52:52 +00:00
Vyacheslav Egorov 0dc324a68d Revert "[VM] Enable --limit-ints-to-64-bits in Dart 2.0 precompiler, v2."
This reverts commit 2a3f00a179.

Reason for revert: SIMARM bots are timing out.

Original change's description:
> [VM] Enable --limit-ints-to-64-bits in Dart 2.0 precompiler, v2.
> 
> * Enable --limit-ints-to-64-bits for CFE when it is used to generate
>   kernel for VM as CFE relies on int.parse being able to parse correct
>   literals and reject incorrect.
> 
> * Pass --limit-ints-to-64-bits to gen_kernel via environment
>   variable to support batch mode compilation.
> 
> * Use current Dart SDK instead of checked-in Dart SDK to run CFE
>   in gen_kernel as checked-in Dart SDK is old and it doesn't have
>   int.parse fix yet.
> 
> Issue: https://github.com/dart-lang/sdk/issues/31339
> Change-Id: Iaba2a7945a3faa9427f9aab1e9f2b907fa2246a3
> Reviewed-on: https://dart-review.googlesource.com/29941
> Commit-Queue: Alexander Markov <alexmarkov@google.com>
> Reviewed-by: Martin Kustermann <kustermann@google.com>

TBR=vegorov@google.com,kustermann@google.com,alexmarkov@google.com,zra@google.com,asiva@google.com

Change-Id: Iecf26953bc6ae95c3bf0d1142bb89fb51cb0aaee
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Issue: https://github.com/dart-lang/sdk/issues/31339
Reviewed-on: https://dart-review.googlesource.com/30440
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
2017-12-19 08:52:25 +00:00
Ryan Macnak dbbc005042 Update documentation for Dart_CreateIsolate and Dart_IsolateCreateCallback.
Change-Id: I35c22e59b130202eca564a1d5894248bd518bd04
Reviewed-on: https://dart-review.googlesource.com/30380
Reviewed-by: Siva Annamalai <asiva@google.com>
2017-12-19 01:19:06 +00:00
Ryan Macnak a51b45870c Revert "Misc "strong" mode fixes for dart:io."
This reverts commit c6f1ce24f3.

Reason for revert: standalone_2/io/socket_exception_test failing

Original change's description:
> Misc "strong" mode fixes for dart:io.
> 
> Bug: https://github.com/dart-lang/sdk/issues/31587
> Change-Id: I032be8e25aa8d6a851f0bf00ec12b1a3578308c6
> Reviewed-on: https://dart-review.googlesource.com/30080
> Reviewed-by: Zach Anderson <zra@google.com>
> Commit-Queue: Ryan Macnak <rmacnak@google.com>

TBR=rmacnak@google.com,zra@google.com,asiva@google.com

Change-Id: I9af0570577009b54e3a43f083008d65c4c3f9ba3
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: https://github.com/dart-lang/sdk/issues/31587
Reviewed-on: https://dart-review.googlesource.com/30420
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2017-12-19 00:04:10 +00:00
Régis Crelier 588cfcba3d [VM runtime] Shortcut type test when the type argument of FutureOr is Object,
dynamic, or void (fixes #31667).
Update status file.

Change-Id: Iaf2fe159cf9ae9be1124c68c01d05367c15a3d1b
Reviewed-on: https://dart-review.googlesource.com/30384
Reviewed-by: Siva Annamalai <asiva@google.com>
2017-12-18 23:41:55 +00:00
Zachary Anderson 971a15795e [dart:io] Allow setting overrides in the root Zone
Otherwise there is no way to install overrides that affect the whole
program.

related https://github.com/flutter/flutter/issues/13602

Change-Id: I905b7067e79f11051e8204ebb296915d495fd13f
Reviewed-on: https://dart-review.googlesource.com/30100
Reviewed-by: Florian Loitsch <floitsch@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2017-12-18 22:46:07 +00:00
Vyacheslav Egorov 7aeb94423f Revert "[vm] Detect and expand calls through getters in AOT call specializer."
This reverts commit eea2c168f9.

Reason for revert: standalone_2/io/test_runner_test times out

python tools/test.py -m release -c precompiler -r dart_precompiled -a simarm64 --use-blobs standalone_2/io/test_runner_test

Original change's description:
> [vm] Detect and expand calls through getters in AOT call specializer.
> 
> If we know that receiver is a subclass of a certain type and that this
> type has accessor get:m then call o.m(...) is guaranteed to be an
> invocation through a getter. Such invocations are executed most
> efficiently when expanded into o.get:m().call(...).
> 
> Source based pipeline handles this case (at least for invocations on
> `this`) directly in the parser, but Kernel based graph builder does not
> have this sort of special case.
> 
> Instead of teaching Kernel flow graph builder to specially handle
> invocations on `this` we teach AOT call specializer to specially handle
> all invocations where receiver is known to be a subclass of certain
> class. Such optimization is more generic and handles things that
> previously were not handled by the optimization.
> 
> AOT compiler also has heuristics for injecting field dispatchers into
> classes but these heuristics only handle fields of function type and
> don't work for fields like `Function f` or `var f`.
> 
> Improves ParserCombinators benchmark by 4x.
> 
> Bug:
> Change-Id: I365d4fb2140577d02aefbf16fcf6be1bd12413a6
> Reviewed-on: https://dart-review.googlesource.com/29840
> Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
> Reviewed-by: Alexander Markov <alexmarkov@google.com>
> Reviewed-by: Martin Kustermann <kustermann@google.com>

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

Change-Id: I2b891b1674dd07fa43d6414428438c41e3332391
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/30400
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
2017-12-18 22:21:07 +00:00
Ryan Macnak c6f1ce24f3 Misc "strong" mode fixes for dart:io.
Bug: https://github.com/dart-lang/sdk/issues/31587
Change-Id: I032be8e25aa8d6a851f0bf00ec12b1a3578308c6
Reviewed-on: https://dart-review.googlesource.com/30080
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2017-12-18 22:15:06 +00:00
Alexander Markov 2a3f00a179 [VM] Enable --limit-ints-to-64-bits in Dart 2.0 precompiler, v2.
* Enable --limit-ints-to-64-bits for CFE when it is used to generate
  kernel for VM as CFE relies on int.parse being able to parse correct
  literals and reject incorrect.

* Pass --limit-ints-to-64-bits to gen_kernel via environment
  variable to support batch mode compilation.

* Use current Dart SDK instead of checked-in Dart SDK to run CFE
  in gen_kernel as checked-in Dart SDK is old and it doesn't have
  int.parse fix yet.

Issue: https://github.com/dart-lang/sdk/issues/31339
Change-Id: Iaba2a7945a3faa9427f9aab1e9f2b907fa2246a3
Reviewed-on: https://dart-review.googlesource.com/29941
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2017-12-18 21:43:06 +00:00
Sam Rawlins b32a56235e Analyzer: fix 'ignore:' comments at the end of a line.
'//ignore:' comments that sit next to code should not invalidate errors on the
next line.

Fixes https://github.com/dart-lang/sdk/issues/28467

Bug: https://github.com/dart-lang/sdk/issues/28467
Change-Id: I15b1787e5fe4dadcdc72c18409e0b82df11060af
Reviewed-on: https://dart-review.googlesource.com/29548
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2017-12-18 20:07:56 +00:00
Dan Rubel b04e75d2bf Add fasta parser top level variable recovery
Change-Id: I211519f62c5934fca581a8981db2805362bbecd2
Reviewed-on: https://dart-review.googlesource.com/30324
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2017-12-18 20:06:06 +00:00
Vyacheslav Egorov b2eab8b96e [VM/Service] Restore zero-copying handling of JSON messages in vmservice.
In 5a44162c97 in attempt to adhere to declared
method signatures we lost zero-copying JSON decoding of responses from
VM: `Message.sendToVM` was changed to always decode the response into
string before passing it to the caller and the logic to use fused
JSON decoding was removed. This increased peak memory consumption by
the VM Service.

This commit addresses the issue by restoring the zero-copying JSON decoding
logic while adding a wrapper around responses that make it clear what kind
of data is passed around and how that data is encoded and handled.

We introduce a class `Response` which can contain either a Dart string, a
binary data (represented as a Uint8List) or utf8 encoded string (represented
as a Uint8List). This class is used in all places where previously a String
or dynamic were used, e.g. MessageRouter.routeRequest is changed to return
Future<Response> rather than Future<String>. This allows callees to
decode JSON responses without copying them into Dart heap while
maintaining sufficient level of typing to make the code easy to reason about.

This commit also removes some dead code from the VM service related to old
Service API and TAR assets unpacking (which has been long done in C++).

Bug: https://github.com/flutter/flutter/issues/13626
Change-Id: Ifbba56944a552034a0f802a965a313326a1236e7
Reviewed-on: https://dart-review.googlesource.com/30280
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
2017-12-18 19:06:06 +00:00
Sam Rawlins eaa6790ef2 Clean up HttpClient docs
In particular, fix typos, and update many comments to begin with a one-sentence
summary, for better readability at api.dartlang.org.

Fixes #31608, #29460, #31538, #31449, #31505

Bug: https://github.com/dart-lang/sdk/issues/31608
Bug: https://github.com/dart-lang/sdk/issues/29460
Bug: https://github.com/dart-lang/sdk/issues/31538
Bug: https://github.com/dart-lang/sdk/issues/31449
Bug: https://github.com/dart-lang/sdk/issues/31505
Change-Id: If00726ef3636479f0613c91e48ff9f0e24b12502
Reviewed-on: https://dart-review.googlesource.com/30120
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
2017-12-18 18:50:46 +00:00
Sam Rawlins 3bc3ab979e Fix IMPORT_INTERNAL_LIBRARY error location
Fixes #31682

Bug: https://github.com/dart-lang/sdk/issues/31682
Change-Id: Id4f52006aa7ca3e5fb0ecce61c0393310f18764f
Reviewed-on: https://dart-review.googlesource.com/30260
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2017-12-18 18:22:46 +00:00
Dan Rubel 76f30b99f5 Add fasta parser interpolation expression recovery
Change-Id: I45942cf29a86feadcd15fe61432681903658f945
Reviewed-on: https://dart-review.googlesource.com/30360
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2017-12-18 18:04:46 +00:00
Dan Rubel 51162efc45 Add fasta parser missing switch block recovery
This adds fasta parser recovery for missing switch blocks
and removes some redundant error checking code.

Change-Id: I92b875d31f0ada50586f5bd81e5e1c51e0c2ceec
Reviewed-on: https://dart-review.googlesource.com/30321
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2017-12-18 17:32:36 +00:00
Brian Wilkerson d6fdf00f7b Rename a test file, add some tests to the renamed file, and add two missed suites to test_all
Change-Id: I3adf6809b781bd839f0dbff7110eca2f5957590b
Reviewed-on: https://dart-review.googlesource.com/30320
Reviewed-by: Dan Rubel <danrubel@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2017-12-18 17:30:26 +00:00
Vyacheslav Egorov 5ed9895488 [vm/kernel] gen_kernel should not report all errors twice
Bug:
Change-Id: Ib389e053571fa4fe235448fb33f15e5f3b659cdc
Reviewed-on: https://dart-review.googlesource.com/29594
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2017-12-18 16:49:31 +00:00
Vyacheslav Egorov eea2c168f9 [vm] Detect and expand calls through getters in AOT call specializer.
If we know that receiver is a subclass of a certain type and that this
type has accessor get:m then call o.m(...) is guaranteed to be an
invocation through a getter. Such invocations are executed most
efficiently when expanded into o.get:m().call(...).

Source based pipeline handles this case (at least for invocations on
`this`) directly in the parser, but Kernel based graph builder does not
have this sort of special case.

Instead of teaching Kernel flow graph builder to specially handle
invocations on `this` we teach AOT call specializer to specially handle
all invocations where receiver is known to be a subclass of certain
class. Such optimization is more generic and handles things that
previously were not handled by the optimization.

AOT compiler also has heuristics for injecting field dispatchers into
classes but these heuristics only handle fields of function type and
don't work for fields like `Function f` or `var f`.

Improves ParserCombinators benchmark by 4x.

Bug:
Change-Id: I365d4fb2140577d02aefbf16fcf6be1bd12413a6
Reviewed-on: https://dart-review.googlesource.com/29840
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2017-12-18 16:34:26 +00:00
Sam Rawlins b50319ca9f Fix RETURN_OF_INVALID_TYPE for anonymous closures
The displayName of an anonymous closure is a blank String, resulting in messages like:

    [error] The return type 'String' is not a 'int', as defined by the method ''.

After this change, an error might instead look like:

$ xcodebuild/ReleaseX64/dart-sdk/bin/dartanalyzer --strong 26056.dart
Analyzing 26056.dart...
  error • The return type 'String' isn't a 'int', as defined by anonymouse closure at 26056.dart:6:28 • return_of_invalid_type
  1 error found.

Bug: https://github.com/dart-lang/sdk/issues/26056
Change-Id: I4003eea22cb23e0b06479482c06d5ce8a936c756
Reviewed-on: https://dart-review.googlesource.com/28382
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2017-12-18 15:33:06 +00:00
Dan Rubel ad9ea873c7 Add fasta parser switch case error checks
This refactors fasta parsing of switch statements so that it can
detect `case` statements after `default` statements
and duplicate `default` statements.

Change-Id: If9d2590a3563d0fe8940e9f3ed45375f2bebfa24
Reviewed-on: https://dart-review.googlesource.com/30240
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2017-12-18 15:21:36 +00:00
Florian Loitsch c0e4c30adb Mark minimal_incremental_kernel_generator_test as slow.
Change-Id: I3f32dc82c146071ff14ba3345f4ba733b46bc56d
Reviewed-on: https://dart-review.googlesource.com/30220
Reviewed-by: Florian Loitsch <floitsch@google.com>
2017-12-18 13:54:55 +00:00
Dan Rubel fd8c3f8436 Add more fasta parser switch statement recovery
This updates the fasta parser to gracefully recover
when a 'case' or 'default' keyword is not followed
by a colon.

In addition, the analyzer error code associated
with the fasta ExpectedButGot error template
has been changed
from UNEXPECTED_TOKEN
to EXPECTED_TOKEN.

Change-Id: Ic1cc01362b2ed796c0a0817504ac6aa9294fa9b3
Reviewed-on: https://dart-review.googlesource.com/30160
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2017-12-18 12:23:38 +00:00
Brian Wilkerson 7ed0bccca8 Add a README file to the meta package
Change-Id: Id8e9587a0a0f3573dcc713c9244c11d0d142a494
Reviewed-on: https://dart-review.googlesource.com/30140
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2017-12-17 21:53:17 +00:00
Samir Jindel 075720c352 [kernel] Add flag on Procedures for forwarding semi stubs.
Change-Id: I6e39557e9ed2e636a8f43e8835ae797e3fd8b0c2
Reviewed-on: https://dart-review.googlesource.com/29721
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Commit-Queue: Samir Jindel <sjindel@google.com>
2017-12-17 04:12:15 +00:00
Konstantin Shcheglov 31a0fe292d Remember import prefix name for static references.
Bug:
Change-Id: Ib71a9cc8e6c65d597f24c20c0260f7f37ef3674f
Reviewed-on: https://dart-review.googlesource.com/28541
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2017-12-16 05:09:35 +00:00
Brian Wilkerson 439dfe0c29 Revert "Produce an error if there would be an exception thrown by an assert in an initializer list"
Change-Id: I21553a5a3bf12b7636d9ef507092d0e19f9c0d57
Reviewed-on: https://dart-review.googlesource.com/30041
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2017-12-16 01:44:13 +00:00
Dan Rubel 028773e032 Add fasta parser missing switch case recovery
Change-Id: I102586df07cf9178e47b5bb05e8b27af57f393c5
Reviewed-on: https://dart-review.googlesource.com/29920
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2017-12-16 01:34:53 +00:00