Commit Graph

2501 Commits

Author SHA1 Message Date
Erik Corry fc693153d1 Fix new test in checked mode
It's also analyzer clean now.
R=vegorov@google.com
BUG=

Review-Url: https://codereview.chromium.org/2909883002 .
2017-05-29 12:27:40 +02:00
Erik Corry b7797ac45f Fix misoptimization of 'is' test
This also moves some common code from jit_optimizer.cc and aot_optimizer.cc to
a new common file, optimizer.cc.  The code is almost unchanged from the
aot_optimizer.cc version, apart from the calls to PurgeNegativeTestCidsEntries.
A flag emulates the behaviour of the simpler jit_optimizer.cc version.
Benchmark tests are running to see which is better.

R=vegorov@google.com
BUG=https://github.com/dart-lang/sdk/issues/29695

Review-Url: https://codereview.chromium.org/2904543002 .
2017-05-29 11:15:59 +02:00
Bob Nystrom c296f75d10 Revert "Revert "Revert "Revert "Refactor test option parsing code.""""
This reverts commit 02547656cc.

R=efortuna@google.com

Review-Url: https://codereview.chromium.org/2904313002 .
2017-05-26 15:04:55 -07:00
Bob Nystrom 92267afc66 Refactor and clean up the status file parsing code. - Make the parser less error tolerant. The expression parser used to ignore any unrecognized tokens, which means a status like "RuntimeError CompileError" (not the missing comma) was parsed as simply "RuntimeError", which seems bad. Now it reports an error. Fixed a couple of status files that thought they were setting statuses that they weren't (!).
- Separate out parsing a status file from applying the environment to
  determine which sections are active. This makes it possible to, for
  example, generate expectation sets for multiple environments without
  having to reparse each time.

- Simplify expression parsing. Remove set expressions since they weren't
  used for anything useful. A test's expectations are a simple
  comma-separated list and don't need anything beyond that. Merge
  Scanner and Tokenizer since the latter was a glorified function.

- Make more names private so that it's clearer what's used outside of
  various libraries.

- Generally modernize the style.

- Add *lots* of documentation.

Again, there should be no behavioral changes. I ran:

  ./tools/test.py -m release,debug -c none,dart2js,dart2analyzer -r none,vm,d8 corelib

Before and after the change and verified that the output was the same
(aside from timing).

R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2891753003 .
2017-05-18 12:42:52 -07:00
Erik Corry 32a54cedc5 Disable slow test on Windows debug
R=pquitslund@google.com
BUG=

Review-Url: https://codereview.chromium.org/2879653002 .
2017-05-11 19:06:54 +02:00
Erik Corry 37b320d381 Avoid scanning huge freelists for large enough free blocks.
The current old-space allocation implementation performs a
linear search in a single (potentially *very long*) free list for
allocations > 2k.

This CL will change this behavior to limit the number of free list
entries traversed, falling back to allocate a new page if the maximum
number of steps was reached. The new page will be pushed onto the
front of the free list, therefore making new allocations go there
immediately.

For the new tests/standalone/fragmentation_test.dart we
      - pay around 11-12% increase in memory
      - to gain a 6x speedup (125x speedup with sweepers disabled)

I tried a much more complicated version that had power-of-two
buckets for freelist items > 2k.  This turned out to regress
dart2js and splay for reasons that I could not determine. This
version is much simpler and fixes the issue as observed in the
bug.

Closes #29588

R=kustermann@google.com

Review-Url: https://codereview.chromium.org/2872883003 .
2017-05-11 09:41:50 +02:00
Florian Loitsch 5202df2238 Warn when adding something to a closed sink and improve documentation.
Adding to a closed sink will throw once https://codereview.chromium.org/2857393003/ is committed.

Also:
Fixes #29122.

BUG= http://dartbug.com/29122
R=lrn@google.com, whesse@google.com

Committed: https://github.com/dart-lang/sdk/commit/8e19729b8913c4225ef84e863193e36879947727
Reverted: https://github.com/dart-lang/sdk/commit/8f3ae7e7e13fad563a84227fa78c6e520d956566
Committed: https://github.com/dart-lang/sdk/commit/c0090fa01fe59b7982891b8c4e34ed4cabd2296f
Reverted: https://github.com/dart-lang/sdk/commit/a4eb8b8fe36f2a8de24a265b63de164719d66517
Review-Url: https://codereview.chromium.org/2822173002 .
2017-05-08 15:52:19 +02:00
William Hesse 94bf0f6a4e Update status for failing process_exit_test on android
BUG=https://github.com/dart-lang/sdk/issues/29578
TBR=zra@google.com

Review-Url: https://codereview.chromium.org/2864313002 .
2017-05-08 11:40:26 +02:00
Zachary Anderson 7fb361907b [infra] Make gclient runhooks gn for Android on supported platforms
Make GN run for Android configurations on supported host platforms
on a gclient runhooks. This should fix the vm-precomp-android-* bots

Review-Url: https://codereview.chromium.org/2861363002 .
2017-05-06 23:52:26 -07:00
Florian Loitsch 8f3ae7e7e1 Revert "Throw when adding something to a closed sink and improve documentation."
This reverts commit 8e19729b89.

BUG=

Review-Url: https://codereview.chromium.org/2864443002 .
2017-05-04 12:52:47 +02:00
Florian Loitsch 8e19729b89 Throw when adding something to a closed sink and improve documentation.
As port of this CL all changes of https://codereview.chromium.org/20036002 are reverted.

Also fixes issue 29122.

BUG= http://dartbug.com/29122
R=lrn@google.com, whesse@google.com

Review-Url: https://codereview.chromium.org/2822173002 .
2017-05-04 11:42:22 +02:00
Bob Nystrom cf3be14b9b Fix path to test.dart in analyzer test for it.
Review-Url: https://codereview.chromium.org/2854283002 .
2017-05-02 17:01:53 -07:00
Florian Loitsch 953ce8c9fb Mark tests as flaky.
Review-Url: https://codereview.chromium.org/2859473002 .
2017-05-02 15:57:18 +02:00
Erik Corry aa6353b6da Dart SDK Spelling b, c, and d.
R=kmillikin@google.com
BUG=

Review-Url: https://codereview.chromium.org/2850783002 .
2017-05-01 08:28:10 +02:00
Lasse R.H. Nielsen e49d32e6a6 Remove status line after CL be9c9f2237 fixed problem.
Related to issue #29211
BUG= http://dartbug.com/29211

Review-Url: https://codereview.chromium.org/2850463002 .
2017-04-27 14:21:29 +02:00
Ben Konyi 4ebaac3d29 Fixed racey testShutdown test, where echoServer was throwing an exception after trying to write to a client socket closed for reading.
BUG=
R=zra@google.com

Review-Url: https://codereview.chromium.org/2837163002 .
2017-04-24 14:21:40 -07:00
Zachary Anderson bdb4eb6338 [dart:io][windows] Implements RawSynchronousSocket
related #29343
fixes #29333

R=asiva@google.com

Review-Url: https://codereview.chromium.org/2830273002 .
2017-04-21 23:29:52 -07:00
Peter von der Ahé ba0e07846f Produce a compile-time error if there's no main method.
R=vegorov@google.com

Review-Url: https://codereview.chromium.org/2801853006 .
2017-04-19 14:28:10 +02:00
Siva Annamalai 96bbe512eb Fix for issue 29350 - VM Crashes when covariant is used incorrectly.
BUG=#29350
R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2827453003 .
2017-04-18 11:10:28 -07:00
Jacob Richman 2dcd56ef43 Format all tests.
There are far too many files here to review everyone carefully.
Spot checking most of the diffs look good as test code is generally written
with less care than application code so lots of ugly formatting get through.
If people notice files where the automated formatting bothers them feel free
to comment indicating file names and I'll move spaces within comments to make
the formatting cleaner and use comments to force block formatting as I have
done for other case where formatting looked bad.

BUG=
R=efortuna@google.com

Review-Url: https://codereview.chromium.org/2771453003 .
2017-04-17 14:53:02 -07:00
Zachary Anderson 9ce608e89d [dart:io] Adds ProcessInfo.{max,current}Rss. Adds OS::MaxRSS on Fuchsia.
R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2822943002 .
2017-04-17 14:41:40 -07:00
Ben Konyi d7c55fb926 Updated status file to allow for RuntimeErrors in raw_synchronous_socket_tests temporarily while the cause of flakiness is found.
BUG=
R=alanknight@google.com

Review-Url: https://codereview.chromium.org/2822523002 .
2017-04-13 11:29:35 -07:00
Ben Konyi cf6165c767 Fixed status file to not expect a raw_synchronous_socket_test crash on the analyzer bots.
TBR=zra@google.com
BUG=

Review-Url: https://codereview.chromium.org/2811363003 .
2017-04-12 16:16:35 -07:00
Ben Konyi 7549bc6b48 Added missing sync_socket_unsupported.cc and fixed issues in test which were causing analysis errors
BUG=
R=zra@google.com

Review-Url: https://codereview.chromium.org/2814283002 .
2017-04-12 15:13:10 -07:00
Ben Konyi 6fbdd19ddb Various fixes for sync socket implementation.
Revert "Revert "Added sync_socket.h include in sync_socket_win.cc""

This reverts commit 2bd6168e1ebf35f6dbd9b2724339362c493377fc.

Revert "Revert "Added synchronous socket implementation to dart:io.""

This reverts commit a47bce03f5502dac7fb12e777e87b5aa1cfc830b.

BUG=
R=zra@google.com

Review-Url: https://codereview.chromium.org/2814773004 .
2017-04-12 14:20:48 -07:00
Ben Konyi b439bd9a54 Revert "Added synchronous socket implementation to dart:io."
This reverts commit a1f87ebdb8.

Revert "Added sync_socket.h include in sync_socket_win.cc"

This reverts commit bdec13e865.

BUG=

Review-Url: https://codereview.chromium.org/2812153002 .
2017-04-11 15:18:46 -07:00
Ben Konyi bdec13e865 Added sync_socket.h include in sync_socket_win.cc
BUG=
R=zra@google.com

Review-Url: https://codereview.chromium.org/2809153003 .
2017-04-11 15:14:35 -07:00
Ben Konyi a1f87ebdb8 Added synchronous socket implementation to dart:io.
BUG=
R=zra@google.com

Review-Url: https://codereview.chromium.org/2803543006 .
2017-04-11 14:41:09 -07:00
Peter von der Ahé d515791312 Handle bad packages files and #void without crashing.
R=vegorov@google.com

Review-Url: https://codereview.chromium.org/2804843003 .
2017-04-06 12:05:54 +02:00
Peter von der Ahé 0df001cebf Implement various getters on DillMember.
R=johnniwinther@google.com

Review-Url: https://codereview.chromium.org/2799783004 .
2017-04-06 10:54:48 +02:00
Peter von der Ahé b06e4d5754 Create separate scopes for constructors, setters, and other members.
R=karlklose@google.com

Review-Url: https://codereview.chromium.org/2788153002 .
2017-04-05 16:07:32 +02:00
Zachary Anderson 8c9c54d833 [dart:io] Don't close stdin with a socket finalizer
If an Isolate touches the 'stdio' getter, a _NativeSocket with
attached finalizer is created for it. Previously, when such an
Isolate exited, the finalizer would close the underlying
file descriptor. This CL changes the finalizer for stdin such
that the native objects will be cleaned up, but the underlying
file descriptor will not be closed. The underlying file
descriptor will now only be closed if the stdin stream
subscription is explicitly canceled.

Accessing the stdin getter after the stream is explicitly
canceled will result in a FileSystemException.

See also: https://github.com/dart-lang/test/issues/583

fixes #29229

R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2791423002 .
2017-04-04 13:57:42 -07:00
Peter von der Ahé bfc4039d54 Special scope for labelled statements.
R=karlklose@google.com

Review-Url: https://codereview.chromium.org/2790923002 .
2017-04-04 14:29:25 +02:00
Peter von der Ahé 7f9ec1b639 standalone/verbose_gc_to_bmu_test no longer fails on Kernel.
Review-Url: https://codereview.chromium.org/2797623004 .
2017-04-04 13:08:31 +02:00
Siva Annamalai c53e020e6c Adjust status files to account for running the Dart test cases through flutter engine on linux.
Accounted for language, co19, lib, corelib, isolate and standalone tests.

Filed issues to track all failing tests

  https://github.com/flutter/flutter/issues/9109
  https://github.com/flutter/flutter/issues/9110
  https://github.com/flutter/flutter/issues/9111
  https://github.com/flutter/flutter/issues/9113
  https://github.com/flutter/flutter/issues/9114
  https://github.com/flutter/flutter/issues/9115

R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2784293003 .
2017-04-03 16:35:09 -07:00
Karl Klose 1ec54ff2df Fix test expectations for io/file_lock_test
TBR=jensj@google.com

Review-Url: https://codereview.chromium.org/2789123002 .
2017-04-03 07:47:58 +02:00
Karl Klose 2d7403abe1 [Gardening] Mark io/file_lock_test as Slow on dartk-debug
R=jensj@google.com

Review-Url: https://codereview.chromium.org/2787313002 .
2017-03-31 09:23:26 +02:00
Zachary Anderson 8d81d91201 Update status file for locale_name_test failure on Android
related #29211

R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2787173002 .
2017-03-30 15:00:21 -07:00
Zach Anderson bc923bed16 [dart:io] Reland: Adds Platform.localeName
The Mac OS build broke because a typedef wasn't added until 10.12.

related #29126

Review-Url: https://codereview.chromium.org/2786183003 .
2017-03-30 13:51:46 -07:00
Zachary Anderson e75df3cce3 Revert "[dart:io] Adds Platform.localeName"
This reverts commit ae6d854ec6.

The build failed on the mac build bots. Need to investigate.

Review-Url: https://codereview.chromium.org/2791453002 .
2017-03-30 13:35:02 -07:00
Zachary Anderson ae6d854ec6 [dart:io] Adds Platform.localeName
related #29126

R=fschneider@google.com

Review-Url: https://codereview.chromium.org/2785073002 .
2017-03-30 13:31:11 -07:00
Ryan Macnak 2343b96911 Mark dwarf_stack_trace_test as flaky in product mode, due to identical code folding.
Fix dwarf_stack_trace_test in checked mode (generated output directory includes a hypen).

R=asiva@google.com

Review-Url: https://codereview.chromium.org/2784033002 .
2017-03-30 10:01:52 -07:00
Vyacheslav Egorov 536c610fd2 Update status files for all test suites for -c dartk / -c dartkp configuration.
We are going to switch to testing all testsuites instead of just limiting ourselves to

co19 language kernel service

BUG=
R=kustermann@google.com

Review-Url: https://codereview.chromium.org/2780943004 .
2017-03-29 13:18:57 +02:00
Zachary Anderson 89dba57bcf [dart:io] Adds a finalizer to _NativeSocket to avoid socket leaks
The finalizer sends the "close" message to the EventHandler for the
file descriptor in the _NativeSocket's native field. To avoid races and
spurious messages, this CL stores a pointer to a wrapper object in the
native field instead of the file descriptor. All messsages about the
_NativeSocket sent to the EventHandler use the wrapper object instead of
the file descriptor. When the EventHandler closes the file, the file
descriptor in the wrapper object is set to -1 so that the finalizer will
instead do nothing.

On Windows, there is another level of indirection since the OS HANDLEs
were already wrapped in various kinds of Handle objects. As an additional
complication, ClientSocket close on Windows is asynchronous, so the
EventHandler may shutdown before all of the ClientSocket Handles can be
destroyed.

related #27898, #28081

R=johnmccutchan@google.com

Review-Url: https://codereview.chromium.org/2760293002 .
2017-03-28 07:44:05 -07:00
Jacob Richman 14531fa62d Re-land "Format all multitests"
Only delta from the original is a bad merge of tests/corelib/list_test.dart

This reverts commit 44d8be0ed3.

BUG=

Review-Url: https://codereview.chromium.org/2774783002 .
2017-03-23 12:40:21 -07:00
Jacob Richman 44d8be0ed3 Revert "Format all multitests"
This reverts commit 312b66dd5f.

BUG=

Review-Url: https://codereview.chromium.org/2770063002 .
2017-03-23 10:49:40 -07:00
Jacob Richman 312b66dd5f Format all multitests
BUG=
R=rnystrom@google.com

Review-Url: https://codereview.chromium.org/2768073002 .
2017-03-23 10:26:44 -07:00
Ryan Macnak abdcb09a31 Skip standalone/dwarf_stack_trace_test on Dartium because it uses dart:io.
Review-Url: https://codereview.chromium.org/2773443002 .
2017-03-22 12:04:01 -07:00
Ryan Macnak 7589236f45 Dwarf tools interpret line number table pc's as start boundries instead of end boundries.
Put kNoSourcePosition on line 0 instead of line 1.

Closes #28785

R=fschneider@google.com, johnmccutchan@google.com

Review-Url: https://codereview.chromium.org/2762313003 .
2017-03-22 10:30:02 -07:00
Jacob Richman 88eb557b65 Fix warnings_checker.dart handling of multitests
Update all tests

Support //# multitests for better dartfmt compatibility and fewer multitest false positives

All files under tests were manually updated with

find . -iregex '.*\.dart$' -print0 | xargs -0 perl -pi -e 's/(\S\s+)\/\/\/ /$1\/\/# /'

For now both old and new styles are allowed to accommodate CO19 tests.

R=efortuna@google.com
BUG=

Review-Url: https://codereview.chromium.org/2765693002 .
Review-Url: https://codereview.chromium.org/2765893003 .
2017-03-21 17:29:56 -07:00