Commit graph

17307 commits

Author SHA1 Message Date
Peter von der Ahé 4f2bdff90b Rename Program to Component
Change-Id: I1a3cc03fba9783807fa637a9d42fdbad68ee7686
Reviewed-on: https://dart-review.googlesource.com/31040
Commit-Queue: Peter von der Ahé <ahe@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2018-03-15 12:22:23 +00:00
Karl Klose a461573294 Remove test expectations for a test that actually passes
R=kmillikin@google.com

Change-Id: I02b4f4231e7d9c775153d265beb96b3565a651ee
Reviewed-on: https://dart-review.googlesource.com/46724
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Commit-Queue: Karl Klose <karlklose@google.com>
2018-03-15 12:18:28 +00:00
Dan Rubel 71e16622cd Improve for statement errors and recovery
This CL updates fasta parsing of `for` statements
to detect additional errors and improve recovery.

The parser originally called parseType when parsing `for` statements
which committed the parser down a particular path
and limited the ability of the caller to gracefully recovery.
Now the parser calls computeType, which parses and caches
the type information, so that the caller has more opportunity
to recover gracefully.

Change-Id: I6296ffb1f75e77a87a7533bfca77dae18cfcf60d
Reviewed-on: https://dart-review.googlesource.com/46383
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-03-15 11:43:13 +00:00
Kevin Millikin 65b19ffa3c Translate asserts in the VM-specific async translation
Translate assert statements in async functions.  The translation of
the condition subexpression can produce a sequence of statements that
have been hoisted out of it.  These need to be guarded so they are
executed only when asserts are enabled.

For this purpose, we introduce an AssertBlock.  The semantics of the
assert block:

assert { s0; ...; sn; }

is the same as:

if (assertsEnabled) { s0; ...; sn; }

where assertsEnabled is a more primitive nullary expression that is
true iff. assertions are enabled.  We chose not to encode this using a
construct like assertsEnabled because (1) we would have to support it
appearing as an arbitrary expression which we don't currently need
and (2) it requires deeper pattern matching to detect and skip the
guarded code when desired.

The translation is more complicated because if there is a message
subexpression in an assert, it is conditionally evaluated only if the
assert's condition is false.

Fixes https://github.com/dart-lang/sdk/issues/28498

Change-Id: I0912a57104ede3160533e49f65b6fb79b76f1500
Reviewed-on: https://dart-review.googlesource.com/46442
Commit-Queue: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2018-03-14 19:41:09 +00:00
Sigmund Cherem d6294bc6b5 Round 6 of status updates: remaining issues in d8, safari, ie11, ff (hopefully)
TBR=efortuna@google.com

Change-Id: Id84ed1a13646a27015d3aa20ad0d3c0c7d08522c
Reviewed-on: https://dart-review.googlesource.com/46564
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Emily Fortuna <efortuna@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2018-03-14 19:25:29 +00:00
William Hesse 0bd1aa01f2 Update status for dart2js unit test that times out
Change-Id: I591aa0f9ea3692f5e586e87829f6a7530ce36d36
Reviewed-on: https://dart-review.googlesource.com/46580
Reviewed-by: Erik Ernst <eernst@google.com>
2018-03-14 17:20:42 +00:00
Sigmund Cherem af1f26fd48 Status fixes round 5: chrome mac & windows
TBR=efortuna@google.com

Change-Id: I69db60955cd22aca48981bb84a2637a28c385cc4
Reviewed-on: https://dart-review.googlesource.com/46422
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2018-03-14 16:16:34 +00:00
Sigmund Cherem 1bad507517 Status fixes round 4: minified+checked d8, and chrome csp
TBR=efortuna@google.com

Change-Id: I98fd69ca11b962a9eb665c0de9d5ecb49626a891
Reviewed-on: https://dart-review.googlesource.com/46421
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2018-03-14 07:11:29 +00:00
Sigmund Cherem 9c9497bda0 Status updates round 3: chrome-faststarup, ff, ff-faststartup
TBR=efortuna@google.com

Change-Id: I06b535f7273c3ac85173bf4f0286e02d09897c8e
Reviewed-on: https://dart-review.googlesource.com/46420
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-03-14 06:16:19 +00:00
Sigmund Cherem 537057cd2d Round 2: fast-startup minified
TBR=efortuna@google.com

Change-Id: Id8d74e93304ed92fd50afbb1820d9ad05e3abf02
Reviewed-on: https://dart-review.googlesource.com/46402
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2018-03-14 05:17:49 +00:00
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
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
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
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
d58887eaf6,
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
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
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
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
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
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
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
Vyacheslav Egorov f0455493de [vm/kernel] Do not skip type checks on closure functions.
Fixes https://github.com/dart-lang/sdk/issues/32502

Bug: 32502
Change-Id: I3e4e9d6dd884f9660380994b24b7a263777f1a18
Reviewed-on: https://dart-review.googlesource.com/46066
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
2018-03-12 17:13:20 +00:00
Dmitry Stefantsov 2fcdfc1f23 Rename bug32353{,_2}_test.dart to issue32353{,_2}_test.dart
Change-Id: Id00f2713dda2fcb62d43d5f7f2034b8f09bb12c1
Reviewed-on: https://dart-review.googlesource.com/46020
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2018-03-12 10:50:17 +00:00
Lasse Reichstein Holst Nielsen 414a3318ea Add jsonDecode, jsonEncode, base64Decode, base64Encode, base64UrlEncode functions.
Change-Id: Ic65ada3b107cc8e6c3459459c4bea389feef2168
Reviewed-on: https://dart-review.googlesource.com/23664
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2018-03-12 09:16:27 +00:00
Dmitry Stefantsov 6cef6625ef [kernel] Record supertypes after the query intervals in CHA are built
Fixes #32353.

Bug: http://dartbug.com/32353
Change-Id: I80199222ad5e44b954ed424f82752381653c63d3
Reviewed-on: https://dart-review.googlesource.com/45681
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
2018-03-12 08:57:17 +00:00
Stephen Adams 70d715f115 Substitute return type too
TBR=johnniwinther@google.com

Change-Id: I82cc6d6e7af8fb42956fbe538d770de66a449bd3
Reviewed-on: https://dart-review.googlesource.com/45924
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2018-03-10 03:44:28 +00:00
Jenny Messerly 40738b8884 fix #32481, generate signatures for mock members induced by nSM
This bug prevented various DDC features from working correctly at
runtime, such as tearoffs, dynamic call checking, generic methods, and
parameter type checks.

Change-Id: I02cd27abbcb1d5f42b9d4ac504c7dd8bc80c866a
Reviewed-on: https://dart-review.googlesource.com/45960
Reviewed-by: Vijay Menon <vsm@google.com>
2018-03-10 01:11:23 +00:00
Brian Wilkerson 7a0b6f8f4a Fix the analyzer bots
Change-Id: I707211ea0698c4b684e13caccb099e3fdcc66409
Reviewed-on: https://dart-review.googlesource.com/45940
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-03-10 00:20:08 +00:00
Dmitry Stefantsov e66733dd60 Simplify test case bug32353_test and decouple it from dart:io
Bug: http://dartbug.com/32353
Change-Id: I941e15ed9f7dcc10c1ea1a0b3ff3acdee92487de
Reviewed-on: https://dart-review.googlesource.com/45503
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2018-03-09 13:45:58 +00:00
Dmitry Stefantsov 7ce30c5289 Fix status files after 26e689de05
Change-Id: I2b992642194af7c56c0145a9aaa37b53984c07b2
Reviewed-on: https://dart-review.googlesource.com/45705
Reviewed-by: William Hesse <whesse@google.com>
2018-03-09 12:56:23 +00:00
Johnni Winther ad62702e93 Update status
Change-Id: I6b231d18741045619315985e85ed04cf01181232
Reviewed-on: https://dart-review.googlesource.com/45701
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2018-03-09 09:39:35 +00:00
Johnni Winther 26e689de05 More work on signatures
Change-Id: Ifd8c20f1947149d60cca7c69e40ad85533519746
Reviewed-on: https://dart-review.googlesource.com/45700
Reviewed-by: Emily Fortuna <efortuna@google.com>
2018-03-09 08:30:28 +00:00
Sigmund Cherem 5f51db3efb More status preparations to make the CQ clean
TBR=sra@google.com

Change-Id: I8275ada3611cfd4099342f963d76d94d7a267aac
Reviewed-on: https://dart-review.googlesource.com/45751
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2018-03-09 06:47:28 +00:00
Emily Fortuna feac6cfc20 Deal with Function type parameter contexts in closure conversion.
They don't have a context, so just set context as "null" for the TypeVaribleTypeWithContext.

Change-Id: I50944c787d4bd88dd55b402d137da1ca99a55566
Reviewed-on: https://dart-review.googlesource.com/45748
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Emily Fortuna <efortuna@google.com>
2018-03-09 02:31:17 +00:00
Jenny Messerly 76a672e8ea mark lib_2/html/fileapi_entry_test flaky on ddc+mac
Change-Id: Ie501f972829f85f3fb3e1a0072d874bf4a2652a3
Reviewed-on: https://dart-review.googlesource.com/45753
Reviewed-by: Jenny Messerly <jmesserly@google.com>
2018-03-09 02:03:34 +00:00
Alexander Markov 7aa3e54acf [vm] Fix computation of hashCode of a closure with null receiver
As tests/language_2/tearoff_dynamic_test.dart shows, it is perfectly
valid to take a tear-off of an instance method from null, and then call
hashCode from such tear-off.

The implementation of hashCode for closures, Closure::ComputeHash()
was calling Instance::Cast(receiver) which asserts for null.
This code is revised to allow null receiver.

Change-Id: I85cc7abf25aab99590b53403904e8bac25328308
Reviewed-on: https://dart-review.googlesource.com/45749
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2018-03-09 00:26:31 +00:00
Stephen Adams b93c74092a Make isInterceptedCall a field
Change-Id: I88a16189d8a6a30fa52be61bc3d015a703368baa
Reviewed-on: https://dart-review.googlesource.com/45583
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2018-03-08 23:50:57 +00:00
Sigmund Cherem c956cc152f Prepare co19 for d8-hostchecked-dart2js-with-cfe.
TBR=sra@google.com

Change-Id: I5c021a4a4043570a07ee931a83250a163227377f
Reviewed-on: https://dart-review.googlesource.com/45750
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2018-03-08 23:48:37 +00:00
Leaf Petersen 4c881188b2 Disable the .whereType method until generic methods are turned on.
The whereType method silently does the wrong thing without methods,
so make it throw until we turn them on everywhere.

Change-Id: Id934c8bdb4f682dbc3560d78fbca580e37297e2d
Reviewed-on: https://dart-review.googlesource.com/45744
Reviewed-by: Nate Bosch <nbosch@google.com>
2018-03-08 23:14:22 +00:00
Sigmund Cherem 16e8194147 Prepare additional lib, html, samples statuses: this embeds of d8-hostcheck results
TBR=sra@google.com

Change-Id: I4a86f3d51629bbd7dd36825f8c2d993b386ea8e0
Reviewed-on: https://dart-review.googlesource.com/45745
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-03-08 21:10:37 +00:00
Sigmund Cherem 0013f6acf8 Prepare co19 for the FE switch
TBR=sra@google.com

Change-Id: I7971fd5e1c795ffa688688e78675d41ffc313997
Reviewed-on: https://dart-review.googlesource.com/45582
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-03-08 20:35:07 +00:00
Sigmund Cherem b7cb8a1daa Mark 2 more tests as flaky
TBR=efortuna@google.com

Change-Id: I70d360de716d06a6467107cc535b5e1b2210d33a
Reviewed-on: https://dart-review.googlesource.com/45743
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Emily Fortuna <efortuna@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2018-03-08 18:36:07 +00:00
Sigmund Cherem e775ae9c30 Mark flaky co19 test
Recent failure on the CQ: https://ci.chromium.org/p/dart/builders/luci.dart.try/dart2js-linux-chrome-try/82

TBR=efortuna@google.com

Change-Id: Ida091ff31ad3a19696378ee10f143c9d202fa44e
Reviewed-on: https://dart-review.googlesource.com/45741
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Emily Fortuna <efortuna@google.com>
2018-03-08 18:00:45 +00:00
Lasse Reichstein Holst Nielsen b3c12d4e3a Dart 2 Libraries Wave 3
Add `typeArguments` to Invocation.
Add constructors to Invocation, making it less necessary for users to create their own implementations.
Add tests.
Add Symbol.unaryMinus and Symbol.empty constants.

Change-Id: I70cb3265f9413617cf57fce1297e393a29eeb26a
Reviewed-on: https://dart-review.googlesource.com/40741
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2018-03-08 16:36:07 +00:00
Paul Berry 021a29d68f Move analyzer-specific status lines into language_2_analyzer.status
Change-Id: Ib1f7be60c9e5e14e0794e31ca5747f2f409e0a94
Reviewed-on: https://dart-review.googlesource.com/45525
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-03-08 14:55:17 +00:00