Commit graph

51590 commits

Author SHA1 Message Date
P.Y. Laligand ab25f54bf5 Allow the host toolchain to be set via a simple variable.
It can now be defined in a config file rather than requiring a gen argument.

Change-Id: I8f11394ee0387683c9ce48764a04b4bdf54fed9b
Bug:
Reviewed-on: https://dart-review.googlesource.com/18687
Reviewed-by: Zach Anderson <zra@google.com>
2017-11-06 19:06:18 +00:00
Konstantin Shcheglov 00d9c180c3 Fix for combining private members.
Bug:
Change-Id: If623420777c13a2d6e56dfcc33be4f2d4ae69f34
Reviewed-on: https://dart-review.googlesource.com/18686
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2017-11-06 18:25:44 +00:00
Erik Corry 3828f6ac10 Allow date_time11 to pass.
R=brianwilkerson@google.com

Bug:
Change-Id: I58f115fce42dd8f6f1ca6df6d5dbbd538209937d
Reviewed-on: https://dart-review.googlesource.com/18545
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2017-11-06 18:24:06 +00:00
Brian Wilkerson e4e82643b9 Add highlight ranges to a few more tests
Change-Id: I00ad76d7c16eb34d2ba9c4778478ca5faa8b9036
Reviewed-on: https://dart-review.googlesource.com/18860
Reviewed-by: Dan Rubel <danrubel@google.com>
2017-11-06 17:40:25 +00:00
Brian Wilkerson 167b529da7 Convert most of the statement parsing methods
Change-Id: I1c7fa1abda6cd3d45ec83d32c864b4e23700b837
Reviewed-on: https://dart-review.googlesource.com/18861
Reviewed-by: Dan Rubel <danrubel@google.com>
2017-11-06 17:33:35 +00:00
Sigmund Cherem 46c859152a Add output unit data: an intermediate representation of the resuls of deferred loading
Change-Id: I54fb3eb49338f137c127113fd884ce54a1187a64
Reviewed-on: https://dart-review.googlesource.com/18508
Reviewed-by: Stephen Adams <sra@google.com>
2017-11-06 17:15:40 +00:00
Samir Jindel bc9645509e Revert "Revert "[kernel] Fix NoSuchMethod errors for generic functions.""
This un-revert fixes the issues revealed in https://logs.chromium.org/v/?s=chromium%2Fbb%2Fclient.dart%2Fvm-kernel-mac-release-x64-be%2F2217%2F%2B%2Frecipes%2Fsteps%2Fvm_tests%2F0%2Fstdout.

Patchset 1 contains the original revision unmodified.

This reverts commit 9029ee09c5.

Bug:
Change-Id: I109c011c2688144b00293ce50b3aad53e018a2f2
Reviewed-on: https://dart-review.googlesource.com/18340
Reviewed-by: Régis Crelier <regis@google.com>
2017-11-06 17:07:38 +00:00
Samir Jindel edc4cb1f90 Fix incorrect type inference in Bigint.modInverse.
Bug:
Change-Id: I73639d68c191d74815f7ac78bc98dc862efd319a
Reviewed-on: https://dart-review.googlesource.com/18841
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2017-11-06 17:04:28 +00:00
Dan Rubel d79c68ea01 fix external factory errors
Change-Id: Id94d0fe355a3ad78cdd66bfbcb2ccc2bb72dc28b
Reviewed-on: https://dart-review.googlesource.com/17301
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2017-11-06 16:21:44 +00:00
Brian Wilkerson c89b566bd1 Convert the parsing of switch statements
Change-Id: I8c3014674929b2822685756edeafb34185437551
Reviewed-on: https://dart-review.googlesource.com/18761
Reviewed-by: Dan Rubel <danrubel@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2017-11-06 14:58:50 +00:00
Erik Corry 0d4f518de0 Disable test that fails after DST ended
R=floitsch@google.com

Bug:
Change-Id: I67f61526de019916d13578621f4f6926c03086a8
Reviewed-on: https://dart-review.googlesource.com/18521
Reviewed-by: Erik Corry <erikcorry@google.com>
2017-11-06 14:46:08 +00:00
Brian Wilkerson b5ba13202d Add a description of the packages used to implement a plugin
Change-Id: Ibb5207e93e7c12560cd9be6845c63a3d50e23df5
Reviewed-on: https://dart-review.googlesource.com/18780
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
2017-11-06 14:11:59 +00:00
Aske Simon Christensen 306668bf0a Support syntax error outcome in sdk test suite.
Also updated test expectations.

Change-Id: I25fe9f47904beb89b9e18cfafd2e889c6a8106a2
Reviewed-on: https://dart-review.googlesource.com/18800
Reviewed-by: Erik Ernst <eernst@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
2017-11-06 12:22:51 +00:00
Erik Ernst 8d2b32df12 Removed status entry for test on issue 30997, issue fixed.
Change-Id: Iee9d3189e73c2cc476847165a89f08e93d592213
Reviewed-on: https://dart-review.googlesource.com/18802
Reviewed-by: Erik Ernst <eernst@google.com>
2017-11-06 10:40:01 +00:00
Erik Ernst 40b6741778 Adds support for syntax error in tests to test.py.
This CL modifies the Dart source used from test.py such that it takes
`syntax error` into account as an expected outcome in test files (so
that we can have `//# 01: syntax error` with a similar meaning as
`//# 01: compile-time error`).

For all tools except the spec_parser, `syntax error` is the same
outcome as `compile-time error`; that is, nobody else will see the
difference.

For the spec_parser, `syntax error` is the outcome where parsing has
failed; `compile-time error` is taken to mean some other compile-time
error, i.e., the spec_parser is expected to _succeed_ when the
expected outcome is `compile-time error`.

Test files in language and language_2 have been adjusted to use the
outcome `syntax error` where appropriate.

The status files in language and language_2 for the spec_parser have
been adjusted such that they fit all the new `syntax error` outcomes
in test files.

Other status files have been adjusted in a few cases where tests were
corrected (because a compile-time error which was clearly not intended
to be a syntax error turned out to be caused by a typo, which means
that the actual compile-time error has never been tested).

The spec grammar Dart.g was adjusted in a few cases, when some bugs
were discovered. In particular, the treatment of Function has been
changed: It is now known by the parser that Function does not take
any type arguments. This makes no difference for developers, because
they cannot declare a type named Function anyway, but it means that
a number of tricky parsing issues were resolved.

Dart.g was also adjusted to allow `qualified` to contain three
identifiers, which is an old bug (preventing things like metadata on
the form `@p.C.myConst`).

Change-Id: Ie420887d45c882ef97c84143365219f8aa0d2933
Reviewed-on: https://dart-review.googlesource.com/18262
Commit-Queue: Erik Ernst <eernst@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2017-11-06 08:56:09 +00:00
Johnni Winther 29f3cc0db1 Various fixes for erroneous cases
Change-Id: I1c370dd220ff5e27196dcc8294d3c8eeda80462c
Reviewed-on: https://dart-review.googlesource.com/18483
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2017-11-06 08:42:46 +00:00
Brian Wilkerson c6c7580c92 Add error detection and reporting for errors related to plugins
Change-Id: If17e88b64022fe71c992c5867c80263c0e6b953b
Reviewed-on: https://dart-review.googlesource.com/18781
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2017-11-05 19:21:07 +00:00
Jenny Messerly 384678e4b3 port DDC's code_generator to Kernel
Change-Id: I2b6a5f56a69f5d3a965aefc3f8d4550d5940ac5a
Reviewed-on: https://dart-review.googlesource.com/17980
Reviewed-by: Vijay Menon <vsm@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2017-11-04 22:17:56 +00:00
Brian Wilkerson 454088ae28 Fix a typo in the status pages
Change-Id: I516a70537d850b94de60dcf63f832518753e5b11
Reviewed-on: https://dart-review.googlesource.com/18760
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2017-11-04 21:57:37 +00:00
Paul Berry 49817352ab Fix strong mode issue in _SignalController.
_SignalController._controller needs to have runtime type
StreamController<ProcessSignal> to avoid an implicit downcast failure
in the getter _SignalController.stream.

Change-Id: Idb033897525e26e17d7cdad345ee0cb6080626a8
Reviewed-on: https://dart-review.googlesource.com/18682
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2017-11-04 16:44:16 +00:00
Jenny Messerly f2478e5526 fix SDK for fuzzy arrows change to main function
Change-Id: I7b7d5b64c1694b0cd4d5b6d8b13231db236617cc
Reviewed-on: https://dart-review.googlesource.com/18688
Reviewed-by: Jenny Messerly <jmesserly@google.com>
Commit-Queue: Jenny Messerly <jmesserly@google.com>
2017-11-04 08:20:24 +00:00
Stephen Adams c566db6227 Use full name for more elements in DUMP_IR output
Names now match old version.

TBR=sigmund@google.com

Change-Id: Ieecceef3fc66f18c926ed2eb8e8f234e18678efb
Reviewed-on: https://dart-review.googlesource.com/18684
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2017-11-04 00:23:24 +00:00
Sigmund Cherem cfc1630f6e Mark jsinterop test slow
Runs fine when run in isolation, but often times out when running the entire
suite on my local machine.

Change-Id: Iedbaa0fac5fc7191de9f3975c642769aff77c950
Reviewed-on: https://dart-review.googlesource.com/18680
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2017-11-03 23:56:04 +00:00
Paul Berry 23d3baddb6 Update source fingerprints for min and max functions.
This should fix debug build failures after 3e85ad23cf.

Change-Id: I05797004359bb88007077b5176aaa9499a2162bc
Reviewed-on: https://dart-review.googlesource.com/18519
Reviewed-by: Alan Knight <alanknight@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2017-11-03 23:12:34 +00:00
Siva Chandra 3289dd2bff Move the kernel offset fields under !defined(DART_PRECOMPILED_RUNTIME).
Also added the missing reading/writing of kernel offsets of libraries
and patch classes in raw_object_snapshot.cc.

Fixes #31258 and #29850.

Change-Id: I7d22ccda9dd1ded9ad1f0963da33bce3975b84ba
Reviewed-on: https://dart-review.googlesource.com/18400
Commit-Queue: Siva Chandra <sivachandra@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2017-11-03 23:01:40 +00:00
Paul Berry cd49cf1201 Insert implicit downcasts for compound assignments.
Change-Id: I090594e16fa890864775b2ebc58842d861c134a4
Reviewed-on: https://dart-review.googlesource.com/18517
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2017-11-03 22:07:10 +00:00
Paul Berry 3e85ad23cf Fix strong mode issue in math_patch.dart.
In the implementations of min and max, when a and b are doubles and a
== 0.0, we have special case logic to return `(a + b) * a * b` and `a
+ b`, respectively.  These expressions both have type `double`,
whereas the return type is required to be `T`, and the type system
can't guarantee that `double` is assignable to `T`, because all that
is known is that `T` extends `num`.

(Note: a human reader can see that since a and b are doubles, and a
and b have static type `T`, it follows that double must be a subtype
of `T`.  But the type system doesn't have the ability to reach this
conclusion).

To work around this issue we assign to a temporary variable of type
`num`.  Since `T` extends `num`, it is safe to return the temporary
variable.

Fixes #31162

Change-Id: I7eeea43384ce134f3b44d266af908a87f8e0e36a
Reviewed-on: https://dart-review.googlesource.com/18515
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2017-11-03 21:30:00 +00:00
Florian Loitsch 4528eb32a0 Newsletter 2017-11-03.
Change-Id: I5adca1c6706d00ff074656b39d561a0497fb8717
Reviewed-on: https://dart-review.googlesource.com/18660
Reviewed-by: Florian Loitsch <floitsch@google.com>
2017-11-03 21:05:36 +00:00
Ryan Macnak f3c32edc1d [vm, reload] Don't report typedefs as unused.
Bug: https://github.com/flutter/flutter/issues/12868
Change-Id: Ibf0a97f918763abc0e0667be6d2ee2bda9e073fa
Reviewed-on: https://dart-review.googlesource.com/18514
Reviewed-by: Alexander Aprelev <aam@google.com>
2017-11-03 20:55:56 +00:00
Konstantin Shcheglov cfe6812abd Native classes are fixed, update the tests.
R=brianwilkerson@google.com, danrubel@google.com

Bug:
Change-Id: I2423c938adb4d5e39e3fd3613a73108b91018e77
Reviewed-on: https://dart-review.googlesource.com/18513
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2017-11-03 20:28:40 +00:00
Konstantin Shcheglov 5ea30b4e3d Rename performace_logger.dart to performance_logger.dart
R=paulberry@google.com, sigmund@google.com

Bug:
Change-Id: Ib7b6d122dff3ddabde3db2270daa777a269e04ed
Reviewed-on: https://dart-review.googlesource.com/18512
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2017-11-03 20:24:00 +00:00
Konstantin Shcheglov c5722c682b Don't propose the 'Remove Type' Quick Assist when there is no initializer.
R=brianwilkerson@google.com

Bug:
Change-Id: If87a9b171ac0672772ee971051687a171c0bcd06
Reviewed-on: https://dart-review.googlesource.com/18510
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2017-11-03 20:13:00 +00:00
Konstantin Shcheglov 611475aaaa Separate KernelDriver.getKernel() and getKernelSequence().
The reason to have both is that IKG needs kernels for all libraries,
potentially not even deserialized from bytes, if we eventually get this
optimization.

OTOH, Analyzer always needs just one library, with enough outlines
to make sense of the dependencies. For now, getKernel() is implemented
using getKernelSequence(), this will change with switching to
outline based compilation.

R=paulberry@google.com, sigmund@google.com

Bug:
Change-Id: Iba02bc3a4cdb67a896c4faa2f809c7cb8069aa9e
Reviewed-on: https://dart-review.googlesource.com/18509
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2017-11-03 20:00:01 +00:00
Ryan Macnak 32a02404c9 [vm, gc] Bitvector-based sliding compactor.
With the current block size, this reduces space for forwarding information from two words per moved object to two words per (kObjectAlignment * kBitsPerWord) bytes of heap (1.6% on 64-bit, 3.1% on 32-bit).

dart2js compiling dart2js:
Compactor/Sweeper             Runtime  Max RSS
Sliding (binary search table) 105   s  1.085 GB
Sliding (bitvector)            57.8 s  998.566 MB
Evacuating                     66.2 s  1.714 GB
Concurrent sweep               53.8 s  1.183 GB
Blocking sweep                 55.0 s  1.181 GB

Bug: https://github.com/dart-lang/sdk/issues/30978
Change-Id: Ia6eec4f0162c3959154c5155df24cc06694ecac7
Reviewed-on: https://dart-review.googlesource.com/17721
Reviewed-by: Erik Corry <erikcorry@google.com>
2017-11-03 19:38:55 +00:00
Paul Berry e9e2ce7a38 Fix status file to account for fix to issue #31270
Change-Id: Ibf94b0aa5d10fafd04b69512769c0474d94c733d
Reviewed-on: https://dart-review.googlesource.com/18507
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2017-11-03 19:23:50 +00:00
Stephen Adams 4babd94282 Update dart2js.noInline docs
Change-Id: Id6870b405d2a379c221a3fc493adc547c84c450b
Reviewed-on: https://dart-review.googlesource.com/18506
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
2017-11-03 19:04:20 +00:00
Sigmund Cherem 24e4d3bb39 Define a location of the synthetic __loadLibrary_foo method
Change-Id: I8fd950cf7a6e6aed79240daed085f2a02e16666e
Reviewed-on: https://dart-review.googlesource.com/18430
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
2017-11-03 18:59:40 +00:00
Konstantin Shcheglov cd2f4a1e44 Update references to Class and TypeParameter, updates for tests.
R=ahe@google.com, kmillikin@google.com, paulberry@google.com, sigmund@google.com

Bug:
Change-Id: I8a922df8c21fe2ff54c60da989f87524b0cff56c
Reviewed-on: https://dart-review.googlesource.com/17340
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2017-11-03 18:55:11 +00:00
Alexander Markov 172786b906 [VM] Extract simple JSON writer out of VM service-specific JSONStream
The purpose of this refactoring is to provide a convenient way to
write JSON independently of VM service, which is excluded in PRODUCT
build mode.

Change-Id: I55700d9ead6ef9269a98714d8178f1edb35435cb
Reviewed-on: https://dart-review.googlesource.com/18502
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2017-11-03 18:31:50 +00:00
Paul Berry 9ac19f0122 Pass --strong to vm when running front_end testcases in strong mode.
Also, stop passing "Hello, World!" as a command line argument when
executing front_end testcases.

Change-Id: I7c3ec6a301537a84bd14e232b5a0d6b8a7bd1914
Reviewed-on: https://dart-review.googlesource.com/18503
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2017-11-03 18:28:51 +00:00
Ryan Macnak 8753545178 [vm] Document ownership of Dart_CreateIsolate's error message.
Change-Id: Icab6f6d169445f66b6ba9469511164e6e21ef49a
Reviewed-on: https://dart-review.googlesource.com/18425
Reviewed-by: Zach Anderson <zra@google.com>
2017-11-03 18:10:53 +00:00
Sigmund Cherem c53c2f948d Support caching impacts with the kernel frontend. This is needed by deferred
loading.

To make this possible, this CL explicitly models the impact cache and deleter.

Change-Id: I444625a7a14155d9c530a390854a42d277055aaa
Reviewed-on: https://dart-review.googlesource.com/18463
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2017-11-03 17:52:21 +00:00
Brian Wilkerson cfa3a809f0 Rework Parser.parseFunctionBody
Change-Id: Ie19d902ad9d456d3c05ecbf04d9a0f1ebecf7d18
Reviewed-on: https://dart-review.googlesource.com/18620
Reviewed-by: Dan Rubel <danrubel@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2017-11-03 17:47:01 +00:00
Ryan Macnak f60efb7e40 Reapply "[vm] Popcount via compiler intrinsics."
Add missing rename of CountOneBits in ARM assembler.

Change-Id: I735da06343248573a1b049109ebc2bf0d1634960
Reviewed-on: https://dart-review.googlesource.com/18504
Reviewed-by: Zach Anderson <zra@google.com>
2017-11-03 17:39:16 +00:00
Konstantin Shcheglov b2b813a37a Update ProtectedFileByteStore in IKG on acceptLastDelta().
So, we don't leak result keys to IKG clients.

Bug:
Change-Id: Ib3002aad690bf98884816a3978f759acd88b12ec
Reviewed-on: https://dart-review.googlesource.com/17342
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2017-11-03 17:31:23 +00:00
Dan Rubel 15a0abf956 Fix OutlineBuilder native class and AnalyzerDietListener tests
Update the OutlineBuilder and AstBuilder to fix native handling,
and in the process, fix several AnalyzerDietListener tests.

Fix https://github.com/dart-lang/sdk/issues/30836

Change-Id: I7e3b6c4c7d241f1325a5fce1e117e277c6166e49
Reviewed-on: https://dart-review.googlesource.com/18500
Reviewed-by: Paul Berry <paulberry@google.com>
2017-11-03 17:16:51 +00:00
Samir Jindel 7b6b716071 [kernel] Don't cancel completed streams in the Async transformation.
Bug:
Change-Id: I40742b13f1b47f2817c480bfc257deaf6f1028ca
Reviewed-on: https://dart-review.googlesource.com/17820
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2017-11-03 17:03:01 +00:00
Ryan Macnak 2761c556ca Revert "[vm] Popcount via compiler intrinsics."
This reverts commit c4f4cdbf29.

Reason for revert: ARM compile-time errors

Original change's description:
> [vm] Popcount via compiler intrinsics.
> 
> Change-Id: I8913beea7b984f04cec7f9efc00673aa12095eda
> Reviewed-on: https://dart-review.googlesource.com/18423
> Reviewed-by: Zach Anderson <zra@google.com>

TBR=rmacnak@google.com,zra@google.com

Change-Id: I5efe8100e3c1fa404b1c24f369dca5c137acd2b8
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/18640
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2017-11-03 16:50:47 +00:00
Ryan Macnak c4f4cdbf29 [vm] Popcount via compiler intrinsics.
Change-Id: I8913beea7b984f04cec7f9efc00673aa12095eda
Reviewed-on: https://dart-review.googlesource.com/18423
Reviewed-by: Zach Anderson <zra@google.com>
2017-11-03 16:34:35 +00:00
Lasse R.H. Nielsen adcb6a7399 Make main invocation not fail strong-mode type checking.
Bug: http://dartbug.com/31270
Change-Id: Id6ad2a429d5dc44b437a0fdd8fb4889d3dccf194
Reviewed-on: https://dart-review.googlesource.com/18480
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2017-11-03 16:06:00 +00:00