Commit Graph

56224 Commits

Author SHA1 Message Date
Sigmund Cherem 1b13c73062 Round 1 of .status fixes: to cover d8 bots
TBR=efortuna@google.com

Change-Id: I93e86104760e6e41ea32fbae311535a46a72e4c8
Reviewed-on: https://dart-review.googlesource.com/46386
Reviewed-by: Emily Fortuna <efortuna@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2018-03-14 01:53:58 +00:00
Emily Fortuna ecdd7df091 Correctly return type signature on async closures.
Change-Id: Icd7472185a08245e9b8e7c0b7adb1132e384c43c
Reviewed-on: https://dart-review.googlesource.com/46400
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Emily Fortuna <efortuna@google.com>
2018-03-14 01:03:38 +00:00
Konstantin Shcheglov 389ad7e93f Issue 32114. Fix instantiating typedefs to bounds.
R=brianwilkerson@google.com

Bug: https://github.com/dart-lang/sdk/issues/32114
Change-Id: I215eafb6314fe265d4809ff6ed80e4a567365a4f
Reviewed-on: https://dart-review.googlesource.com/46381
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-03-14 00:31:18 +00:00
danrubel f5ec1143ab Reorganize TypeInfo tests
Change-Id: I03306fcb2a91546931aef3056be36a43e983822a
Reviewed-on: https://dart-review.googlesource.com/46380
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-03-13 23:54:10 +00:00
Ben Konyi b28c4664c0 Revert "[VM] Move runtime/lib/{developer,profiler,timeline}.dart -> ..._patch.dart, fix owner of constructors"
This reverts commit 60a2cfa219.

Change-Id: I6d83653c72d5e8576952a631d23be5be5d9c71f6
Reviewed-on: https://dart-review.googlesource.com/46384
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2018-03-13 22:24:19 +00:00
pq 3918265129 Bump Linter to 0.1.44.
* new `avoid_relative_lib_imports` lint
* new `unnecessary_parenthesis` lint
* fix to `prefer_const_literals_to_create_immutables` to handle undefined classes gracefully
* updates to `prefer_const_declarations` to support optional `new` and `const`
* `prefer_const_declarations` updated to check locals
* fixes to `invariant_booleans`
* bumped SDK lower bound to `2.0.0-dev`
* build and workflow improvements: rule template fixes; formatting and header validation
* miscellaneous documentation fixes

Change-Id: I999891b61c19e602eded4b43449f7d6d96f102e7
Reviewed-on: https://dart-review.googlesource.com/46305
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-03-13 20:03:18 +00:00
Zach Anderson ffb4bc0d5b [vm] Relax low profile period conditions
The lower profiler period should only be needed on older ARM hardware.

Change-Id: I737aee2385f74a5026d9d8155ea8e33c94d92422
Reviewed-on: https://dart-review.googlesource.com/46361
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2018-03-13 19:58:25 +00:00
Sigmund Cherem c438f8b3f4 Dart2js defaults to the new common front-end
Change-Id: Id0f69d258b010a746b56e259335185bcca7dafec
Reviewed-on: https://dart-review.googlesource.com/45143
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2018-03-13 19:25:59 +00:00
Dmitry Stefantsov 8c82c3b5fe Fix instantiate-to-bound algorithm implementation
Change-Id: Ia13867b0ffab9fab527d8dba6d4f10cc90c002c2
Reviewed-on: https://dart-review.googlesource.com/43061
Reviewed-by: Samir Jindel <sjindel@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
2018-03-13 19:18:34 +00:00
Alexander Markov 881c0196aa [vm] Fix type test '_Closure class IS FunctionType' in strong mode
Closes https://github.com/dart-lang/sdk/issues/32508

Change-Id: Ib3455edd393d0ce5ccd5fe315f8d54f14606cc25
Reviewed-on: https://dart-review.googlesource.com/46201
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-03-13 19:08:56 +00:00
Dmitry Stefantsov f8995da6aa Report a compile-time error on magic const
When inferring const or new for expressions that aren't required to be const,
Fasta always choses new. That's not correct, and this is a short-term work
around to avoid introducing a breaking change in the future. The plan is to
implement this feature correctly, but that will require more time than we have
right now.

Originally submitted by ahe@google.com.  Added: status file fixes.

Change-Id: I2d70bd2488de6b69fcd5546c1f4654dfbbb30b7f
Reviewed-on: https://dart-review.googlesource.com/46340
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
2018-03-13 19:07:12 +00:00
Devon Carew 5bc6d66bd9 fix a few --preview-dart-2 issues
Change-Id: Ib4bd63b826d8957cdd2db97e1d5311f52bcdf921
Reviewed-on: https://dart-review.googlesource.com/46304
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2018-03-13 17:46:09 +00:00
Alexander Markov 38f598bf80 [Gardening] Mark timed-out test as Slow
The test language_2/vm/precompiled_static_initializer_test times out
on kernel/precompiler/debug bots. This test enables uncontrollable inlining
which results in a huge amount of code to precompile. Most probably,
it started to time-out because type flow analysis, which was enabled in
https://github.com/dart-lang/sdk/commit/d58887eaf6cb8460e2283d8531bbd8c0611a146d,
does more devirtualization and provides more opportunities for inlining.

Change-Id: I915132f81529cc967f62f9546d16a60cb4e8aed7
Reviewed-on: https://dart-review.googlesource.com/46303
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2018-03-13 17:32:09 +00:00
Brian Wilkerson ea94e65b43 Make preview-dart-2 imply strong-mode
Change-Id: Ifa230f9e64a538e222557ea471dc728ad3dd01d7
Reviewed-on: https://dart-review.googlesource.com/46300
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
2018-03-13 17:15:39 +00:00
Brian Wilkerson f66854a700 Fix a type issue found when running analyzer with a VM flag of --preview-dart-2
Change-Id: I36954eb08b9d9a7cb24e6cb24baa51ef0a608a36
Reviewed-on: https://dart-review.googlesource.com/46123
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
2018-03-13 16:39:19 +00:00
Paul Berry 28cdeb3a49 Store method invocation arguments in summaries when needed for type inference.
When summarizing an initializer expression that contains a method
call, we need to store the method arguments in case they are needed
for type inference.  They might be needed if the method in question is
a generic method and no type arguments are provided at the call site.

Since we do serialization based on an unresolved AST, we can't tell if
the method in question is generic at serialization time, so we
serialize the arguments of any method invocation that doesn't specify
explicit type arguments.

Addresses one of the root causes of #32394

Change-Id: Ibb50bdfc5ed29a518f51b13d2ffd72c484ab461d
Reviewed-on: https://dart-review.googlesource.com/46301
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-03-13 16:03:59 +00:00
Sigmund Cherem e5f490fb00 Roll a new version of pub
There was only 1 change since the last roll.

Change-Id: I44a8ef56bc16d4bc4616480025125f1ca64beff8
Reviewed-on: https://dart-review.googlesource.com/46221
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2018-03-13 15:37:09 +00:00
Brian Wilkerson f1586f3bca Remove the unused type parameter from ResultCachingPolicy
Change-Id: I858eaf7365d668bcb19ea35f6d0bbdee4b42897c
Reviewed-on: https://dart-review.googlesource.com/46160
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-03-13 15:30:09 +00:00
Dan Rubel ff9591d2d3 Extract computeType from parseType for better recovery
This CL extracts the core logic out of parseType into a new computeType
function. This enables the TypeContinuation logic in parseType to be
moved into the callers of parseType so that recovery can be improved.

Change-Id: Ibded6f5eacfeaccdc6c56e234b305596d9582a92
Reviewed-on: https://dart-review.googlesource.com/45760
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-03-13 14:49:59 +00:00
Peter von der Ahé 856c582383 Introduce an enum to track constant context
Change-Id: I862654e07028290f1856dc7548fa39673d8c4ac8
Reviewed-on: https://dart-review.googlesource.com/46243
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2018-03-13 14:23:10 +00:00
Lasse R.H. Nielsen 6f13072739 Add toString to MapEntry.
Fixes #32464

BUG: http://dartbug.com/32464

Change-Id: I1462452c3f6a7838aeaaa84e3fb0e092a3f85338
Reviewed-on: https://dart-review.googlesource.com/45704
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2018-03-13 13:57:59 +00:00
Martin Kustermann 8dadc89bfb [VM] Disallow ConstructorInvocation/ListLiteral/MapLiteral in constant evaluator
Change-Id: I4ef12bd25974bba9aa69127630b05f2e4fd46657
Reviewed-on: https://dart-review.googlesource.com/46241
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-03-13 12:59:09 +00:00
Lasse R.H. Nielsen 00dae36b47 Add of constructors to collections.
Change-Id: Ic9a180cbb758cf8fe51369d904fa4b51fd1b8e27
Reviewed-on: https://dart-review.googlesource.com/44480
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2018-03-13 12:57:49 +00:00
Alexander Thomas 019dae1904 [infra] Remove front end unit tests from other builders
The new front end builders will continue to run them.

Change-Id: Iffd5af76bd3a082256ea4fb146981737462938f9
Reviewed-on: https://dart-review.googlesource.com/46042
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: William Hesse <whesse@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
2018-03-13 12:40:39 +00:00
William Hesse dfbd8f044b Update status for analyzer on Windows after test.py fixes
R: ahe@google.com
Change-Id: I46b43bfefcdfce05408cefc5a82071f061e6a9eb
Reviewed-on: https://dart-review.googlesource.com/46246
Reviewed-by: Peter von der Ahé <ahe@google.com>
2018-03-13 12:25:24 +00:00
Johnni Winther f58659399d More status fixes
Change-Id: Ib43800c9fe0da786a154d7b42f9784e45c690a77
Reviewed-on: https://dart-review.googlesource.com/46245
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2018-03-13 12:12:17 +00:00
Johnni Winther 85720e4eb3 Fix status of dart2js-with-kernel tests
Change-Id: I2f5a1589b800fc1d453f5dd6f941f77c42250acc
Reviewed-on: https://dart-review.googlesource.com/46242
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2018-03-13 11:22:44 +00:00
Paul Berry 424ae0f5e4 Check contravariance of property gets that resolve to fields.
Fixes #32501

Change-Id: Ic3c5aca1d12b73e40e63c6cdd8304b95f54e5497
Reviewed-on: https://dart-review.googlesource.com/46002
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-03-13 10:37:09 +00:00
Martin Kustermann 60a2cfa219 [VM] Move runtime/lib/{developer,profiler,timeline}.dart -> ..._patch.dart, fix owner of constructors
This makes sure we can distinguish e.g. 2 different timeline.dart files
(from runtime/lib/timeline.dart and sdk/lib/developer/timeline.dart)

This CL also fixes the owner of constructors to be patch classes, if
the constructors come from a patch.

This CL also adds a service/valid_source_locations_test, which loops
over libraries/classes/fields/functions and obtains source locations for
them, including line numbers.  This ensures that if there is a source
location attached to a member, we can use it's token position to get to
the line number.

This CL also changes package:kernel's [Cloner] to clone fileOffsets (and
not just fileEndOffsets). This is important for mixin resolution, where
we copy members into mixin application classes.

Issue https://github.com/dart-lang/sdk/issues/32489

Change-Id: I4fea5cd646d81f47e1c4ede1e86d477ba6de3e82
Reviewed-on: https://dart-review.googlesource.com/46141
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-03-13 10:27:26 +00:00
Johnni Winther b08bedee7e Update RuntimeTypesNeed to disable rti optimization
- for local signatures in strong mode.

Change-Id: I0cafead24b24a534813449b6bf710eeafcb569bd
Reviewed-on: https://dart-review.googlesource.com/46064
Reviewed-by: Emily Fortuna <efortuna@google.com>
2018-03-13 10:09:26 +00:00
Johnni Winther 42e7598f5d Don't emit function signatures for non-closure classes in Dart 2
Change-Id: I144ddd60abebe41549c1f5304d73cb56042c7289
Reviewed-on: https://dart-review.googlesource.com/46043
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-03-13 09:50:39 +00:00
Erik Corry 65776fdc3e [VM] ARM64: Fix tbz instruction for bit positions >= 32
R=kustermann@google.com

Change-Id: I03f42ee44a37da7e064f79db18a7f45fa25ee010
Reviewed-on: https://dart-review.googlesource.com/46063
Reviewed-by: Martin Kustermann <kustermann@google.com>
2018-03-13 09:31:50 +00:00
Peter von der Ahé b0a2e6b9c9 [test.py] Handle Windows file names correctly.
Change-Id: I1b4707826c00144da3190e75e19870b7e39acbf3
Reviewed-on: https://dart-review.googlesource.com/46065
Commit-Queue: Peter von der Ahé <ahe@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2018-03-13 09:16:18 +00:00
Peter von der Ahé 8a9956d4a7 [dart2js] Handle Windows file names correctly.
Closes https://github.com/dart-lang/sdk/issues/31899

Change-Id: I0577e9cd5bab7083df53ccbee7ffb2258f08a442
Reviewed-on: https://dart-review.googlesource.com/46080
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Peter von der Ahé <ahe@google.com>
2018-03-13 09:15:48 +00:00
Johnni Winther 1df3150d05 Compute emitted function signatures in RuntimeChecksBuilder
Change-Id: I9801df4e14ca70ac17bbec3d7fb5b53a138582f0
Reviewed-on: https://dart-review.googlesource.com/45702
Reviewed-by: Emily Fortuna <efortuna@google.com>
2018-03-13 09:14:36 +00:00
Jens Johansen 5e629d24ac Hot reload test that demonstrated a hot reload failure before fix
Fix was given in 66af0113de

Change-Id: I5209d4951cc00a5656e852c7c418dd198a317a5a
Reviewed-on: https://dart-review.googlesource.com/46041
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-03-13 08:44:42 +00:00
Lasse Reichstein Holst Nielsen 0b5d718489 Change return type of decodeBase64 to Uint8List.
Matches base64.decode.

Change-Id: Ida4e2a450940217959089d5bc48b6462b52df755
Reviewed-on: https://dart-review.googlesource.com/46140
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2018-03-13 08:12:52 +00:00
Sigmund Cherem dc67800cb8 One more tweak to co19 status file, preparing for turning CFE by default on
dart2js

TBR=efortuna@google.com

Change-Id: Iae1d0d3942665b194152ecfbed77e4623cb6fa4c
Reviewed-on: https://dart-review.googlesource.com/46127
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2018-03-13 00:34:49 +00:00
Mike Fairhurst 6f3b6bfb62 Do the rounds for new analyzer publish + fix analyzer_plugin.
I'm not sure -- I ticked analyzer to 0.32 from 0.31-alpha.

I think because of the new methods, this is the right call (though it
leaves us in the weird place where there was no stable publish of
0.31.2?)

Also not sure if I need to update any other downstream packages (args?
dart_style?). Seems like if so, those are all in other repos.

Change-Id: I512e6674549a99fdafe47f2138738463f4e66e37
Reviewed-on: https://dart-review.googlesource.com/46126
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
2018-03-12 23:02:29 +00:00
Adam Barth 3c6961fcc2 [fuchsia] Update to the FIDL2 String API
Change-Id: Ie7dc0ee3236587c9e86fba862c9ae2275f8e44dc
Reviewed-on: https://dart-review.googlesource.com/46200
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Adam Barth <abarth@google.com>
2018-03-12 22:58:29 +00:00
Alexander Markov d58887eaf6 [vm/kernel/aot, test tool] Enable global type flow analysis
Issue: https://github.com/dart-lang/sdk/issues/30480
Change-Id: I984869a8cdd9c52cab677cab64b562d002cde490
Reviewed-on: https://dart-review.googlesource.com/46122
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2018-03-12 22:45:39 +00:00
pq c7224d8187 Update .gitignore to new dart_tool pub cache
See: https://github.com/dart-lang/sdk/issues/32030
Change-Id: I8210b963cec3656544e57fe468a59bd236b3c591
Reviewed-on: https://dart-review.googlesource.com/46000
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-03-12 22:44:51 +00:00
Alexander Markov ef80524b4f [benchmarks trybot] Add precompiler_entry_points.json
Change-Id: I3edbf7b20f3ab7afce89d7adabd537a6e47133d0
Reviewed-on: https://dart-review.googlesource.com/46005
Reviewed-by: Zach Anderson <zra@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2018-03-12 22:11:10 +00:00
Ryan Macnak 66af0113de [vm, reload] Eagerly assign static field initializers a PatchClass owner.
Static field initializers are not added as members of their owning class, so they must be pre-emptively given a patch class to avoid the meaning of their kernel/token position changing during a reload. Member functions and fields have their owner changed to patch class only when the class is changed during a reload.

Curiously, this was originally done in the C++ front end before hot reload: https://codereview.chromium.org//1317753004

Bug: https://github.com/dart-lang/sdk/issues/32497
Change-Id: I236c188a4b9e05a1e3c011d27e123979db1ca2e5
Reviewed-on: https://dart-review.googlesource.com/46124
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-03-12 21:12:29 +00:00
Ben Konyi 3c8d3b6870 [VM] Refactored console configuration out of platform_*.cc into console_config.h and reapplied c9700040c3 for POSIX platforms (Windows needs more work). We may also want to move code in bin/stdio.h.
Change-Id: Ic7cbc690f490e0127387d9a23866ea7eddbc84cf
Reviewed-on: https://dart-review.googlesource.com/45746
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
2018-03-12 20:31:09 +00:00
Ryan Macnak 180866dc46 [vm] Make Dart_DumpStackTrace work when there is no current isolate.
Bug: https://github.com/dart-lang/sdk/issues/32391
Change-Id: Idb1b44509a7bf2269e2f2c0dc1f7ffa0a2a4408c
Reviewed-on: https://dart-review.googlesource.com/44804
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-03-12 19:59:23 +00:00
Brian Wilkerson be916c18ee Pull the latest version of protobuf into the sdk to fix a preview-dart-2 error
Change-Id: Ic672d34a111800cd92f4f4fc77f059c2b6e7a008
Reviewed-on: https://dart-review.googlesource.com/46121
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-03-12 19:41:49 +00:00
Konstantin Shcheglov c0d69c365e Include default constructor in getElementDeclarations().
We record actual empty name for such constructors.
The client has enough information - kind CONSTRUCTOR, and empty name,
to decide on presentation.

R=brianwilkerson@google.com

Bug: https://github.com/dart-lang/sdk/issues/32495
Change-Id: I7cfd09c1e012a7c5ee72f7bb32fb0f258aaff148
Reviewed-on: https://dart-review.googlesource.com/46004
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-03-12 18:38:29 +00:00
Brian Wilkerson 2a8f503f40 Add required package to the pubspec
Change-Id: I44595ca05aca3aeadcd51090f0d9613a605dc975
Reviewed-on: https://dart-review.googlesource.com/46120
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-03-12 18:20:32 +00:00
Konstantin Shcheglov de6b837b5f Support for function typed parameters in getElementDeclarations().
R=brianwilkerson@google.com

Bug: https://github.com/dart-lang/sdk/issues/29510
Change-Id: I2ae8f69cd265286537623eaa0bf15a62c35a5bb8
Reviewed-on: https://dart-review.googlesource.com/46003
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-03-12 17:40:58 +00:00