Commit graph

66234 commits

Author SHA1 Message Date
Michael Thomsen
5e549b3d21 Update CHANGELOG.md
Clarify cast example for const expressions

Closes #38181
https://github.com/dart-lang/sdk/pull/38181

GitOrigin-RevId: 6b11ef6fa885659a4680c12d433a0b2aa7a228ac
Change-Id: If37be42bbeb2a6da0ec655de340e738bf6cc34da
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115260
Reviewed-by: Leaf Petersen <leafp@google.com>
2019-09-04 07:58:23 +00:00
Johnni Winther
1946d9d7a0 [dart2js] Add tests for issue 37724
Change-Id: I9df9daf9573906818564650495fa82e80200f607
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115024
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2019-09-04 07:20:50 +00:00
Karl Klose
f2789f74fc [infra] Remove non-essential test expectations with comments from pkg status file
Change-Id: I8e5d565cf92491c486d1210455837adeb317c6b5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/114856
Commit-Queue: Karl Klose <karlklose@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2019-09-04 07:18:51 +00:00
Jens Johansen
a01dd3655f [CFE] Let compile platform include more required libraries"
That should allow us to "implement"
6f85cb83cf again in two steps:
* first we remove the dart:profiler as a required library, but retain it in the platform
* (we wait for stuff to roll, both in flutter and in google3)
* we remove it completely (i.e. not retaining it in the platform, removing the source etc)

Change-Id: Ieb77c2ba909300c05f3923c2edba7cab7d34fae6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115244
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-09-04 06:57:10 +00:00
Sam Rawlins
35c011c030 Update meta docs to consider mixins and static extensions
* Update optionalTypeArgs to consider mixins and static extensions
* Update visibleForOverriding to consider mixins
* Update visibleForTesting to consider private declarations, and
  declarations on unnamed mixins

Bug: https://github.com/dart-lang/sdk/issues/38105
Change-Id: I50b87e0fafd7960abc945b240788b1a640f78621
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115067
Auto-Submit: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2019-09-04 04:01:47 +00:00
Aart Bik
622747502e [vm/interpreter] Enforce consistent interpreter/compiler unboxing view
Rationale:
Both the interpreter and compiler had some logic on when fields
could be unboxed. Rather than duplicating this logic, this CL
uses the same methods to get a more consistent view of unboxing.
Note that this add a slight overhead to the interpreter, but
only a slight. We could avoid this by duplicating the logic
to enforce consistency, but this has the danger of getting
similar issues in the future.

https://github.com/dart-lang/sdk/issues/37821

Change-Id: Icf0c1ad518d75c63e9da72e1f75eaf1cf903587f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115301
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Aart Bik <ajcbik@google.com>
2019-09-04 00:52:27 +00:00
Ben Konyi
54fdd559d8 Revert "Add dart2native tool for building either an aot file or a stand-alone executable."
This reverts commit a6141ff5c9.

Reason for revert: Blocking Dart SDK -> Flutter engine roll. See logs here: https://github.com/flutter/engine/pull/11836/checks?check_run_id=210988794

Original change's description:
> Add dart2native tool for building either an aot file or a stand-alone executable.
> 
> *dart2aot has been rewritten in Dart accompanied by a trampoline script.
> *dart2exec is still missing implementation.
> 
> Change-Id: I4b662ce86c7365fa4d043b48a691881c8ef08a8c
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/108601
> Commit-Queue: Sarah Zakarias <zarah@google.com>
> Reviewed-by: Clement Skau <cskau@google.com>

TBR=cskau@google.com,zarah@google.com

Change-Id: I4c5946ce0f0a66484e243b98cdcb7e2b24e2d705
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115340
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2019-09-04 00:40:20 +00:00
Ben Konyi
1dfba01a3e [ VM ] Don't check if an interpreted frame is marked for lazy deopt
Checking if an interpreted frame is marked for lazy deopt while
preparing to handle an exception was causing an assert to be hit. We
can skip this check for interpreted frames.

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

Change-Id: Icea65868c6291864df93920fa25236bcc36fded5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115268
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2019-09-04 00:09:27 +00:00
Alexander Markov
8e63413fff [vm/bytecode] Explicitly mark _Closure._hash as nullable.
_Closure objects are created by the VM "magically", without invoking
constructor. Usually nullability of fields is calculated when compiling
a constructor, but constructor of _Closure is not compiled. With AST
nullability is also derived from field initializers, but this is not
the case in bytecode mode (as there are no initializers for instance
fields unless they are needed for hot reload).

Fixes language_2/bound_closure_equality_test with bytecode
and --optimization-counter-threshold=5.

Change-Id: If86a276c875f798af8511038326714e66e212cc1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115300
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2019-09-04 00:08:58 +00:00
Ryan Macnak
cc0c86f1e0 [vm] Don't execute Dart code to get hashes during reload.
Change-Id: Ib1f358161ec4e593b7667f8fe16af157914effb5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115160
Reviewed-by: Régis Crelier <regis@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2019-09-03 22:50:38 +00:00
Felicitas Hetzelt
a5ca7e9177 [vm/fuzzer] Fix loading of FFI C-library
Bug: https://github.com/dart-lang/sdk/issues/38146
Change-Id: Id067f8fb77b5d8a57682c9058a4764292e1ecb0d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115274
Reviewed-by: Aart Bik <ajcbik@google.com>
Commit-Queue: Felicitas Hetzelt <felih@google.com>
2019-09-03 22:25:27 +00:00
Felicitas Hetzelt
5db9c6f6cd [vm/fuzzer] Separate iteration limit
Rationale:
The limit on the number of classes is the same as the number of methods
per class, leading to exponential growth of the generated program if
this limit is raised. This patch introduces an optional parameter to
increase the limit separately for different use cases.
Change-Id: Id74d00a47494162a67fd980c163243690c5c1ebb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115004
Commit-Queue: Felicitas Hetzelt <felih@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Aart Bik <ajcbik@google.com>
2019-09-03 22:20:27 +00:00
Konstantin Shcheglov
6bcf67a6a2 Move isLate to VariableElement.
R=brianwilkerson@google.com

Change-Id: I9228dc48a42d7daa08d96b8cd52949a817bcbeff
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115272
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-09-03 21:31:54 +00:00
Samir Jindel
b8ab1d8b7a [vm/jit] All instructions which may throw need a deopt-id.
Fixes https://github.com/dart-lang/sdk/issues/38144

Change-Id: Iad2499fcca5547066d8d7588773e99a99af0a42c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115212
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Aart Bik <ajcbik@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2019-09-03 20:39:26 +00:00
Paul Berry
067f45c7c7 Flow analysis: move misplaced test.
The test `pkg/front_end/test/flow_analysis/type_promotion/switch.dart`
wasn't running because it was declared in the wrong place (it should
have been inside the `data` directory).  Merge it with the existing
test file `pkg/front_end/test/flow_analysis/type_promotion/data/switch.dart`.

Change-Id: Idc98464d88001ce68274a29ed73d02f6c378abc8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115263
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-09-03 20:28:36 +00:00
Paul Berry
c9a75cbbc9 Flow analysis: fix crash in for_conditionBegin.
The crash occurred when:

- The body of the for-loop contained a write to a variable that was
  declared inside the body of the loop.

- At least one variable was declared outside the for-loop.

Fixes #37983.

Change-Id: I241312e1f1c9efb879bbff93fc0ca569d8ec8370
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115262
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-09-03 20:28:36 +00:00
Brian Wilkerson
a07f0dc40f Remove an unused parameter
Change-Id: I48b4e4138315656168b475ea532a88a75acf51a0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115271
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-09-03 20:19:46 +00:00
Johnni Winther
ab8e70addd [cfe] Handle implicit extension access inference
Change-Id: Ia46976af37b586a7b88e3ff8465894e6858a6759
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115210
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-09-03 20:10:26 +00:00
Konstantin Shcheglov
946e7e3913 Issue 37005. Use FunctionType to get parameters.
R=brianwilkerson@google.com

Bug: https://github.com/dart-lang/sdk/issues/37005
Change-Id: Ic149578a98414a8670cbbdf70a5762656fbb66a1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115270
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-09-03 20:03:16 +00:00
Konstantin Shcheglov
67ac9cf52c Don't report ASSIGNMENT_TO_FINAL or ASSIGNMENT_TO_FINAL_LOCAL for late variables.
R=brianwilkerson@google.com

Change-Id: I72feef1b1e78ab787fa538d7ff87e20c04a644fc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115269
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-09-03 19:38:16 +00:00
Felicitas Hetzelt
cb0abfef47 [vm/fuzzer] Avoid recursive assignments in foreach
Rationale:
Adding a new element to a Map while iterating over the same Map
will cause an exception. This patch should avoid such assignments.
Change-Id: I82e461deabcf41291fe0d584905fbb03da2c8b08
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/114752
Commit-Queue: Felicitas Hetzelt <felih@google.com>
Reviewed-by: Aart Bik <ajcbik@google.com>
2019-09-03 18:33:15 +00:00
pq
da502f85a7 add assist association for curly_braces_in_flow_control_structures
See: https://github.com/dart-lang/linter/issues/1374

Change-Id: I151170ee2374a726dc6be037b25e1c7a54729bec
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115266
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2019-09-03 18:24:57 +00:00
Samir Jindel
0a272400ec [vm/aot] Use object identity for enqueued_functions_ and functions_to_retain_.
Change-Id: Idc37052ad78ed79967841d5ecbb2ff34f5184f1b
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-product-x64-try,vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-android-release-arm-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115249
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2019-09-03 17:58:37 +00:00
Alexander Markov
5999cd9838 [vm/compiler] Account for phis in the successor block when merging blocks
This fixes language_2/control_flow_collections/for_inference_test
with bytecode and --optimization-counter-threshold=5.

Change-Id: I61ea83c92ea04a71edf564a9a68b57af1a17103f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115077
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Aart Bik <ajcbik@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2019-09-03 17:42:01 +00:00
Brian Wilkerson
d92ffcb771 Change where we decide that unnamed extensions are private
Change-Id: If9a979d58418f9405c362acc746ec37e51562cc7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115264
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-09-03 16:44:18 +00:00
Brian Wilkerson
233b4a71ca Deprecate some unnecessarily duplicated error codes
Originally the spec made a distinction between when some of these
conditions were errors and when they were warnings. That distinction has
been removed, so this just cleans up our code to reflect that fact.

Change-Id: I3a6fdae2896eb93c6b9cacfea790cd9b553feec5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115261
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-09-03 16:01:25 +00:00
Danny Tuppeny
6e64750d85 Tweak LSP symbol kind for extensions
Change-Id: I60be9519670f860fc466588dbcf0f08fb3d3ef9c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115245
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Danny Tuppeny <dantup@google.com>
2019-09-03 14:30:16 +00:00
David Morgan
54b95f1c8b Revert "[SDK] Remove dart:profiler library which has been deprecated since Dart 1.2"
This reverts commit 6f85cb83cf.

Reason for revert: CFE built before this CL breaks with dill built after; it expects dart:profiler to be present in the dill.

Original change's description:
> [SDK] Remove dart:profiler library which has been deprecated since Dart 1.2
>       and remove all references to it in tests and the SDK build scripts.
> 
> Change-Id: I65a4d71b74c66ca090eba28e922e2f70a7b2989d
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/114965
> Reviewed-by: Ben Konyi <bkonyi@google.com>
> Commit-Queue: Siva Annamalai <asiva@google.com>

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

# Not skipping CQ checks because original CL landed > 1 day ago.

Change-Id: I5fec5c7aec55377ba5cba0b55a25e67682220276
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115242
Reviewed-by: David Morgan <davidmorgan@google.com>
Commit-Queue: David Morgan <davidmorgan@google.com>
2019-09-03 14:26:26 +00:00
Dmitry Stefantsov
8ee22c246e [cfe] Update the api for nullability on TypeParameterTypes
The nullability on the LHS of type-parameter types is assumed to be set
explicitly, at the moment of creation of the type or some time after
that.  The latter case is needed for when the bound of the corresponding
type parameter is not yet set.

The second change is that the overall nullability is not stored in a
field, but is computed as a getter.

Change-Id: Ifbe6922c3a17943dd6c4f054976516c4f6bfc96d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115209
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-09-03 13:35:16 +00:00
Johnni Winther
c50621a560 [cfe] Infer type arguments for explicit extension application
Change-Id: I52d97abf85eadea679f2a48563f575eca1fd8436
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115140
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-09-03 13:17:56 +00:00
Jens Johansen
9f57cf71d7 Add a blacklist to spelling tests; spell-check all packages and sdk with blacklist
Change-Id: I5bf3d5784d2ba48568a2699bb09ae39a85be17c4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115214
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-09-03 12:39:24 +00:00
Aske Simon Christensen
f5839de1ec [cfe] Set named mixin application flag on DillClassBuilder.
The flag is needed by the class hierarchy builder to properly handle
using named mixin application classes as mixins.

Exposed by this: https://dart-review.googlesource.com/c/sdk/+/114560

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

Change-Id: I38dd7129527bbdf12027233161b8939546a4968e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115218
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
2019-09-03 12:38:23 +00:00
Samir Jindel
72e8bdc56b Revert "[vm/ffi] Implement FFI callbacks on AOT for ELF and Asm snapshots (excl. blobs)."
This reverts commit ecbea5a58e.

Reason for revert: broken with bare instructions and ABI bot

Original change's description:
> [vm/ffi] Implement FFI callbacks on AOT for ELF and Asm snapshots (excl. blobs).
> 
> To do this, we add writable data sections (currently uninitialzed) to ELF and Asm snapshots
> and allow Instructions to have patchable relocations against (the start of) these sections.
> 
> Issue https://github.com/dart-lang/sdk/issues/37295 (see also for design & discussion).
> 
> Change-Id: If20bfa55776f4044aaa6bb8ea2101d2ada41842c
> Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-product-x64-try,vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-android-release-arm-try
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110221
> Commit-Queue: Samir Jindel <sjindel@google.com>
> Reviewed-by: Martin Kustermann <kustermann@google.com>

TBR=kustermann@google.com,rmacnak@google.com,alexmarkov@google.com,sjindel@google.com

Change-Id: I9787da6d42575ca4f5ae0a698052a19ac4275afd
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-debug-x64-try, vm-kernel-precomp-linux-product-x64-try, vm-kernel-precomp-linux-release-x64-try, vm-kernel-precomp-android-release-arm-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115240
Reviewed-by: Samir Jindel <sjindel@google.com>
Commit-Queue: Samir Jindel <sjindel@google.com>
2019-09-03 12:31:15 +00:00
Samir Jindel
ecbea5a58e [vm/ffi] Implement FFI callbacks on AOT for ELF and Asm snapshots (excl. blobs).
To do this, we add writable data sections (currently uninitialzed) to ELF and Asm snapshots
and allow Instructions to have patchable relocations against (the start of) these sections.

Issue https://github.com/dart-lang/sdk/issues/37295 (see also for design & discussion).

Change-Id: If20bfa55776f4044aaa6bb8ea2101d2ada41842c
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-product-x64-try,vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-android-release-arm-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110221
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2019-09-03 12:02:02 +00:00
Sarah Zakarias
a6141ff5c9 Add dart2native tool for building either an aot file or a stand-alone executable.
*dart2aot has been rewritten in Dart accompanied by a trampoline script.
*dart2exec is still missing implementation.

Change-Id: I4b662ce86c7365fa4d043b48a691881c8ef08a8c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/108601
Commit-Queue: Sarah Zakarias <zarah@google.com>
Reviewed-by: Clement Skau <cskau@google.com>
2019-09-03 09:36:50 +00:00
Sigurd Meldgaard
af9e298391 Reland "Use identical as shortcut in equality checks"
This is a reland of 4b5893f9cf

Nothing has changed, the revert was accidental.

Original change's description:
> Use identical as shortcut in equality checks
>
> These equality checks are showing up in a profile-run of the type flow analysis.
> For this particular benchmark, time went down ~10% from ~32.2s to ~29.5s.
>
> Change-Id: I158f1db0d0816aa347f89ae0228f7a9a5158318f
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115203
> Reviewed-by: Martin Kustermann <kustermann@google.com>
> Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>

Change-Id: Ia7bdf790f48eab2060f51328a50eaff153483203
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115216
Reviewed-by: Sigurd Meldgaard <sigurdm@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
2019-09-03 09:24:50 +00:00
Teagan Strickland
d2e99c4935 [vm/compiler] Continued work on the IL serializer.
Adds support for:
  Constant
  Goto
  JoinEntry
  PushArgument
  StaticCall

Adds canonical name parsing, which allows us to parse Function
and Field values. Adds ImmutableList, Instance, and TypeParameter
parsing.

Results from compiling hello world program:

* Early round trip:
    * Contains unhandled instructions: 4070
    * Failed during deserialization: 2
    * Successful round trips: 106
* Late round trip:
    * Contains unhandled instructions: 3789
    * Failed during deserialization: 4
    * Successful round trips: 385

Bug: https://github.com/dart-lang/sdk/issues/36882
Change-Id: If9cb4c133e3ba8c62016e545f8471c67cc126290
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/113684
Commit-Queue: Teagan Strickland <sstrickl@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Aart Bik <ajcbik@google.com>
2019-09-03 09:14:00 +00:00
Sigurd Meldgaard
8fb0152af8 Revert "Use identical as shortcut in equality checks"
This reverts commit 4b5893f9cf.

Reason for revert: Got the operator associativity wrong

Original change's description:
> Use identical as shortcut in equality checks
> 
> These equality checks are showing up in a profile-run of the type flow analysis.
> For this particular benchmark, time went down ~10% from ~32.2s to ~29.5s.
> 
> Change-Id: I158f1db0d0816aa347f89ae0228f7a9a5158318f
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115203
> Reviewed-by: Martin Kustermann <kustermann@google.com>
> Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>

TBR=kustermann@google.com,sigurdm@google.com

Change-Id: Ib71ca9595ad7d163de07911b813e9de3c93efcf9
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115213
Reviewed-by: Sigurd Meldgaard <sigurdm@google.com>
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
2019-09-03 07:12:09 +00:00
Jens Johansen
00d14e7dd1 [CFE] Always start constant evaluation error where we are asked to evaluate
Fixes #38167

Change-Id: I57ded79835348a1e02b4949986a8b1668d3e425a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115206
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-09-03 06:16:37 +00:00
Konstantin Shcheglov
6705a135e5 Clean up 'Extract Local' refactoring.
We don't support expression fragments anymore, also don't need to
re-tokenize code.

R=brianwilkerson@google.com

Change-Id: Ic8bf930a2d7b81862ce08925405bdd479db8eaba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115180
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-09-02 20:07:47 +00:00
Konstantin Shcheglov
fe3fc9ed15 Don't use FunctionType.typeArguments in EdgeBuilder.
With summary2 FunctionType(s) don't have them.

R=paulberry@google.com

Change-Id: Iecfc3acec7e3c1132ad912b6cf18f630c2d854e6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115063
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-09-02 18:15:57 +00:00
Danny Tuppeny
3cffdaa01e Fix crash in LSP documentSymbols for extension classes
Handle empty names in document symbols

Change-Id: I336efa1b80c11af555562c6c5fc944bf1671b2e5

Handle extension kinds in document symbols

Change-Id: Ib04e099241abbd82e0676c3a5c5997de1a615adb

Prevent crash when SymbolKinds are not known in LSP

Change-Id: I265755b22fba18c5d5da70456ab2c76ed72a96a7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115207
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Danny Tuppeny <dantup@google.com>
2019-09-02 16:51:56 +00:00
Martin Kustermann
97b1c64efb [kernel] Recursively number constants, avoid swallowing exceptions
Change-Id: Ie4beed397a2632e7dde9b93a9f09aa658bf4b585
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/114841
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2019-09-02 16:20:46 +00:00
Sigurd Meldgaard
4b5893f9cf Use identical as shortcut in equality checks
These equality checks are showing up in a profile-run of the type flow analysis.
For this particular benchmark, time went down ~10% from ~32.2s to ~29.5s.

Change-Id: I158f1db0d0816aa347f89ae0228f7a9a5158318f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115203
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
2019-09-02 14:10:46 +00:00
Jens Johansen
72908edb6d [CFE] Add strong tests for errors reported at 'wrong' place
Change-Id: I3632d379617576e9246efb977d5147c0f5010e45
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115208
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-09-02 12:37:36 +00:00
Jens Johansen
5bf51b4c25 [CFE] Skip failing flutter test on bot flutter-frontend
Skip test that fails to compile because theres an error triggered by
constant evaluation because we're not compiling for a web-platform.
This should turn the bot green.

Change-Id: Icb7a4d5a55f14c146f03e17d06d518f615189e27
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115205
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-09-02 10:38:16 +00:00
Jens Johansen
b6880f76b0 [CFE] Add failing incremental compiler tests wrt re-issuing errors
If errors are caused by some file (say "a.dart") but are reported in
another library (say "b.dart") we are going to re-issue errors we
shouldn't have in the incremental compiler.
This CL introduces some test cases that currently fail.

Bug: 38167
Change-Id: I3c82fa72dab7c4714974c9caedc1906bead143ff
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115202
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-09-02 10:36:48 +00:00
Jens Johansen
1400ab4136 [CFE] Language versioning max/default also setable via compiler options
* Max and default for language version controllable via language options
* Default (if not set) comes from kernel static fields
* Kernel static fields updated to 2.6
* (Also set version for debug expression library)
* Test added that checks that the kernel static fields aren't out-of-date
  (checked against python script "tools/make_version.py").

Change-Id: I65f26053081e4c55c215b677128f37fa970693c6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/114944
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-09-02 07:43:05 +00:00
Karl Klose
29ca4e670a [infra] Remove non-essential test expectations with comments from analyzer status files
Change-Id: I43a5c85fe414c4fc9ed70b926d245c291ef0d28c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/114853
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Karl Klose <karlklose@google.com>
2019-09-02 07:12:10 +00:00
Karl Klose
ed55695f6b [infra] Remove non-essential test expectations with comments from kernel status files
Change-Id: I7f49b31abdf4786365ac2a1e6cedc5ddbfae2ee8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/114852
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Karl Klose <karlklose@google.com>
2019-09-02 07:04:06 +00:00