Commit graph

21538 commits

Author SHA1 Message Date
Daco Harkes db90fd784b [test] Replace non-implemented @DontInline() annotations
Remove the `@DontInline()` annotation. None of the backends implemented
it. (Searching for "DontInline" yields nothing in our code base.)

Instead replaced the use sites with `@pragma('vm:never-inline')` and
`@pragma('dart2js:noInline')`, which are implemented in the backends.

Original suggestion:
https://dart-review.googlesource.com/c/sdk/+/208080/4..6/tests/language_2/const/map_hashcode_override_test.dart#b11

Change-Id: Ifdcfc8ef3413d0b5964edc1bc1fa47c5ce306935
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/208082
Reviewed-by: Erik Ernst <eernst@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2021-07-26 13:22:31 +00:00
Daco Harkes a5d4e010af [test] const types and null in const maps and sets
We were lacking tests for doing a `null` lookup in const maps and sets.

Also, we were lacking tests for having type literals with user-defined
classes in const maps and sets.

Bug: https://github.com/dart-lang/sdk/issues/45908

Change-Id: I1665420ddcc71df7b47a87ee9e16d7ebbe9e13f5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/208080
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2021-07-26 12:42:20 +00:00
Johnni Winther 51d10c8c04 [test] Fix constructor tear off tests in language
Change-Id: Icf5f6e99df68cd4194e9f4d9314757eab3d3fe11
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/207661
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2021-07-23 08:41:09 +00:00
Alexander Markov 6128a39d85 [vm/compiler] Fix handling of delayed type arguments in case of inlined closure call
Previously, prologue builder omitted loading of delayed type arguments
from closure object in case of inling. This would effectively switch
from using delayed type arguments of an instantiated generic closure to
type arguments passed on the stack (null/all-dynamic if none), which is
not correct.

The fix is to load delayed type arguments from closure object even
in case of inlining.

TEST=tests/language/regress/regress46550_test.dart
Fixes https://github.com/dart-lang/sdk/issues/46550

Change-Id: Ibe50b0bc2ebda1d3638c4940fe9a26cd5ba7ce32
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/207704
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Tess Strickland <sstrickl@google.com>
2021-07-22 17:33:39 +00:00
Sam Rawlins ea5333a23f Do not report const ctor with a mixed in abstract final field
Additionally, reduce duplicated errors regarding invalid const constructors.

Fixes https://github.com/dart-lang/sdk/issues/46641
Change-Id: Ica397ad6e28a05bc5340d5ceca236fbedf1e95f6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/207621
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-07-21 17:56:08 +00:00
Clement Skau 2f0b352e98 [VM] Adds compile-time error for non-static FfiNative
This makes it a compile-time error to add @FfiNative annotation
to any non-static function, such as an instance method.

TEST=tests/ffi/ffi_native_test.dart,pkg/analyzer/test/src/diagnostics/ffi_native_test.dart

Bug: https://github.com/dart-lang/sdk/issues/43889
Change-Id: Ib9ec61345bb47e735ed635c5ceea15ab643f65a6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/207306
Commit-Queue: Clement Skau <cskau@google.com>
Reviewed-by: Tess Strickland <sstrickl@google.com>
2021-07-20 11:54:30 +00:00
Nicholas Shahan 9c6b1ea4e9 [tests] Add regression tests for #46568
Two different const functions should not be identical.

Change-Id: I3974574c8d0cb34b9cf886532c41e1a77ae632a4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/206422
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2021-07-19 21:49:49 +00:00
Stephen Adams cfc8ad4e7f [js_runtime] Use custom hashCode for GeneralConstantMap
Fixes #46580

Change-Id: Ida2b7df75415881973085f9afeacd9ee384fd910
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/207160
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2021-07-16 22:58:02 +00:00
Martin Kustermann 6a87d049ac [vm] Use unique names for process-anonymous unix domain sockets in test
This will allow running the same test concurrently in multiple isolates
without causing name collisions.

It also aligns the NNBD and non-NNBD test.

TEST=Making test more robust. Fixes one issue in iso-stress builder.

Change-Id: Ic0c15a0f47de8e255d2bdfb96547d44d016b2a72
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/207125
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Tess Strickland <sstrickl@google.com>
2021-07-16 14:23:37 +00:00
Martin Kustermann 627292bcc0 [vm] Remove --experimental-enable-isolate-groups-jit, only guard via --enable-isolate-groups
The JIT support has progressed and is no longer unstable. We'll
therefore remove the experimental flag and rely on the same
--enable-isolate-groups flag as in AOT mode.

Issue https://github.com/dart-lang/sdk/issues/36097

TEST=Existing test suite.

Change-Id: Iff0dd5b64d9b6ab91ad9ffc0ae445efc802d3908
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/207122
Auto-Submit: Martin Kustermann <kustermann@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2021-07-16 09:13:28 +00:00
Martin Kustermann 91ac6475cb [vm/concurrency] Enable more isolate tests, remove outdated TODOs, fix 2 tests
This CL

  * Removes conditional Skip markers in status files
  * Removes some outdated TODOs in the code
  * Deletes tests/lib_2/isolate/isolate_stress_test
    => It's skipped everywhere, we no longer support isolates on web
  * Fixes standalone{,_2}/io/directory_list_sync_test:
    => Instead of relying on the Platform.script which could be an ELF
       file lying somewhere else, use Platform.executable instead
  * Fixes standalone{,_2}/io/unix_socket_test:
    => The server used `sub.cancel()` to close it's reading end while
       the client tried to write to it. This is racy.
       If the server goes first, the write on client will throw (since
       no error listener was installed on socket.done)
       Avoid the race by coordinating client/server.

Issue https://github.com/dart-lang/sdk/issues/36097

TEST=Enables more tests.

Change-Id: I0464f81f540f2eda23ef4199cc536e53e6a809b9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/207120
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2021-07-16 07:51:58 +00:00
Martin Kustermann 1ab1438431 [vm] Fix incorrect socket/unix-domain-socket binding code for shared sockets
When creating a binding socket with `shared: true` there will be one
underlying [OSSocket] used. Any following bind on the same address with
`shared: true` will re-use that [OSSocket].

The code that was searching for existing sockets is correct, but the
code that increments the refcount, ... was incorrectly using the start
of the linked list instead of the found existing socket instance.

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

TEST=standalone{,_2}/io/unix_socket_regress_46634_test

Change-Id: I3ce1bdc98ecd4b5311f826ab2597a62fe048be09
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/207083
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2021-07-16 00:27:27 +00:00
Srujan Gaddam 839408f00b Test extensions on and semantics of JavaScriptObject
Tests static extension methods on JavaScriptObject work as
expected, as well as making sure it works with package:js. Once
extension types are added, these tests need to be changed to use
those instead.

Change-Id: I9504c8a3a8e466c680b221e259d93c1df5474218
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/199601
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2021-07-16 00:15:09 +00:00
Mayank Patke c559cf04c3 [dart2js] Some DartTypeVisitor cleanup.
This CL deletes BaseDartTypeVisitor and makes all of the visit* methods
in DartTypeVisitor abstract. This forces subclasses of DartTypeVisitor
to provide definitions for all of these methods rather than relying on
some default.

The old code led to a series of bugs with the same root cause: when a
new kind of DartType was added (and a corresponding visit* method added
to DartTypeVisitor), not all concrete implementations of the visitor
were updated to handle the new DartType. This didn't produce static
errors because DartTypeVisitor provided default no-op implementations
for visit* methods. In some cases, this was the desired behavior anyway,
but in practice, any time a new DartType is added, we want our tools to
yell at us until we've validated that it's properly handled everywhere
(even if the proper handling turns out to be "do nothing").

This CL also updates Namer.getTypeRepresentationForConstant to use a
visitor pattern.

Fixes: https://github.com/dart-lang/sdk/issues/46589
Change-Id: I451b592ae1ce4afff40de913535798a62e17b8b6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/206943
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2021-07-15 19:04:25 +00:00
Clement Skau 06a35b8c2e [VM] Adds test for FfiNative leaf calls.
- Tests that non-leaf calls transition generated -> native,
  and that leaf calls don't.
- Tests that leaf calls with Handle argument or return type
  results in a compile-time error.
- Adds note explaining why there is no ffi_2 version.

TEST=tests/ffi/ffi_native_test.dart

Cq-Include-Trybots: luci.dart.try:analyzer-linux-release-try,analyzer-nnbd-win-release-try,analyzer-analysis-server-linux-try,analyzer-win-release-try,analyzer-nnbd-mac-release-try,analyzer-nnbd-linux-release-try,analyzer-mac-release-try,flutter-analyze-try
Change-Id: I9af60e21f5122f2479c909a52249809850824692
Cq-Do-Not-Cancel-Tryjobs: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/206788
Commit-Queue: Clement Skau <cskau@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2021-07-15 16:14:45 +00:00
Martin Kustermann 6f8304d1f5 [vm] Fix test to use sync file system operations
The test uses a temporary directory that gets deleted once the test
finishes. Though some calls to async methods are not await'ed, so the
directory might get removed before the async methods are completed.

We instead change the test to use synchronous methods consistently. The
regression test is still testing the `rename` method as before.

TEST=Fixes iso-stress builder failures where this issue occurs.

Change-Id: Ide3098fa67de619756417e83df056cf5d1299189
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/207003
Reviewed-by: Tess Strickland <sstrickl@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2021-07-15 09:31:39 +00:00
Srujan Gaddam c261b6574a Filter is_check_and_as_cast_test from CSP target
It uses eval, which is disallowed.

Change-Id: Ib125276560903846eefa3b86125350294ff5d8fd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/206661
Auto-Submit: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2021-07-14 18:10:41 +00:00
Martin Kustermann d6d00b344a [vm] Fix standalone{,_2}/io/issue_30687_test to operate in custom temp directory
All of our tests relying on filesystem operations should operate in a
randomly created temporary directory. This ensures the test will not
interact badly with other tests - running in parallel.

This particular test couldn't be run multiple times concurrently,
since it would cause races to FSE creation/deletion.

TEST=Fixes iso-stress builder issue (which runs tests repeatedly in parallel)

Change-Id: I8b2e015bf4b6a9ecdfa471eb2ec887e634c2b233
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/206783
Reviewed-by: Tess Strickland <sstrickl@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2021-07-14 12:45:00 +00:00
Clement Skau 460e00a6a6 [VM] Adds leaf call option to FfiNative.
This change essentially exposes `asFunction`'s `isLeaf` in
`@FfiNative`, allowing us to declare FFI Natives as leaf calls.

TEST=Adds tests/ffi/ffi_native_test.dart

Bug: https://github.com/dart-lang/sdk/issues/43889
Change-Id: I2a396fae2ab28d21df282f3afb35fa401485ed52
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/206375
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Clement Skau <cskau@google.com>
2021-07-14 09:13:51 +00:00
Ryan Macnak 09cc09cb85 [vm] Don't block OOB messages or reload during field initialization; make interrupts lock-free.
- Account for initialization-in-progress sentinel when checking static field types for reload.
 - Don't read the true stack limit when setting or clearing interrupts.

TEST=ci
Bug: https://github.com/dart-lang/sdk/issues/46596
Change-Id: I80adb4d7d69f01125b7eae8215b5da4d2e467bda
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/206662
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2021-07-14 00:09:10 +00:00
Srujan Gaddam f7c284b9f0 [pkg:js] Add tests for inheritance type checks/casts and subtyping
Adds tests for type checks/casts for pkg:js types that inherit each
other. Similarly, adds subtyping tests for both when types are made
live and when they are not.

Also adds extends_test to lib_2.

Change-Id: Ia3ca03ad9c0291092998d1d3e98d672711fcf8e6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/205602
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Riley Porter <rileyporter@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2021-07-13 20:02:49 +00:00
Martin Kustermann 430aa20a1f [vm/concurrency] Implement a fast transitive object copy for isolate message passing
We use message passing as comunication mechanism between isolates.
The transitive closure of an object to be sent is currently serialized
into a snapshot form and deserialized on the receiver side. Furthermore
the receiver side will re-hash any linked hashmaps in that graph.

If isolate gropus are enabled we have all isolates in a group work on
the same heap. That removes the need to use an intermediate
serialization format. It also removes the need for an O(n) step on the
receiver side.

This CL implements a fast transitive object copy implementation and
makes use of it a message that is to be passed to another isolate stays
within the same isolate group.

In the common case the object graph will fit into new space. So the
copy algorithm will try to take advantage of it by having a fast path
and a fallback path. Both of them effectively copy the graph in BFS
order.

The algorithm works effectively like a scavenge operation, but instead
of first copying the from-object to the to-space and then re-writing the
object in to-space to forward the pointers (which requires us writing to
the to-space memory twice), we only reserve space for to-objects and
then initialize the to-objects to it's final contents, including
forwarded pointers (i.e. write the to-space object only once).

Compared with a scavenge operation (which stores forwarding pointers in
the objects themselves), we use a [WeakTable] to store them. This is the
only remaining expensive part of the algorithm and could be further
optimized. To avoid relying on iterating the to-space, we'll remember
[from, to] addresses.

=> All of this works inside a [NoSafepointOperationScope] and avoids
   usages of handles as well as write barriers.

While doing the transitive object copy, we'll share any object we can
safely share (canonical objects, strings, sendports, ...) instead of
copying it.

If the fast path fails (due to allocation failure or hitting) we'll
handlify any raw pointers and continue almost the same algorithm in a
safe way, where GC is possible at every object allocation site and
normal barriers are used for any stores of object pointers.

The copy algorithm uses templates to share the copy logic between the
fast and slow case (same copy routines can work on raw pointers as well
as handles).

There's a few special things to take into consideration:

  * If we copy a view on external typed data we need to know the
    external typed data address to compute the inner pointer of the
    view, so we'll eagerly initialize external typed data.

  * All external typed data needs to get a finalizer attached
    (irrespective if the object copy suceeds or not) to ensure the
    `malloc()`ed data is freed again.

  * Transferables will only be transferred on successful transitive
    copies. Also they need to attach finalizers to objects (which
    requires all objects be in handles).

  * We copy linked hashmaps as they are - instead of compressing the
    data by removing deleted entries. We may need to re-hash those
    hashmaps on the receiver side (similar to the snapshot-based copy
    approach) since new object graph will have no identity hash codes
    assigned to them. Though if the hashmaps only has sharable objects
    as keys (very common, e.g. json) there is no need for re-hashing.


It changes the SendPort.* benchmarks as follows:

```
Benchmark                                     |              default |                        IG |                  IG + FOC
----------------------------------------------------------------------------------------------------------------------------
SendPort.Send.Nop(RunTimeRaw):                |        0.25 us (1 x) |       0.26 us    (0.96 x) |       0.25 us    (1.00 x)
SendPort.Send.Json.400B(RunTimeRaw):          |        4.15 us (1 x) |       1.45 us    (2.86 x) |       1.05 us    (3.95 x)
SendPort.Send.Json.5KB(RunTimeRaw):           |       82.16 us (1 x) |      27.17 us    (3.02 x) |      18.32 us    (4.48 x)
SendPort.Send.Json.50KB(RunTimeRaw):          |      784.70 us (1 x) |     242.10 us    (3.24 x) |     165.50 us    (4.74 x)
SendPort.Send.Json.500KB(RunTimeRaw):         |     8510.4  us (1 x) |    3083.80 us    (2.76 x) |    2311.29 us    (3.68 x)
SendPort.Send.Json.5MB(RunTimeRaw):           |   122381.33 us (1 x) |   62959.40 us    (1.94 x) |   55492.10 us    (2.21 x)
SendPort.Send.BinaryTree.2(RunTimeRaw):       |        1.91 us (1 x) |       0.92 us    (2.08 x) |       0.72 us    (2.65 x)
SendPort.Send.BinaryTree.4(RunTimeRaw):       |        6.32 us (1 x) |       2.70 us    (2.34 x) |       2.10 us    (3.01 x)
SendPort.Send.BinaryTree.6(RunTimeRaw):       |       25.24 us (1 x) |      10.47 us    (2.41 x) |       8.61 us    (2.93 x)
SendPort.Send.BinaryTree.8(RunTimeRaw):       |      104.08 us (1 x) |      41.08 us    (2.53 x) |      33.51 us    (3.11 x)
SendPort.Send.BinaryTree.10(RunTimeRaw):      |      373.39 us (1 x) |     174.11 us    (2.14 x) |     134.75 us    (2.77 x)
SendPort.Send.BinaryTree.12(RunTimeRaw):      |     1588.64 us (1 x) |     893.18 us    (1.78 x) |     532.05 us    (2.99 x)
SendPort.Send.BinaryTree.14(RunTimeRaw):      |     6849.55 us (1 x) |    3705.19 us    (1.85 x) |    2507.90 us    (2.73 x)
SendPort.Receive.Nop(RunTimeRaw):             |        0.67 us (1 x) |       0.69 us    (0.97 x) |       0.68 us    (0.99 x)
SendPort.Receive.Json.400B(RunTimeRaw):       |        4.37 us (1 x) |       0.78 us    (5.60 x) |       0.77 us    (5.68 x)
SendPort.Receive.Json.5KB(RunTimeRaw):        |       45.67 us (1 x) |       0.90 us   (50.74 x) |       0.87 us   (52.49 x)
SendPort.Receive.Json.50KB(RunTimeRaw):       |      498.81 us (1 x) |       1.24 us  (402.27 x) |       1.06 us  (470.58 x)
SendPort.Receive.Json.500KB(RunTimeRaw):      |     5366.02 us (1 x) |       4.22 us (1271.57 x) |       4.65 us (1153.98 x)
SendPort.Receive.Json.5MB(RunTimeRaw):        |   101050.88 us (1 x) |      20.81 us (4855.88 x) |      21.0  us (4811.95 x)
SendPort.Receive.BinaryTree.2(RunTimeRaw):    |        3.91 us (1 x) |       0.76 us    (5.14 x) |       0.74 us    (5.28 x)
SendPort.Receive.BinaryTree.4(RunTimeRaw):    |        9.90 us (1 x) |       0.79 us   (12.53 x) |       0.76 us   (13.03 x)
SendPort.Receive.BinaryTree.6(RunTimeRaw):    |       33.09 us (1 x) |       0.87 us   (38.03 x) |       0.84 us   (39.39 x)
SendPort.Receive.BinaryTree.8(RunTimeRaw):    |      126.77 us (1 x) |       0.92 us  (137.79 x) |       0.88 us  (144.06 x)
SendPort.Receive.BinaryTree.10(RunTimeRaw):   |      533.09 us (1 x) |       0.94 us  (567.12 x) |       0.92 us  (579.45 x)
SendPort.Receive.BinaryTree.12(RunTimeRaw):   |     2223.23 us (1 x) |       3.03 us  (733.74 x) |       3.04 us  (731.33 x)
SendPort.Receive.BinaryTree.14(RunTimeRaw):   |     8945.66 us (1 x) |       4.03 us (2219.77 x) |       4.30 us (2080.39 x)
```

Issue https://github.com/dart-lang/sdk/issues/36097

TEST=vm/dart{,_2}/isolates/fast_object_copy{,2}_test

Change-Id: I835c59dab573d365b8a4b9d7c5359a6ea8d8b0a7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/203776
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2021-07-13 19:04:20 +00:00
Srujan Gaddam 0fc2d929e3 [pkg:js] Add subtyping tests with liveness
Adds tests for subtyping between pkg:js types. Also runs tests
for both when types are made live and for when they are not.

Also adds these tests to lib_2.

Change-Id: I25fdc293e422eb21fa8a80dea66ae5d492c5aafd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/205601
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Riley Porter <rileyporter@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2021-07-13 18:51:34 +00:00
Daco Harkes 21af69a7a5 Revert "[vm] Don't block OOB messages during field initialization; make interrupts lock-free."
This reverts commit 4d789f60d1.

Reason for revert: TSAN races
https://github.com/dart-lang/sdk/issues/46596

Original change's description:
> [vm] Don't block OOB messages during field initialization; make interrupts lock-free.
>
> TEST=ci
> Change-Id: I51d0f51995e197ab71c059f17d22259eea19c286
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/206566
> Commit-Queue: Ryan Macnak <rmacnak@google.com>
> Reviewed-by: Ben Konyi <bkonyi@google.com>

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

Change-Id: I777f5a0bbeb3cd60e03aff46183b19ab4e286664
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/206545
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2021-07-13 11:30:08 +00:00
Srujan Gaddam 8f11985c47 [pkg:js] Test runtime is checks
The is checks in is_check_and_as_cast_test.dart are currently optimized
by dart2js at compile time. In order to test them at runtime, is checks
are added after confusing the instance.

Also adds this test file to lib_2.

Change-Id: I3a77c779799f77342297508b89367ab8b64c3241
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/205600
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Riley Porter <rileyporter@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2021-07-13 01:28:55 +00:00
Ryan Macnak 4d789f60d1 [vm] Don't block OOB messages during field initialization; make interrupts lock-free.
TEST=ci
Change-Id: I51d0f51995e197ab71c059f17d22259eea19c286
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/206566
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2021-07-13 00:43:05 +00:00
Daco Harkes d5a97be466 [test] Fix getValueNonOptimized in tests
Addressing https://dart-review.googlesource.com/c/sdk/+/206202/4/tests/language/const/set_hashcode_override2_test.dart#12

Change-Id: I08948507b702dd0885b98ae31b1a7d22536e9ce1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/206224
Reviewed-by: Erik Ernst <eernst@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2021-07-12 10:23:14 +00:00
Clement Skau ffde1585da [VM] Removes types from reused temps in async.
When we detect that a temporary variable is being reused
with a different type, we change the type of the temp
to dynamic.
This allows us to retain types for any non-reused temps.

For any dynamic temps we still have type information available
for use sites, which we can pass on via unsafeCast.

One drawback of this approach is that we don't know ahead
of time which temps are reused, and get turned into dynamic,
so we have to unsafeCast all uses.


This change is similar to what was done in:
https://dart-review.googlesource.com/c/sdk/+/138500

TEST=Adds tests/language/vm/regress_flutter_85311_test.dart,
updates relevant expect files.

Bug: https://github.com/flutter/flutter/issues/85311
Change-Id: I821c5266327892d5c3fd5bae1bebba7f3fe3931b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/205647
Commit-Queue: Clement Skau <cskau@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2021-07-12 08:55:53 +00:00
Erik Ernst 72d8a215e7 Adjust test on super-bounds to avoid error-on-error situations
Bug: https://github.com/dart-lang/sdk/issues/46516
Change-Id: I8df54ebd4743ed93a81bb13fc43816d85b7b3aa6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/205789
Auto-Submit: Erik Ernst <eernst@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-07-10 00:44:10 +00:00
Daco Harkes 2a68e31ffb [test] Non terminating hashCode override in const
The language spec only mandates operator== to not be overridden for
instances used in const maps as keys or const sets. However, hashCode
_can_ be overridden.

This adds a test that exercises this behavior.

Bug: https://github.com/dart-lang/sdk/issues/45908

Change-Id: Id64c0722872bb916963b71057a06309bf3b8b559
Cq-Include-Trybots: luci.dart.try:dart2js-csp-minified-linux-x64-chrome-try,dart2js-minified-strong-linux-x64-d8-try,dart2js-nnbd-linux-x64-chrome-try,dart2js-strong-hostasserts-linux-ia32-d8-try,dart2js-strong-linux-x64-chrome-try,dart2js-strong-linux-x64-firefox-try,dart2js-strong-mac-x64-chrome-try,dart2js-strong-mac-x64-safari-try,dart2js-strong-win-x64-chrome-try,dart2js-unit-linux-x64-release-try,ddc-linux-release-chrome-try,ddc-mac-release-chrome-try,ddc-nnbd-linux-release-chrome-try,ddc-win-release-chrome-try,vm-kernel-precomp-nnbd-linux-debug-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/206085
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2021-07-08 12:18:48 +00:00
Daco Harkes c8c41f72a0 [test] const instances in non-const sets
The language spec only mandates operator== to not be overridden for
instances used in const maps as keys or const sets. However, hashCode
_can_ be overridden.

This CL adds tests that uses these const instances in non-const maps.
(As follow up of https://dart-review.googlesource.com/c/sdk/+/206085)

Bug: https://github.com/dart-lang/sdk/issues/45908

Change-Id: I3caf5afd45aaec24b3e89e4645b00841a2075ca3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/206202
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
2021-07-08 11:30:53 +00:00
Martin Kustermann c133aa8660 Reland "[vm] Remove --causal-async-stacks flag"
The flag isn't used anywhere in our tests or in embedder code. Turning
it on will result in a VM startup error.

We should therefore remove all uses of the flag and the flag itself.

This is a unmodified reland of

  https://dart-review.googlesource.com/c/sdk/+/204500

after some remaining g3 usages have been fixed (the flutter
roll didn't port the GN changes to BUILD changes in g3)

TEST=Existing test suite.

Change-Id: Ic28c9b334a0b04524ee57e2554cc8d713a83fbfb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204785
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2021-07-02 14:26:46 +00:00
Erik Ernst 9371fd9fc8 Adjust vm test about the Symbol constructor
The `Symbol` constructor has been changed to accept any string as the
actual argument (it used to require strings similar to the ones that we
can use with `#` to create a symbol literal). This CL change a vm test
such that it has the updated expectations.

Cf. https://github.com/dart-lang/sdk/issues/46207.

Change-Id: I25fa5a145b7d476372b4c2f8502eabb36ec82fec
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/205781
Commit-Queue: Erik Ernst <eernst@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2021-07-02 12:41:41 +00:00
Alexander Aprelev b1db8a3c65 [io/gardening] Marking large_file_read_small_file_test slow.
Fixes https://github.com/dart-lang/sdk/issues/45388.

TEST=io/large_file_read_small_file_test

Change-Id: Ib3512f3005a820ff69e8cbe4c5e3f6b0b5e1a0df
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/205841
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2021-07-02 03:53:13 +00:00
Erik Ernst 47502de6b0 Remove two tests using a deferred type
This is a compile-time error today, and that is tested already
elsewhere, so the test serves no purpose.

Bug: #46526
Change-Id: If098f8dc308ae4532b22f786f14a1986e2899251
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/205720
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
2021-07-01 20:53:05 +00:00
Erik Ernst 166d474257 Adjust symbol tests to new semantics
Cf. https://github.com/dart-lang/sdk/issues/46207, the semantics of
the platform class `Symbol` was changed such that all string argumnts
are accepted (previously, only some strings were accepted).

Change-Id: I1d2b093e4fdbb5dabf17b7a53c70e9787a7a76a4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/205480
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
2021-07-01 18:43:14 +00:00
Konstantin Shcheglov 32f9d0c404 Issue 46529. Annotate imports unresolved because of errors in .packages files.
Bug: https://github.com/dart-lang/sdk/issues/46529
Change-Id: I05dc36914adddb6196ade294650ec683dc4a593d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/205628
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-07-01 16:15:18 +00:00
michaellee8 4160a6b361 [Http] Fix handling of ipv6 address in host header
The current implementation of _HttpHeaders._addHost does not handle
ipv6 address correctly. This patch fixes the handling and add test
case for that.

References:

- https://github.com/flutter/flutter/issues/83609#issuecomment-870356766

TEST=http_headers_test.dart has been updated with new cases.

Bug: https://github.com/flutter/flutter/issues/83609#issuecomment-870356766
Change-Id: Idc4e9bbe66d66f0d846c7a32a40854201c3b0153
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/205280
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2021-07-01 01:18:44 +00:00
Riley Porter eaafc3deb0 Skip tests using eval to inject JavaScript on CSP build
Change-Id: I3084fa1056550e78ad09009c5c507dfa03bae78d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/205631
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Riley Porter <rileyporter@google.com>
2021-06-30 23:29:17 +00:00
Riley Porter 63ac437e99 Optimize js_util callMethod calls for 0-4 arguments.
Change completes initial set of js_util optimizations. Some usages
of `getProperty`, `setProperty`, and `callMethod` with <= 4
arguments will have unnecessary checks removed by the compilers.

Change-Id: I94d5402ca9a64ad2818fd6d6a5f7f114f87348c5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204562
Commit-Queue: Riley Porter <rileyporter@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2021-06-30 20:11:44 +00:00
Jens Johansen 7e183b64a9 [test] Fix bug in export/duplicate_import_libd
`git show fc1b1ecc712d` shows - among lots of other changes - this:

```
diff --git a/tests/language_2/duplicate_import_liba.dart b/tests/language_2/export/duplicate_import_liba.dart
similarity index 100%
rename from tests/language_2/duplicate_import_liba.dart
rename to tests/language_2/export/duplicate_import_liba.dart
```

and

```
diff --git a/tests/language_2/duplicate_import_libd.dart b/tests/language_2/export/duplicate_import_libd.dart
similarity index 91%
rename from tests/language_2/duplicate_import_libd.dart
rename to tests/language_2/export/duplicate_import_libd.dart
index ccec81e0ff6..14f1ff413fb 100644
--- a/tests/language_2/duplicate_import_libd.dart
+++ b/tests/language_2/export/duplicate_import_libd.dart
@@ -8,6 +8,6 @@ import 'duplicate_import_liba.dart';
 import 'duplicate_import_libb.dart';
 import 'duplicate_import_libc.dart';

-export 'duplicate_import_liba.dart';
+export '../duplicate_import_liba.dart';
 export 'duplicate_import_libb.dart';
 export 'duplicate_import_libc.dart';
```

Change-Id: I806ba94ae251d574981e06ea88e6189063719785
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/205264
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2021-06-30 07:44:52 +00:00
Lasse R.H. Nielsen 42238ecfb8 Reland "Add some operator based tests."
This is a reland of 8a57112091

Original change's description:
> Add some operator based tests.
>
> Change-Id: Id9aa12854621eab68227b64bebf507f25b07ea1e
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154683
> Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
> Reviewed-by: Johnni Winther <johnniwinther@google.com>

Change-Id: I69f9810d7539b309ee7c1b87c13cd4153c590f2a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/205263
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
2021-06-29 16:28:48 +00:00
Lasse R.H. Nielsen 5eb5d78a63 Revert "Add some operator based tests."
This reverts commit 8a57112091.

Reason for revert: Wasn't calling the new test function at all.

Change-Id: Ibb49de7a6f40b740d8a70200babce76811d2bf61
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/205262
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
2021-06-29 10:25:53 +00:00
Ben Konyi 71c61ea24c [ VM ] Add delay between SIGINTs to fix flakiness of regress_42092_test
Change-Id: I1cce3f37491567bd13c9f64d4d15afed23a35a10
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204901
Auto-Submit: Ben Konyi <bkonyi@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2021-06-29 01:36:32 +00:00
Lasse R.H. Nielsen 8a57112091 Add some operator based tests.
Change-Id: Id9aa12854621eab68227b64bebf507f25b07ea1e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154683
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2021-06-28 15:06:52 +00:00
Erik Ernst 070e32e553 Add test on identity and equality of tearoffs
Change-Id: Ief2313b6c7f859622f8970cb3abb42ba98c89084
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202243
Commit-Queue: Erik Ernst <eernst@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2021-06-28 14:57:02 +00:00
Mayank Patke 58ad941a5a [dart2js] Fix interface subtyping bug.
Previously, when checking S <: T, we only checked if S and T had the
same interface name once. However, it's possible that redirections
eventually cause them to become equal. For example, if S is an interop
type and T is JavaScriptObject, after following the redirection from S
to JavaScriptObject, we end up checking JavaScriptObject <:
JavaScriptObject. Therefore, we need to recheck after following each
redirection.

Change-Id: Ie3eb9530627a0e48a5ea704fd4078ae238a65c78
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204744
Commit-Queue: Mayank Patke <fishythefish@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2021-06-25 22:34:06 +00:00
Johnni Winther 268290725d [cfe] Support explicit instantiation
+ add bounds check for implicit instantiation

Closes #46458

Change-Id: I032f79d8ae4ed6944fbad999e067976ff72d94fe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204802
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2021-06-25 14:47:45 +00:00
Lasse R.H. Nielsen 43cff26365 Add supertype to enum classes.
TEST= language/enum/enum_test

Change-Id: I83b7fd1c29103c3aa4dc7ad3e41141fb8c62339e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/203564
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2021-06-25 14:08:16 +00:00
Lasse R.H. Nielsen 83376bf1ee Add Object.hash and Object.hashAll static helper methods.
Fixes #11617.

Bug: http://dartbug.com/11617
Change-Id: Id06fb5b3914bee24713427edbd3b9b7e86f86449
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/73360
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2021-06-25 11:40:35 +00:00
Stephen Adams 8fda1d6cf3 [js_runtime] Don't modify inputs to Function.apply
In some cases adding default arguments modified the 'positional'
arguments input List.  Since there are 'accelerated' paths for small
numbers of arguments, this bug did not show in any other tests.

Change-Id: I5075c96ecfdc9645b85b9beeeb38305415153d20
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204747
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2021-06-24 03:29:38 +00:00
Mayank Patke c015e02180 [dart2js] Fix spurious ! in ConstantMap.
Change-Id: I45ab75005c4f3d658c476886ede3ba37dbb067e9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204625
Commit-Queue: Mayank Patke <fishythefish@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2021-06-23 18:30:11 +00:00
Stephen Adams 11991056b6 Specialize closures for 0 and 2 arguments
Change-Id: Ia21249cb9671960eb3e0d96afef5e5efb8ba7ee2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105200
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Joshua Litt <joshualitt@google.com>
2021-06-23 16:54:41 +00:00
Martin Kustermann 0999d13ff3 Revert "[vm] Remove --causal-async-stacks flag"
This reverts commit b1f1aee94d.

Reason for revert: Some left-over uses in g3 need to removed first
(some were removed in b/380758599 but apparently there's some 
usages left).

Original change's description:
> [vm] Remove --causal-async-stacks flag
>
> The flag isn't used anywhere in our tests or in embedder code. Turning
> it on will result in a VM startup error.
>
> We should therefore remove all uses of the flag and the flag itself.
>
> TEST=Existing test suite.
>
> Change-Id: I19dfba052df7948dfdb379c0610dab67ebbcd12d
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204500
> Reviewed-by: Clement Skau <cskau@google.com>
> Commit-Queue: Martin Kustermann <kustermann@google.com>

TBR=kustermann@google.com,cskau@google.com

Change-Id: I03aad46f46153d5ea4ac2fcdd5685d0ef2a0d9af
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204723
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2021-06-23 16:53:22 +00:00
Martin Kustermann b1f1aee94d [vm] Remove --causal-async-stacks flag
The flag isn't used anywhere in our tests or in embedder code. Turning
it on will result in a VM startup error.

We should therefore remove all uses of the flag and the flag itself.

TEST=Existing test suite.

Change-Id: I19dfba052df7948dfdb379c0610dab67ebbcd12d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204500
Reviewed-by: Clement Skau <cskau@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2021-06-23 14:37:31 +00:00
Nate Bosch 1948bd6109 Add fixes for HttpStatus constants
Add rename migrations for all the screaming snake case constants that
were renamed to lower camel case during the Dart 2 migraiton.

Rename the test from `file.dart` to `io.dart` so that we can test all
deprecations for the same import together. Add a test for the same
deprecations when imported through `dart:html`.

Change-Id: Iee91d88b1b11648e8c65cfcc8d2fcfabac3954ec
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/203820
Auto-Submit: Nate Bosch <nbosch@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2021-06-22 23:39:57 +00:00
Regis Crelier 8b7870bc62 Reland "[VM/runtime] Handle generic types in intrinsics for type equality and runtimeType comparison."
This is a reland of 09d2025685

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

Intrinsics for sameRuntimeType wrongly assumed that types with unequal type arguments are unequal, which is not true:
1) nullability of individual type arguments may be different
2) one vector may be a prefix of the other vector

Note that the intrinsic for type equality did not make this assumption.

Case 2 above was not handled properly in the runtime.

TEST=added regression test

Original change's description:
> [VM/runtime] Handle generic types in intrinsics for type equality and runtimeType comparison.
>
> Generic types with equal class ids and equal type arguments are now considered equal by the intrinsics and a runtime call is avoided.
>
> Fixes https://github.com/dart-lang/sdk/issues/23746
>
> TEST=existing ones
>
> Change-Id: I668db119ac6d2525eac3a4f17a44f36c53b9dbf5
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/203143
> Reviewed-by: Ryan Macnak <rmacnak@google.com>
> Commit-Queue: Régis Crelier <regis@google.com>

Change-Id: I53fc00d856ecd9d9b8d66b8da95285e6e0bd508e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204363
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Régis Crelier <regis@google.com>
2021-06-22 20:35:53 +00:00
Lasse R.H. Nielsen 902f149e2c Add unawaited function and ignore extensions member.
The `unawaited` function in `dart:async` is intended for use with the `unawaited_futures` lint which is hopefully going to be part of the Dart recommended set of lints.

The `ignore` extension method is there to provide an alternative if you even want to ignore errors from a future. By having both, it makes the distinction clearer and makes it easier to not think one can be used for everything.

Change-Id: Ib96ed5ff64ead4b228721e5210efa82f76119c9f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200428
Reviewed-by: Jacob Richman <jacobr@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
2021-06-22 20:03:13 +00:00
Lasse R.H. Nielsen 19252d5786 Fix behavior for -infinity width/height of rectangles.
Fixes #30186
BUG= dartbug.com/30186

Change-Id: I2994d180a4dc4d4e4bba7edec67bc2bcc2e8fc0b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201568
Auto-Submit: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
2021-06-21 13:29:39 +00:00
Jens Johansen 4a49580e7e [parser] Consume (and use) identifier looking like start of next top level declaration as class name
Fixes https://github.com/dart-lang/sdk/issues/46346

Change-Id: Ie688d0838b612c2eda157bbf9e2fa799bae96fb1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/203762
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-06-18 10:20:32 +00:00
Alexander Aprelev dab206dec8 [vm/tests] Fix names of regressions tests, delete no-longer-valid test
Deleted tests that are mixing classes without extending Object.

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

Change-Id: I9114e5bd9927a6a343ac72103a104227d59eba3f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200932
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2021-06-17 20:56:11 +00:00
Stephen Adams 1c3ea7878e [dart2js] Do not do null assertions on operator==
`operator==` is special.

In the specification, `operator==` methods cannot be called with `null`,
so do not _need_ a null-check for `--null-assertions`.

However, in the dart2js implementation, `operator==` methods are
augmented to handle a `null` argument rather than check the argument
for `null` at every call site. So it is necessary to be _ensure_ there
is no code added for the `--null-assertions` check.



Change-Id: I859b99d680f6d0fad698e1b59eafa1ba0b1749b2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/203842
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2021-06-17 16:47:41 +00:00
Ryan Macnak d2e460675b [vm] Fix gcc build.
TEST=local build
Change-Id: I572aba5798a07ce5cb0cbda83d6eb3e44811ba5b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/203287
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2021-06-17 16:05:02 +00:00
Joshua Litt 343682c4ac Fix web/native/native_exceptions1_frog_test.
An earlier cl fixed the test in web_2, this is just backporting that
fix.

earlier cl:
https://dart-review.googlesource.com/c/sdk/+/200020

Change-Id: Id34bfbc77b5d7774f0e464170c65fd84fa5e9d17
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/203827
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2021-06-16 22:00:27 +00:00
Alexander Aprelev b791ee1b9e [gardening] Skip socket_sigpipe_test on jitk, simarm.
The test uses ffi and it spawns helper process, therefore it's not compatible with those bots.

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

TEST=ci

Change-Id: I680609c17c91133e7208bc2dc7ffe7c847f4987d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/203830
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2021-06-16 21:56:57 +00:00
Regis Crelier bae9560c8a [VM/runtime] Insert TypeRef when type parameter bound refers to type parameters.
Fixes https://github.com/dart-lang/sdk/issues/46276

TEST=added regression test

Change-Id: Iecdccd4af02c374d4d17d0c0d7985fdaeec5e42a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202820
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Régis Crelier <regis@google.com>
2021-06-16 18:25:37 +00:00
Alexander Aprelev fb32ffd97f [io/mac/sigpipe] Ensure SIGPIPE is not triggered for client socket connect code.
Fixes https://github.com/flutter/flutter/issues/84499

TEST=socket_sigpipe_test.dart

Change-Id: I220558e74b41c1969efa422254867c11dd17ee91
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/203660
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
2021-06-16 17:38:37 +00:00
Nicholas Shahan c83eeac5b8 [ddc] Avoid sending messages to console.debug
Calling `postEvent()` or `registerExtension()` from the
dart:developer library now sends messages via global functions
that can be set by the development infrastructure. For example,
these hooks are set by package:dwds.

When there is no debugger attached to the app, calling `postEvent()`
or `registerExtension()` will produce a warning once each to avoid
spamming the debug log with messages that do nothing.

For backwards compatibility, when a debugger is attached but the
hooks have not defined continue to write the events to the
console.debug log. This support will be removed when package:dwds
no longer reads from the log.
https://github.com/dart-lang/webdev/issues/1342

Change-Id: I126446666b5a85c68424546b8b1198d1582bba74
Issue: https://github.com/flutter/flutter/issues/75225
Fixes: https://github.com/dart-lang/sdk/issues/36143
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202540
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Gary Roumanis <grouma@google.com>
Reviewed-by: Mark Zhou <markzipan@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2021-06-15 23:28:03 +00:00
Daco Harkes fed3cef63a [vm/tests] const maps are immutable
Bug: https://github.com/dart-lang/sdk/issues/45908

Change-Id: I15011ab63fb119a601ba5f147481f9e9aefafdd7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/203683
Reviewed-by: Clement Skau <cskau@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2021-06-15 14:08:52 +00:00
Gabriel Castro 820ba59dda [html] Fix nested JS Map to Dart assignment
Added check to convertNativeToDart_Dictionary to recursively convert native objects within a map to their Dart equivalent.

Fixes: https://github.com/dart-lang/sdk/issues/44319
Change-Id: I80a2bc0541454900b1c7d9635debaf72d7c120f2
Bug: 44319
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201200
Commit-Queue: Gabriel Castro <gabrielmcastro@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
2021-06-14 21:18:08 +00:00
Konstantin Shcheglov ee6a8a4743 Stop using ConstantAstCloner.
With storing initializers and default values in summaries,
including offsets, we don't need cloning them to store into elements.

Presubmit in google3 looks green.
https://test.corp.google.com/ui#id=OCL:376954598:BASE:379074195:1623530623317:a06607e1

Change-Id: I6e403302d047eb3ce38822f5ac09f1a99decf667
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201986
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2021-06-13 17:33:42 +00:00
Lasse R.H. Nielsen b3ae822e5a Create tests for constructor tear-offs and related syntax changes.
Change-Id: I2e76322f57a331704a657b7cc471a61fd3227c94
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/197168
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
2021-06-11 12:28:06 +00:00
Daco Harkes ddafaa0775 [vm/ffi] Update tests to cover MacOS arm64 after-struct alignment
Expands the test PassStruct9BytesPackedMixedx10DoubleInt32 to see how
the second integer is allocated.
Updates runtime/vm/compiler/ffi/unit_tests/structPacked to have the same
signature.

Fixes the structs by value test generator to output // @dart 2.9 for
legacy mode.
Deletes the copy of the test generator from tests/ffi, the copy did not
run in legacy mode.

TEST=only test changes

Change-Id: I65b7db56225a8e7963493dbccc2f296faca6fee1
Cq-Include-Trybots: luci.dart.try:vm-kernel-mac-release-arm64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202968
Reviewed-by: Tess Strickland <sstrickl@google.com>
2021-06-11 12:00:26 +00:00
Nicholas Shahan 0733c1f6b1 [ddc] Add unspecified nullability regression test
Change-Id: If82ef47aac1d67c5f6db636522ed0ef7de180f8d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/203121
Reviewed-by: Mark Zhou <markzipan@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2021-06-10 20:18:53 +00:00
Alexander Aprelev bd4a6291e5 [io/stacktraces] Fix socket_connect_stacktrace_test exception expectations.
This is follow-up to 52aa8508f1.

TEST=socket_connect_stacktrace_test

Change-Id: I46eafa4852bed92eaf1a9035bcb3b007d700fc0e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/203280
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2021-06-10 18:27:40 +00:00
Alexander Aprelev 52aa8508f1 [io/stacktraces] Ensure websocket connect reports callers stacktrace.
Introduce dwarf-friendly socket connect stacktrace test.

TEST=socket_connect_dwarf_stacktrace_test

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

Change-Id: I428ac4b334d9d80ea06c64283ece3ff411abfa19
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/203160
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2021-06-10 16:16:50 +00:00
Alexander Aprelev c8ffded3ad [vm/regexp] Ensure recently added reg_exp_receive_port_test runs on dartkp.
This is follow-up to db17c490f8 where test was marked as skipped on dart_precompiled runtime.

Normalized corelib.status file so that presubmit reports relevant feedback with changes to it.

TEST=reg_exp_receive_port_test

Change-Id: Ib67d4c139040f27d1bd0b2b65ceb07269bacadd9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202981
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2021-06-09 17:06:51 +00:00
Sergey G. Grekhov a6342dcfcb [co19] co19_2 status file updated
Change-Id: Ic246235bdffbd3dc7332352680e2a9ebcde205c1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202774
Commit-Queue: Erik Ernst <eernst@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
2021-06-09 14:17:11 +00:00
Tess Strickland 7d44c20f2c [tests] Fixes for standalone{,_2}/check_for_aot_snapshot_jit_test.
* Skip on IA32, since it has no AOT mode.

* Use .bat/.exe suffixes on Windows.

* Look for gen_snapshot in <buildDir>/clang_x64 on MacOS ARM64.

* Avoid using Platform.script to find .dart source file locations, since
  some architectures generate a .dill for running JIT programs, which
  will be in the generated files directory, not the SDK directory.

* Try both 'dart <aotsnapshot>' and 'dart run <aotsnapshot>', which
  should both give the correct error message.

Cq-Include-Trybots: luci.dart.try:vm-kernel-nnbd-linux-release-x64-try,vm-kernel-nnbd-linux-release-ia32-try,vm-kernel-nnbd-linux-release-simarm-try,vm-kernel-nnbd-linux-release-simarm64-try,vm-kernel-linux-release-x64-try,vm-kernel-linux-release-ia32-try,vm-kernel-linux-release-simarm-try,vm-kernel-linux-release-simarm64-try,vm-kernel-win-release-ia32-try,vm-kernel-win-release-x64-try,vm-kernel-nnbd-win-release-x64-try,vm-kernel-nnbd-win-release-ia32-try,vm-kernel-mac-release-arm64-try,vm-kernel-mac-release-x64-try,vm-kernel-nnbd-mac-release-x64-try
Change-Id: Ic50b86fb51b5f2b30c6a4cb4fd8f0594bb1cf93d
Bug: https://github.com/dart-lang/sdk/issues/46306
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202923
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: Clement Skau <cskau@google.com>
2021-06-09 12:22:41 +00:00
Alexander Aprelev db17c490f8 [vm/regexp] Ensure regex sent in a message can be used by the receiver.
Fixes https://github.com/dart-lang/sdk/issues/46294

TEST=reg_exp_receive_port_test.dart

Change-Id: Ic9ecde42224d44035ecb60347e11aae0bd92cd09
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202861
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2021-06-09 02:50:50 +00:00
Alexander Aprelev 80749188ca [io/socket] When socket connection fails report stacktrace of the callsite.
Currently stack trace reported on thrown exceptions is null.

TEST=socket_connect_stacktrace_test.dart

Bug: https://github.com/dart-lang/sdk/issues/44994
Change-Id: I188aff197ab519272f63f41387b94458c2f1cec7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202802
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2021-06-08 16:17:47 +00:00
Riley Porter 30b3552ee3 Use static DartType for js_util optimizations.
Change-Id: I294af3925f15a438f8ad76b538de4ca3a227749e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202440
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Riley Porter <rileyporter@google.com>
2021-06-07 17:27:42 +00:00
Lasse Reichstein Holst Nielsen 1154efb073 Fix null-safety migration bug in VM version of fuse JSON-UTF-8 decoder.
A JSON value can be `null`, so the return type must be `Object?`, not `Object`.

Fixes #46205.

Bug: http://dartbug.com/462051
Change-Id: I9a5522e09765457dcf8cd2639abbe385d97a3186
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202623
Reviewed-by: Erik Ernst <eernst@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
2021-06-07 11:43:02 +00:00
Joshua Litt 2ad8d3d23e [dart2js] Add test for empty holders in an output unit.
Change-Id: I364366c2a5e9ce5895dbc4096d17ad04374b69d6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202310
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2021-06-04 17:55:17 +00:00
Martin Kustermann 706965fd2c [gardening] Fix string_overflow_test.dart
The test was originally introduced in [0]. This restores its state to
how it was written back then with some small adjustements.

[0] d8ef2ae7 https://codereview.chromium.org//16783003

TEST=standalone{,_2}/string_overflow_test

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

Change-Id: I255f676481f2ab6e906ebfe4612d394c29663dd0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202482
Reviewed-by: Clement Skau <cskau@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2021-06-04 14:38:16 +00:00
Alexander Aprelev 05e5427800 [io/mac] Ensure FSEventsWatcher::Node is deleted synchronously with Callback that uses it.
This is follow-up to ed82bb6f4c

TEST=tests/standalone/io/file_system_watcher_large_set_test.dart

Change-Id: If02c922eafe1371c6e67196158896b9cb786bfd6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202312
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
2021-06-04 14:26:36 +00:00
Ryan Macnak bc3aa70e20 [vm, compiler] Fix size of sign-extension in x64c BigInt intrinsics.
TEST=ci
Change-Id: I99aa9875705823c22b5474bb1d66c7bc1aaac9fb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202309
Reviewed-by: Liam Appelbe <liama@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2021-06-03 22:47:56 +00:00
Konstantin Shcheglov 4cc88389fd Issue 45672. Report constant errors when null value where non-nullable type is expected.
When in a legacy library, runtimeTypeMatch() with the legacy type.

Original: https://dart-review.googlesource.com/c/sdk/+/196042
Reverted as: https://dart-review.googlesource.com/c/sdk/+/196281

Presubmit looks green:
https://test.corp.google.com/ui#id=OCL:369597863:BASE:377223944:1622729657782:14c50e7

Bug: https://github.com/dart-lang/sdk/issues/45672

Change-Id: Ife02dbdc4c111dec22536de4c50c349381ba1b3f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/197109
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-06-03 16:58:57 +00:00
Alexander Aprelev 6c254fab89 [io/http] Don't add zero-valued content-length header on GET, HEAD, DELETE, CONNECT requests.
Per https://tools.ietf.org/html/rfc7230#section-3.3.2:
"... A user agent SHOULD NOT send a
Content-Length header field when the request message does not contain
a payload body and the method semantics do not anticipate such a
body."

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

Change-Id: I96b735c06038eb3d12a303ee5329228a9b594726
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194881
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2021-06-03 16:14:24 +00:00
Irina Arkhipets 79a61fab8f [co19] Remove Compiler-tear-offs tests from status files.
Change-Id: Ia41537d3a4c5951841de92507c62711d1f2d8fd5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202240
Reviewed-by: Erik Ernst <eernst@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
2021-06-03 10:49:04 +00:00
Robert Nystrom 0a3b4fca3e Rename some more incorrectly named tests.
Change-Id: Ia15c2accc2e5b192834bbd37bbd6a720bf52a3f8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201224
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
2021-06-03 00:49:54 +00:00
Robert Nystrom e376bcd30f Rename "string/overflow.dart" -> "string/overflow_test.dart".
Change-Id: I32fa46c5750ee6d2410231322bf16fa7decb751d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201227
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
2021-06-03 00:40:24 +00:00
Mayank Patke 7cdb6444f2 Add language tests for some late instance variable corner cases.
Change-Id: Ic269846684201bebab74ae83d269753fa40626f1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200921
Reviewed-by: Stephen Adams <sra@google.com>
2021-06-02 23:21:24 +00:00
Tess Strickland a205935d9a [vm/compiler] Treat allocations generically in redundancy eliminator.
Instead of explicitly listing certain subclasses in some places, instead
allow any AllocationInstr subclass and just reject certain subclasses if
necessary.

Code size different in Flutter gallery (release-sizeopt):
* ARM7: Total -0.12%, instructions -0.14%, readonly -0.11%
* ARM8: Total -0.12%, instructions -0.15%, readonly -0.09%

TEST=Current test suite.

Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-debug-simarm64c-try,vm-kernel-precomp-linux-debug-simarm_x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-debug-x64c-try,vm-kernel-precomp-linux-product-x64-try,vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-linux-release-simarm64-try,vm-kernel-precomp-linux-release-simarm-try,vm-kernel-linux-debug-ia32-try,vm-kernel-linux-debug-x64-try,vm-kernel-linux-product-x64-try,vm-kernel-linux-release-simarm64-try,vm-kernel-linux-release-simarm-try,vm-kernel-linux-release-x64-try,vm-kernel-linux-debug-x64c-try
Change-Id: I4ce42d7185d4b3a83356e5131a5835fa858c4882
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201832
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
2021-06-02 18:10:38 +00:00
Simon Binder be893fdf27 [vm/ffi] Add providesSymbol to DynamicLibrary
This adds the providesSymbol method to DynamicLibrary. It returns
whether the library contains a function with the given name.

As per dlsym(3), it is valid for dlsym to return nullptr in a success
case if the symbol actually has a NULL value. So I've changed the logic
to check for dlerror() after we invoke dlsym(), both in the existing
lookup and in the new method.

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

TEST=tests/ffi(_2)/has_symbol_test.dart

Change-Id: Ibcb1c051cc0cdd95a104fe86ef2fc76da5bafb5d
Cq-Include-Trybots: luci.dart.try:vm-precomp-ffi-qemu-linux-release-arm-try,vm-ffi-android-debug-arm64-try,vm-ffi-android-debug-arm-try,vm-kernel-linux-debug-x64-try,vm-kernel-win-debug-x64-try,vm-kernel-mac-debug-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201900
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2021-06-02 16:01:43 +00:00
Alexander Thomas 997487db0f [testing] Fix line numbers in dwarf_stack_trace_test.dart
The test contained hardcoded line numbers that changed when the language
version comment was added[1].

[1] https://dart-review.googlesource.com/c/sdk/+/201564

Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-release-x64-try
Change-Id: I2fda2b013a8ac3ee71dd98a6c243c00a5aeae823
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202040
Auto-Submit: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2021-06-02 09:54:25 +00:00
Alexander Thomas 7baeabe0e4 [testing] Rely on language versions in the analyzer tests
https://github.com/dart-lang/co19/issues/1090

TEST=Standard tryjobs, all changes are in test code only.

Change-Id: Ie73174447ab165827335652cf035f85b7510ab55
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201564
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2021-06-02 07:47:46 +00:00
Paul Berry b7c6ad117f Remove hack that builds FunctionExpressionInvocation with synthetic arguments.
Now that we have an AST and visitor support for the FunctionReference
structure (which represents `Expression<TypeArguments>` for various
kinds of expressions), we no longer need to error recover this as a
FunctionExpressionInvocation with synthetic arguments.  The resolver
still doesn't resolve the syntax properly, but that's ok because it's
not permitted in valid code (for now we just treat it as having type
`dynamic`).

Fixes #46150.

Change-Id: I357175cc16bcf2f9027be2e1da66bb6ca70a9400
Bug: https://github.com/dart-lang/sdk/issues/46020
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/199682
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-06-01 22:44:45 +00:00
Regis Crelier 7014f03aad [VM/runtime] Fix type test: a closure is T, when T is instantiated to Object.
Fixes https://github.com/dart-lang/sdk/issues/46165

TEST=added regression test

Change-Id: I3016f60560b00f077d5ef55a0b23ccfb7dbf0836
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201863
Reviewed-by: Liam Appelbe <liama@google.com>
Commit-Queue: Régis Crelier <regis@google.com>
2021-06-01 20:25:55 +00:00
Zach Anderson 8beec1d9cc Fix abstract unix socket test
There was a race between the subprocess listening on the socket and
the test trying to connect.

Also the Android bits of the test harness needed to be taught about
the abstract_socket_test program, similar to how process_test is
handled.

TEST=Fixes tests
Change-Id: I5e1c5d2e23e4bff2a01cd5c491a45e1c58d2578e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201861
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2021-06-01 17:30:54 +00:00