Commit Graph

56224 Commits

Author SHA1 Message Date
Brian Wilkerson 9df1d66b57 Flip analyzer and server to preview-dart-2 by default
Change-Id: I5d009debf962ba49ae715a87aa117538f552fbdb
Reviewed-on: https://dart-review.googlesource.com/47122
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2018-03-19 20:57:17 +00:00
Dan Rubel 8fde515354 Inline modifiers into beginTopLevelMethod event
Change-Id: I40423fcd53dc6a374a1c5be280d1806c31f34a6d
Reviewed-on: https://dart-review.googlesource.com/47120
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-03-19 20:20:37 +00:00
Konstantin Shcheglov 1d184ace7b Fixes for packages:args deprecated uses.
Mostly addOption() -> addMultiOption().

Change-Id: Iab40059aab45a371e0def89fbdfcd08bd1487d47
Reviewed-on: https://dart-review.googlesource.com/47121
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-03-19 20:15:37 +00:00
Sigmund Cherem 0c75857ad8 Fix old2new API conversion to use utf8.encode
Pub still uses the old API to provide inputs. Source files are provided as
String, which were were incorrectly provided as codeunits. The FE expected the
binary input to be utf8 encoded.

As a separate follow up, I can update pub to provide binary data directly, or
even move it to use the new API instead so we can delete the old API soon.
Because pub-build is being replaced, I'm inclined to only do a small fix there.
Closes #32561

Bug= dartbug.com/32561
R=johnniwinther@google.com

Change-Id: I69d9ac896d534427a918ded721ee946aa5c0fc34
Reviewed-on: https://dart-review.googlesource.com/46945
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2018-03-19 19:55:16 +00:00
Terry Lucas 2c902f359f Not quite the full test name.
TBR=whesse@google.com

Change-Id: Idf5568b9c9504ffcf082e7df1d7bd37bd314504f
Reviewed-on: https://dart-review.googlesource.com/47140
Reviewed-by: Terry Lucas <terry@google.com>
2018-03-19 18:25:14 +00:00
Brian Wilkerson 6856e70b2f Disable unused tests
Change-Id: Ib5c50063215e282c2b28b2b2fc207a3d63f81413
Reviewed-on: https://dart-review.googlesource.com/47100
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-03-19 18:00:26 +00:00
Ryan Macnak 3989d09c95 [vm] Move writing snapshot magic value from embedder to VM.
Add Dart_IsSnapshot and Dart_IsKernel to the embedding API.

Change-Id: I7d4e1d145557e8f11dbc3c143767ad38b3615a4a
Reviewed-on: https://dart-review.googlesource.com/46360
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2018-03-19 17:47:55 +00:00
Lasse Reichstein Holst Nielsen a81bc639b5 Fix bug in BigInt.from with certain double values.
Add test.

Change-Id: I385f7237e1b3d004b4401e18a82919b15d097181
Reviewed-on: https://dart-review.googlesource.com/46460
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Florian Loitsch <floitsch@google.com>
2018-03-19 17:46:35 +00:00
Konstantin Shcheglov 538dbb62d6 Don't expect type arguments for class type parameters of static methods.
R=brianwilkerson@google.com

Bug: https://github.com/dart-lang/sdk/issues/32396
Change-Id: I4b6b6804cfced4c6628198a7e99e0123f77c2108
Reviewed-on: https://dart-review.googlesource.com/46940
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-03-19 17:03:15 +00:00
Terry Lucas 1b5b2225f0 Few more to mark off.
TBR=whesse@google.com

Change-Id: I4381b766757d1d365378f1aefa9875d6a55fb726
Reviewed-on: https://dart-review.googlesource.com/47101
Reviewed-by: Terry Lucas <terry@google.com>
2018-03-19 16:41:52 +00:00
Brian Wilkerson 209809eee0 Changes to AST impl classes
Change-Id: I2889157892e4a9666d15c5346d0ea24fe8d9d7a0
Reviewed-on: https://dart-review.googlesource.com/47062
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-03-19 16:19:56 +00:00
Terry Lucas afa27982e4 Marked the failing tests in the right status file.
TBR=whesse@google.com

Change-Id: I7eda272cc69e2be8784c85b0045c0d04197924f8
Reviewed-on: https://dart-review.googlesource.com/47063
Reviewed-by: Terry Lucas <terry@google.com>
2018-03-19 15:53:00 +00:00
Vyacheslav Egorov d41794ee11 [vm/compiler] Fix UB in ToIntegerConstant helper
Change-Id: I5ffbebb12bd84eacca33fb81b3df51ba4ca291a8
Reviewed-on: https://dart-review.googlesource.com/46722
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
2018-03-19 14:12:15 +00:00
Alexey Knyazev 4f1f5f8167 Reland "Do not return this on RandomAccessFile.close"
This is a reland of 44aa9a17fd

Original change's description:
> Do not return this on RandomAccessFile.close
> 
> Bug: 32015
> Change-Id: I98508bdad569201afeed91f1287f061b5bb39a31
> Reviewed-on: https://dart-review.googlesource.com/44060
> Reviewed-by: Sigmund Cherem <sigmund@google.com>
> Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
> Commit-Queue: Vyacheslav Egorov <vegorov@google.com>

Bug: 32015
Change-Id: I96d870e083d7862cf0f6ad664364cf7ddef0f598
Reviewed-on: https://dart-review.googlesource.com/46780
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
2018-03-19 13:45:25 +00:00
Brian Wilkerson 1560f19844 Fixes to make analyzer preview-dart-2 safe, part 1 of many
Change-Id: I8f88168a1fab61b3d0d808b5d9e09e6391325302
Reviewed-on: https://dart-review.googlesource.com/46953
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-03-19 13:15:46 +00:00
Terry Lucas c51db0d213 Revert "Fix status file for few broken tests."
This reverts commit 52d2813dfd.

TBR=sigmund@google.com

Change-Id: If84e54b755c0d690fa4fbde163b374e0ab1e8cd6
Reviewed-on: https://dart-review.googlesource.com/47061
Reviewed-by: Terry Lucas <terry@google.com>
2018-03-19 12:29:48 +00:00
Johnni Winther c3f177b8cc Add FutureOr to dart2js static type system
Change-Id: I0e26c82fffaa41d2e3fc02ba4d2b253c3673ce1a
Reviewed-on: https://dart-review.googlesource.com/46260
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-03-19 11:50:55 +00:00
Lasse Reichstein Holst Nielsen c43b1d66b5 Fix typo in map.update.
Add tests.

Change-Id: If27b6c987c944ebb84d43acde012f5b44730c4e7
Reviewed-on: https://dart-review.googlesource.com/45501
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
2018-03-19 10:54:15 +00:00
William Hesse d9c022184c Pass enable-asserts flag from test.py to VM runtime.
Change-Id: I84223c57dcbc74d9e5ba7d2d977fe9d5f6d686dc
Reviewed-on: https://dart-review.googlesource.com/46900
Reviewed-by: Erik Ernst <eernst@google.com>
Commit-Queue: William Hesse <whesse@google.com>
2018-03-19 10:38:05 +00:00
Terry Lucas 52d2813dfd Fix status file for few broken tests.
TBR=sigmund@google.com

Change-Id: I2f9104be404771cfb6685ff2dbfd18591e947b73
Reviewed-on: https://dart-review.googlesource.com/46960
Reviewed-by: Terry Lucas <terry@google.com>
2018-03-19 04:07:33 +00:00
Terry Lucas 666172ded2 Revert "Corrected for safari only"
This reverts commit 3612130281.

TBR=sigmund@google.com

Change-Id: Idd49c929a1245e9e6bf3fd4798c478e8f08c9bdf
Reviewed-on: https://dart-review.googlesource.com/46956
Reviewed-by: Terry Lucas <terry@google.com>
2018-03-19 03:55:06 +00:00
Terry Lucas 3612130281 Corrected for safari only
TBR=sigmund@google.com

Change-Id: I01d64bb823f566e5d55e14110508ab5f36b08f53
Reviewed-on: https://dart-review.googlesource.com/46955
Reviewed-by: Terry Lucas <terry@google.com>
2018-03-19 02:41:02 +00:00
Terry Lucas ef292c678e Updated for Chrome 63 Roll
TBR=sigmund@google.com

Change-Id: Iba8e73a1db3f898babdca7aaa08d34790000cf51
Reviewed-on: https://dart-review.googlesource.com/46954
Reviewed-by: Terry Lucas <terry@google.com>
Commit-Queue: Terry Lucas <terry@google.com>
2018-03-19 01:57:50 +00:00
Terry Lucas ea392fee27 TouchEvents now supported on Safari
TBR=sigmund@google.com

Change-Id: If485b39afeb0ce389c98d90ebe8a7ea6359e0fba
Reviewed-on: https://dart-review.googlesource.com/46950
Reviewed-by: Terry Lucas <terry@google.com>
2018-03-18 14:40:03 +00:00
Terry Lucas 9c0ba9992d Aded expected failure to status file.
TBR=sigmund@google.com

Change-Id: I4e7ede394441038deee6eb973a4b3d7ba1e4623d
Reviewed-on: https://dart-review.googlesource.com/46949
Reviewed-by: Terry Lucas <terry@google.com>
2018-03-18 14:28:38 +00:00
Terry Lucas 60469482f1 Move ClientRect members to DOMRect.
TBR=sigmund@google.com,sra@google.com

Change-Id: I424b087830954329f4399f6b169f572196a4f658
Reviewed-on: https://dart-review.googlesource.com/46948
Commit-Queue: Terry Lucas <terry@google.com>
Reviewed-by: Terry Lucas <terry@google.com>
2018-03-18 13:27:46 +00:00
Terry Lucas 148a642aa1 Fixed typo.
TBR=sigmund@google.com

Change-Id: I7b898c6c77615d9790a72dcb0b5622af0cc4a9e5
Reviewed-on: https://dart-review.googlesource.com/46947
Reviewed-by: Terry Lucas <terry@google.com>
2018-03-18 11:29:05 +00:00
Terry Lucas b4e0c342c5 Updated html tests to match new/changed Chrome 63 APIs.
TBR=sigmund@google.com

Change-Id: I831a37c29ed1b82ac5336a017c54486ea75bb889
Reviewed-on: https://dart-review.googlesource.com/46946
Reviewed-by: Terry Lucas <terry@google.com>
2018-03-18 10:55:05 +00:00
Terry Lucas ef6273cba0 Dart Web Libraries re-generated based on Chrome 63 WebIDLs.
This is a migration of 13 Chrome release about 1.5 years of Chrome releases.
Update PYTHON scripts for cleaner and easier rolling.

Here's a doc on the changes that might affect Dart users:
https://docs.google.com/document/d/1Kj0nk3SueO3JKub8im7z3znu9j5oiI7vf49ejZrMxuE/edit#

Change-Id: I768fbd09b04fe6884af36ac102d5813f67bae426
Reviewed-on: https://dart-review.googlesource.com/24501
Commit-Queue: Terry Lucas <terry@google.com>
Reviewed-by: Terry Lucas <terry@google.com>
2018-03-18 09:41:04 +00:00
Brian Wilkerson 746c2557a2 Correctly handle casts of Set in quick fix
Change-Id: I00067a03b41cc0ace16501fc21b990b91ea0af61
Reviewed-on: https://dart-review.googlesource.com/46944
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-03-17 14:55:38 +00:00
Ryan Macnak 29749cd0d0 [vm] Remove dead DFE::ReadKernelBinary.
Change-Id: I167849cc1134925819e2c51d0234d80e7bed34e3
Reviewed-on: https://dart-review.googlesource.com/46701
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2018-03-17 00:40:57 +00:00
Ryan Macnak d1f8f8b259 [vm] Clean up any remaining API scopes in Dart_ShutdownIsolate.
Some embedders, i.e. tonic, sometimes call Dart_ShutdownIsolate after encountering a fatal error without calling Dart_ExitScope.

Change-Id: Iedba50b6d87acd277812ca6a476964c007b5416a
Reviewed-on: https://dart-review.googlesource.com/46840
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2018-03-17 00:01:48 +00:00
Emily Fortuna db21add40c Adding test for async closures with type variables, and fixing how we emit stubs
with type parameters in the meanwhile.

Change-Id: I5fe1e94e7423af30adf4020b46269b8ea81ac07f
Reviewed-on: https://dart-review.googlesource.com/46700
Commit-Queue: Emily Fortuna <efortuna@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-03-16 17:46:18 +00:00
Ryan Macnak 8590919ca6 [vm] Add a timeline stream for recording the zone high watermark.
Change-Id: Ic7f899dbb29eb732b54d7164968a176d7b1025b9
Reviewed-on: https://dart-review.googlesource.com/45544
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2018-03-16 17:43:27 +00:00
Alexander Markov 9a20a001a6 [vm/kernel/aot] Make static non-const fields nullable in TFA
In Dart, if initializer throws an exception, a static non-const field
will have a null value, even if result of initializer is non-nullable.
This CL fixes TFA to make static non-const fields with initializer
nullable in order to correctly handle this case.

Change-Id: Ib451927b3da508c18ea43fcd0533066fb129a45e
Reviewed-on: https://dart-review.googlesource.com/46577
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2018-03-16 17:15:47 +00:00
Jonas Termansen b885b84f1e Merge remote-tracking branch 'github/master'
It appears 6ee70f9a2c was accidentally merged
through the github UI, which shouldn't happen according to our
https://github.com/dart-lang/sdk/wiki/Merging-a-PR-contribution-(Don't-do-it-on-Github)
policy, as it breaks GitHub <-> dart.googlesource.com mirroring.
2018-03-16 17:55:56 +01:00
Konstantin Shcheglov 91d3c02d19 Rewrite relative URIs in instrumented Flutter outline code.
R=brianwilkerson@google.com, devoncarew@google.com

Change-Id: I33e73400643d77eb7c2b105eae918f4997e7d55d
Reviewed-on: https://dart-review.googlesource.com/46920
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-03-16 16:52:40 +00:00
Brian Wilkerson f6f1327fbe Add a fix to add an explicit cast
Change-Id: Ib27b2609cce14ea6d7c1666388c653e757b82a64
Reviewed-on: https://dart-review.googlesource.com/46881
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-03-16 16:43:58 +00:00
Dan Rubel b2dd274e08 Remove modifiers from local function event structures
This removes pushing and popping modifiers when parsing a local function
declaration since they cannot have modifiers.

Change-Id: Iabbc6bb050d7006d07d4ec5d2220947593d62fd6
Reviewed-on: https://dart-review.googlesource.com/46880
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-03-16 16:05:07 +00:00
Eric J. Duran 6ee70f9a2c Fixing #32455 - Replace precisley with precisely (#32460) 2018-03-16 08:51:04 -07:00
Alexandre Ardhuin d0f4d7e229 update CHANGELOG for new hints
Fixes #32518

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

GitOrigin-RevId: 7779b37697bf522b9d7d1dd3b6cbb9e67191b70c
Change-Id: I15f7cb3cb69e6c3fb6db57943f73f9187b499d1e
Reviewed-on: https://dart-review.googlesource.com/46423
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-03-16 15:43:37 +00:00
Kevin Millikin 8108ad9e0e Make the Kernel serializer implement, not extend, Visitor
Extending visitor makes it impossible to get a static error when new
syntax is added to Kernel.  Also, add @override annotations so we can
get a hint when syntax is removed from Kernel.

Change-Id: I9f3111e406e9994e76a637d2782e24cde264fd31
Reviewed-on: https://dart-review.googlesource.com/46721
Commit-Queue: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2018-03-16 11:03:57 +00:00
William Hesse bc3b0540f7 Add hash for downloading Linux Chrome to tools/bots/browsers.
Change-Id: Iafacb0d2f1753019878927462e2edd8dfc18b6fe
Reviewed-on: https://dart-review.googlesource.com/45780
Reviewed-by: Alexander Thomas <athom@google.com>
2018-03-16 10:35:11 +00:00
Peter von der Ahé e5c84938f2 Update names derived from Program
Change-Id: Ifdb072506fef909ccf5ad2e5270b1976ae61e3cc
Reviewed-on: https://dart-review.googlesource.com/31143
Commit-Queue: Peter von der Ahé <ahe@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2018-03-16 09:33:07 +00:00
danrubel f1ebe2bd5c Inline utility method closeBraceTokenFor
Now that Token implements endGroup, there is no need for a type check
and the associated utility method can be inlined.

Change-Id: Ibb7b54837e4b459dbfa35b987c67794b05e0d579
Reviewed-on: https://dart-review.googlesource.com/46576
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-03-15 23:29:35 +00:00
Ryan Macnak f36358c370 [vm] Replace Dart_LoadKernel with Dart_LoadLibrary/ScriptFromKernel.
Dart_LoadKernel is only used in Flutter engine and dart_runner, where it is always used as Dart_LoadKernel(Dart_ReadKernelBinary). These uses should be replaced with Dart_LoadScriptFromKernel.

Dart_LoadLibraryFromKernel is needed for loading split kernel files and implementing IsolateMirror.loadUri.

Change-Id: Ib505350eff53ec889406747f8f99393ebbdb4c7d
Reviewed-on: https://dart-review.googlesource.com/46220
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
2018-03-15 23:24:44 +00:00
Ryan Macnak 82ed3eb9ed [vm, kernel] Fix loading enum classes from kernel when the embedder does not use DFE.
Change-Id: I3a88d1d4bb3741bf9199acd62d4be54d60849146
Reviewed-on: https://dart-review.googlesource.com/46823
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2018-03-15 23:05:06 +00:00
Konstantin Shcheglov 2881ebcd78 Fix for lint non_constant_identifier_names.
R=brianwilkerson@google.com

Bug: https://github.com/dart-lang/sdk/issues/32488
Change-Id: I76580a581845d8c6d3c8003b6b0f631a5fc40cdb
Reviewed-on: https://dart-review.googlesource.com/46822
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-03-15 22:44:44 +00:00
Sigmund Cherem b24a9d8ee6 Roll pub once again: this allows reenables suing the CFE from pub-build
Change-Id: Ia1dba48f3b7f74891d30a0e4065ab4ed53187d96
Reviewed-on: https://dart-review.googlesource.com/46821
Reviewed-by: Emily Fortuna <efortuna@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2018-03-15 22:24:34 +00:00
Konstantin Shcheglov 64e092d4a3 Add fields codeOffset/codeLength to FlutterOutline.
R=brianwilkerson@google.com

Change-Id: I917a780704882fcd7537a9334febc21098aabd4f
Reviewed-on: https://dart-review.googlesource.com/46579
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-03-15 21:01:14 +00:00