Commit graph

62883 commits

Author SHA1 Message Date
pq
ec8222f457 bump to linter 0.1.84
Change-Id: I9e546a7865ecfe72905bc938a8cf30659df1fc13
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98696
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2019-04-05 14:22:24 +00:00
Paul Berry
d14990b3ad Remove no-longer-needed override
Change-Id: I7cda32a2b9f087e3fb2922dc938d3e17be4121de
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98694
Auto-Submit: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-04-05 13:32:14 +00:00
Clement Skau
907c514c89 [SDK] Adds build targets, wrappers and SDK builds for Dart AOT.
Adds:
- dart2aot, a script similar to dart2js which compiles my.dart to my.dart.aot.
- dartaotruntime, a minimal Dart runtime that only runs AOT blobs.
- some extra tooling like gen_kernel and gen_snapshot used by the above.
- build rules for all of the above, including adding it to the full SDK builds.

Bug:https://github.com/dart-lang/sdk/issues/27596
Change-Id: Ic35f832b2b86be959212b8d21cfc5a082da5ced4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97627
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Clement Skau <cskau@google.com>
2019-04-05 13:23:44 +00:00
Samir Jindel
a2709992a2 [vm] Support optcounter=1 and randomize it for testing.
Change-Id: I1d371ca9644a65f8fe9864ac708689c1469da17d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97242
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Samir Jindel <sjindel@google.com>
2019-04-05 10:15:44 +00:00
Clement Skau
4958a4e782 [vm] Adds a --help flag to vm/lib/kernel_front_end.dart (and by extension gen_kernel).
Bug:None
Change-Id: I6f2a1748189a586e42d84db2989bade751acb467
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98568
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Clement Skau <cskau@google.com>
2019-04-05 09:40:24 +00:00
Kevin Millikin
b700223542 [cfe] Do not reset the VM async name generator
In the VM-specific async transformation, an index is used to generate
fresh temporary names for values that are live across an await.
Before it was always 0 when translating a statement because there are
no live values on entry or exit to a statement.

When translating statements nested inside block expressions there can
be live values, so the index should not be reset.

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

Change-Id: I6103d75c25f312ab1538a7c0f8fee0fea9f01b27
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98664
Commit-Queue: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-04-05 09:00:24 +00:00
Bob Nystrom
245576a096 Update dart_style to 1.2.6.
Change-Id: I82036fa3babc65ffa96f56309b073dd72f07c6f6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98695
Commit-Queue: Kevin Moore <kevmoo@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
2019-04-05 05:06:43 +00:00
Alexander Markov
38dbddc90d [vm/bytecode] Add AllocateClosure bytecode
AllocateClosure bytecode is used to convey information about closure
function into an instance allocation site. This allows VM inliner to see
closure function very early at the optimization pipeline and enables
inlining of closure calls.

DeltaBlueClosures in JIT/bytecode mode (--use-bytecode-compiler):
Before: DeltaBlueClosures(RunTime): 1746.5404424083767 us.
After: DeltaBlueClosures(RunTime): 1291.4649496449324 us.

Issue: https://github.com/dart-lang/sdk/issues/36342
Issue: https://github.com/dart-lang/sdk/issues/36429
Issue: https://github.com/dart-lang/sdk/issues/36428
Change-Id: I6e94cdc2eb30110b0651a86bd2bdc40dcdd63207
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98439
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2019-04-05 00:00:13 +00:00
danrubel
a38dbf8575 update ChangeBuilder to lazily build the source change
Change-Id: Id645c0538eb8a3391d78e24a3785fe26c7861777
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98626
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2019-04-04 23:20:53 +00:00
Zichang Guo
b45c67a933 [vm] improve vm help messages
Bug: https://github.com/dart-lang/sdk/issues/36312
Change-Id: Ibbfdf1467d94bba5784889c4539f6d660f9bcc7d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98687
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Zichang Guo <zichangguo@google.com>
2019-04-04 22:46:33 +00:00
Liam Appelbe
5a5b58db7e Reland "[vm] Allow running with the latest ABI dill files."
This reverts commit 69ff056b51.

Reason for revert: Relanding with fix.

Original change's description:
> Revert "[vm] Allow running with the latest ABI dill files."
>
> This reverts commit 35c4af445b.
>
> Reason for revert: Broke a bunch of tests, eg:
> https://logs.chromium.org/logs/dart/buildbucket/cr-buildbucket.appspot.com/8917088905682853152/+/steps/test_results/0/logs/tests_that_began_failing__logs_/0
>
> Original change's description:
> > [vm] Allow running with the latest ABI dill files.
> >
> > To support this, we need to download the current version during gclient
> > sync, and change the way the --use-abi-version flag is processed so that
> > there's a distinction between the current version and the flag being
> > unset (-1). Also bump the oldest supported ABI version.
> >
> > Bug: https://github.com/dart-lang/sdk/issues/36047
> > Change-Id: If3fb5e1ba1ebddf11e9f0a9a7c42b7bb0b820ad8
> > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98609
> > Commit-Queue: Liam Appelbe <liama@google.com>
> > Reviewed-by: Siva Annamalai <asiva@google.com>
>
> TBR=asiva@google.com,liama@google.com
>
> Change-Id: I40f83fcc7f9d785353fb05d4296376ec04af8309
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: https://github.com/dart-lang/sdk/issues/36047
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98700
> Reviewed-by: Liam Appelbe <liama@google.com>
> Commit-Queue: Liam Appelbe <liama@google.com>

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

Change-Id: I909fd649eb41911a7b15e682b669708ebe083c8e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: https://github.com/dart-lang/sdk/issues/36047
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98690
Commit-Queue: Liam Appelbe <liama@google.com>
Reviewed-by: Liam Appelbe <liama@google.com>
2019-04-04 22:45:25 +00:00
Brian Wilkerson
2415c08373 Add Dartdoc template info to the status pages
Change-Id: I27df7cabe864b99feb64d95365232dda72d5fb63
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98691
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-04-04 22:15:53 +00:00
pq
4ff8846d79 associate CONVERT_TO_SPREAD assist w/ spread_collections lint
Change-Id: I6cd1882c7a88328895bb8172ea5c5808d9e75bb7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98689
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2019-04-04 21:23:03 +00:00
Konstantin Shcheglov
7e28fc2cd6 Increment Analysis Server version to 1.26.0
R=brianwilkerson@google.com

Change-Id: I3121d8262bab8748fdd64a58178b7020607a2252
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98703
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-04-04 21:02:33 +00:00
Brian Wilkerson
4fa79e9ded Remove comments from the token stream
Change-Id: Idc5171ad87590d40d26e26000c8fb795f28678dc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98704
Reviewed-by: Ari Aye <ariaye@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-04-04 20:43:33 +00:00
Jacob MacDonald
3d6e29d251 set empty environment defines to CompilerOptions
Bug: https://github.com/dart-lang/sdk/issues/36476
Change-Id: I5fac7372026acbb9ef1d9514e6518088ee18dcfd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98702
Auto-Submit: Jake Macdonald <jakemac@google.com>
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
2019-04-04 20:38:18 +00:00
danrubel
afe609d2c2 Update NNBD migration to add import as necessary
... and simplify apply code edits

Change-Id: I6f205df29ffd42341e2244ff3a5609ba005adcfa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98612
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2019-04-04 20:31:23 +00:00
Brian Wilkerson
e4fa8904f8 Fix the windows bot
Change-Id: I76c4670464869a9f7efcc2c758677b1c2bffe18b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98682
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-04-04 20:30:13 +00:00
Konstantin Shcheglov
ddbeda075f Rework storing constructors and enum constants.
I was adding default constructor to classes and found another problem
with shadowing exported declarations with local ones - we shadow
the class, but not its constructor. So, I'm changing it to keep
constructors and enum constants in corresponding parent declaratiosn.

R=brianwilkerson@google.com

Change-Id: I4e49b57f9fe1ac8bf611f241d2c279c746ad55ca
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98701
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-04-04 19:40:54 +00:00
Liam Appelbe
fd9e32df56 Reland "Spawn isolates using platform kernel when using old ABIs"
This reverts commit 2a8117c341.

Reason for revert: I think it was actually https://dart-review.googlesource.com/c/sdk/+/98609 that caused the breakage

Original change's description:
> Revert "Spawn isolates using platform kernel when using old ABIs"
> 
> This reverts commit c3113b0818.
> 
> Reason for revert: Broke some tests, eg https://logs.chromium.org/logs/dart/buildbucket/cr-buildbucket.appspot.com/8917089062837512336/+/steps/test_results/0/logs/tests_that_began_failing__logs_/0
> 
> Original change's description:
> > Spawn isolates using platform kernel when using old ABIs
> > 
> > Bug: https://github.com/dart-lang/sdk/issues/36047
> > Change-Id: I4a95ec336e1ba6b955563cca5498a18310b51379
> > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98260
> > Reviewed-by: Siva Annamalai <asiva@google.com>
> > Commit-Queue: Liam Appelbe <liama@google.com>
> 
> TBR=asiva@google.com,liama@google.com
> 
> Change-Id: I33a714add2858752015dec38b8d973347a3ba79a
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: https://github.com/dart-lang/sdk/issues/36047
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98684
> Reviewed-by: Liam Appelbe <liama@google.com>
> Commit-Queue: Liam Appelbe <liama@google.com>

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

Change-Id: I8ce6b050f0c3aeb7ac4f15b83bbec0b3b0e909bd
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: https://github.com/dart-lang/sdk/issues/36047
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98688
Reviewed-by: Liam Appelbe <liama@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2019-04-04 19:15:35 +00:00
Alexander Markov
652a8be7a7 [Tests] Fix inifinite replication of Dart processes in tests
When tests are executed on certain configurations like dartkb or simarm,
the test script is first compiled into a dill file, so the VM command
line for running a test looks like

dart .../generated_compilations/dartkb/foo_test/out.dill

Certain tests have the logic to replace '_test.dart' in Platform.script
with '_test_body.dart' and execute the resulting script.
However, as out.dill does not contain '_test.dart', the script remains
the same after replacement. As a result, test was infinitely re-executing
itself, overloading bots and not making any progress.

Change-Id: I7257d3553a7f0a0de2f6d8218a9eb5c8981af17d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98685
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Auto-Submit: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2019-04-04 19:14:44 +00:00
Liam Appelbe
69ff056b51 Revert "[vm] Allow running with the latest ABI dill files."
This reverts commit 35c4af445b.

Reason for revert: Broke a bunch of tests, eg:
https://logs.chromium.org/logs/dart/buildbucket/cr-buildbucket.appspot.com/8917088905682853152/+/steps/test_results/0/logs/tests_that_began_failing__logs_/0

Original change's description:
> [vm] Allow running with the latest ABI dill files.
> 
> To support this, we need to download the current version during gclient
> sync, and change the way the --use-abi-version flag is processed so that
> there's a distinction between the current version and the flag being
> unset (-1). Also bump the oldest supported ABI version.
> 
> Bug: https://github.com/dart-lang/sdk/issues/36047
> Change-Id: If3fb5e1ba1ebddf11e9f0a9a7c42b7bb0b820ad8
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98609
> Commit-Queue: Liam Appelbe <liama@google.com>
> Reviewed-by: Siva Annamalai <asiva@google.com>

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

Change-Id: I40f83fcc7f9d785353fb05d4296376ec04af8309
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: https://github.com/dart-lang/sdk/issues/36047
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98700
Reviewed-by: Liam Appelbe <liama@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2019-04-04 18:12:18 +00:00
Martin Kustermann
a0e82ba23e [gardening] Disable exception caused by missing core dumps on windows
Issue https://github.com/dart-lang/sdk/issues/36469

Change-Id: I57d53d1ef02841e1f5c9f9993f896a8d20ee6f18
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98670
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2019-04-04 18:07:33 +00:00
Liam Appelbe
2a8117c341 Revert "Spawn isolates using platform kernel when using old ABIs"
This reverts commit c3113b0818.

Reason for revert: Broke some tests, eg https://logs.chromium.org/logs/dart/buildbucket/cr-buildbucket.appspot.com/8917089062837512336/+/steps/test_results/0/logs/tests_that_began_failing__logs_/0

Original change's description:
> Spawn isolates using platform kernel when using old ABIs
> 
> Bug: https://github.com/dart-lang/sdk/issues/36047
> Change-Id: I4a95ec336e1ba6b955563cca5498a18310b51379
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98260
> Reviewed-by: Siva Annamalai <asiva@google.com>
> Commit-Queue: Liam Appelbe <liama@google.com>

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

Change-Id: I33a714add2858752015dec38b8d973347a3ba79a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: https://github.com/dart-lang/sdk/issues/36047
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98684
Reviewed-by: Liam Appelbe <liama@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2019-04-04 17:47:26 +00:00
Aart Bik
5e8b0b7a97 [dart/fuzzer] Fuzz support for spread and control flow collections
Rationale:
Follows the documented grammar to allow for arbitary nested
spead/if/for inside collections (list, set, maps).

https://github.com/dart-lang/sdk/issues/36218
https://github.com/dart-lang/sdk/issues/36214

Change-Id: Ie5b5828a323401c4db14045e6edd0587677f2c19
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98261
Reviewed-by: Aart Bik <ajcbik@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Aart Bik <ajcbik@google.com>
2019-04-04 17:22:24 +00:00
Liam Appelbe
c3113b0818 Spawn isolates using platform kernel when using old ABIs
Bug: https://github.com/dart-lang/sdk/issues/36047
Change-Id: I4a95ec336e1ba6b955563cca5498a18310b51379
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98260
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2019-04-04 16:56:23 +00:00
Liam Appelbe
35c4af445b [vm] Allow running with the latest ABI dill files.
To support this, we need to download the current version during gclient
sync, and change the way the --use-abi-version flag is processed so that
there's a distinction between the current version and the flag being
unset (-1). Also bump the oldest supported ABI version.

Bug: https://github.com/dart-lang/sdk/issues/36047
Change-Id: If3fb5e1ba1ebddf11e9f0a9a7c42b7bb0b820ad8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98609
Commit-Queue: Liam Appelbe <liama@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2019-04-04 16:55:03 +00:00
Brian Wilkerson
7e5810ab30 Add an offset to the protocol used for import-on-paste
Change-Id: I87c50b2fee7643733b38a368b2c231e5fb7cddda
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98681
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-04-04 16:18:43 +00:00
danrubel
896f1c4bb9 CFE tests for issue 36400
Change-Id: I05139ce86177fe32cae857e410f759d365dc7bde
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98503
Commit-Queue: Dan Rubel <danrubel@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-04-04 15:48:30 +00:00
Martin Kustermann
a112b11e2e [gardening] Disable dwarf_stack_trace_test on product mode because symbols can be wrong
Change-Id: I4e3a7fd12afddf44f69e4da066585866e8770e47
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98671
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
Auto-Submit: Martin Kustermann <kustermann@google.com>
2019-04-04 14:47:20 +00:00
Aske Simon Christensen
313e0f5410 [CFE] Check if set element or map key overrides operator '=='.
Fixes https://github.com/dart-lang/sdk/issues/36444

Change-Id: I38b485ca538c65072e2ec3386e30c5ce49671fe4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98666
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2019-04-04 14:39:50 +00:00
Brian Wilkerson
e58a8fade5 Fix typos in the diagnostic messages
Change-Id: I65a11e52933c37a63cb9d0a14b1961a20e16271f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98600
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-04-04 13:47:40 +00:00
Martin Kustermann
9814cb1b9c [vm/compiler] Make new CheckBoundBase and allow range analysis contrain values after GenericCheckBound
Before this CL the range analysis was only constraining bounds for the
JIT-based CheckArrayBounds. This CL enables doing the same for
GenericCheckBound by extracting a common base class and make the range
analysis use it

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

Change-Id: Ie23b297ea0b133dd9dee2cff460cd9f24301152f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98460
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2019-04-04 12:53:50 +00:00
Brian Wilkerson
688475b1cd Fix bug in evaluation of == under constantUpdate2018
Change-Id: Ie915a116365dc93e8e329c28e6c79ac0a79da2ea
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98611
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-04-04 12:28:50 +00:00
Aske Simon Christensen
a069ddda21 [CFE] Produce InstanceCreation from unevaluated constructor invocation.
Thread assert enable flag through in dart2js to make the dart2js cfe
constant evaluation unit test properly pass the flag.

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

Change-Id: Ie4ac86ce96feda1548120fed54ece9ca03387496
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98570
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2019-04-04 12:22:50 +00:00
Aske Simon Christensen
f63eaab3af [kernel] Add instance creation kernel node.
This is used in constant evaluation to represent const constructor
invocations with unevaluated field values or asserts.

Change-Id: I1d2d60a18f967a4dd195b3b5895db9a126c47803
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98561
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2019-04-04 12:22:50 +00:00
Daco Harkes
395e5f6037 [cfe/vm] make dart:ffi compatible with constant-update-2018
I added TODOs for removing the old code after the constants update has landed.

Change-Id: Icde8d68e4e7c4b51e9536f09ce4e514e3b00336d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98661
Auto-Submit: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2019-04-04 11:09:51 +00:00
Martin Kustermann
76f3630d04 [vm/compiler] Remove polymorphic typed data access in inliner
This is the first CL which takes advantage of the newly added inner
pointer in the RawTypedDataBase in a polymorphic way (so far this
pointer was only used if we knew the object is external typed data).

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

Change-Id: I80f915774aa650b7943bd6b4a1d5ffdcb7952b21
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98571
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2019-04-04 11:09:30 +00:00
Martin Kustermann
31d558c81c [vm/compiler] Add il_test_helper.h with support for running compilation pipelines for testing
The two existing places where IR is built are changed to use this new
helper. It supports running normal JIT/AOT passes as well as a
user-specified set of passes.

In order to allow vm/cc tests to make assertions about AOT pipeline this CL
enables the DART_PRECOMPILER define in run_vm_tests binary (similar to
gen_snapshot, run_vm_tests has now JIT and AOT support)

Change-Id: Ib51a024a81e0291e89d20860b8b9a2762611426c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98482
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Aart Bik <ajcbik@google.com>
2019-04-04 05:58:29 +00:00
Mark Zhou
600b2831ef [dartdevc] Updating nullability inference to account for unevaluated constants
Change-Id: I9982a38c8e15655d660c2e9d68fea5dc993bc962
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98455
Reviewed-by: Jenny Messerly <jmesserly@google.com>
Commit-Queue: Jenny Messerly <jmesserly@google.com>
2019-04-04 02:14:19 +00:00
Alexander Markov
7c9d02b313 [vm/bytecode] Generate empty list literals more efficiently
Issue: https://github.com/dart-lang/sdk/issues/36429
Change-Id: I47e189bff4e9998123c06afa2e5b0d1c79d74566
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98608
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Auto-Submit: Alexander Markov <alexmarkov@google.com>
2019-04-03 23:43:21 +00:00
Alexander Markov
bf293ea34c [vm/bytecode] Remove support for old version of bytecode format (v1)
Bytecode format version 2 was introduced Feb 05 2019 in
https://dart-review.googlesource.com/c/sdk/+/91108

This change cleans up code related to old constant pool entries which
were removed in v2.

Change-Id: Ic9cccd2fdec26758f377691bf4edc26d1309a524
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98610
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2019-04-03 22:44:21 +00:00
Aart Bik
e9f5b85492 [vm/bytecode] fixed typo in stack test
Rationale:
We should test for *empty* stack. As written, we basically
never generate OSR points for the bytecode path except for
the cases we can' handle yet :-)

https://github.com/dart-lang/sdk/issues/36421

Change-Id: Ie70a626f9fd24d63442e681ab120087f9d1b010b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98625
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Aart Bik <ajcbik@google.com>
2019-04-03 22:38:41 +00:00
Brian Wilkerson
da15746f4c Update the production of training data
Change-Id: Ib9634c5e5bdd8c0097f55a9cf71054e2a2b6a5fe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98287
Reviewed-by: Ari Aye <ariaye@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-04-03 22:36:01 +00:00
Ryan Macnak
603a57e4c2 [vm, interpreter] Increment implicit accessor usage counts.
Fixes NBody regression from 298dacfef5.

Change-Id: I04634750c76668376bf449f97c2f6b79a3a06b92
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98621
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2019-04-03 21:52:42 +00:00
Alexander Markov
4d37977473 [vm/bytecode] Do not mark null-initialized instance fields as nullable too early
In bytecode we track null-initialized fields for each constructor,
so there is no need to record stores to such fields eagerly.

This enables more accurate tracking of fields which don't have initializer
or initialized with null, but they are always overwritten by initializers
in constructors.

Change-Id: I08edc65c18a644f69109f0eced736e5e859f1715
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98624
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2019-04-03 21:35:23 +00:00
Mayank Patke
2f77af1c6f Fold identical(double.nan, double.nan) => false in dart2js.
Change-Id: Idc6b064e330af71bbc8525a48874d332d84f404a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98607
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2019-04-03 21:14:31 +00:00
asiva
f1cfcc621a [test/vm status files] Update vm status file to remove all entries related to spread and control_flow
Change-Id: I45469fea64f1d5144c3cbe2f800f1eb2be7e90d9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98525
Reviewed-by: Aart Bik <ajcbik@google.com>
2019-04-03 21:00:36 +00:00
Mayank Patke
11a3dd7332 Split up language_2/control_flow_collections/for_test.
This helps triage/resolve various issues in testRuntimeErrors:
* for_non_bool_condition_test isolates the code causing a crash on the
dart2js-production-linux-d8 configuration. (See
https://github.com/dart-lang/sdk/issues/36442 and the status file.)
* for_null_condition_test will be an approved failure for all dart2js
configurations due to https://github.com/dart-lang/sdk/issues/36446.
* for_runtime_error_test contains all the remaining expected type
errors. On the dart2js-production-linux-d8 configuration (which runs
with -O3), we assume no type errors exist - even ones guarded by
Expect.throwsTypeError - so the optimized code produces runtime errors
instead. See https://dart-review.googlesource.com/c/sdk/+/97820 for a
similar discussion.
* for_test contains the remaining tests, which are valid on all dart2js
configurations.

Change-Id: Ifef4f7d2e27e2731cdd4a3fec03754ea63b6328d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98606
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2019-04-03 19:40:32 +00:00
Sigmund Cherem
35f45cf3f1 Remove _mainLibraryUri, replace with user-code-locations
This prepares the compiler to accept a modular mode that contains several
libraries as user-code locations

Change-Id: I04f6c1fe36eea23de79b3573855896c560996fe1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98457
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2019-04-03 19:34:41 +00:00