Commit Graph

1846 Commits

Author SHA1 Message Date
Bob Nystrom ba84855c0a Migrate the lingering language_strong tests over to language_2.
Change-Id: I4d60b650a2146c1d9be0fd0c5f98eac85f9e2eb1
Reviewed-on: https://dart-review.googlesource.com/16333
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2017-10-27 23:44:08 +00:00
Ryan Macnak 107e92d11c Revert "[vm] Tighten stack overflow check in the parser."
This reverts commit eebbac4d78.

Reason for revert: Crash on ASAN bots

Original change's description:
> [vm] Tighten stack overflow check in the parser.
> 
> A recent change increased the accuracy of the stack limit used in the stack overflow check. This allowed the parser to complete some example programs that previously tripped the limit, but the flow graph builder or optimizer (depending on mode) then experienced the overflow. Rather than sprinkle checks throughout the compiler pipeline, we now flag an error in the parser based on the amount of nesting instead of amount of call stack used.
> 
> Bug: https://github.com/dart-lang/sdk/issues/31158
> Change-Id: I794e484d736e61499fe6812cf25185ce097bcdd8
> Reviewed-on: https://dart-review.googlesource.com/15651
> Reviewed-by: Zach Anderson <zra@google.com>

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

Change-Id: I232d929b24c54191d6688530c6f4c59dcccb5890
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: https://github.com/dart-lang/sdk/issues/31158
Reviewed-on: https://dart-review.googlesource.com/16400
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2017-10-24 23:08:09 +00:00
Ryan Macnak eebbac4d78 [vm] Tighten stack overflow check in the parser.
A recent change increased the accuracy of the stack limit used in the stack overflow check. This allowed the parser to complete some example programs that previously tripped the limit, but the flow graph builder or optimizer (depending on mode) then experienced the overflow. Rather than sprinkle checks throughout the compiler pipeline, we now flag an error in the parser based on the amount of nesting instead of amount of call stack used.

Bug: https://github.com/dart-lang/sdk/issues/31158
Change-Id: I794e484d736e61499fe6812cf25185ce097bcdd8
Reviewed-on: https://dart-review.googlesource.com/15651
Reviewed-by: Zach Anderson <zra@google.com>
2017-10-24 21:38:46 +00:00
Emily Fortuna 85c8a91bb1 Dart gardening: Update test statuses for vm_precomp and simarm64 Timeouts.
Bug:
Change-Id: I4988c795eed2dfe88e56e8dea50cfc60b3466882
Reviewed-on: https://dart-review.googlesource.com/15764
Reviewed-by: Emily Fortuna <efortuna@google.com>
Commit-Queue: Emily Fortuna <efortuna@google.com>
2017-10-20 21:59:18 +00:00
Erik Corry 37eaf1cdb1 Also skip deep_nesting1_negative_test
R=whesse@google.com

Bug: 31158
Change-Id: I1dcf37c07fdaafea6394e746b7e2558112334dff
Reviewed-on: https://dart-review.googlesource.com/15160
Reviewed-by: William Hesse <whesse@google.com>
2017-10-19 15:53:31 +00:00
Erik Corry 2b3c7ef7dd Disable deep_nesting2_negative_test on precompiled runtime
Started failing after
https://github.com/dart-lang/sdk/commit/b85a7fecd02c309fa70e466a11c7f0bac14d10db

R=hesse@google.com

Bug: 31158
Change-Id: I80ee69bac34f50d6c8d2764891ebd39df59f0bc1
Reviewed-on: https://dart-review.googlesource.com/15126
Reviewed-by: William Hesse <whesse@google.com>
2017-10-19 12:37:22 +00:00
Bob Nystrom 14011f47e3 Resurrect deleted language tests.
They're back from the grave, and ready to party!

Change-Id: I088134a9be7ecabf1fbf751c015a656a15cabff9
Reviewed-on: https://dart-review.googlesource.com/12821
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2017-10-11 17:47:11 +00:00
pq 2fbb267460 Revert "Migrate test block 152 to Dart 2.0." [TBR].
This reverts commit 9744f5d212.

Change-Id: I1299f0e9ea14c776c315dd8439bd9ab255d9060b
Reviewed-on: https://dart-review.googlesource.com/5001
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2017-09-11 18:24:16 +00:00
pq 9744f5d212 Migrate test block 152 to Dart 2.0.
Change-Id: Iad60c7a650595703b0a0109d15d8971a4c209d84
Reviewed-on: https://dart-review.googlesource.com/3701
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2017-09-11 17:11:17 +00:00
Janice Collins 3a8a1ca54c Migrate test block 113 to Dart 2.0.
Request particular attention to generic_creation_test and generic_field_mixin6_test, but all of the following required tweaks
to the status files to pass tests:

generic_closure_test
generic_function_bounds_test
generic_function_dcall_test
generic_function_typedef_test
generic_field_mixin6_test
generalized_void_syntax_test
generic_functions_test

BUG=
R=jmesserly@google.com

Review-Url: https://codereview.chromium.org/3008573002 .
2017-08-30 08:50:16 -07:00
Janice Collins fe7c2acd4e Migrate block 163 to Dart 2.0.
Interesting tests requiring status file or other changes:

type_variable_promotion_test
type_variable_scope_test
type_variable_static_context_negative_test - changed from negative to compile-time error
unresolved_top_level_method_negative_test - changed from negative to compile-time error
unary_plus_negative_test
unhandled_exception_negative_test
unbound_getter_test
unresolved_in_factory_negative_test -
unresolved_top_level_var_negative_test - changed from negative to compile-time error
unresolved_top_level_method_negative_test - changed from negative to compile-time error
vm/async_await_catch_stacktrace_test

BUG=
R=lrn@google.com

Review-Url: https://codereview.chromium.org/3008723002 .
2017-08-30 08:05:12 -07:00
Bob Nystrom 0cae5b30fc Migrate over the status for closure_cycles_test.
R=efortuna@google.com

Review-Url: https://codereview.chromium.org/3008863002 .
2017-08-29 16:29:27 -07:00
Bob Nystrom 46320c5208 Migrate block 115.
Interesting changes:

- A static getter colliding with an inherited non-static setter is a
  compile error, not a type warning.

- Trying to call a setter on what is only a getter is a compile error
  with no runtime behavior.

- Add support to test.dart for negative tests in DDC.

BUG=
R=jcollins@google.com

Review-Url: https://codereview.chromium.org/3005643002 .
2017-08-28 16:17:28 -07:00
Vyacheslav Egorov 7d5231796e [VM, Precompiler] Support obfuscation of the symbolic information in precompiler
Obfuscation is controlled by obfuscate flag in Dart_IsolateFlags.

Obfuscation of identifiers is performed during script tokenization - when TokenStream is generated from the source. All kIDENT and kINTERPOL_VAR tokens are renamed consistently using a persistent obfuscation map stored in ObjectStore::obfuscation_map.

Some identifiers (pseudo-keywords, arithmetic operators, builtin recognized methods and entry-points) are not renamed to keep name based lookups from breaking. All other identifiers are renamed.

Constant instances of Symbol-s (both created via literal syntax #ident and using constant constructor const Symbol("ident")) are renamed consistently with corresponding identifiers.

Script urls and Library urls and names are also obfuscated.

Obfuscation map can be dumped as a JSON array at the end of precompilation using Dart_GetObfuscationMap API.

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

Review-Url: https://codereview.chromium.org/3003583002 .
2017-08-25 09:48:23 +02:00
Bob Nystrom 615be6451e Migrate block 114 (and some of 113).
generic_instanceof ... getter_closure_execution_order_test.

The main interesting one is generic_methods_type_expression_test. It
was testing old Dart 1.0-specific behavior and needed a lot of changes.

R=jmesserly@google.com

Review-Url: https://codereview.chromium.org/3001803002 .
2017-08-24 10:52:29 -07:00
Morten Krogh-Jespersen 3803057169 Migrating a block of dart 2:
./language[_strong]/class_keyword_test.dart
./language[_strong]/closure_shared_state_test.dart

R=johnniwinther@google.com

NOTE: I had to bypass hooks since the analyser fails on the files that have static compile-time errors. Should I do something else?
Committed: https://github.com/dart-lang/sdk/commit/fa59030f18c5015f7e25832d9247cc2967e99aa1
Review-Url: https://codereview.chromium.org/3001433002 .
2017-08-10 15:11:33 +02:00
Morten Krogh-Jespersen f0e8bb629b Revert "Migrating a block of dart 2:"
This reverts commit fa59030f18.

TBR=sortie@google.com

Review-Url: https://codereview.chromium.org/2997723002 .
2017-08-10 14:51:18 +02:00
Morten Krogh-jespersen fa59030f18 Migrating a block of dart 2:
./language[_strong]/class_keyword_test.dart
./language[_strong]/closure_shared_state_test.dart

R=johnniwinther@google.com

NOTE: I had to bypass hooks since the analyser fails on the files that have static compile-time errors. Should I do something else?
Review-Url: https://codereview.chromium.org/3001433002 .
2017-08-10 14:43:05 +02:00
Bob Nystrom 50c087d5a6 Migrate language block 45 - call_argument ... call_with.
R=jmesserly@google.com

Review-Url: https://codereview.chromium.org/2998493002 .
2017-08-04 17:15:26 -07:00
Bob Nystrom 243d1c74eb Migrate language block 46 - canonical_const ... char_escape.
R=jmesserly@google.com

Review-Url: https://codereview.chromium.org/2996533003 .
2017-08-04 16:52:13 -07:00
Bob Nystrom 3c7f9852a5 Migrate block 43.
R=bkonyi@google.com

Review-Url: https://codereview.chromium.org/2990933002 .
2017-08-01 16:58:52 -07:00
Vyacheslav Egorov 33ab401cc7 Gardening: fix issues with expectations for precomp-linux-product-x64.
Fixes https://github.com/dart-lang/sdk/issues/30289

R=kustermann@google.com
BUG=

Review-Url: https://codereview.chromium.org/2987113002 .
2017-07-31 13:44:40 +02:00
Alan Knight 7694ecabb0 And properly qualify the suppressed tests
BUG=

Review-Url: https://codereview.chromium.org/2989103002 .
2017-07-28 16:54:24 -07:00
Alan Knight f3746d3548 Fix typo in status file
BUG=

Review-Url: https://codereview.chromium.org/2992723002 .
2017-07-28 16:00:20 -07:00
Alan Knight 2993c194bf Suppress crashing/failing VM precomp tests
BUG=

Review-Url: https://codereview.chromium.org/2987073002 .
2017-07-28 15:53:27 -07:00
Bob Nystrom ad7e4df362 Migrate block 39 language/async_backwards ... /async_star_take.
R=bkonyi@google.com

Review-Url: https://codereview.chromium.org/2990973002 .
2017-07-28 14:28:57 -07:00
Bob Nystrom f32d1b2bcd Migrate block 37, language/arithmetic2 ... /async_await_syntax_test.
R=jmesserly@google.com

Review-Url: https://codereview.chromium.org/2992003002 .
2017-07-28 11:16:23 -07:00
Erik Corry e431e93e87 Revert two Kernel changes that were causing test failures.
Example failure:
python tools/test.py -m release -c dartk --builder-tag no_ipv6 \
    language/function_type/function_type63_test

Revert "Serialize typedef parameters (including function typed ones) to Kernel and use it to resynthesize typedefs from Kernel."
This reverts commit afc392b66d.
Reverts https://codereview.chromium.org/2990783002

Revert "Add Member.documentationComment and use it to resynthesize documentation from Kernel."
This reverts commit 47ecf72272.
Reverts https://codereview.chromium.org/2990873002

Also reverts some attempts to fix test files:
302b410364
https://codereview.chromium.org/2984343002
05ccf27015
https://codereview.chromium.org/2992683002
f71dcd7834
https://codereview.chromium.org/2984363003

Also had to revert some test changes that were committed on top of a red buildbot, in order to try to get back to a place where bots were green:

23952fdf56
https://codereview.chromium.org/2990773002
557cab2a3e
https://codereview.chromium.org/2985173002

R=johnniwinther@google.com, karlklose@google.com
BUG=

Review-Url: https://codereview.chromium.org/2986093002 .
2017-07-28 14:08:23 +02:00
Erik Corry f71dcd7834 Reinstate config line erroneously removed from test status file
This is a fix for a change in https://codereview.chromium.org/2990773002
R=karlklose@google.com
BUG=

Review-Url: https://codereview.chromium.org/2984363003 .
2017-07-28 11:33:49 +02:00
Bob Nystrom 23952fdf56 Migrate language/arithmetic2_test ... language/async_await_syntax_test.
R=sra@google.com

Review-Url: https://codereview.chromium.org/2990773002 .
2017-07-27 16:13:47 -07:00
Bob Nystrom 557cab2a3e Migrate language/async_backwards... ... language/async_star_take...
R=bkonyi@google.com

Review-Url: https://codereview.chromium.org/2985173002 .
2017-07-27 15:48:30 -07:00
Erik Ernst 9336e199fd Re-land of CL 2990703002, adding fixes to analyzer_test and error_test.
This CL is identical to the reverted CL 2990703002 which implements
syntactic support for generalized void in the analyzer, plus two bug
fixes in pkg/analyzer/test/generated/parser_test.dart and
pkg/analyzer_cli/test/error_test.dart. In the former, a test on parsing
`void,` was changed to expect an error: _isTypeIdentifier on a lone
`void` will no longer return true, which is necessary because `void`
can now be used as a type annotation alone. Another test on `void x`
was added, which produces the behavior previously seen for `void,`.
In error_test, the error which is used throughout was changed from
`void foo;` to `var int foo;` (because the former is no longer an
error).

Review-Url: https://codereview.chromium.org/2992623002 .
2017-07-27 12:39:19 +02:00
Siva Annamalai 8751f704d5 Remove references to 'dartium' and 'drt' in status files.
R=bkonyi@google.com

Review-Url: https://codereview.chromium.org/2986693002 .
2017-07-26 15:59:38 -07:00
Erik Ernst 2e73ce1187 Revert "Implemented support for generalized void in analyzer."
This reverts commit 1d44f5296a,
because it causes failures for the analyzer in parser_test, error_test.

Review-Url: https://codereview.chromium.org/2990723002 .
2017-07-26 18:18:04 +02:00
Erik Ernst 1d44f5296a Implemented support for generalized void in analyzer.
Changed the analyzer parser to accept usages of `void` which were
previously rejected as syntax errors: `void` can now be the type
annotation for a variable or parameter, and it can be an actual type
argument.

Removed affected error codes like VOID_PARAMETER, VOID_VARIABLE,
VOID_RETURN_FOR_GETTER and associated declarations (like checking
functions), and adjusted test cases to expect success rather than
compile time errors.

Adjusted generalized_void_syntax_test.dart (it had real errors like
`final` variables with no initializer etc. that were not detected
when tools would just reject the file as syntactically wrong).

R=brianwilkerson@google.com

Review-Url: https://codereview.chromium.org/2990703002 .
2017-07-26 17:45:13 +02:00
Alexander Markov 203955bc48 Reapply "Improve hashCode for closure objects" with fixes.
This CL includes the following fixes:
* Fix for incorrect non-nullable assumption about _Closure._hash field.
* Add error handling into BecomeMapTraits::Hash.
* Correct assertions for validating layout of Closure objects.
* Add identityHashCode to the list of VM entry points in precompiler.

Closes #30211.

Original code review:

https://codereview.chromium.org/2983823002/

Original CL description:

This performance improvement is inspired by Flutter listeners stored in
the HashSet (see ObserverList) and frequently checked using
HashSet.contains(). If there are many such listeners and they are
implicit instance closures (for example, created by
'new Listenable.merge(...)'), HashSet.contains() becomes very slow.
It spends a lot of time in Closure_equals native method due to hash
collisions between closure objects with same function
but different receivers.

This CL improves hashCode() calculation for implicit instance closures
by mixing function hashcode with identity hashcode of the receiver.
For explicit closures and static implicit closures hashCode() is
improved by using identityHashCode() of a closure object.

Also, hashcode is calculated once and cached in each closure instance.
The size of a closure instance doesn't grow up because there was unused
word-size padding both on 32-bit and 64-bit architectures.

The execution time of the following micro-benchmark is reduced from
47665ms to 135ms on my Linux/x64 box.

-------------------------------------

import "dart:collection";

class Foo {
  int _a;
  Foo(this._a);
  void bar() {}
}

main() {
  HashSet hs = new HashSet();
  for (int i = 0; i < 1000; ++i) {
    hs.add(new Foo(i).bar);
  }

  var watch = new Stopwatch()..start();

  for (int i = 0; i < 1000; ++i) {
    for (var c in hs) {
      hs.contains(c);
    }
  }

  int time = watch.elapsedMilliseconds;
  print("Time: ${time}ms\n");
}

-------------------------------------

R=zra@google.com

Review-Url: https://codereview.chromium.org/2988493002 .
2017-07-20 15:22:18 -07:00
Alexander Markov d9851b0cf1 Silence test bound_closure_equality_test (issue 30211)
R=asiva@google.com

Review-Url: https://codereview.chromium.org/2982283003 .
2017-07-19 18:39:11 -07:00
Terry Lucas d0d5d6cc25 Revert "Revert "Removed Dartium test exceptions""
This reverts commit b85f66253c.

TBR=alanknight@google.com

Review-Url: https://codereview.chromium.org/2984613002 .
2017-07-19 05:51:54 -07:00
Johnni Winther 6e36c49b26 Skip vm/optimized_stacktrace_test
Review-Url: https://codereview.chromium.org/2978303002 .
2017-07-19 13:32:40 +02:00
Johnni Winther b85f66253c Revert "Removed Dartium test exceptions"
This reverts commit 84f079f24c.

Review-Url: https://codereview.chromium.org/2983073002 .
2017-07-19 13:31:32 +02:00
Terry Lucas 84f079f24c Removed Dartium test exceptions
TBR=alanknight@google.com

Review-Url: https://codereview.chromium.org/2983033002 .
2017-07-18 13:18:14 -07:00
Erik Ernst 182c4d5923 Added test using void in new positions.
This is the first step of addressing issue 30176.
The test contains syntax errors according to all tools, and status
files have been adjusted accordingly.

R=johnniwinther@google.com

Review-Url: https://codereview.chromium.org/2980293002 .
2017-07-18 13:27:33 +02:00
Lasse R.H. Nielsen 8e21707a47 Fix bug in test's /none version. Update status files.
R=eernst@google.com

Review-Url: https://codereview.chromium.org/2975193002 .
2017-07-14 14:04:10 +02:00
Jens Johansen fe4771337d [Gardening] Mark stacktrace_demangle_ctors_test as failing in precompiled mode
See https://github.com/dart-lang/sdk/issues/30153

BUG=
R=vegorov@google.com

Review-Url: https://codereview.chromium.org/2979943002 .
2017-07-13 12:25:28 +02:00
Ryan Macnak f20b32b793 [vm] Enable mirrors in product mode. Allows building a product mode SDK.
Fixes https://github.com/dart-lang/sdk/issues/29972

R=zra@google.com

Review-Url: https://codereview.chromium.org/2972883002 .
2017-07-12 12:55:58 -07:00
Lasse R.H. Nielsen d7653c1f88 More status file updates
Review-Url: https://codereview.chromium.org/2978493002 .
2017-07-10 16:22:40 +02:00
Lasse R.H. Nielsen 807a1fb294 Add more status files for assert-in-initializer tests, remove mistype.
Review-Url: https://codereview.chromium.org/2975773002 .
2017-07-10 14:25:28 +02:00
Lasse R.H. Nielsen 609d26a227 Add assert-in-initializer-list to formal specification.
Add tests for new syntax.
Not dart-formatted yet since the formatter doesn't accept the new syntax.

R=eernst@google.com, floitsch@google.com

Review-Url: https://codereview.chromium.org/2962153002 .
2017-07-10 13:59:38 +02:00
Zachary Anderson 50475dd351 [Fuchsia] Fix test image. Update status files for vm and language suites
IN-70

R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2957233003 .
2017-06-29 07:45:19 -07:00
Zachary Anderson ac16656161 Remove MIPS support
R=asiva@google.com

Review-Url: https://codereview.chromium.org/2858623002 .
2017-06-22 08:49:22 -07:00