Commit graph

17541 commits

Author SHA1 Message Date
Samir Jindel
7d5025e814 Fix incorrect handling of NSM forwarders and pull all logic into CFE.
The original implementation was designed around a shared misunderstanding
of optional parameter handling in the spec. (which was also ambiguous about type parameters).

The correct behavior for optional/type parameters is to fill them in with their default values/bounds.
This behavior can be implemented without any backend support, as is done in this CL.

Change-Id: Ib81f17ead2d2920e755703e244db5afc328d0315
Reviewed-on: https://dart-review.googlesource.com/52802
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2018-05-02 12:18:30 +00:00
Johnni Winther
2a8c3515b2 Avoid strong+checked mode: strong mode supersedes checked mode
Change-Id: Ic68f429ec06d583a9e60b6ace1ec88ee83a4be5f
Reviewed-on: https://dart-review.googlesource.com/53202
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-05-02 08:33:28 +00:00
Johnni Winther
4a0ac85cc3 Update co19 status
Change-Id: I75e0fcf72d2606a8cca0324225a14fe1922aad70
Reviewed-on: https://dart-review.googlesource.com/53360
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2018-05-02 07:13:41 +00:00
Aske Simon Christensen
011676641a Ignore forwarding stubs when checking for missing implementations.
Fixes https://github.com/dart-lang/sdk/issues/33009

Change-Id: If131193014d99430a0b1934d2f8890cd4f123934
Reviewed-on: https://dart-review.googlesource.com/53203
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2018-05-01 15:44:24 +00:00
Johnni Winther
8351dd4928 Support constant instantiation
Closes #32774

Change-Id: I88090246d3fb39e3d3a1f9c3fdcc3b6fd6e0fa4f
Reviewed-on: https://dart-review.googlesource.com/53022
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-05-01 12:59:18 +00:00
Johnni Winther
687b1b5edd Update status
Change-Id: Ia0d41e674882c4b37160cd3a7da447706c5b62c8
Reviewed-on: https://dart-review.googlesource.com/53210
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2018-05-01 12:42:31 +00:00
Johnni Winther
f373cfed83 Add omit-implicit-checks mode to equivalence tests.
Change-Id: Ifd98727384943d167b0ef39caaa9c1351b16e9ee
Reviewed-on: https://dart-review.googlesource.com/52805
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-05-01 12:41:59 +00:00
Johnni Winther
d85c175a22 Register deferredLoadlibrary as backend impact
Closes #32998

Change-Id: If2a0a948f1209652925be360f7f145ebfdb3d60d
Reviewed-on: https://dart-review.googlesource.com/53008
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-05-01 11:05:31 +00:00
Johnni Winther
54b8ebd992 Support js-interop classes that implement generic types in Dart 2
This adds a special RTI representation for a type argument of a
(supertype of a) js-interop class, which effectively is the Dart 1
`dynamic` type.

Closes #32969

Change-Id: Ifd92b3fc6779d96d354ad929bd7c07a349299ae6
Reviewed-on: https://dart-review.googlesource.com/53002
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-05-01 08:37:11 +00:00
Johnni Winther
20c7725954 Handle deferred constant instantiations
Closes #32997

Change-Id: I31661bb223ca9d9bdee2e7cabe4e62bf18e87509
Reviewed-on: https://dart-review.googlesource.com/53007
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-05-01 08:31:01 +00:00
Stephen Adams
1f6f9adb6c dart2js co19 status bingo
TBR=sigmund@google.com

Change-Id: I7f6e1a3e3f80cab42102e1cefa9238ba6b94f6df
Reviewed-on: https://dart-review.googlesource.com/53165
Reviewed-by: Stephen Adams <sra@google.com>
2018-04-30 23:40:38 +00:00
Stephen Adams
d6a3b85ed2 Use factory methods for async/sync*/async* transforms
The static methods allow type parameters to be registered,
but this means that the type parameters will be dropped unless in strong mode.

Change-Id: I91c1977c287c14742df7d59b988e64ddc46f794d
Reviewed-on: https://dart-review.googlesource.com/52870
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-04-30 22:32:56 +00:00
Dmitry Stefantsov
5af05d407d [fasta] Report type argument number mismatch during outline building
Change-Id: I1c1f22f3117ccbfc8620b3b0459bc96ed1ad1bdf
Reviewed-on: https://dart-review.googlesource.com/51128
Reviewed-by: Peter von der Ahé <ahe@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
2018-04-30 13:01:15 +00:00
Dan Rubel
2e19e275e8 Update status file
Change-Id: I661e46a1b6ff2f42d32c3e17a3292b8412c95fc3
Reviewed-on: https://dart-review.googlesource.com/52922
Reviewed-by: Dan Rubel <danrubel@google.com>
2018-04-29 00:57:32 +00:00
danrubel
663a9f2b32 Update status file
Change-Id: Icfa3c31900391a456e5ddb376c148674bebfe4ad
Reviewed-on: https://dart-review.googlesource.com/52921
Reviewed-by: Dan Rubel <danrubel@google.com>
2018-04-28 21:27:59 +00:00
Dan Rubel
79a15f52bf Fix isValidMethodTypeArguments
Change-Id: I3c4bb8dc981c285b8ecfad7dcd7dc849ed1bda7b
Reviewed-on: https://dart-review.googlesource.com/52920
Commit-Queue: Dan Rubel <danrubel@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-04-28 18:10:06 +00:00
Ryan Macnak
32f10d6f7a [test] app_snapshot_share_test cannot run on Android.
The device running the test doesn't have dart_bootstrap or the SDK tree.

Change-Id: Ifb8047c6ddbc8d9d7fd5d0b728ab5ee732403bfc
Reviewed-on: https://dart-review.googlesource.com/52987
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2018-04-28 00:30:54 +00:00
Bob Nystrom
162d6c3b0c Turn label negative tests into multitests.
Found two mistakes in the tests:

- label2_negative_test had no labels whatsoever.
- label8_negative_test called an undefined function, doAgain().

Change-Id: I4d17c969a2b1422ff96cf68996225ecaaf5fe829
Reviewed-on: https://dart-review.googlesource.com/52868
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-04-27 23:14:17 +00:00
Bob Nystrom
881e35ee82 Migrate library_negative_test.
In the process, I discovered multitests can't handle imports to
non-existent libraries. So I fixed that and cleaned up the code.

Change-Id: I9a8557e84f91ba7858bdf98f8732cd0ded55aa1a
Reviewed-on: https://dart-review.googlesource.com/52869
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2018-04-27 22:28:27 +00:00
Sigmund Cherem
594aaf57f4 Fix status of isolate test
This test "passes" now that sync-async is enabled by default because the test
completes before it gets a chance to fail.

TBR=sra@google.com

Change-Id: I4e8aaade6b618ab8cd79fbfff354dc99214feb27
Reviewed-on: https://dart-review.googlesource.com/52982
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2018-04-27 22:15:57 +00:00
Sigmund Cherem
3c9d0858b0 dart2js: turn on sync-async by default
Closes https://github.com/dart-lang/sdk/issues/32869

Change-Id: I79b2d02d13adccdfbbd3a78158805244aceff7de
Reviewed-on: https://dart-review.googlesource.com/52061
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2018-04-27 19:48:46 +00:00
Ryan Macnak
0cc70c4a7c [vm] Support for sharing parts of an app snapshot.
In addition, this removes support for seeding the VM isolate snapshot with Instructions and referencing those Instructions in the isolate snapshot. This was leftover from an earlier experiment to share Instructions between a Core-JIT snapshot and App-JIT snapshots. Removing this reclaims the sign bit on Instruction offsets.

Add missing cases to TypeTestingStubFinder::StubNameFromAddresss.

Change-Id: Ie87216b4e284db1dc3eddb12f38ddbe8a841d312
Reviewed-on: https://dart-review.googlesource.com/50620
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2018-04-27 17:42:16 +00:00
Jenny Messerly
bd76221d58 fix #31489, JS interop to prototype getter in dartdevk
Change-Id: I6a3e1e25e0113bfcc49de19f250c23027ea3a69f
Reviewed-on: https://dart-review.googlesource.com/52865
Reviewed-by: Vijay Menon <vsm@google.com>
2018-04-27 00:17:29 +00:00
Stephen Adams
ca419a9251 dart2js status refresh
TBR=sigmund@google.com

Change-Id: I5433f177557953c6ab578ec2fc7765b04ef88ac7
Reviewed-on: https://dart-review.googlesource.com/52866
Reviewed-by: Stephen Adams <sra@google.com>
2018-04-26 23:57:49 +00:00
Janice Collins
1afe71c08a Enable preview-dart-2 as default for analyzer.
Based on https://dart-review.googlesource.com/c/sdk/+/52340, but adds
the necessary plumbing through the test system to pass through
negations to strong and preview-dart-2.  Also adds support for those
negations to the analyzer.

Change-Id: I9793ff28bb593d25bbb0a2ed8736b5b53e0a62d8
Reviewed-on: https://dart-review.googlesource.com/52461
Commit-Queue: Janice Collins <jcollins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-04-26 17:01:12 +00:00
Johnni Winther
c59b390806 Update status
These started failing at 8aa36b75c5

Change-Id: I3b53ac2169e890c8695f217f26d2596e32f061d7
Reviewed-on: https://dart-review.googlesource.com/52761
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2018-04-26 08:41:39 +00:00
Johnni Winther
93511d523c Track RTI for noSuchMethod
Change-Id: I1fd66c48061556f8950bad471744eab4e2f40eb7
Reviewed-on: https://dart-review.googlesource.com/52560
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2018-04-26 08:07:02 +00:00
Jenny Messerly
f6db874416 fix some dartdevk behavior to match dartdevc in more cases
Most notably this fixes mixins, but a few others issues were discovered
as well. Fixes #32428.

This gets dartdevk closer to producing a valid Dart SDK file

Change-Id: I2973baef279d6b71ed29b97bec758b2d3209c275
Reviewed-on: https://dart-review.googlesource.com/51760
Commit-Queue: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
2018-04-26 01:13:52 +00:00
Vyacheslav Egorov
c0015fe23f [gardening] Skip tests that are meaningless in AOT configuration.
Deferred libraries are loaded eagerly by VM compiler.

Closes https://github.com/dart-lang/sdk/issues/27587

Change-Id: I2dc0615be563f38bd4b859a89e9630de2ee84850
Reviewed-on: https://dart-review.googlesource.com/52424
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
2018-04-26 00:46:42 +00:00
Sigmund Cherem
004ee9cd12 Fix how we use Comparable.compare, so we have a function with the appropriate type in JSArray.sort
This is the same fix that was done here: https://github.com/dart-lang/sdk/blob/master/sdk/lib/collection/list.dart#L349

Change-Id: I6013dc96c67b487b0e96118028ef920a84f371b5
Reviewed-on: https://dart-review.googlesource.com/52701
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2018-04-26 00:32:02 +00:00
Jenny Messerly
30b53ceaab fix #30852, cyclic init errors in some cases in dartdevc
Change-Id: Iae73dcf7b3ad9b547d8dc278210310699673a9ab
Reviewed-on: https://dart-review.googlesource.com/52282
Reviewed-by: Vijay Menon <vsm@google.com>
2018-04-26 00:22:19 +00:00
Vyacheslav Egorov
328163bba9 [kernel] CloneVisitor should preserve isDefault on switch cases.
Fixes https://github.com/dart-lang/sdk/issues/32971

Change-Id: I16bf688080ee60853f5de449ead3e7feaec37fc2
Reviewed-on: https://dart-review.googlesource.com/52602
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2018-04-25 23:53:22 +00:00
Jenny Messerly
7c6594c0bd fix #32302, friendlier Type.toString() in dartdevc
Change-Id: I650634d17aad8d6b7e154874578eb88cf87fd994
Reviewed-on: https://dart-review.googlesource.com/52081
Commit-Queue: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
2018-04-25 23:16:56 +00:00
Kevin Millikin
d47203a71b Fix a crash in type inference
It's not generally safe to continue to use the Shadow nodes after they
have had their type inferred, because they give a false picture of the
tree.  In this case it led to an assertion failure.

Move the assert to a place in the code where it is true.  Use the
correct subexpression for subsequent check insertion.  Clear the
parent pointer when Kernel nodes are removed from the tree to try to
catch problems like this.

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

Change-Id: I775747d7a6a5240d63881c8563c83cc84628e3d7
Reviewed-on: https://dart-review.googlesource.com/52525
Commit-Queue: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2018-04-25 21:36:25 +00:00
Brian Wilkerson
9e9b50d19d Improve error messages for annotations involving undefined names (issue 27788)
Change-Id: Iccfcb73b7671f50353b57a81817dec013b997a53
Reviewed-on: https://dart-review.googlesource.com/52640
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-04-25 17:48:49 +00:00
Erik Corry
cf78da8a48 [VM] Reduce Smi size to 32 bit on 64 bit platforms
This reduces small tagged integers on 64 bit platforms from 63 bits to
31 bits plus one tag bit.
This is a step on the way to compile-time-optional compressed pointers
on 64 bit platforms.  See more about this at go/dartvmlearnings
This causes a slowdown for some uses of integers that don't fit in 31
signed bits, but because both x64 and ARM64 have unboxed 64 bit
integers now the performance hit should not be too bad.

This is a reapplication of
https://dart-review.googlesource.com/c/sdk/+/46244
It was reverted due to a compilation error on 32 bit
ARM with DBC.

R=vegorov@google.com

Change-Id: I943de1768519457f0e5a61ef0b4ef204b6a53281
Reviewed-on: https://dart-review.googlesource.com/51321
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-04-25 12:31:33 +00:00
Martin Kustermann
be8637756a Update status file (follow-up to be47fa67)
Change-Id: I434993c9df7c3f6d6ecad08745be97d1612216d7
Reviewed-on: https://dart-review.googlesource.com/52580
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2018-04-25 11:56:36 +00:00
Johnni Winther
5e72411c5c Add InstantiationConstantExpression/Value
Change-Id: I2f471560a076e79f944fa70000de4be50385ae18
Reviewed-on: https://dart-review.googlesource.com/52443
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-04-25 09:37:29 +00:00
Keerti Parthasarathy
9eb09d825b Revert "Create _nullFuture and _falseFuture in the root zone."
This reverts commit 9bb085a1c6 due to
test failure in google3.

Change-Id: I63940e62bd97c83bc432db99b44c991e6c1e025e
Reviewed-on: https://dart-review.googlesource.com/52422
Reviewed-by: Dan Grove <dgrove@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
2018-04-24 20:45:38 +00:00
Aske Simon Christensen
9c2fcedaf4 Error on missing method implementation in non-abstract class
Bug: https://github.com/dart-lang/sdk/issues/32013

Change-Id: I163a84e70e94852a05ce99b07ec883c610ea788c
Reviewed-on: https://dart-review.googlesource.com/52320
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2018-04-24 13:07:54 +00:00
Johnni Winther
e5a2fe6435 Update jump, side effect and inlining tests to test strong mode
Change-Id: I0c8073f5bc72fae63b012033dc23b15c1913fec7
Reviewed-on: https://dart-review.googlesource.com/52223
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2018-04-24 08:37:24 +00:00
Stephen Adams
bcc5e6ed42 dart2js: Fix Iterable<T> type check
Bug: https://github.com/dart-lang/sdk/issues/32810
Change-Id: I0d34185725bd9cbd627a5da66d3ef5eea5b7e4dd
Reviewed-on: https://dart-review.googlesource.com/52402
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-04-24 04:51:54 +00:00
Zach Anderson
679fe1c784 [dart:io] Name more OtherResources in secure-bad_certificate_test
Change-Id: I585b86335a5232e9dbb8a28442a2672d051030bf
Reviewed-on: https://dart-review.googlesource.com/52404
Reviewed-by: Zach Anderson <zra@google.com>
2018-04-23 23:09:44 +00:00
Zach Anderson
c117aeea3b [dart:io] Check hostname when validating cert chains on MacOS
fixes #32936

Change-Id: Ic79ce7151cbeff1cf1d28908715c07c4e3b422d9
Reviewed-on: https://dart-review.googlesource.com/52342
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2018-04-23 22:39:32 +00:00
Brian Wilkerson
bf1d0efde2 Revert "Improve error messages for annotations involving undefined names (issue 27788)"
Change-Id: I017592bf8982ff51bb73eb5fe892f8d9cffb9c9d
Reviewed-on: https://dart-review.googlesource.com/52400
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-04-23 21:05:53 +00:00
Johnni Winther
9c9a3544ec Skip abstract methods in super access.
Closes #32928

Change-Id: I2834a9e34e4b8f4241e01f776be0bb22e375b30a
Reviewed-on: https://dart-review.googlesource.com/52222
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-04-23 08:28:59 +00:00
Johnni Winther
f74ee52c70 Optimize signature need computation.
Change-Id: Ied6dfbfe71a9d323e189dbcacdb5ae2985c3fbb8
Reviewed-on: https://dart-review.googlesource.com/52221
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-04-23 08:00:02 +00:00
Johnni Winther
7afa0812ee Implement strong mode open world strategy.
Implements a new strategy for closed world computation that takes
the static type of the receiver into account when processing dynamic
calls.

For this to work, the J-model needs to only contain live members,
meaning queries can no longer assume that a J-model member exists for
instance for JSString.split because it might not be live.

This is the initial implementation which only uses
ir.MethodInvocation.invocationTarget. Later we will use the static
type of the expression on ir.MethodInvocation, ir.PropertyGet, and
ir.PropertySet.



Change-Id: I2dcc5a9148f27127d4e89c414a7d24f90f9cf2a4
Reviewed-on: https://dart-review.googlesource.com/48480
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-04-23 07:58:12 +00:00
Brian Wilkerson
1ffd7e529a Improve error messages for annotations involving undefined names (issue 27788)
Change-Id: Ib7af4bdd97e9f775646c90e8f49f021836125b78
Reviewed-on: https://dart-review.googlesource.com/52240
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2018-04-22 20:11:11 +00:00
Stephen Adams
dfc68f1991 dart2js co19 status
TBR=sigmund@google.com

Change-Id: I878bf620be3697fcb961ab0f0859d861483373b0
Reviewed-on: https://dart-review.googlesource.com/52285
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2018-04-21 16:37:55 +00:00