Commit graph

66265 commits

Author SHA1 Message Date
Alexander Aprelev b6b4a3d2ca [vm/benchmark] Cleanup Isolates benchmark
Change-Id: Id8e3d45ceac331cdf44292642c0ab3a15fc32987
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115442
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2019-09-04 21:54:57 +00:00
Brian Wilkerson 57314a7e2f Add fixes to create getters in extensions
Change-Id: I9a78cdeac0fddfc23f919956723a884456c4e429
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115480
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-09-04 21:13:45 +00:00
Devon Carew fc88ba0ab0 [pkg:vm_service] add an onDone future to VmService
Change-Id: Ib72aabf3a61c78c51697712e11f7e4736ec0db8c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/114883
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2019-09-04 21:07:34 +00:00
Aart Bik 6be60a76e4 [vm/compiler] fix missing unbox code
Rationale:
Two safe non-speculative cases were missing,
causing AOT to crash on some fuzzing sessions.
Note fuzzer is regression test here.

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

Change-Id: I12c633d66e387c703f1bcf0b6eebd50165bb2970
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115445
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Aart Bik <ajcbik@google.com>
2019-09-04 20:40:31 +00:00
Martin Kustermann c0e327ea85 [vm] Add runtime/.clang-tidy and run clang-tidy in parallel (via dart script)
Change-Id: I1ef69f0be521db2466d1e60663c75c177bc4b778
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115402
Reviewed-by: Samir Jindel <sjindel@google.com>
2019-09-04 20:33:50 +00:00
Mike Fairhurst a931a457f0 [nnbd_migration] support untyped set & map literals
Change-Id: Iaf2c72cfe9415e89e8d9000f473aa364bbcf012a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115267
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
2019-09-04 20:21:03 +00:00
Alexander Markov ea5f0db671 [vm/bytecode] Load bytecode class declaration when referencing class from type in AST
When running from a dill file with AST on the VM with bytecode, we should
ensure that bytecode class declarations are loaded when class is referenced
from a type in AST. Otherwise we could attempt to finalize a type without
proper class declaration.

This change fixes pkg/vm/test/transformations/protobuf_aware_treeshaker/treeshaker_test
with bytecode.

Change-Id: I7a9975e1af6b9e04575f41c5e78b1c2154106e31
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115460
Reviewed-by: Régis Crelier <regis@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2019-09-04 19:45:11 +00:00
Zichang Guo c5e618b3da bump up ABI version to fix red abi bot
Change-Id: I8c2cf558ff605812df3fee10da04e67125055cbc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115441
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Zichang Guo <zichangguo@google.com>
2019-09-04 19:37:41 +00:00
Aart Bik bbe6624074 [vm/fuzzer] Enable control-flow collections, cleanup
Rationale:
Control flow collections are already the default for
a while, but this TODO was still there. We are now
testing all features of CFC fully. Also did some
comment cleanup and removed old-style "new" syntax.
Moved constructors into try-catch just in case
we will add code into constructors in the future.

Change-Id: I557650575f41d7501a0c6f37c07756ca47ad54fd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115444
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Aart Bik <ajcbik@google.com>
2019-09-04 19:30:36 +00:00
Paul Berry 0e7e8eb07e Flow analysis: rework tests
Two changes:

- Rather than remember to call `FlowAnalysis.finish` at the end of
  each test, we now have a `_Harness.run` method that calls it
  automatically.

- Variables are created using `_Harness.addVar` and their declarations
  are reported to flow analysis using `_Harness.declare`.  This allows
  us to more easily test scenarios where a variable might be
  referenced before its declaration site is encountered (which might
  occur due to analyzer error recovery).

Change-Id: I0eff619840aeb057dcce8d64b6c6d23a265f81bd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115421
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-09-04 19:23:41 +00:00
Paul Berry 079ff845a5 Sort tests in flow_analysis_test.dart
Change-Id: I28f81d8160e80ef6cfb7c95c39658d0f5396e6ca
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115420
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-09-04 19:23:41 +00:00
Konstantin Shcheglov 9df2b2d25f Resolution tests for IndexExpression.
Change-Id: I6e0b6a6503860f7eb232f7544afa4c0a408e3c18
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115422
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-09-04 19:22:31 +00:00
Ryan Macnak 67bb2b7819 [vm, compiler] Consistently use CallTargets instead of ICData or MegamorphicCache.
Bug: https://github.com/dart-lang/sdk/issues/37575
Change-Id: I15f3862af380b04498cb58c8658aa6de76212733
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/114445
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2019-09-04 18:49:40 +00:00
Keerti Parthasarathy efe256cf6c Update dartdoc in the SDK to 0.28.5
Change-Id: Id22a9d77bb53adbbca380d6e5dedc48cf0249d09
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115275
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2019-09-04 18:46:40 +00:00
Paul Berry a6ea4037bd Migration: handle static method invocations properly.
Fixes ~22 exceptions with a stacktrace containing the line:

DecoratedClassHierarchy.getDecoratedSupertype (package:nnbd_migration/src/decorated_class_hierarchy.dart:59:10)

Change-Id: I59bfcf19044f2bd985ec9bd4b33f307f9ab5bb24
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115121
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-09-04 18:15:30 +00:00
Paul Berry 8a0b0220e9 Migration: fix two minor bugs in the computation of class hierarchy decorations.
The first bug was that we were assigning an empty map to
`_genericSupertypeDecorations[class_]` prior to computing the supertype
decorations, and then updating the map in place.  This meant that if
an exception occurred while computing the supertype decorations, then
any subsequent requests for supertype decorations on the same class
would lead a partial result.  This led to a lot of weird
counterintuitive behavior.

The second bug was that `Variables.decoratedDirectSupertypes` wasn't
updating the `_decoratedDirectSupertypes` object when an entry wasn't
found; as a result, we were doing a lot of redundant computation.

This should address ~184 exceptions whose stack trace includes the line:

DecoratedClassHierarchy.getDecoratedSupertype (package:nnbd_migration/src/decorated_class_hierarchy.dart:59:10)

Change-Id: I7b7e5191f77c0e1d299923a99d841b6c11ca28c1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115075
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-09-04 18:15:30 +00:00
Samir Jindel 08132661a6 [vm/ffi] Unhide FFI docs.
Change-Id: I3bcf99d49950a2f7f69621455617f324b8258882
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115401
Reviewed-by: Michael Thomsen <mit@google.com>
Commit-Queue: Samir Jindel <sjindel@google.com>
2019-09-04 18:07:01 +00:00
Konstantin Shcheglov 43a7408129 Turn on summary2.
Change-Id: I075531073614f58d14f87016e1896698c9ad2aea
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115440
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-09-04 16:59:23 +00:00
Zichang Guo c3db2e3ee0 [vm] support zoneID for http
Coming from https://dart-review.googlesource.com/c/sdk/+/103544.

Fixes: https://github.com/dart-lang/sdk/issues/37570
Change-Id: I0f81cb5d8009dc929fca24e03a343a7b0c1597bc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110121
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Zichang Guo <zichangguo@google.com>
2019-09-04 15:42:01 +00:00
Paul Berry 39b60a636c Flow analysis: inline _removePromotedAll at the call site.
There was only one call site, and the logic is clearer if all the
logic is in one method.

Change-Id: I59a6e0ce1e3345039146525a9bcd0b72025cbb5d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115006
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-09-04 13:33:52 +00:00
Paul Berry c73df64c94 Flow analysis: move tracking of definite assignment into VariableModel class.
Change-Id: I28cdc6f65aa3488da3538a7b920dc10f87ec1de0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115003
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-09-04 13:33:52 +00:00
pq ec62b1a242 new fix: MAKE_VARIABLE_NOT_FINAL
Fixes: https://github.com/dart-lang/sdk/issues/33290

Change-Id: Ice1c11907ed696d9d209145a4cacf2ca250c17c6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115273
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-09-04 13:14:22 +00:00
Jens Johansen 4bd13a74d9 [kernel] Better error on empty input
Change-Id: Ia1097f7a6ecfb41928749533e7adebcc8063ac64
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115366
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-09-04 12:41:42 +00:00
Jens Johansen 0a669419eb [kernel/CFE] Verify binary.md tags/version against tag.dart and against the VM
Change-Id: I51dda3d6333aefe91fe596ea03d4ee290a3c2595
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115365
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-09-04 12:41:34 +00:00
Martin Kustermann 9a3680c0ef [vm] Fix presubmit script to only invoke clang-tidy if there are any .h/.cc files
Change-Id: I180392e5f77f6a5fa81c529b109e35c76f4deef6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115367
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2019-09-04 12:08:27 +00:00
Clement Skau a1949cd835 [sdk] Removes gen_snapshot.lib from copy_dartaotruntime.
To address: https://dart-review.googlesource.com/c/sdk/+/115340

Change-Id: I6524eddfff9aece7b5670f33ded04abc3112ca18
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115364
Reviewed-by: Sarah Zakarias <zarah@google.com>
Commit-Queue: Clement Skau <cskau@google.com>
2019-09-04 11:21:53 +00:00
Martin Kustermann 6c4fbc11b8 [gardening] Fix recently added assertion, ensuring that instructions in JIT have deopt id if they throw
Change-Id: I39569839aaaad3c3dabdb99a772b22693c3597c4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115361
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Samir Jindel <sjindel@google.com>
2019-09-04 11:00:02 +00:00
Jens Johansen fd27e795ba [CFE] Skip more failing (web) flutter test on bot flutter-frontend
Change-Id: I90117f480e9a181d90022c51f19e74d04030c8bd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115363
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-09-04 09:15:52 +00:00
Clement Skau 201addc553 [typo] SUPPORT_TIMLINE -> SUPPORT_TIMELINE in dart.cc
Change-Id: I5ad181ff5a6a68d8b8426c50f8f3a9eca214dead
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115023
Auto-Submit: Clement Skau <cskau@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Clement Skau <cskau@google.com>
2019-09-04 09:01:17 +00:00
Karl Klose e4a1085b45 [infra] status file clean up tool: add flag to also remove non-essential expectations in lines with comments
Deleted comments are collected and printed or written to a spearate file (when using -w).

Adds an option -i to resolve the status of issue using a log file of issue status changes.

Change-Id: I3939ef949cb32738755065ec74af238d12f71e55
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/114847
Commit-Queue: Karl Klose <karlklose@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2019-09-04 08:57:53 +00:00
Martin Kustermann 1f2316adc5 [vm] Add clang-tidy PRESUBMIT.py check on linux, flag implicit-to-bool conversions
Fixes also some implicit to bool conversions in native_api_impl.cc

Change-Id: I31aecaa1e442f7f934de46ee019765f9f0746658
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115248
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2019-09-04 08:53:12 +00:00
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