Commit graph

63787 commits

Author SHA1 Message Date
Jaime Wren
8de23bbbff Update the Dart Analaysis Server protocol to 1.26.1 to mark that the MOVE_FILE refactoring is now enabled. The functionality landed May 3rd, 2019 with https://dart-review.googlesource.com/c/sdk/+/101320
Change-Id: I7f33b73304a72db1375a6a21132dc8207cc784c6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101630
Reviewed-by: Jaime Wren <jwren@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Jaime Wren <jwren@google.com>
Auto-Submit: Jaime Wren <jwren@google.com>
2019-05-07 22:15:56 +00:00
Paul Berry
ca4b63f067 Remove NullabilityNode.isAlwaysNullable.
This method relied on querying the underlying constraint variable, so
it needed to go in order to migrate away from the contraint variable
implementation.

Change-Id: I0c5004f98fcbb1891ade67266350569a196cf756
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101680
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-05-07 21:11:42 +00:00
Zach Anderson
2d5e82bb7a [watchlists] Remove zra from watchlists
https://media.giphy.com/media/11F0d3IVhQbreE/giphy.gif

Change-Id: I7da5ed7bd17083473817f341a8f4768465441efb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101627
Commit-Queue: Zach Anderson <zra@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Auto-Submit: Zach Anderson <zra@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2019-05-07 21:01:50 +00:00
Alexander Aprelev
f1dcb7f2a9 Fix PRESUBMIT.py so it is python3-compatible.
Change-Id: I751220a9bfbfff61c281c6592477e11ab60877fb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101700
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2019-05-07 20:53:06 +00:00
Paul Berry
df7db795dc Stop using ConstraintVariable.always to represent the nullability of dynamic.
This is a necessary part of reworking nullability migration to stop
using constraint variables entirely.

Change-Id: If6c347c16882edfc2e8bdbeac761e09d8256c9bb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101622
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-05-07 20:15:18 +00:00
Paul Berry
d06c7b7c89 Remove the ability of migration to use ?s in input files as a hint.
This speculative feature turned out to be infeasible, since the files
that are input to migration have NNBD disabled, so `?` is not
permitted.

Change-Id: Ice3fabe436c25718cbe4099a4d9ef86c8aa19896
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101623
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-05-07 20:14:08 +00:00
Jaime Wren
2ee973102c Add some additional tests for variable name completions for variable naming inside of for-statements
Change-Id: Ifbc06485a7378f917770ec41e8f0f602bbc2bd1e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101624
Reviewed-by: Jaime Wren <jwren@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-05-07 20:06:55 +00:00
Paul Berry
2c3114f7a7 Replace most uses of assertConstraint with assertConnection.
This helps reduce the use of constraint variables in nullability
migration tests.

Change-Id: I48fb540489b1124f278b542a7f847c4dd3270185
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101465
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-05-07 19:55:28 +00:00
Paul Berry
5b63d74608 Rework some migration tests to make use of the nullability graph.
This required tracking the map from a node to the nodes that are
upstream from it.

Change-Id: I079fac2196f3928b521b0866fd6f1790e6f24573
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101489
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-05-07 18:34:57 +00:00
Mike Fairhurst
a8b6e18b62 Resolve x ?? y as LUB(X!, Y) instead of LUB(X, Y).
Change-Id: I081d8ec153916fb37e2a949d9fa85a6ea778438e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/92390
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
Auto-Submit: Mike Fairhurst <mfairhurst@google.com>
2019-05-07 16:34:17 +00:00
Brian Wilkerson
78e50a5f9b Revert "Implement the type Never"
This reverts commit 40a06c3a77.

Reason for revert: Introduced a bug that is blocking a roll.

Original change's description:
> Implement the type Never
> 
> Change-Id: Icbf407bc19f602c8382946b1e735905cc165c59c
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100993
> Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
> Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
> Reviewed-by: Paul Berry <paulberry@google.com>

TBR=paulberry@google.com,scheglov@google.com,brianwilkerson@google.com,mfairhurst@google.com

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

Change-Id: Iebb5b8327b0be7129298f39b343555b812314abf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101640
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-05-07 16:22:37 +00:00
Konstantin Shcheglov
986c0791dc Build local elements in constructor initializers.
R=brianwilkerson@google.com

Change-Id: Idb4645bc46a6f4804167d45e6ad809be33be8d53
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101560
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-05-07 15:36:52 +00:00
Konstantin Shcheglov
00c6c53ff8 Include 'exists' into unlinked signature.
We don't report UNUSED_IMPORT when the library file does not exist,
so that libraryElement.isSynthetic, and an empty but existing file
is not the same as not existing at all.

R=brianwilkerson@google.com

Change-Id: I33d911b01f2ca7e1f5c4fdda7083507f469ec6c3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101580
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-05-07 15:28:57 +00:00
Konstantin Shcheglov
32f146afe2 Fix tests that are probably opinions how something should be resolved.
R=brianwilkerson@google.com

Change-Id: I981feeb3e7a128789b8b7fd38e81e4e19beed22e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101600
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-05-07 15:28:47 +00:00
Konstantin Shcheglov
d2d8e8a4a5 Prefer hasLibraryDirective over hasPartOfDirective.
R=brianwilkerson@google.com

Change-Id: Ic411bd057ef1befd1aecd1f05a485430ec16b89d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101467
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-05-07 15:20:56 +00:00
Konstantin Shcheglov
c331ce69a3 Update extract implicitly typed instance property tests.
The reason when there is a difference in summary1 and summary2 behavior
is that in summary2 we link cycle by cycle, and in summary1 we link
all requested libraries together.

R=brianwilkerson@google.com

Change-Id: I173d37d7a6b6c766c641715c6dbce7c1701139f0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101492
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-05-07 15:20:46 +00:00
Aske Simon Christensen
dd6da838f1 [CFE] Avoid cloning bodies of lazy if elements.
Fixes https://github.com/dart-lang/sdk/issues/36812

Analyzer/DDC failures: https://github.com/dart-lang/sdk/issues/36873

Change-Id: I36d61d3035c9275078b368637d53f6385cf8c487
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101262
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-05-07 13:48:48 +00:00
Aske Simon Christensen
3e95afb414 [CFE] Refactor const collection construction into builders.
This refactoring does not change the behavior of the constant
evaluator, but is paves the way for the fix of
https://github.com/dart-lang/sdk/issues/36812

Change-Id: Ie621a352ce6b69ce7e9bd97ffdc688b327e3a7dd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101260
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-05-07 13:48:48 +00:00
danrubel
a83fbc5edb remove unused enable lazyAssignmentOperators flag
Change-Id: I4112fe4ad5a08916d124216753a995d607a9892d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101485
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2019-05-07 13:06:39 +00:00
Clement Skau
ff75c98bf7 Remove two generated files unintentionally included in 100244.
https://dart-review.googlesource.com/c/sdk/+/100244

Change-Id: Icc2264d01dd20cf16f4e3dcaa558adebe74fd70d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101293
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Clement Skau <cskau@google.com>
2019-05-07 08:48:19 +00:00
Johnni Winther
9e90424749 Decouple startup emitter from compiler/backend
Change-Id: I5220cbf6c6ce6369787b2eed33e952dc694128a5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101294
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2019-05-07 07:57:06 +00:00
Johnni Winther
3d7405f198 Separate CodegenImpl from JavaScriptBackend
Change-Id: I9644ca0cd6cb60bf20142d7fa74a559dc516a22d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101292
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2019-05-07 07:57:06 +00:00
Johnni Winther
1c1af2808f Introduce Codegen interface to decouple JavaScriptBackend from the codegen phase
Change-Id: I7effc20d34fa5d5da799c690182eb6f09948c6ff
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101288
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2019-05-07 07:57:06 +00:00
Clement Skau
f1fcd89c2d [SDK] Fix missing argument in tools/bots/dart_sdk.py
This should make the build cycle green again.

Change-Id: I7a355020247d9edb18ad93cb6d890baef312a206
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101295
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Clement Skau <cskau@google.com>
2019-05-07 07:34:33 +00:00
Sigurd Meldgaard
4934f766d7 [vm] protobuf aware treeshaker, Support freezing messages
This also bumps the protobuf version.

Change-Id: I3e2d4f8fddcac5f7ac213fbad5a36804d917e34c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101296
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
2019-05-07 07:12:33 +00:00
Konstantin Shcheglov
3173e594ba Skip not classes in mixin superclass constraints.
R=brianwilkerson@google.com

Change-Id: Ic9f3ed3e032839e1dd953be7dd938c9283851bf8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101466
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-05-07 01:00:53 +00:00
Chinmay Garde
aa64d1d2e6 Allow building Dart with Fuchsia SDK enabled buildroots.
The Fuchsia SDK can now be consumed by non-Fuchsia buildroots to produce
Fuchsia artifacts.

The Fuchsia SDK comes with a JSON manifest that describes the various SDK
"parts". GN targets are stamped for each of these parts. The location of these
GN targets can be configured. That location is set to |fuchsia_sdk_root| in
each buildroot. This variable is defined in //build/fuchsia/sdk.gni in each
buildroot. For buildroots that don't care or know about the Fuchsia SDK, that
file may not exist. This is why, the import of that file is guarded behind
the is_fuchsia flag. When the Fuchsia SDK is enabled, that file will define
values for two required variable |using_fuchsia_sdk| and |fuchsia_sdk_root|.

The first flag defines if the SDK is being used. If unset (but defined), the
builds are in-tree. Eventually we want only SDK builds. |fuchsia_sdk_root|
is set to the spot in the buildroot where the GN targets for the SDK parts
are stamped.

Change-Id: I604612c8d6a21efb07b323610e80b596abc1a6dd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101540
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Chinmay Garde <chinmaygarde@google.com>
2019-05-07 00:43:33 +00:00
Ryan Macnak
704fe5e663 [build] Newer versions of Mac have a predefined _FORTIFY_SOURCE that creates a conflict trying to set it with a compiler argument.
Change-Id: I7518f30a8eaf4302f76326db1ea970fdd9760f61
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101324
Reviewed-by: Zach Anderson <zra@google.com>
Reviewed-by: Aart Bik <ajcbik@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2019-05-06 23:50:32 +00:00
Mark Zhou
149d62bd80 [dartdevc] Adding support for labels in switch statements
Issue: https://github.com/dart-lang/sdk/issues/29352
Issue: https://github.com/dart-lang/sdk/issues/36345
Change-Id: Ic811d0b54784483c1ff642909acf0df1609cf407
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100570
Commit-Queue: Mark Zhou <markzipan@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2019-05-06 22:43:12 +00:00
Konstantin Shcheglov
b27436158a Get GenericFunctionType element from the node, not the type.
R=brianwilkerson@google.com

Change-Id: Ida2c7765fb74e6a768f771a8123dc5fbf541f512
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101462
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-05-06 22:20:52 +00:00
Konstantin Shcheglov
259ab698ab Fix for CompilationUnitElementImpl.nameOffset and type alias code range.
R=brianwilkerson@google.com

Change-Id: I90bb0b74ea52eea883ee4c8accb8f2055ba568a3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101490
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-05-06 22:01:12 +00:00
Konstantin Shcheglov
04db35c3b5 Prevent infinite recursion via not 'self'.
When we are checking `A`, we will catch self-reference and stop.
But when we are checking `B`, we still need to stop.

typedef A A();
typedef B(A a);

R=brianwilkerson@google.com

Change-Id: I8ad57a94301ec3379c2480c782637c502aa02675
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101464
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-05-06 21:57:04 +00:00
Paul Berry
078338bb1d Create a data structure to track the graph of nullability nodes.
The previous design (which stored the graph impicitly in the nodes
themselves) had a memory leak because some nullability nodes are
static, meaning that once a node became connected to one of the static
nodes, it would never be garbage collected.

Change-Id: I9821660198e29ff974ee0afa678851e0418e0527
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101487
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-05-06 21:48:02 +00:00
Sigmund Cherem
9ac7bd7855 Ensure we have a scope for variables when visiting fields
Fixes https://github.com/dart-lang/sdk/issues/36864

Change-Id: I66d70cc30b26bd069d4ab5e2b98f0f5954f3ef59
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101460
Auto-Submit: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-05-06 21:43:42 +00:00
Brian Wilkerson
821c75c584 Update a test comment
Change-Id: I6bb053a128a689d35ae1c21b29c6a7e8bb869fad
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101321
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-05-06 21:19:20 +00:00
Mike Fairhurst
7928dbd270 [analyzer] Resolve nullability of generic function types
Change-Id: Ie14ae8844b83f54b5e2c9d1d5424ca8f015bb5d0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101463
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
2019-05-06 21:18:59 +00:00
Mike Fairhurst
36c315eacc [analyzer] resolve x?.y to return T?
Change-Id: I3ef319621753364b8d70e79b2ab32d7ec9c1e8d8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/92383
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
2019-05-06 21:09:39 +00:00
Matthew Dempsky
a53c12d07a [vm] Use std::unique_ptr with Message
Message is a C++ type with a simple ownership model appropriate for
std::unique_ptr. This CL applies the following changes:

1. All uses of "new Message(...)" are replaced with
"Message::New(...)", which is effectively
"std::make_unique<Message>(...)". (The latter was only added in C++14,
but Dart still compiles in C++11 mode.)

2. All owning Message* are replaced with std::unique_ptr<Message>. The
notable exception is MessageQueue, which still uses raw Message*
internally to simplify the linked list handling.

3. All "delete message;" statements are removed.

4. Uses of "NULL" replaced with "nullptr" as necessary.

Change-Id: I05b5804289f2a225bfa05d3c1631129358fed373
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101222
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Matthew Dempsky <mdempsky@google.com>
2019-05-06 21:01:39 +00:00
Konstantin Shcheglov
457e58c637 Type promotion requires current function body.
So, wee set one when resolving constructor initializers, even if it
is empty.

R=brianwilkerson@google.com

Change-Id: Ia63e60ed40bbf7e9c7f681acbce9548cc03bca65
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101486
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-05-06 20:52:13 +00:00
danrubel
79f4ecf191 report error on const method with empty body
Fix https://github.com/dart-lang/dart_style/issues/810

Change-Id: I5ff31f0cdcc89f9b05b9079698a752b875518da2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101441
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2019-05-06 20:00:38 +00:00
Konstantin Shcheglov
6aab33ff09 Fix for setter names in library local declarations.
R=brianwilkerson@google.com

Change-Id: Ie4df5f075b39d78eb508e9dfb7a5bb0e9442e0d4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101484
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-05-06 19:53:15 +00:00
Konstantin Shcheglov
271c8465f4 Rewrite AST when resolving constants.
R=brianwilkerson@google.com

Change-Id: I952a5848e498fac54b29202edce66eea019d3414
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101483
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-05-06 19:52:43 +00:00
Konstantin Shcheglov
dd185a029e Build local elements for metadata.
R=brianwilkerson@google.com

Change-Id: Ie4f997eb577d2b8496bb68ce7ab546f20ae14787
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101482
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-05-06 19:52:35 +00:00
Brian Wilkerson
0e4370d75f Fix exception when libraries cannot be resolved (issue 36863)
Change-Id: I293cbcc2ba966a62bb40b1eba9c3d25b524cb8cb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101481
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-05-06 19:29:53 +00:00
Chingjun Lau
51730db51b Add flutter track widget creation transform to bazel kernel worker
Had to do a few changes to make this happen:
1. Restored some of the code removed in the transformer, making class
hierarchy optional.
2. Split the "compile" method in bazel_worker.dart into two, since we
need the intermediate Component object in one of the case.

Change-Id: I0ee004467e76dff0025f7979834c62b9db328ecc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100480
Commit-Queue: Jake Macdonald <jakemac@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
Reviewed-by: Jacob Richman <jacobr@google.com>
2019-05-06 19:20:08 +00:00
Konstantin Shcheglov
8d1ed856d2 Always create DeclarationsTracker in AnalysisServer.
R=brianwilkerson@google.com

Change-Id: I1de49423d921da1fdf78ecd480a26e4577efcfe9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101480
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-05-06 18:56:13 +00:00
Jaime Wren
f6ba1abab1 Additional MOVE_FILE bazel tests that cannot yet be run due to the expectations around analysis roots and the refactoring test framework.
Change-Id: Idea9b52a7e1be39750cdfa4b40e2e0d5756e20fd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101442
Reviewed-by: Jaime Wren <jwren@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-05-06 18:11:42 +00:00
Alexander Markov
c3285a77d6 [vm/bytecode/compiler] Make sure the first successor in branches corresponds to fallthrough
Forward jumps in bytecode usually go to the 'else' part (skipping 'then')
or exit loops. In order to generate Branch instructions in flow graph
which would represent ifs and loop conditions more naturally the first ('true')
successor of a BranchInstr should correspond to fallthrough in bytecode, and not the
target of a Jump bytecode instructions.

This results in a slightly better register allocation.

Golem shows overall improvement +0.4620% on x64 and +0.8395% on arm64.

Issue: https://github.com/dart-lang/sdk/issues/36429
Change-Id: I1ea581ef9f5998eb960914680d0e867c57639f1f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101361
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2019-05-06 17:50:57 +00:00
danrubel
4655f63670 update analyzer.Scanner to track featureSet
Change-Id: Ide1ed3fc83831ab2a957b6e823f515135611614b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101440
Commit-Queue: Dan Rubel <danrubel@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-05-06 17:46:52 +00:00
Alexander Markov
e1d6decd7b [vm/bytecode/compiler] Mark _simpleInstanceOf calls with Token::kIS
'is' checks which are represented as _simpleInstanceOf() calls
are sometimes recognized by Token::kIS and not by a target of a call.

Before: TypeChecks.IsCheck(RunTime): 279.63057234726693 us.
After: TypeChecks.IsCheck(RunTime): 200.77956524794217 us.
(best of 5 runs)

Issue: https://github.com/dart-lang/sdk/issues/36429
Change-Id: I5a22222c59c33d2fa8262383a597c2c013ab61b6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101322
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2019-05-06 17:42:53 +00:00