Commit Graph

585 Commits

Author SHA1 Message Date
Paul Berry abe2e85d15 Report "invalid assignment" from the front end as an error rather than a warning.
The front end only detects invalid assignments during type inference,
and type inference is only done in strong mode.  In strong mode,
invalid assignment is an error.

Change-Id: I1c598716be84804e9dc109414fe45f73888ed8c0
Reviewed-on: https://dart-review.googlesource.com/20741
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2017-11-14 18:39:14 +00:00
Alexander Markov 1d6c1020c9 [VM] Fix OOM handling when allocating buffers in dart:io
* Test standalone_2/file_error_test is updated for Dart 2.0 fixed-size
  integers.

* This update revealed that certain dart:io native methods do not handle
  out-of-memory properly when I/O buffers are allocated.
  This CL fixes this bug.

Change-Id: I6a9018ab86da7b163d9797d745544835dfb0f15c
Reviewed-on: https://dart-review.googlesource.com/20582
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
2017-11-14 18:26:34 +00:00
Zachary Anderson 0af5298845 [dart:io] Adds optional withTrustedRoots parameter to SecurityContext()
The parameter defaults to false. This enables creating a
SecurityContext that includes the trusted root certificates that can
be modified per-connection.

fixes #24693

Change-Id: I22e5736838755ce4055f77b1b17aeb5176329240
Reviewed-on: https://dart-review.googlesource.com/20580
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2017-11-14 18:09:34 +00:00
Lasse R.H. Nielsen 0b58c4bd10 Change some constant declarations to lowerCase.
Retain the old values.

Reapply of https://dart-review.googlesource.com/c/sdk/+/20680 with fixes
for VM method fingerprints.

Change-Id: Ie14e7ccc3194d5561983348e6b6752728913ff4d
Reviewed-on: https://dart-review.googlesource.com/20664
Reviewed-by: Erik Ernst <eernst@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
2017-11-14 12:59:14 +00:00
Lasse R.H. Nielsen e61fc07b58 Revert "Change some constant declarations to lowerCase."
This reverts commit c048cfb178.

Reason for revert: VM code fingerprints needs update.

Original change's description:
> Change some constant declarations to lowerCase.
> 
> Retain the old values.
> 
> Change-Id: I03bd326f379fe5f96d8f6081a7133de956d745c0
> Reviewed-on: https://dart-review.googlesource.com/11520
> Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
> Reviewed-by: Florian Loitsch <floitsch@google.com>

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

Change-Id: I095e8198304ca4e59b39d30b0fdf0af4945e5231
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/20680
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
2017-11-14 11:23:08 +00:00
Lasse R.H. Nielsen c048cfb178 Change some constant declarations to lowerCase.
Retain the old values.

Change-Id: I03bd326f379fe5f96d8f6081a7133de956d745c0
Reviewed-on: https://dart-review.googlesource.com/11520
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Florian Loitsch <floitsch@google.com>
2017-11-14 11:13:04 +00:00
Alexander Markov 0a4b151dc4 [Test tool] Pass --strong to dart_bootstrap, disable experimental opts
In '-c dartkp --strong' mode test tool should pass --strong option to
dart_bootstrap. Otherwise it uses non-strong vm_platform.dill instead
of vm_platform_strong.dill.

Also, experimental strong-mode based optimizations are disabled for now.

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

Change-Id: I2188b9165ae4daa0510e4e566393810b8165291e
Reviewed-on: https://dart-review.googlesource.com/20304
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2017-11-11 01:46:01 +00:00
Vyacheslav Egorov 2b88fa0132 [gardening] Update dartkp-debug status files.
R=kustermann@google.com

Bug:
Change-Id: Ifc35f8a9b2ccf2fa095a4da510111b04c1ea883e
Reviewed-on: https://dart-review.googlesource.com/20061
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2017-11-10 13:35:13 +00:00
Vyacheslav Egorov fd78da5059 [gardening] Update dartkp status files.
Bug:
Change-Id: I51746bfa10bc10acc90c176ef98cf6da081a42d9
Reviewed-on: https://dart-review.googlesource.com/19568
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2017-11-09 16:26:01 +00:00
Paul Berry 1e4358f8ed Fix a strong mode problem in _NativeSocket.
The response returned by _IOService._dispatch has type `dynamic`, so
type inference can't infer the generic type parameter for
response.skip(1).map.  This leads to the map operation producing an
Iterable<dynamic>, which in turn causes _NativeSocket.lookup() to
return a List<dynamic>, which violates its interface.  (Its interface
guarantees it will return a List<InternetAddress>.)

The easiest solution is to supply a type argument to `map`.

This should fix some failures on the VM kernel debug bots.

Change-Id: I61b5b344b56080d9065a902700bb313139c422da
Reviewed-on: https://dart-review.googlesource.com/18880
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2017-11-08 18:50:50 +00:00
Siva Annamalai 61377237fd Fix status files in standalone directory.
Change-Id: I17a2ec840692367f506aa94e64e83f9b0fb24f11
Reviewed-on: https://dart-review.googlesource.com/19142
Reviewed-by: Siva Annamalai <asiva@google.com>
2017-11-08 00:45:54 +00:00
Dmitry Stefantsov fe14ee8ac1 Update status files due to the recent strong-mode fix in sockets
More tests are passing due to this commit:
https://github.com/dart-lang/sdk/commit/714dae5ac469ea530a382bad13b98c935110b193
Bug:
Change-Id: I72f572e01f1bc6ea9d68915fa8351b19d172cd88
Reviewed-on: https://dart-review.googlesource.com/19006
Reviewed-by: Jens Johansen <jensj@google.com>
2017-11-07 15:01:22 +00:00
Paul Berry e9e2ce7a38 Fix status file to account for fix to issue #31270
Change-Id: Ibf94b0aa5d10fafd04b69512769c0474d94c733d
Reviewed-on: https://dart-review.googlesource.com/18507
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2017-11-03 19:23:50 +00:00
Lasse R.H. Nielsen adcb6a7399 Make main invocation not fail strong-mode type checking.
Bug: http://dartbug.com/31270
Change-Id: Id6ad2a429d5dc44b437a0fdd8fb4889d3dccf194
Reviewed-on: https://dart-review.googlesource.com/18480
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2017-11-03 16:06:00 +00:00
Vyacheslav Egorov 188746563d [gardening] Mark io/addlatexhash_test as flaky on reload bot
Bug: https://github.com/dart-lang/sdk/issues/31252
Change-Id: I5738e849f6381b686461d76481528a4d072b4db0
Reviewed-on: https://dart-review.googlesource.com/17381
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2017-10-31 09:59:07 +00:00
Ryan Macnak 442e0e8192 Test double.hashCode with and without intrinsics.
Change-Id: I34c317d3f11bef061cb9f2f6ad1123e948ef78f2
Reviewed-on: https://dart-review.googlesource.com/16683
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Kasper Lund <kasperl@google.com>
2017-10-26 23:59:32 +00:00
Ryan Macnak d965998d1c [vm] Begin a sliding compactor.
Improves the space overhead of compaction from O(size of live objects) to O(number of live objects).

Future work includes: 
 - a smaller, faster representation the forwarding table via a bitmap of used allocation units
 - sorting class sizes off-heap to allow sliding classes
 - running forwarding in parallel

Removes unnecessary sweep from evacuating compactor.

Change-Id: If0991bfb75573201c6e8feed142ca0cc69fccab4
Bug: https://github.com/dart-lang/sdk/issues/30978
Reviewed-on: https://dart-review.googlesource.com/15988
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Erik Corry <erikcorry@google.com>
2017-10-25 21:57:08 +00:00
Sigmund Cherem 5d2613d632 Status updates for vm-kernel in strong mode
Change-Id: I93a4429822f374741b0211e755ed9d5b1b43fe23
Reviewed-on: https://dart-review.googlesource.com/16623
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2017-10-25 20:25:49 +00:00
Sigmund Cherem e2e3934b62 Add status entries for dartk and dartkp in strong mode
This is an initial step and some entries say "Pass", which indicates
that the test was marked earlier in some other (more general) section and that
we should split that section.

Change-Id: I0417d55dcdec352f730c298bb155d112eb341711
Reviewed-on: https://dart-review.googlesource.com/16322
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2017-10-24 21:49:19 +00:00
Samir Jindel 6b64aa8943 [kernel] Always disable reified generic functions in the Kernel FE.
Currently, we have some tests that run with reified generic functions ON and
some with it OFF. However, this causes inconsistencies when running the Kernel
FE from snapshot in the VM, since the VM requires that the flag be consistent
with the snapshot. Our solution is to turn the reified generic functions flag
into a per-isolate flag, which is always disabled in the Kernel FE's isolate.

Bug:
Change-Id: Ia91e9f0ff5fc059edf4bdbd79ef14abb288b4a49
Reviewed-on: https://dart-review.googlesource.com/16020
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2017-10-24 15:21:28 +00:00
Ryan Macnak 6d3549ed56 Reapply "[vm] Add a simple compactor."
This is a subset of the previous attempt; the other part was fixed in 2994f60298.

Bug: https://github.com/dart-lang/sdk/issues/30978
Change-Id: Ica22eb0d81e75378f4b528f8ca77504ef3e09c84
Reviewed-on: https://dart-review.googlesource.com/15769
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2017-10-23 18:51:47 +00:00
Kasper Lund 1db8615e29 Avoid just truncating to the nearby int in double.hashCode.
Preserves the property that doubles and ints that are equal
share the same hash code, but gives different doubles a much
higher chance of having different hash codes.

BUG=https://github.com/dart-lang/sdk/issues/2884

Change-Id: Ia97164087db568f26ffbbd6854ed9c19f81e9611
Reviewed-on: https://dart-review.googlesource.com/15140
Commit-Queue: Kasper Lund <kasperl@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2017-10-23 06:47:20 +00:00
Ryan Macnak 80e3fed6df Revert "Reapply "[vm] Add a simple compactor.""
This reverts commit 6451ce078f.

Reason for revert: Crashes on some reload bots

Original change's description:
> Reapply "[vm] Add a simple compactor."
> 
>  - Update capacity when freeing pages to prevent confusing the growth policy.
>  - Test with fragmentation_test instead of mirrors_reader_test to fit within time limits on the reload and opt-counter-threshold bots.
> 
> Bug: https://github.com/dart-lang/sdk/issues/30978
> Change-Id: I50488230bf5a0ed3b663ce555ff6ed62f2e5acca
> Reviewed-on: https://dart-review.googlesource.com/15011
> Reviewed-by: Erik Corry <erikcorry@google.com>
> Commit-Queue: Ryan Macnak <rmacnak@google.com>

TBR=rmacnak@google.com,asiva@google.com,erikcorry@google.com

Change-Id: I93e57d4b0b71ce87f7ca04cd35a87d6205864bba
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: https://github.com/dart-lang/sdk/issues/30978
Reviewed-on: https://dart-review.googlesource.com/15300
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2017-10-19 19:51:05 +00:00
Bob Nystrom ba2e4aff24 Some minor clean-up in test.dart.
- Fix fuzzy arrow errors.
- Default the Dart repo URI so it doesn't always need to be explicitly
  set.
- Run dartfmt on everything.
- Move some members out of the garbage bin "TestUtils" class:
  - Move the stuff around the Dart repo directory to a new Repository
    class.
  - Move absolute() into Path where it belongs.
  - Move workingDirectory in Path since it is a Path.
  - Delete the random number stuff since it was apparently unused.

Change-Id: I3dab3a4f1713b7a749e64b6776149d05a0ce1b69
Reviewed-on: https://dart-review.googlesource.com/14502
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2017-10-19 19:05:58 +00:00
Ryan Macnak 6451ce078f Reapply "[vm] Add a simple compactor."
- Update capacity when freeing pages to prevent confusing the growth policy.
 - Test with fragmentation_test instead of mirrors_reader_test to fit within time limits on the reload and opt-counter-threshold bots.

Bug: https://github.com/dart-lang/sdk/issues/30978
Change-Id: I50488230bf5a0ed3b663ce555ff6ed62f2e5acca
Reviewed-on: https://dart-review.googlesource.com/15011
Reviewed-by: Erik Corry <erikcorry@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2017-10-19 18:08:58 +00:00
Régis Crelier 55bbf44e06 Update kernel status file for standalone_2 now that --reify-generic-functions is passed.
Change-Id: I3b736746b9121f69c3934c6c2bf7451ef8ba1380
Reviewed-on: https://dart-review.googlesource.com/15007
Reviewed-by: Régis Crelier <regis@google.com>
2017-10-18 23:35:08 +00:00
Bob Nystrom 07b9df22ac Use the Expect.throws___() helper methods throughout tests.
No behavioral changes, just getting rid of a lot of redundant closures
and helper functions.

Change-Id: I55c52c2cc9e5505bb64203c31aad8d76847f8eeb
Reviewed-on: https://dart-review.googlesource.com/14320
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2017-10-17 23:37:15 +00:00
Martin Kustermann 8dca2f344c Clear flow graph type propagator information when winden-to-int32
The CL [0] caused a bug since it was not safe to re-use type propagation
information after certain optimizations.  The winden-to-int32 is one
such optimization we found and we'll for now clear out the type
information on use sites explicitly after doing the widening.

(Hopefully there are no other optimizations causing the type propagation
 information to be no longer up-to-date.)

[0] https://github.com/dart-lang/sdk/commit/3cc0cea37e56bc5c590905f2da4bc5d9db9d73e6


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

Change-Id: I4c2ead9571c4007e8dbef3c0591cc836d71de35d
Reviewed-on: https://dart-review.googlesource.com/14060
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2017-10-16 18:23:47 +00:00
Dmitry Stefantsov 7fa0a6bb69 Mark test standalone_2/io/web_socket_test as flaky
The status of the test was lost for some configurations during the test
migration.

Change-Id: I3cdcefe640614c44fd52a1bae0a55f0026b2d50d
Reviewed-on: https://dart-review.googlesource.com/13541
Reviewed-by: Morten Krogh-jespersen <mkroghj@google.com>
2017-10-12 13:44:59 +00:00
William Hesse c308ac398e Update status for standalone_2/io/process_segfault test on android
Bug: https://github.com/dart-lang/sdk/issues/26376
Change-Id: Ie66cb65e16de2689aa04b1970de90c2775ea2f2e
TBR=asiva@google.com
Reviewed-on: https://dart-review.googlesource.com/12295
Reviewed-by: William Hesse <whesse@google.com>
2017-10-09 15:42:01 +00:00
Morten Krogh-Jespersen f84f4f0f92 Add compiler != dart2analyzer status file test
Error introduced by bd2a8e1d60.

Bug:
Change-Id: Ib4fc765d32ab6e4b74e52bed33e3b4557062d25c
Reviewed-on: https://dart-review.googlesource.com/12281
Reviewed-by: Alexander Thomas <athom@google.com>
2017-10-09 08:06:25 +00:00
Siva Annamalai bd2a8e1d60 Reland migrate most of the tests in standalone to be strong mode clean and move them to standalone_2 directory.
Bug:
Change-Id: I4ca50f315361422db1d4356055862463bfe1d6f3
Reviewed-on: https://dart-review.googlesource.com/12240
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2017-10-07 01:29:36 +00:00
Siva Annamalai ff32187145 Revert "Migrate most of the tests in standalone to be strong mode clean and move"
This reverts commit c85563f582.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> Migrate most of the tests in standalone to be strong mode clean and move
> them to standalone_2 directory.
> 
> Change-Id: I9887b8d6d4d86001e4660b400224b881205e6273
> Reviewed-on: https://dart-review.googlesource.com/6080
> Reviewed-by: Ben Konyi <bkonyi@google.com>

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

Change-Id: I3c7b6081f17fca45e7828603538f50d06417e2be
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/12020
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2017-10-06 17:24:20 +00:00
Siva Annamalai c85563f582 Migrate most of the tests in standalone to be strong mode clean and move
them to standalone_2 directory.

Change-Id: I9887b8d6d4d86001e4660b400224b881205e6273
Reviewed-on: https://dart-review.googlesource.com/6080
Reviewed-by: Ben Konyi <bkonyi@google.com>
2017-10-06 17:07:34 +00:00
Siva Annamalai f1689b6eb0 Migrate first block of tests in standalone to standalone_2
R=bkonyi@google.com

Review-Url: https://codereview.chromium.org/2984363004 .
2017-08-01 09:05:01 -07:00