Commit graph

70152 commits

Author SHA1 Message Date
pq
8439158668 completion driver wip
Gotta start somewhere.

All subject to revision.  (Names especially.)

This gets us an end-to-end test and a starting point for client algorithm implementations.

Note that this was designed to run outside `test/`.  We should be able to move it out if so desired.

Needless to say any thoughts on any of it are welcome!

Change-Id: Iecf5c7ce854f619aa5677454091ceb68dd45827b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134542
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-02-06 00:33:10 +00:00
Jaime Wren
e525e42267 Initial working 'dartdev format *' tool with the set of args and flags to match the 'flutter format *' tool
Change-Id: I292a85cf7b10a725f82a7a86d90aada4972b7c38
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134566
Commit-Queue: Jaime Wren <jwren@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2020-02-06 00:09:19 +00:00
Ben Konyi
6548694a82 Reland "[ VM / DartDev ] Added support for format and pub commands via standalone VM"
Fixes a malloc/delete[] mismatch.

This reverts commit b3396cbdca.

Change-Id: I18fe142bc60bedd8af4c588ba4039742e1d34606
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134570
Reviewed-by: Liam Appelbe <liama@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2020-02-06 00:04:09 +00:00
Ryan Macnak
d7fd79480e [vm] Don't hold IdleTimeHandler::mutex_ when entering a safepoint.
Change-Id: I8b6f6db81d1fa6047114ba4caea61dcbba8f316f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134580
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2020-02-05 23:29:02 +00:00
Martin Kustermann
7339b27f7f [vm/concurrency] Fix bug in Safepoint{Mutex,Monitor}Locker which can cause a deadlock
While a thread is outside a safepoint it should not perform any
long blocking operation and it must not acquire a Mutex/Monitor which
can be held while being inside a safepoint.

Right now we can have this situation

   GC wants to safepoint
   T1 is in a safepoint, acquires lock L and wants to leave safepoint (waits for GC to finish)
   T2 is not in a safepoint and tries to acquire lock L

With this CL, we ensure to always transition to a safepoint before
performing Lock/Enter/Wait.

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

Change-Id: I79c55c79bfe828a319f5b035880f578ef62d913a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134323
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2020-02-05 23:17:59 +00:00
asiva
83fdfde140 [VM/libraries] - Fix signature of waitFor.
This should fix issue 40472.

Bug: 40472
Change-Id: I5cfa7cf25778b6a5430168707dd9370b202d3e6d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134565
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2020-02-05 22:48:50 +00:00
Janice Collins
eba2741166 Use analyzer filesystem implementation.
Change-Id: I071945c0f04c14474758b94f3ca560a2fbf7d2a8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134543
Commit-Queue: Janice Collins <jcollins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-02-05 22:33:19 +00:00
Mayank Patke
8d76edf4a8 [dart2js] Remove type unaliasing.
Now that typedefs are gone, unaliasing is a no-op.

Change-Id: I2fbe4555d06e11c12b1c1149af23a23e09df42b9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134503
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2020-02-05 22:27:49 +00:00
Martin Kustermann
5f42db7441 [vm/concurrency] Make some service tests more robust
This is extracted to make the shared heap cl a bit smaller.

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

Change-Id: I2f5b959aefcb2de96f51c39667a18612debd17e3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134522
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2020-02-05 22:02:19 +00:00
Devon Carew
204a70d4bd [nnbd migration] add an initial readme to describe the workflow and tool
Change-Id: I6d1614aafd0b722c633fba0aa128f90acb4ea006
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134560
Reviewed-by: Janice Collins <jcollins@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2020-02-05 21:48:49 +00:00
Paul Berry
c9b66b222e Migration: propagate non-null intent into function literals.
Previously, if a function literal was used in a context where a
function returning non-null was expected, but the function literal
might return null, the migration tool inserted a cast that was
guaranteed to fail.  Now it propagates non-null intent into the
function literal, so that the appropriate null checks happen inside
the function literal.

Change-Id: Ia62d18bc3b9955e84b09b846ea913607b305677d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134504
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-02-05 21:35:19 +00:00
Ben Konyi
b3396cbdca Revert "[ VM / DartDev ] Added support for format and pub commands via standalone VM"
This reverts commit 1b959d6127.

Reason for revert: ASAN failures

Original change's description:
> [ VM / DartDev ] Added support for `format` and `pub` commands via standalone VM
> 
> Initial work to allow for Dart snapshots to be executed based on a verb
> provided to the VM. Examples:
> 
> - `dart format` === `dartfmt`
> - `dart pub run test` === `pub run test`
> 
> Change-Id: I22c9c2ab6790b485395f1148419c517641f693ac
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/133663
> Commit-Queue: Ben Konyi <bkonyi@google.com>
> Reviewed-by: Siva Annamalai <asiva@google.com>

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

Change-Id: I35d9ff260e5f35f4e36b1e22ecf8b9dc1d2e3ed2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134564
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2020-02-05 20:56:19 +00:00
Paul Berry
fecab44f59 Migration: Improve the tracking of type parameter bounds.
This CL extends ElementTypeProvider so that it also tracks type
parameter bounds.  This allows the FixBuilder to reason correctly
about the what generic function types will look like after migration,
and that in turn prevents it from trying to add unnecessary casts.

Change-Id: I3c909a3b5ba14bf9f2aad4e58d0981c1b7b5bdd2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134412
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-02-05 20:51:49 +00:00
Paul Berry
4df17ee697 Migration: clean up how decorated type parameter bounds are tracked.
We now track decorated type parameter bounds similarly to how we track
ordinary type parameter bounds in the FixBuilder, by having a single
static instance of a DecoratedTypeParameterBounds class that keeps
track of the mapping.

Change-Id: I49196e8a506ca8765857b3d47a355b7aaaa1918e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134411
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-02-05 20:51:49 +00:00
Konstantin Shcheglov
0b870e2ff6 Update RemoveMethodDeclarationTest to be consistent.
The actual motivator is though that test_method was failing.

I suspect that this is a linter issue, `super.toString()`, when called
from legacy library and referencing NNBD SDK, is MethodMember, and
probably linter does not handle this right. I believe that this is
not a problem we should test or fix in analysis_server, so I update
the test to verify what is implemented in the server.

R=brianwilkerson@google.com, pquitslund@google.com

Change-Id: Iffe896deb138cd8f2da15ccf67a571491b544512
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134406
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2020-02-05 20:35:59 +00:00
Konstantin Shcheglov
bf08df3141 Update TypeState.toString() to use getDisplayString().
Change-Id: Iee39d69c0ea5c3f05dc60c3664914e73a3034533
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134418
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-02-05 20:27:19 +00:00
Devon Carew
0631e949b2 [migration tool] fail the CI if the generated files haven't been rebuilt
Change-Id: I824f8528b5b2bf2efec4121e017d77bab5b6ab60
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134468
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2020-02-05 20:25:39 +00:00
Ben Konyi
a9bc5edbae [ dartfuzz ] Additional logging cleanup
Change-Id: I5bf18fb17089902b463ebb6561f40069047ee665
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134540
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2020-02-05 19:47:59 +00:00
Brian Wilkerson
0617d85227 Add a fix for the prefer_contains lint
Change-Id: I296bf15939b8dafd514db927859602ed91cb800d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134501
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-02-05 19:45:29 +00:00
Ben Konyi
1b959d6127 [ VM / DartDev ] Added support for format and pub commands via standalone VM
Initial work to allow for Dart snapshots to be executed based on a verb
provided to the VM. Examples:

- `dart format` === `dartfmt`
- `dart pub run test` === `pub run test`

Change-Id: I22c9c2ab6790b485395f1148419c517641f693ac
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/133663
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2020-02-05 19:37:14 +00:00
Sigmund Cherem
40a03f472a [dart2js] Make dart:_native_type_data null safe.
This mostly copies the changes from DDC to the dart2js implementation.

Change-Id: Ib56b607a6cea3df0e319e32cd4afa6b5b55b03d5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134463
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2020-02-05 19:34:59 +00:00
Sigmund Cherem
eb54b5bb9b Formatting changes to dart:_native_type_data to make dart2js and ddc more similar.
Mostly changes to the comment syntax, removing optional `new`, and using the
same kind of quotes on strings.

Change-Id: Ia6d7f38523312f67cfa30cd30cef994759d40ef1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134480
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2020-02-05 19:34:59 +00:00
Sigmund Cherem
20745941ad [ddc,dart2js] make dart:typed_data the same in dart2js and ddc and opt-in to null safety.
Change-Id: If325a2ea11afef1d784fd01830999d5a4c9d4daf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134049
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
2020-02-05 19:29:10 +00:00
Brian Wilkerson
b211bc3d4c Mark newly published diagnostics so that links will be generated
Change-Id: Id0b7edf54aea1d8841cd4746e5353877190717f7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134416
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-02-05 19:26:55 +00:00
Konstantin Shcheglov
af4b6014f6 Move createAnalysisOptionsFile() call to setUp().
So, that individual tests call call it with different options,
and don't be overwritten in resolveTestUnit().

R=brianwilkerson@google.com, pquitslund@google.com

Change-Id: I75f5d40b36b78b62eee7ed3f64ef49d1c30752ef
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134541
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-02-05 19:26:28 +00:00
Jaime Wren
5d3c91b68e Fix the MeanReciprocalRankComputer computation math, the computed MRR computation was not the MRR, follow up tests coming soon.
Change-Id: I3ae4486eada3ab41b21190050a7a7a2368432004
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134414
Commit-Queue: Jaime Wren <jwren@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-02-05 19:18:51 +00:00
Mark Zhou
bf66cba15e [tests] Updating tests to not depend on type variable names being conserved.
Change-Id: Id34fb4bbc4bb88241fd984acc490097e604d16cf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134410
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Mark Zhou <markzipan@google.com>
2020-02-05 19:18:49 +00:00
Ryan Macnak
ac2cdd6ec1 [vm] Reject reloads that would remove fields from const objects.
Bug: https://github.com/dart-lang/sdk/issues/40442
Change-Id: I84db73dcea909fb2b911ce3def88284d2712d65c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134383
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2020-02-05 18:42:53 +00:00
Ben Konyi
763bcae067 Reland "[ VM / Service ] Added getClientName, setClientName and requireResumeApproval RPCs"
This reverts commit 37f4a44a27.

Reason for revert: Relanding after infra issues cleared

Original change's description:
> Revert "[ VM / Service ] Added `getClientName`, `setClientName` and `requireResumeApproval` RPCs"
> 
> This reverts commit 48808f7dce.
> 
> Reason for revert: Unable to approve failures.
> 
> Original change's description:
> > [ VM / Service ] Added `getClientName`, `setClientName` and `requireResumeApproval` RPCs
> > 
> > Add support for naming VM service clients which allows for resume
> > permissions to be set for all clients of the same name. If a client
> > name requires resume approval, an isolate won't be resumed until all
> > clients which require resume approval have called the `resume` RPC.
> > 
> > Resume approvals can be set for the following pause events:
> > - PauseOnStart
> > - PausePostRequest (issued after `reloadSources(pause: true)`)
> > - PauseOnExit
> > 
> > Change-Id: I7dde3d8aaeccfcf47fa84f1f92159846f1560e16
> > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/133621
> > Commit-Queue: Ben Konyi <bkonyi@google.com>
> > Reviewed-by: Siva Annamalai <asiva@google.com>
> > Reviewed-by: Gary Roumanis <grouma@google.com>
> 
> TBR=jacobr@google.com,bkonyi@google.com,rmacnak@google.com,asiva@google.com,grouma@google.com
> 
> Change-Id: I8e60416ad8cbec9ad93f4e34e9bf9af5a516c6dc
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134465
> Reviewed-by: Ben Konyi <bkonyi@google.com>
> Commit-Queue: Ben Konyi <bkonyi@google.com>

TBR=jacobr@google.com,bkonyi@google.com,rmacnak@google.com,asiva@google.com,grouma@google.com

Change-Id: Ibd9d831774e5c4dd500da026f41b173589a9aefd
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134415
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2020-02-05 18:14:39 +00:00
Brian Wilkerson
e2a528d976 Remove the lint marker from more fix tests
Some of the tests were fairly seriously broken, so this fixes them.

Some of the tests were testing that we don't provide a fix when there is
no lint, but I don't think that it's useful to test that.

One test required no changes other than removing the marker.

Change-Id: I6d85fd98506fa20d8bf4996d30603feb8b1ff252
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134500
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-02-05 18:10:49 +00:00
Alexander Markov
e8cb7f1bc9 [vm/nnbd] Make sure nullability is not changed after type testing stub is selected
Fixes https://github.com/dart-lang/sdk/issues/40465

Change-Id: Iaa221440e941b725e8ca123b6708b510b8ef015b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134413
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2020-02-05 18:02:20 +00:00
Mike Fairhurst
eff4807eef [analysis_server] Fix #36352, cannot stop a plugin that isn't running
Report it as a silent exception. This way it will show up in log files
and (in the future) over crash reporting (since we haven't solved the
underlying cause), but *not* to users, because it currently appears to
be harmless.

In the future we should consider a "logged-only" type of exception, once
we are confident this isn't causing secondary issues, if we don't intend
to or think we are able to solve this at a deeper level.

Change-Id: I2ee339718fbd6e7c684ccc42718fbb57742f2dd7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134467
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
2020-02-05 17:13:59 +00:00
Daco Harkes
73160d74bc [vm/ffi] Revert erroneous assertions
Reverts adding the asserts from https://dart-review.googlesource.com/c/sdk/+/129081/47/runtime/vm/compiler/ffi/abi.cc

Change-Id: I2575cfa717a464f92c29ac8e5439d1173ce13cf0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134337
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2020-02-05 16:53:10 +00:00
Daco Harkes
b17459731a [vm] fix ifdefs after constants refactoring
Change-Id: I273ca9df6bf0ed45f8441d4f8acc91f8452d884c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134336
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-02-05 16:36:09 +00:00
Janice Collins
b59d3974d1 Consolidate dependency injection and set up FantasyWorkspace tests.
Change-Id: I25a3d6a3a0b94c2918cf77f41f1ceece903506e2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134400
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Janice Collins <jcollins@google.com>
2020-02-05 16:24:54 +00:00
Aske Simon Christensen
4ab9c71a6b [vm/aot] Enable table dispatch by default.
Most benchmarks see speed improvements, especially the ones doing many
highly polymorphic calls. DeltaBlue on X64 is 35% faster.

ARM64 instructions size reduction on Flutter benchmarks ranges from
1.6% to 2.5% (0.7% to 1.2% on total size).

In terms of absolute numbers, the most significant size changes in the
Flutter Gallery snapshot are:

                 v7 before v7 after v7 diff  v8 before v8 after v8 diff
Instructions       6034448  5964136  -70312    5880528  5740112 -140416
ObjectPool          139175   102704  -36471     141186   104720  -36466
UnlinkedCall          5795     3331   -2464       5795     3331   -2464
DispatchTable            0    48802  +48802          0    48796  +48796
CompressedStackMaps 410194   421222  +11028     461743   470841   +9098
Total              6589612  6540195  -49417    6489252  6367800 -121452

Change-Id: I78663b423c91ab105fc52a8e0bcb47eaf8cc57fb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131833
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-02-05 16:07:09 +00:00
Dmitry Stefantsov
5f29d40b0f [cfe] Make context of the null-check operator nullable
Closes #37692.

Bug: http://dartbug.com/37692
Change-Id: I2301cf693dc82133681e3969211103bc57880d82
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134330
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-02-05 14:40:39 +00:00
Jonas Termansen
fddbc53a64 [nnbd] Reland backporting socket option semantics from NNBD dart:io.
The Socket class will now throw a SocketException if the socket has been
destroyed or upgraded to a secure socket upon setting or getting socket
options.

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: If7029f8b42fd4b05cfb79eb439c09dc206dd3b92
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134328
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Jonas Termansen <sortie@google.com>
2020-02-05 14:26:09 +00:00
Daco Harkes
a71d60c1cf [vm/ffi] Support Linux on Arm 32-bit (hardfp)
Implement the hardfp calling convention.

Tested QEMU locally as the bots are not online yet.

tools/test.py -m debug -a arm -c dartkp --use-qemu ffi_2 ; tools/test.py -m debug -a arm -c dartk --use-qemu ffi_2
Test configuration:
    custom configuration(architecture: arm, compiler: dartkp, mode: debug, runtime: dart_precompiled, system: linux, use-qemu)
Suites tested: ffi_2
[00:45 | 100% | +  189 | -    0]
Test configuration:
    custom configuration(architecture: arm, compiler: dartk, mode: debug, runtime: vm, system: linux, use-qemu)
Suites tested: ffi_2
[09:52 | 100% | +  189 | -    0]

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

Change-Id: Ic34175bdf9b9f359f1126aeb157362e76443921a
Cq-Include-Trybots: luci.dart.try:vm-ffi-android-debug-arm-try,vm-ffi-android-debug-arm64-try,app-kernel-linux-debug-x64-try,vm-kernel-linux-debug-ia32-try,vm-kernel-win-debug-x64-try,vm-kernel-win-debug-ia32-try,vm-kernel-precomp-linux-debug-x64-try,vm-dartkb-linux-release-x64-abi-try,vm-kernel-precomp-android-release-arm64-try,vm-kernel-asan-linux-release-x64-try,vm-kernel-linux-release-simarm-try,vm-kernel-linux-release-simarm64-try,vm-kernel-precomp-android-release-arm_x64-try,vm-kernel-precomp-obfuscate-linux-release-x64-try,dart-sdk-linux-try,analyzer-analysis-server-linux-try,analyzer-linux-release-try,front-end-linux-release-x64-try,vm-kernel-precomp-win-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124136
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-02-05 14:22:59 +00:00
Alexander Thomas
c66b15139a [infra] Bump number of test results per pubsub message to 100
99th percentile execution time is at 20s, so with twice as many results
we should still be well below the 60s timeout.

This should reduce the likelihood of lock contention on updating the
chunk count resulting in fewer builds failing to get test results.

Change-Id: I4eff0c854ca1fa091431d47017ce995110178e77
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134331
Commit-Queue: Alexander Thomas <athom@google.com>
Commit-Queue: Jonas Termansen <sortie@google.com>
Auto-Submit: Alexander Thomas <athom@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
2020-02-05 13:18:39 +00:00
Dmitry Stefantsov
4389ffa9d2 [cfe] Allow member access on Never
Closes #40125.

Bug: http://dartbug.com/40125
Change-Id: I2dcb1bdc022990ba8c76c7798c4e6793c5c89108
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134326
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-02-05 12:32:09 +00:00
Johnni Winther
d826ecc447 [cfe] Use inferred types on forwarding constructors
Closes #40428

Change-Id: I26bf1e21684605d85312c5e808191ad035eb574b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134289
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-02-05 12:26:49 +00:00
Jake Macdonald
12b5e23084 Revert "[dart:io] Backport semantic changes from the dart:io NNBD migration."
This reverts commit 4cd6243d77.

Reason for revert: Breaks anything using the bazel_worker package (which is used for modular compilation with build_runner).  https://travis-ci.org/dart-lang/build/jobs/645748778

Original change's description:
> [dart:io] Backport semantic changes from the dart:io NNBD migration.
> 
> The NNBD migration required making subtle changes to some dart:io
> semantics in order to provide a better API. This change backports these
> semantic changes to the unmigrated SDK so any issues can be discovered
> now instead of blocking the future SDK unfork.
> 
> The Process class will now throw a StateError if the process is detached
> upon accessing the stdin, stdout, stderr, and exitCode getters.
> 
> The Socket class will now throw a SocketException if the socket has been
> destroyed or upgraded to a secure socket upon setting or getting socket
> options.
> 
> Change-Id: I956fd07e713e51ebd479ebbfe4790d8d2fdf0744
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/133989
> Commit-Queue: Jonas Termansen <sortie@google.com>
> Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>

TBR=sortie@google.com,lrn@google.com

# Not skipping CQ checks because original CL landed > 1 day ago.

Change-Id: I744662fcd14ca232bf44a584bb6f3974d48da69a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134361
Auto-Submit: Jake Macdonald <jakemac@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
Commit-Queue: Jonas Termansen <sortie@google.com>
2020-02-05 10:03:47 +00:00
Lasse R.H. Nielsen
3a36439abe Tests for language operators and constructs with (non-)nullable operands.
Test that the NNBD implementation does not allow a nullable expression
where a non-null value is expected for language constructs.

Similarly that null-aware operations used on non=-nullable values
are caught.

Change-Id: I877e9b464666698b7f25b355b0474eb171bfc4b3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134160
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2020-02-05 10:00:27 +00:00
Daco Harkes
8408232522 [vm/ffi] Replace FFI compiler pipeline
Introduces NativeRepresentation and NativeLocation for the compilation of FFI.

NativeRepresentations are able to express all representations (or types) of the native ABIs we bind to with FFI, this is more representations that than that are used in Dart itself.
NativeLocations are able to express all locations of the native ABIs we bind to with FFI, this is more types of locations than that are used for the Dart calling convention.
See the documentation in the respective files.

These NativeLocations and NativeRepresentations are computed by the NativeCallingConvention and consumed by the Marshaller and Assemblers.

This reenginering is required for go/dart-ffi-by-value, hardfp (Arm S and D fpu registers), and iOS 64 bit (non-word-aligned stack arguments).

In addition, by using the NativeRepresentations we also get slightly reduced code size:

* The tracking of sizes is improved, so less sign/zero-extension operations are required.
* UnboxedWidthExtenderInstr is fully removed, the size extension is done inside the native moves, coalescing moves and size extension when possible.
* BitCastInstr is only used when really needed. This reduces code-size on arm32 softfp.

This fixes the iOS arm64 calling convention, manually tested with https://github.com/flutter/flutter/pull/46078 and https://dart-review.googlesource.com/c/sdk/+/131074.

Fixes: https://github.com/dart-lang/sdk/issues/39637
Issue: https://github.com/dart-lang/sdk/issues/36309
Issue: https://github.com/dart-lang/sdk/issues/36730

Change-Id: I8878bc0f314277bab4ca22f417c6295ecc017720
Cq-Include-Trybots: luci.dart.try:vm-ffi-android-debug-arm-try,vm-ffi-android-debug-arm64-try,app-kernel-linux-debug-x64-try,vm-kernel-linux-debug-ia32-try,vm-kernel-win-debug-x64-try,vm-kernel-win-debug-ia32-try,vm-kernel-precomp-linux-debug-x64-try,vm-dartkb-linux-release-x64-abi-try,vm-kernel-precomp-android-release-arm64-try,vm-kernel-asan-linux-release-x64-try,vm-kernel-linux-release-simarm-try,vm-kernel-linux-release-simarm64-try,vm-kernel-precomp-android-release-arm_x64-try,vm-kernel-precomp-obfuscate-linux-release-x64-try,dart-sdk-linux-try,analyzer-analysis-server-linux-try,analyzer-linux-release-try,front-end-linux-release-x64-try,vm-kernel-precomp-win-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/129081
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2020-02-05 08:46:07 +00:00
Daco Harkes
3284ef81a6 [vm] Clean up constants namespacing
This commit undoes https://dart-review.googlesource.com/c/sdk/+/97325 because we removed DBC.

Fixes: https://github.com/dart-lang/sdk/issues/40457
Change-Id: I873a8c6daa2ef79f7b0a5dff00d52f12d5770476
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134298
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-02-05 08:46:07 +00:00
Daco Harkes
43fe0b35d8 [vm] Clean up Location templating
This commit undoes https://dart-review.googlesource.com/c/sdk/+/97312 because we removed DBC.

Fixes: https://github.com/dart-lang/sdk/issues/40458
Change-Id: I7e08544e4c57d34c6f4bfc10aeed8ab87ed31953
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134297
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-02-05 08:46:07 +00:00
Konstantin Shcheglov
34893faa60 Use DartType.getDisplayString() instead of toString().
Change-Id: I982a4fff312593e6788afcbc9200a83793fefb97
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134464
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-02-05 07:41:22 +00:00
Konstantin Shcheglov
738ad286d7 Use DartType.getDisplayString() instead of toString().
Change-Id: I97059ac709bc46347f97fd951d839985ab12d62b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134481
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-02-05 07:33:21 +00:00
Konstantin Shcheglov
d025cd9378 Use DartType.getDisplayString() instead of toString().
Change-Id: Ibe5aa728058778bee42a1d87f4788da573a87d4d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134462
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-02-05 07:33:19 +00:00