Commit graph

71253 commits

Author SHA1 Message Date
Simon Que 35ce88100c [build] GN flag to use relative symlink to Xcode
The flag "mac_use_goma_rbe" creates a symlink to the Xcode SDK
directory, under $root_build_dir/sdk/xcode_links.

e.g. the -isysroot arg in the build command becomes:
  -isysroot sdk/xcode_links/MacOSX10.15.sdk

This is based on a similar solution for Chromium iOS builders:
http://crrev.com/c/1946174
http://crrev.com/c/2102649

Bug: b/151697301
Change-Id: Ie65d3ae2b98da5977ad0f5a75f865c838bbbb963
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139782
Commit-Queue: Simon Que <sque@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2020-03-19 08:33:17 +00:00
Alexander Thomas 97afe8410a [beta] Support the beta channel in SDK scripts
Fixes https://github.com/dart-lang/sdk/issues/40992

Change-Id: Icc6888c94517667a184931d3e690db2fe67cc0ca
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139814
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2020-03-19 07:49:38 +00:00
Stephen Adams afbce123fa [dart2js] Add '--legacy-javascript' flag
dart2js will migrate slowly to modern JavaScript.

The --legacy-javascript flag causes emitted code to be compatible with
IE11, our only supported non-modern target. This is a temporary flag
until IE11 is removed from support.

The negative flag --no-legacy-javascript allows the code to be
incompatible with legacy browsers and, over time, be improved to take
advantage of modern JavaScript features.

Initially --no-legacy-javascript will use some minimal features that
are incompatible with IE11 as a 'trip-wire' to ensure that
--legacy-javascript is always used for IE11.  dart2js analytics can
then be used to assess how much --legacy-javascript is used. (The
'trip-wire' unsupported feature is unguarded use of JavaScript
Symbols.)

The default at this change is --legacy-javascript so that this change
is non-breaking. The default will be changed soon to
--no-legacy-javascript.

Change-Id: Ic13461362a5fa80293fb66b112945d1404a64a03
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139867
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-03-19 02:11:07 +00:00
Ben Konyi d1c8aae6d8 [ VM ] Update lib_2/isolate tests to no longer use package:unittest
Fixes https://github.com/dart-lang/sdk/issues/40799

Change-Id: Ia65221c2a14b9d8e923e394ebc1c35ea5dad4c6f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139953
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2020-03-19 00:57:26 +00:00
Regis Crelier eca06cd299 [VM/nnbd] Normalize FutureOr<T> when loading kernel file.
CFE does not always normalize FutureOr<T> eagerly, e.g. it does not normalize
FutureOr<Null> parsed in the source. However, it normalizes inference or
instantiation results.
For performance reasons, the VM chooses to do it eagerly, i.e. it must also
normalize unnormalized types from a kernel file.

Change-Id: I5798333ba3c58c5b2851045ef32c345d94f58268
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139955
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Régis Crelier <regis@google.com>
2020-03-19 00:19:10 +00:00
Alexander Markov 64b80cd151 [vm/nnbd] Specialize List.filled constructor invocations
With NNBD default List constructor is deprecated.
Instead, List.filled constructor is used to create lists of a particular
length, so List.filled is now used much more often.
This change adds VM-specific specialization for List.filled constructor
invocations when they are used to create lists filled with null.

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

Change-Id: I050549fd550acb8d62997b2b28c1f1e41ad3e0cc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139952
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2020-03-18 23:40:40 +00:00
Regis Crelier 4e75fc1609 [VM/nnbd] Use correct top type in inline code for is-test.
Instantiate with correct nullability and normalization in type testing stubs.

Change-Id: I24a74625d450e2ce1d9cdf23fbfdc1f9983ffdb1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139951
Reviewed-by: Liam Appelbe <liama@google.com>
Commit-Queue: Régis Crelier <regis@google.com>
2020-03-18 23:26:00 +00:00
Ryan Macnak 5b21a43c55 Reland "[vm] Fix CreateWithinExistingIsolateGroup calling RegisterIsolate without a write lock."
Avoid deadlock by not holding the write lock to more than one isolate group at a time.

Bug: https://github.com/dart-lang/sdk/issues/39611
Bug: https://github.com/dart-lang/sdk/issues/41080
Change-Id: I229b2a30da0901c7798c3df89fdf2a9547aae557
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139941
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2020-03-18 22:22:09 +00:00
Mark Zhou 84a2f271a3 [dartdevc] Cleaning up required name arg stringification.
Change-Id: Ib10bd1a0d986a3ca4e37000a909be9a2fced5f45
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139944
Auto-Submit: Mark Zhou <markzipan@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Mark Zhou <markzipan@google.com>
2020-03-18 21:47:12 +00:00
Paul Berry 75a720f2fb Migration: in preview tool, links in edit details should not clear edit details
Change-Id: I30336e93b9d3d579d1ef8c91d3a21d68b0e4aeb5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139946
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-03-18 21:40:02 +00:00
Paul Berry 3b0b0eb6dd Migration: reorder data in "Edit Details" box
This CL moves the "edit rationale" section down to the bottom, and
marks it as "experimental", since it doesn't seem to give as useful
information as the traces.

Change-Id: I5c45c31d9cfcee89bf03b1ef8803f4a59ac180e6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139945
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
2020-03-18 21:24:32 +00:00
Paul Berry 40976c6000 Migration: remove "Nullability trace for" text from preview tool.
It was redundant with the text in the trace description.

Change-Id: I7970cede15fe620440e3a05adb987ea451ac9f16
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139943
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-03-18 21:18:22 +00:00
Paul Berry 096bf5769d Migration: add "why not nullable" traces to preview tool.
Change-Id: If945d32f33124e5e85429bd76c1db14167c0024e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139960
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2020-03-18 21:18:22 +00:00
Paul Berry 41b67a9b52 Migration: add grayed-out spaces to indicate types not being made nullable.
Change-Id: I4fa076693c25cf9466d33332030df3983043ffd1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139940
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2020-03-18 21:18:22 +00:00
Jonas Termansen e725e8edf2 [nnbd] Fix regressions in the standalone/io migration.
Closes https://github.com/dart-lang/sdk/issues/40571.

Change-Id: I38704ab2583f4e856866f091ac652a8a652abe54
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/137101
Reviewed-by: William Hesse <whesse@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Jonas Termansen <sortie@google.com>
2020-03-18 20:38:52 +00:00
Zichang Guo d8f5ca49c5 [dart:io] webSocket pingInterval doesn't close the connection
pingInterval api pages says, when pong is not received on time, the connection will be closed. But our implementation didn't follow the description.

Bug: https://github.com/dart-lang/sdk/issues/39469
Change-Id: Ic62b8ab0152997ac60b1b836d6a1587d9ce38131
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138760
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Zichang Guo <zichangguo@google.com>
2020-03-18 19:51:19 +00:00
Alexander Markov 941e4e13a0 [nnbd/vm/corelib] Avoid extra call in identityHashCode
Fixes https://github.com/dart-lang/sdk/issues/41087

Change-Id: I6b48ebc96f21a587c0f95b22530a6019a92ad649
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139864
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2020-03-18 19:16:53 +00:00
Nicholas Shahan a5704eaca3 [dartdevc] Throw TypeError instead of CastError
Remove all `_check()` calls as they are now identical to `as()`.

Fixes: #41008
Change-Id: I4e4dd1ff50840d3d1cbf0aae9b8cef0621016079
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139490
Reviewed-by: Mark Zhou <markzipan@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2020-03-18 18:39:26 +00:00
Alexander Markov 584914b33c [nnbd/corelib] Remove unnecessary polymorphism in SplayTreeNode
Fixes https://github.com/dart-lang/sdk/issues/41064

Change-Id: I144265410ee92ba5df93cc0cf9ad1692da165b17
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139748
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2020-03-18 18:35:46 +00:00
Zichang Guo 6a5b87f92c [dart:io] Stop accessing http header with _add()
Several places adds HttpHeader with _add() instead of public add(). This skips some validation checks.

Bug: https://github.com/dart-lang/sdk/issues/40905
Change-Id: Ifcb16fcd40fb93914540f6bf09f476f621c36e15
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138860
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Zichang Guo <zichangguo@google.com>
2020-03-18 18:10:55 +00:00
Jaime Wren 784b17dd24 Fix the output when running dart help pub.  Process.runSync(..) is used since printUsage() is not an async method.
Bug: https://github.com/dart-lang/sdk/issues/41040
Change-Id: I9e4fbab333bbd67dcab2b1e0752fc0debb80be46
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139833
Commit-Queue: Jaime Wren <jwren@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
2020-03-18 18:05:26 +00:00
Ryan Macnak 9a140bab87 [vm] Use acquire-release ordering to publish and consume the class table backing arrays.
Change-Id: I57a3109b3ba42e1addf97c15c5d8108cd0338266
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139860
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2020-03-18 17:18:55 +00:00
Joshua Litt 8d308cc30e [dart2js] Create a predicate to treat strong tops as raw for set rti.
Change-Id: I92c8bb540b5f7ab0000cf109002902c9b3e8d004
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139840
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2020-03-18 16:33:41 +00:00
Mark Zhou 2fc27ffe22 [dartdevc] Making boolean conversion throw a TypeError.
Boolean conversion now throws a TypeError, not CastError. See:
* https://github.com/dart-lang/sdk/issues/40317
* https://github.com/dart-lang/sdk/issues/40763

Presubmit: https://critique.corp.google.com/#review/301195917

Change-Id: I76e8aa4a849eb519e47c80f1b4873032a05ad636
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139402
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Mark Zhou <markzipan@google.com>
2020-03-18 16:14:11 +00:00
Regis Crelier a94fb21f08 [VM/nnbd] Fix normalization of FutureOr<T> after instantiation (fixes #41005).
Note that the remaining failure on line 28 of test
language/nnbd/type_equality/futureOr_normalization_legacy_test
is due to the CFE failing to normalize at compile time.

Change-Id: I8e982830f59cfa5cdf45314aa7a34026975ba952
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139863
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Régis Crelier <regis@google.com>
2020-03-18 16:02:11 +00:00
Jonas Termansen 96cf889e6b [dart:io] Fix HeaderValue parsing, toString(), and support null values.
This is a breaking change. https://github.com/dart-lang/sdk/issues/40709

This change makes the HeaderValue parsing more strict in two invalid
edge cases, supports parameters with null values as a feature, and fixes
toString() so it always produces tokens or quoted-strings valid per RFC
7230 3.2.6.

The empty parameter value without double quotes (which is not allowed by
the standards) is now parsed as the empty string rather than null. E.g.
HeaderValue.parse("v;a=").parameters now gives {"a": ""} rather than
{"a": null}.

Invalid inputs with unbalanced double quotes are now rejected. E.g.
HeaderValue.parse('v;a="b').parameters will now throw a HttpException
instead of giving {"a": "b"}.

The HeaderValue.toString() method now supports parameters with null
values by omitting the value. E.g.:

  HeaderValue("v", {"a": null, "b": "c"}).toString()

now gives

  v; a; b=c

This behavior can be used to implement some features in the Accept and
Sec-WebSocket-Extensions headers.

Likewise the empty value and values using characters outside of RFC 7230
3.2.6 tokens are now correctly implemented by double quoting such values
with escape sequences. E.g.:

  HeaderValue("v",
      {"a": "A", "b": "(B)", "c": "", "d": "ø", "e": "\\\""}).toString()

now gives

   v;a=A;b="(B)";c="";d="ø";e="\\\""

The NNBD migration required making subtle changes to some dart:io
semantics in order to provide a better API. This change backports one of
these semantic changes to the unmigrated SDK so any issues can be
discovered now instead of blocking the future SDK unfork.

Change-Id: Iafc790e03b6290232cac71fe14f995ce0f0b036b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136620
Commit-Queue: Jonas Termansen <sortie@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2020-03-18 11:36:36 +00:00
Teagan Strickland 5f8802b82f [vm] Add sizes to ELF static symbols for Code payloads.
Change-Id: I7868ec621e08773b7d379e95fe091e820bf29c94
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-linux-release-simarm_x64-try,vm-kernel-precomp-mac-release-simarm64-try,vm-kernel-precomp-win-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139807
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Teagan Strickland <sstrickl@google.com>
2020-03-18 10:23:36 +00:00
Govind Dixit 9a640dfe51 chore: update contributing link in readme
fix #41091

This PR will update the link for contributing readme in the repo's readme

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

GitOrigin-RevId: a7f6e2217efbf4bf6c477aee161ef160daba7aee
Change-Id: I81a0d8503b2aeeae34d3592e62f261e2a7a7074c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139920
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2020-03-18 09:25:07 +00:00
Robert Nystrom d4cbf0d9a1 Add dart2js test directories to the CFE opt-out whitelist.
This doesn't reduce the technical debt of having the whitelist in the
first place, but it correctly treats those tests as being opted out.

This doesn't address "compiler/dartdevc_native". That one's a little
harder because it contains a mixture of NNBD and legacy libraries. We
might want to put "@dart=2.7" tags in there for the legacy ones. I'll
look into that in a separate CL.

But this should at least get the CFE handling some more of the tests
correctly.

Change-Id: I4db0d671ac097eba27bfbeedb296a8526043622a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139868
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-03-18 08:36:56 +00:00
Erik Ernst 41fa72ef11 Adjust test for new default values of .fromEnvironment
Breaking change #40678 mandates new default values for
String.fromEnvironment, this CL adjusts the expectations of a test
accordingly.

Change-Id: Ib8a26005673d07c67f65708fc9c4ae7b17421670
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139811
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
2020-03-18 07:55:15 +00:00
Konstantin Shcheglov 4844fa9622 Issue 40959. Support null-shorting for cascades.
Bug: https://github.com/dart-lang/sdk/issues/40959
Change-Id: Ia7fd153debafd13ab469bbfcc3a2d1ef3feaa5f5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139865
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-03-18 07:36:36 +00:00
Konstantin Shcheglov f4592159d6 Issue 41050. Support for evaluating bool.hasEnvironment().
Bug: https://github.com/dart-lang/sdk/issues/41050
Change-Id: I806c201dde6e4692a3252fef5aec2fbcbd663147
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139823
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-03-18 02:53:05 +00:00
Sam Rawlins 3fc075d397 Do not report on collision of private _static_ members
Fixes #29751; related to #27218

Change-Id: I8adcc5dcc7a97ec3e8237506af84aff2667aff6f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139866
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2020-03-18 01:05:25 +00:00
Nicholas Shahan 3ae7394979 [tests] Update test expectation methods
`Expect.identical()` --> `Expect.equals()`

The spec defines runtime type object equality but not that they are
identical.

Issue: https://github.com/dart-lang/sdk/issues/41005
Change-Id: I57a0a5da0af18974d4081ea463ec0bff86f7d3e4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139843
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2020-03-17 23:43:05 +00:00
Ryan Macnak 6f5db9189b Revert "[vm] Fix CreateWithinExistingIsolateGroup calling RegisterIsolate without a write lock."
This reverts commit 5379edb62b.

Reason for revert: https://github.com/dart-lang/sdk/issues/41080

Original change's description:
> [vm] Fix CreateWithinExistingIsolateGroup calling RegisterIsolate without a write lock.
> 
> Detected by TSAN as a data race between the registration code and iteration code.
> 
> Bug: https://github.com/dart-lang/sdk/issues/39611
> Change-Id: Ic232e9382a775369ce5898f3c4e5a90e8c0160c0
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139495
> Reviewed-by: Martin Kustermann <kustermann@google.com>
> Commit-Queue: Ryan Macnak <rmacnak@google.com>

TBR=kustermann@google.com,aam@google.com,rmacnak@google.com

Change-Id: I8b6f2b4152ca0e6979ea015561006f794d0e5510
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: https://github.com/dart-lang/sdk/issues/39611
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139900
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2020-03-17 23:34:25 +00:00
Brian Wilkerson 49c3fd32da Measure how often context type information is available
Change-Id: I4dc3fea554ec16665e7ca5e4cfb1e577403a8ec9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139861
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-03-17 23:28:55 +00:00
Srujan Gaddam 1ea7d52d63 Migrate the rest of html tests off unittest
Migrated to minitest where possible and async_minitest elsewhere,
but kept the same import for file suites (e.g. history_*).

Change-Id: Iecd16dfbbcf0691d290fcb82555ff53d715e8500
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139827
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2020-03-17 22:40:05 +00:00
Srujan Gaddam cf265d0309 Migrate js_util_test to async_minitest
Change-Id: I9b232f7a093107df93b8fd4a62c29a70f206a550
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139826
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2020-03-17 22:27:25 +00:00
Ryan Macnak 4ef342680b [vm] Fix data race installing into the SharedClassTable.
Bug: https://github.com/dart-lang/sdk/issues/39611
Change-Id: I391717a8f175f16a8286e6e8928aa5240bb28a90
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139828
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2020-03-17 21:59:15 +00:00
Srujan Gaddam f295f381b6 Migrate html xhr tests to async_minitest
Tests needed to be restructured in order to maintain asynchronous
behavior.

Change-Id: I4502188e8edada39dfacf9c5f3d59cbccac66133
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139825
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2020-03-17 21:54:45 +00:00
Mayank Patke 80503ef26f [dart2js] Correctly handle T <: Object where T is an interface type.
Change-Id: Ib6e8c80cdf0e2ddb900a146296c24bef009d3a81
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139832
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2020-03-17 21:19:35 +00:00
Robert Nystrom d810d26e47 Remove support for HTML multitests.
They're no longer being used (yay!) so we can simplify the test runner
a little.

Change-Id: I9fe93a7982fbe1589cde9f35e07cff1733c7bece
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139750
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
2020-03-17 21:04:35 +00:00
Ben Konyi 31fdba6cec [ VM ] Fix issue where DartDev snapshot would not be found when Dart is installed with Brew
Brew uses symlinks to symlinks, and code to determine the directory of
the current Dart executable was assuming that only one level of
symlinking could occur. This change results in symlink evaluation being
performed until we find the absolute path of the executable.

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

Change-Id: Id7326f09e01383150a41754e71174400cc6ec6b8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139781
Reviewed-by: Jaime Wren <jwren@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2020-03-17 20:16:25 +00:00
Nate Bosch 52fe5ec0cd Sync to the latest args
- Remove blank lines between options which happened to split lines
- Remove the `help` command from usage output.

Change-Id: Ie9d365c9d69a33685dbb69c37457b3b39200dc04
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139831
Commit-Queue: Nate Bosch <nbosch@google.com>
Commit-Queue: Jaime Wren <jwren@google.com>
Auto-Submit: Nate Bosch <nbosch@google.com>
Reviewed-by: Jaime Wren <jwren@google.com>
2020-03-17 20:13:25 +00:00
Martin Kustermann 933d8e913f [vm/compiler] Do not speculate operands to e kSmiCid if we know from interface target it cannot be a Smi
Hitting the assertion from the issue (see below) is innocent: It
informs us that we should avoid speculating operands to be Smis if we
actually know for sure the receiver cannot be a Smi (based on interface
target).

This particular case was hit on an instance call `a ^ b` where the interface
type tells us it is `boo.^` - so we shouldn't insert CheckedSmiOp.

There might be more cases where we insert CheckedSmiOp/CheckedSmiComparison
instructions where we shouldn't (because interface target tells us
receiver cannot be a Smi).
-> In debug mode we'll hit this assertion, so if the fuzzer finds more such
   cases, we should fix them one-by-one.

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

Change-Id: I55624f77b9edeece4d1334f1629ce5514cf3784a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139812
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2020-03-17 19:59:05 +00:00
Martin Kustermann a67aac8c6a Re-land "[vm/tfa] Convert named and optional parameters to required parameters where possible."
When performing protobuf-aware treeshaking, we may generate a kernel
file which will later be used in conjunction with a non-transformed
platform kernel. In this case signature shaking is unsafe.

The original revision is in patchset 1.

This reverts commit b59dad38df.

Change-Id: I1a85e42f245fcdbd821fa1f07b2e9966b8c2d958
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139100
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2020-03-17 19:54:05 +00:00
Brian Wilkerson f617f92c15 Capture the syntactic metrics removed from relevance-metrics
Change-Id: I89f7112ad31f41b0b6bc406156f4371fa373d62c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139842
Reviewed-by: Jaime Wren <jwren@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-03-17 19:35:55 +00:00
Brian Wilkerson 23abbd30b8 Set a default relevance for cases where none of the features apply
Change-Id: I7fd837349965ce7710fd99daacd691b30bf25100
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139841
Reviewed-by: Jaime Wren <jwren@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-03-17 19:27:30 +00:00
Brian Wilkerson 169b88654d Split out metrics computations for static members
Also did a little cleanup and sorted the file.

Change-Id: I7bb288345abf851dd88d6f7cf28e4d49ade75ec6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139829
Reviewed-by: Jaime Wren <jwren@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-03-17 19:23:27 +00:00
Srujan Gaddam 4f2e49038b Migrate js_interop_1_test to async_minitest
Semantics needed to change to replace expectAsyncUntil.

Change-Id: I7dd55c9571b405e471c812e966e708e6ef76a134
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139822
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2020-03-17 19:19:25 +00:00