Commit graph

19798 commits

Author SHA1 Message Date
Kallen Tu 53bbe6c88c [dart2js] Added variance support for static subtype checking.
Change-Id: I0731884aad68e3dd7f84658d75e946ca5db62bbe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127063
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
2019-12-04 20:54:16 +00:00
Alexander Markov f56b0f6907 [vm/aot/tfa] Whole-program constant propagation
Size:
flutter_gallery total size -2.48% (arm), -2.3% (arm64)
flutter_gallery instructions size -2.91% (arm), -2.77% (arm64)
velocity_tracker_bench total size -7.5% (arm), -7.1% (arm64)

Performance:
SkeletalAnimation +46.02% (Intel Core i5), +37.75% (Intel Xeon), +24.86% (arm), +39.75% (arm64).
FfiMemory.Pointer* +44-64% (x64)
FfiMemory.PointerPointer +436-465% (x64), +443% (arm64).

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

Change-Id: I6221bfa02b165ccc17d4ee8b857bb89212febaff
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125936
Reviewed-by: Régis Crelier <regis@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2019-12-04 19:19:29 +00:00
Martin Kustermann c52acadd15 [vm/ffi] Split up some tests/ffi into vmspecific and non-vmspecific
The separation will allow flutter/flutter integration tests to run the
non-vmspecific parts.

Change-Id: I0e771f1247ec62d2f0c3faa95ee10560e62524f1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127144
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2019-12-04 15:56:08 +00:00
Karl Klose 60afc24502 [infra] Convert some multi-tests to the new static error framework
This is the result of running the tool from
https://dart-review.googlesource.com/c/sdk/+/124128 on the
language_2 tests that contain only static multi-test annotations.

Some of the results needed manual editing and in these cases I have
also changed the formatting of the tests.

Change-Id: I4ddd16a2c5d8576adccb0a740cb1d4aabbc001b8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/126161
Commit-Queue: Karl Klose <karlklose@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2019-12-04 13:06:58 +00:00
Martin Kustermann b0155a72a7 [vm/ffi] Add script to extract existing positive ffi tests into bundle to be used for flutter/flutter integration test
The `tests/ffi/prepare_flutter_bundle.dart` script will try to discover
all synchronous, positive test from the "ffi" test suite, rewrite them
slightly and output a directory which can be used in a flutter/flutter
FFI integration test.

We split the ffi test functions into two parts, because a subset of the
C functions will issue calls to the VM via `dart_api.h`, which is not
available for the flutter/flutter integration test.

=> We make `runtime/bin/ffi_test/ffi_test_functions.cc` a pure C
   library, usable without `dart_api.h` and move the remaining VM
   specific code to .../ffi_test_functions_special.cc contains.

All tests from `tests/ffi/*_test.dart` will be included in the generated
bundle, which

   * don't use async/isolates
   * don't rely on VM api
   * don't rely on DynamicLibrary.{process,executable}
   * don't take too long to execute

The script can be used as follows:

   sdk % dart tests/ffi/prepare_flutter_bundle.dart foo
   Using SDK root: .../sdk
   The following tests will be included:
      aliasing_test.dart
      data_not_asan_test.dart
      data_test.dart
      extension_methods_test.dart
      external_typed_data_test.dart
      function_structs_test.dart
      negative_function_test.dart
      regress_37254_test.dart
      regress_39044_test.dart
      regress_39063_test.dart
      regress_39068_test.dart
      stacktrace_regress_37910_test.dart
      structs_test.dart
      variance_function_test.dart
   The following tests were filtered due to using dart_api.h/async/DynamicLibrary.{process,executable}/...
      function_callbacks_test.dart
      function_gc_test.dart
      function_test.dart
      object_gc_test.dart
      regress_37100_test.dart
      regress_37511_callbacks_test.dart
      regress_37511_test.dart
      regress_37780_test.dart

   Please copy generated files into FFI flutter test application
      * foo/lib/src/generated
      * foo/ios/Classes

Change-Id: Ia13f97df3bbc90829bb8fde8265a7e1d2c0f8260
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127006
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2019-12-04 13:02:48 +00:00
Nicholas Shahan 2a13b1fe26 Reland "[dartdevc] Break dart:_debugger dependency on dart:html"
Original change was broken by the fact that DDC expects all types marked as
native have all their superclasses marked as native when the super classes are
compiled.

In this case `MapMixin` from dart:collection was not being marked as native and
the only reason it was working before was that the library dependency enforced
the necessary order.

* Now `MapMixin` is explicitly marked as native.
* Added a test case to use some of the API on `window.localStorage` that is
  inherited from the MapMixin class.

Change-Id: I1584bfb86179016ee12c2acc5cfbbe81d086841e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/126906
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2019-12-04 00:51:18 +00:00
Konstantin Shcheglov 198fde2342 Fix language_2/nnbd/syntax/null_assertion_ambiguous_test
Change-Id: I095dd98b63e500e92b9298975f28adb75b0e7348
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/126822
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-12-03 00:49:30 +00:00
Robert Nystrom 284f662022 Migrate the corelib_2/ tests starting with "e" through "i".
Change-Id: I764d0457da85b2935e1d83309eab4c4b5b3ea000
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/126204
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
2019-12-02 23:19:10 +00:00
Robert Nystrom a4d799c402 Migrate corelib/ tests starting with b-d to NNBD.
Note that cast_test.dart isn't migrated yet due to #39517.

First patch set is just copying the tests over. The second patchset has
the actual meaningful changes.

Change-Id: I89233f20187b4305a776f865cde09a984423fa4f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125920
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
2019-12-02 23:13:10 +00:00
Konstantin Shcheglov 4fe27fd444 Report an error when 'await' is used in the initializer of a late local variable.
Change-Id: I4c610dd37e4c7ca653d250d4e0522536a70a6ca9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/126820
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-12-02 18:00:48 +00:00
Konstantin Shcheglov e4344a568f Report INVALID_OPTIONAL_PARAMETER_TYPE when default values are not allowed.
Change-Id: I8145bde238c092a50ddbc053100891737b74feb8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/126801
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-12-02 16:54:47 +00:00
Johnni Winther 1454a67e09 [cfe] Don't use multiple null-aware guards in opt-out
Change-Id: I15bd991577ffcc309569ee4a5512dfb29c7874ee
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/126732
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2019-12-02 12:19:27 +00:00
Konstantin Shcheglov 3de7487a2c Report an error for 'late final' fields in classes with const constructors.
Change-Id: I6843191a2f7a0bdd856549177468ff87eec949f1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/126782
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-12-01 01:48:20 +00:00
Brian Wilkerson 0a575d8681 Unify two diagnostics into instantiate_abstract_class
Change-Id: I0d9b97b26173ec789a7937337b8ff015edd283b3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/126780
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-12-01 00:58:00 +00:00
Erik Ernst 077795b3e5 [co19] Add .gitignore to new co19 directory
Change-Id: If0477e6096af1cec41b346c0c288ed73051f61df
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/126644
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
2019-11-28 11:12:44 +00:00
Kallen Tu 73fdf19b56 [dart2js] Add variance table to RTI and updated subtyping wrt variance.
Change-Id: Iac4c28d295e883997acdc2e6c7084739e60be9fd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/126403
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2019-11-27 18:45:25 +00:00
Martin Kustermann 5aa86eb123 [vm/concurrency] Run all isolate related tests with/without enabling isolate groups
Issue https://github.com/dart-lang/sdk/issues/36097

Change-Id: I0b7eca744bc49ab5ba09da3ce2a9286b1ed3c70f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/126340
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2019-11-27 17:23:31 +00:00
Alexander Thomas 3524bb1a93 [co19] Roll co19_2 and add co19 (nnbd) to DEPS.
Initial import of co19 (nnbd) at 8767031866e8243eafdb46011d4d8a7b5705019d.

Roll co19_2 to 368bfa9e877a2df003547f64bb17e30596af10c7:
2019-11-22 irina.arkhipets@gmail.com Issue 501 fixed: correct expected result adjusted.
2019-11-22 irina.arkhipets@gmail.com Issue 501 fixed: correct expected result adjusted.
2019-11-22 irina.arkhipets@gmail.com Issue 499 fixed: correct expected result adjusted.
2019-11-22 sgrekhov@unipro.ru Fixes 500. Expected result corrected
2019-11-12 sgrekhov@unipro.ru Fixes 495. Partial fix. Explicit extension member invocation tests added
2019-11-11 sgrekhov@unipro.ru 495. Partial fix. Null-aware explicit extension member invocation tests added
2019-11-07 sgrekhov@unipro.ru Remove hint in analyzer
2019-11-07 sgrekhov@unipro.ru 495. Partial fix. Explicit extension member invocation tests for composite member invocation added
2019-11-06 sgrekhov@unipro.ru 495. Partial fix. Explicit extension member invocation tests for composite member invocation added
2019-11-05 sgrekhov@unipro.ru 495. Partial fix. Explicit extension member invocation tests for composite member invocation added
2019-10-31 sgrekhov@unipro.ru 495. Partial fix. Explicit extension member invocation tests for binary operations added
2019-10-30 sgrekhov@unipro.ru 495. Partial fix. Explicit extension member invocation tests for binary operations added
2019-10-29 sgrekhov@unipro.ru 495. Partial fix. Explicit extension member invocation tests added
2019-10-10 irina.arkhipets@gmail.com Fixed Issue 494: expected result corrected.
2019-10-09 irina.arkhipets@gmail.com Fixed Issue 493: typo corrected.
2019-10-09 irina.arkhipets@gmail.com Fixed Issue 492: typo corrected.

Failures are due to:
* Triple-shift is not yet implemented.
* https://github.com/dart-lang/sdk/issues/39527

Change-Id: I81578e1e3e18b396f1d20cee7aaa34cd4df54bbf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125973
Reviewed-by: Jonas Termansen <sortie@google.com>
2019-11-26 17:10:18 +00:00
Erik Ernst a5a9057d73 [cfe] Add non-function type alias usage tests
Change-Id: Iba19aa26d982e2a89b81c9f9856e560977c26224
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/126342
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
2019-11-26 15:44:59 +00:00
Liam Appelbe 629d4ce095 [vm] Test for late fields with complicated initializers
This exposed a bug in late_var_init_transformer, where statements that
came before the late var declaration weren't copied over. So I rewrote
it a lot simpler.

Bug: https://github.com/dart-lang/sdk/issues/38841
Change-Id: I7f75448179f737fa1e3b90aefd9ea15a2c4be5d8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/126085
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2019-11-25 17:21:15 +00:00
Teagan Strickland 709b2aa33d Adding a tool for using DWARF information to convert stack traces.
Also fixes the low and high PC information in the DWARF output of
inlining nodes.

Bug: https://github.com/dart-lang/sdk/issues/35851
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-android-release-arm64-try,vm-kernel-mac-release-x64-try,vm-kernel-precomp-mac-release-simarm_x64-try,vm-kernel-precomp-win-release-x64-try
Change-Id: I11c3577bdc5c12abdc88aa799c1aae3f505294df
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/123734
Commit-Queue: Teagan Strickland <sstrickl@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2019-11-25 09:21:24 +00:00
Liam Appelbe f3102ab0cf [vm] Fix late final field edge case
If a late final field initializer is recursive, it can write multiple
values to the field. Only the first should succeed, and the rest should
throw.

Bug: https://github.com/dart-lang/sdk/issues/38841
Change-Id: I87ffdc0b8fcd429c47f102fe76a0e6a577ae6c30
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125934
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2019-11-22 21:37:17 +00:00
Kallen Tu 029e06b8d9 [analyzer] Allow downwards inference and upper bound heuristic wrt variance.
variance_downwards_inference_test now passes.

The other part of this CL addresses https://github.com/dart-lang/language/issues/658
The code has similar logic to https://dart-review.googlesource.com/c/sdk/+/125552.

Change-Id: Ib2bc7e9c11574ccd9b16fe66472bba8c16dabd29
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125486
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
2019-11-22 01:31:03 +00:00
Liam Appelbe 09d22a0509 [vm] Wrap late local var initializers in a closure.
This fixes the case where a late local var initializer allocates
variables or temporaries. It's not clear where they should be
allocated, since the initializer could be called anywhere the late
variable is accessed. So we wrap the initializer in a closure, since
calling a closure only requires a single temporary.

So then we just need to allocate that temp everywhere the late var is
accessed. Since temporaries are associated with specific AST nodes,
we also need to add the ability to swap out the temporaries associated
with a node, so that we can use the getter's temp when the getter
visits the initializer.

This will also reduce code bloat for large initializers.

Bug: https://github.com/dart-lang/sdk/issues/38841
Change-Id: Ice8c16babc0e56368657088edf1b51b422ee0241
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125762
Commit-Queue: Liam Appelbe <liama@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
2019-11-21 20:39:36 +00:00
Johnni Winther acff31ed26 [cfe] Support null-aware index access
Change-Id: I54b58624722845e4b008b90e675516ec274bc2da
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125960
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2019-11-21 14:36:30 +00:00
Alexander Thomas afa82d8e98 [co19] Add missing backslash to update script
Change-Id: Ia713dc14222a901f1040d2a7254ead21b5049750
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125965
Reviewed-by: Jonas Termansen <sortie@google.com>
2019-11-21 13:19:19 +00:00
Alexander Thomas 51f14eb911 [co19] Fork the update script for the co19 NNBD tests
This will allow creation of the co19 NNBD CIPD package. We'll keep the
old variant of the script to create the co19 legacy packages until the
non-NNBD tests are no longer needed.

The new layout on CIPD will be:
dart/third_party/co19 (co19's master branch)
dart/third_party/co19/legacy (co19's pre-nnbd branch)

Change-Id: I21c61083630de43be10fcead221616a2bc6f9c20
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125962
Reviewed-by: Jonas Termansen <sortie@google.com>
2019-11-21 11:16:40 +00:00
Mayank Patke eb6d7f51e2 [dart2js] Add DartTypes for T*, T?, and Never.
Type relations to be implemented in a later CL.

Also discovered some visitors were missing support for FutureOr.
Fixes: https://github.com/dart-lang/sdk/issues/38821

Change-Id: Iee494cfa2eff3b320a3fd1a2e7ffbf3f969b40e4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125880
Commit-Queue: Mayank Patke <fishythefish@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2019-11-21 09:58:14 +00:00
Mayank Patke 539b0093e1 [dart2js] Remove unnecessary DartType predicates and replace with
is-tests.

Change-Id: I520d0893793e291d009e31ff32980194278bb0b5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125923
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2019-11-21 08:58:54 +00:00
Kallen Tu aa2b3a5eaa [cfe] Inference constraint solving takes contravariance into account.
Implements https://github.com/dart-lang/language/issues/658.

Change-Id: I28857c40bbc5db76f7312ed540052fed40dac4b4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125552
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2019-11-21 00:05:18 +00:00
Robert Nystrom a9c1f68135 Oops, meant to commit these changes with:
https://dart-review.googlesource.com/c/sdk/+/125727.

Change-Id: Id0bc8d8495a011aacd48ca18c845049d87fbfd39
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125768
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
2019-11-20 22:27:12 +00:00
Robert Nystrom 4ee62c3479 Migrate all of the negative language_2 tests to not be negative tests.
Also, remove the three negative tests under compiler/dart2js_extra.

Change-Id: I5d285d1e5ed2016de4e0236ee89fe0399fc008c8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125727
Reviewed-by: Leaf Petersen <leafp@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
2019-11-20 21:24:02 +00:00
Simon Lightfoot 867a6e0e52 [dart:core] Update DartTime.parse to support arbitrary precision fractional seconds.
Update DartTime.parse to support arbitrary precision fractional seconds. So it now conforms to ISO8901 and RFC3339 standards.

Closes #24205

Closes #39350
https://github.com/dart-lang/sdk/pull/39350

GitOrigin-RevId: 66f15b6e646a65b7955c7b617647b8edfd680481
Change-Id: Ife2211e6cce5922b59cdde0d30ed3ef887cffcf9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124903
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2019-11-20 18:16:19 +00:00
Robert Nystrom db64f9ecb2 Delete standalone_2/io/process_exit_negative_test.dart.
I am trying to migrate all of the negative tests to something more
precise. As far as I can tell, this test stopped being useful with Dart
2.0. Now that all compilation errors are reported eagerly, the file
simply doesn't run at all. It's now just another test of an unresolved
identifier.

(This is a good example of *why* I want to get rid of negative tests.
This test silently went from a desired runtime failure to a compile-time
failure.)

Change-Id: Iec3cdd32a15612c0760119e92d618e3a5ba1f5ec
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125555
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
2019-11-19 18:23:30 +00:00
Robert Nystrom 2c5705ad23 Migrate some negative tests to static error tests.
Note function_type_parameter_negative_test and
function_type_parameter2_negative_test were identical as far as I could
tell, so I merged them into one.

Change-Id: I00d53bf8ec9534b0c2832b0ea2cc4da442bfd683
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125556
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
2019-11-19 17:37:19 +00:00
Erik Ernst 26f5ea47e8 [co19] Rename status file to co19_2-co19.status
Change-Id: Ia5a397825417e2a849367efd92fc06ec682f3d1a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125661
Commit-Queue: Erik Ernst <eernst@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2019-11-19 16:17:10 +00:00
Erik Ernst eeca3fb1cb New "general" status file added
In order to manage the implementation of nonfunction-type-aliases,
this CL adds a new status file for co19_2 (because there was no such
file, corresponding to 'language_2.status' in 'language_2', etc.).
It skips every test that has the option 'nonfunction-type-aliases',
unless the compiler is fasta.

Change-Id: Ibfd536f6e47d6e28d6d2fb23a3676e4a5875e4df
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125640
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
2019-11-19 15:07:39 +00:00
Erik Ernst 626639f11f Added nonfunction-type-alias tests, skipped for non-fasta compiler
Change-Id: I89ed80c973c5f2c76d534fcbd0f16d8141869757
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125601
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
2019-11-19 13:46:44 +00:00
Robert Nystrom 582cec84f4 Set up new test suites for migrating the tests to NNBD.
- Copies corelib_2/a*    -> corelib/
- Copies language_2/ab*  -> language/
- Copies lib_2/math/     -> lib/math/
- Copies standalone_2/a* -> standalone/

And also copies over and renames all of the status files in those
directories.

Then it migrates those tests to be static error free in NNBD.

Finally, adds support to the test_runner for the new suites.

Note that this review is split into multiple patchsets. The first
patchset is a straight copy of the existing files. Then the later
patchsets have the interesting changes.

Change-Id: Icec2ff850a3aee30b653066ac184495d1e3814d0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125467
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2019-11-19 00:18:43 +00:00
Liam Appelbe bde92ca34a [vm] Late modifier for final local variables.
Bug: https://github.com/dart-lang/sdk/issues/38841
Change-Id: Ia99a3441b4175bb16097766d57133c6d83a0e3f7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125542
Commit-Queue: Liam Appelbe <liama@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2019-11-18 23:12:48 +00:00
Kallen Tu 62c67e40dc Added language test for reified torn-off methods with explicit variance.
Change-Id: I51892de84245bc31f442b5b01ab3d03ac869e86f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124913
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
2019-11-18 22:50:55 +00:00
Kallen Tu 7c517ed007 [analyzer] Report invalid variance positions in fields.
Change-Id: I51a0e64907569a722fd1df58e098bb92254d53c6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125481
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-11-18 22:42:15 +00:00
Aart Bik e12a7e0ca2 Fix for OSR assert (debug) or crash (release)
Rationale:
Rename traverses blocks in DOM order, not in execution order.
As a result, blocks that are directly entered from the entry
should introduce synthetic phis during OSR with non-empty stack
to make sure incoming stack values are merged properly.

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

Change-Id: Ic35961169aa535657333c2ab14fbd2c4e1f0783f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125489
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Aart Bik <ajcbik@google.com>
2019-11-18 22:33:05 +00:00
Aart Bik 29ff784ecb [dart/compiler] Loop analysis and BCE improvements
Rationale:
Loop analysis did not take outer indices used as bounds
(triangular loops) into account to enhance analysis. This
left some obvious BCE optimizations on the table (mainly AOT).

Observed improvements (performance and code size):

About 5-15% performance on golem benchmarks:
   mainly armv7, and TypedData*Bench

Minor overall code size reduction on flutter gallery (arm32,arm64)

Comparing ./orig32.json (old) to ./new32.json (new)
Old   : 6614912 bytes.
New   : 6600336 bytes.
Change: -14576 bytes.

Comparing ./orig64.json (old) to ./new64.json (new)
Old   : 6459216 bytes.
New   : 6458736 bytes.
Change: -480 bytes.

Similar on velocity_tracker_bench (arm32,arm64)

Comparing orig32.json (old) to new32.json (new)
Old   : 804280 bytes.
New   : 794552 bytes.
Change: -9728 bytes.

Comparing orig64.json (old) to new64.json (new)
Old   : 705520 bytes.
New   : 705312 bytes.
Change: -208 bytes.

Change-Id: Ifc3b3a378ae6fd98743c48944a86a9e90ce4da5c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117200
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Aart Bik <ajcbik@google.com>
2019-11-18 19:51:13 +00:00
Johnni Winther 4b5589e0cb Reland "[cfe] Use StaticTypeContext for getStaticType" and more"
This relands commits
 "[cfe] Use StaticTypeContext for getStaticType"
 45033c6ad9

 "[cfe] Move caching of thisType to CoreTypes"
 fab25cbe0c

 "[vm/bytecode] Notify static type context when entering/leaving library"
 c9f88ae253

Change-Id: I407d6b0e3b3df503cedc9fcb2c834d835cf083f8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125343
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2019-11-16 05:50:58 +00:00
Ryan Macnak d6b0a27665 [test] Explicitly mark streamed_conversion_json_utf8_decode_test as slow in reload test modes.
Change-Id: I60777b0fd3a20b340b12225a24529474eb75b2af
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125483
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2019-11-16 01:14:28 +00:00
Ben Konyi 1c12878d05 [ dart:io ] Added timeline events for HttpClient connections and requests
Setting the `enableTimelineLogging` property of `HttpClient` to true results in
timeline events being created for HTTP connections and HTTP requests.
Timeline events contain general connection information, including:
  - Request type
  - Status code
  - Request / response headers
  - Cookies
  - Non-sensitive proxy information
  - Relevent error messages for failed connections

Change-Id: Ibe16a312ab5398c9ae886ea07bea5ca70b63e440
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/123540
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2019-11-16 00:46:46 +00:00
Kallen Tu a2fe9d450e [analyzer] Report invalid variance positions in methods of a class.
Change-Id: I425f81e7e64a02b29e094dab53f37318a09a3c62
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125228
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-11-15 23:55:19 +00:00
Liam Appelbe 329d0913ca [vm] Late modifier for non-final local variables.
I also added a test for top level late variables (they already worked).

Bug: https://github.com/dart-lang/sdk/issues/38841
Change-Id: I6720e6476a067c7f8b21a34b87b23ab14fc866a8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125224
Commit-Queue: Liam Appelbe <liama@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
2019-11-15 23:03:16 +00:00
Kallen Tu 6ec813e07a [analyzer] Modified type inference constraints wrt variance.
Change-Id: I0502bad1c57af358453c78d27fe738880beb7b4e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125021
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
2019-11-15 22:02:36 +00:00