Commit Graph

28 Commits

Author SHA1 Message Date
asiva bc7220a4fd [VM] Turn dart2 on by default on the command line VM
- make Dart2 the default option for the command line VM
- add option --no-preview-dart-2 as a fallback option to run dart1
- change test scripts to use the executable dart for testing dart2 mode instead of
pkg/vm/tool/dart2
- adjust numerous build and test configurations

Change-Id: Id813fa5b71a89c7ec9335d3f6e83cfc9f35f86e7
Reviewed-on: https://dart-review.googlesource.com/58240
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
2018-06-18 22:31:32 +00:00
Peter von der Ahé 032925c4ff Remove obsolete features
Remove tree-shaker as we're not using it, and it creates problems
when the SDK changes.

Remove scopes from AstBuilder as we will be phasing out AstBuilder
in favor of using BodyBuilder and the Forest API.

Change-Id: I51950c5d8bfb0493587336325f9da8f5bf8ecea6
Reviewed-on: https://dart-review.googlesource.com/57261
Commit-Queue: Peter von der Ahé <ahe@google.com>
Reviewed-by: Dan Rubel <danrubel@google.com>
2018-05-31 07:24:54 +00:00
Samir Jindel 69f35c18bc Test code for CFE expression compilation.
Change-Id: I90f953592d66be04bfb26ffb5f604ba5e7f010a5
Reviewed-on: https://dart-review.googlesource.com/51322
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2018-04-30 15:33:11 +00:00
Samir Jindel f85480b4dd Add tests for CFE implementation of expression compilation.
Change-Id: Ib7af386876d831e84ca97c42bbe3084c96fcc114
Reviewed-on: https://dart-review.googlesource.com/49906
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
2018-04-16 19:29:38 +00:00
Jens Johansen 38fae026b4 Allow to output full component via computeDelta
This is the second attempt at this change.
The original try was committed as f9c7a4a22d.
The revert of that was committed as 2f68e82526.

This CL allows users of the incremental compiler to ask for a computeDelta
call to include the full Component in the output,
basically turning the incremental compiler into a batch compiler.

This CL furthermore changes the frontend_server (in pkg/vm) to use this
functionality.

This change - used in flutter - takes the time it takes to run
`flutter test` in `packages/flutter` from ~8 minutes 30 seconds to
~2 minutes 30 seconds (on my machine).

Fixes #32663.

Change-Id: I073e77b3596b33a24cabcfbcedf97bb0be7aa450
Reviewed-on: https://dart-review.googlesource.com/49125
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
2018-04-03 12:59:48 +00:00
Siva Annamalai 2f68e82526 Revert "Allow to output full component via computeDelta"
This reverts commit f9c7a4a22d.

Reason for revert: This CL breaks the restart functionality in Flutter, when we restart we end up with an empty app.dill file (60 bytes).

Original change's description:
> Allow to output full component via computeDelta
> 
> This CL allows users of the incremental compiler to ask for a computeDelta
> call to include the full Component in the output,
> basically turning the incremental compiler into a batch compiler.
> 
> This CL furthermore changes the frontend_server (in pkg/vm) to use this
> functionality.
> 
> This change - used in flutter - takes the time it takes to run
> `flutter test` in `packages/flutter` from ~8 minutes 30 seconds to
> ~2 minutes 30 seconds (on my machine).
> 
> Change-Id: Ia185d28da1f97b0be5dad8814cd01a8f13482724
> Reviewed-on: https://dart-review.googlesource.com/47020
> Commit-Queue: Jens Johansen <jensj@google.com>
> Reviewed-by: Peter von der Ahé <ahe@google.com>
> Reviewed-by: Vyacheslav Egorov <vegorov@google.com>

TBR=ahe@google.com,vegorov@google.com,jensj@google.com

Change-Id: I5ff39f9d78319413f4bbb7800e24bf27ab4ada9c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/48240
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2018-03-23 21:20:30 +00:00
Jens Johansen f9c7a4a22d Allow to output full component via computeDelta
This CL allows users of the incremental compiler to ask for a computeDelta
call to include the full Component in the output,
basically turning the incremental compiler into a batch compiler.

This CL furthermore changes the frontend_server (in pkg/vm) to use this
functionality.

This change - used in flutter - takes the time it takes to run
`flutter test` in `packages/flutter` from ~8 minutes 30 seconds to
~2 minutes 30 seconds (on my machine).

Change-Id: Ia185d28da1f97b0be5dad8814cd01a8f13482724
Reviewed-on: https://dart-review.googlesource.com/47020
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-03-23 12:07:56 +00:00
Jens Johansen 2e366e8c9a [fasta] Refactor incremental_load_from_dill_test
Split into 2:
- One with a "smoke-test" of dart2js.
- One with several small examples that has caused problems in the past.

The latter of the two is now based on package:testing and the test-cases
are saved as yaml files.

Change-Id: I8b588e9b42edc73f58a07292a1226e37cc458d89
Reviewed-on: https://dart-review.googlesource.com/45505
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
2018-03-22 08:57:36 +00:00
Peter von der Ahé b2d7397a0c Add testing chain to validate messages.yaml
Change-Id: I34bf0a4bbbd9dab1133a69c844033035b7edb8db
Reviewed-on: https://dart-review.googlesource.com/43969
Commit-Queue: Peter von der Ahé <ahe@google.com>
Reviewed-by: Dan Rubel <danrubel@google.com>
2018-02-28 11:02:23 +00:00
Dmitry Stefantsov b94da9dbe7 Run instantiate-to-bound tests in legacy mode
Change-Id: I6cc90caea40b210f6a988a3c019f3ebc900a7a42
Reviewed-on: https://dart-review.googlesource.com/42640
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
2018-02-22 12:37:53 +00:00
Aske Simon Christensen cff6f514ed Look up constructors and methods in the correct maps in case of name clash.
Also updated sdk suite status with recent changes.

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

Change-Id: I24c9699a125671a41dc38eeefd69232bbb11976d
Reviewed-on: https://dart-review.googlesource.com/34585
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
2018-02-05 15:37:56 +00:00
Peter von der Ahé 4d1adf42d3 Deprecate IncrementalClassHierarchy
See https://github.com/dart-lang/sdk/issues/31842

Change-Id: I019909831a91a4e06138dc3a6bf32f766bca1ae6
Reviewed-on: https://dart-review.googlesource.com/34880
Commit-Queue: Peter von der Ahé <ahe@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2018-01-17 13:30:17 +00:00
Dmitry Stefantsov d9f7f81961 Add tests of instantiate to bound in fasta
Change-Id: Ie4940c9fda24abcfd038409e993f208a6ba0a94a
Reviewed-on: https://dart-review.googlesource.com/31940
Reviewed-by: Erik Ernst <eernst@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
2018-01-08 08:35:22 +00:00
Peter von der Ahé 632bba54b9 Start building incremental test suite
Change-Id: I38e969e494c671982ec2cba96d2657a836dd0d49
Reviewed-on: https://dart-review.googlesource.com/24122
Commit-Queue: Peter von der Ahé <ahe@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2017-12-01 13:03:16 +00:00
Peter von der Ahé e9ed7b09d2 Import incremental tests from Dartino
This file is copied verbatim from https://github.com/dartino/sdk/blob/fa9ec675c51947f8b974a689214fe50abcfa5d6b/tests/dartino_compiler/incremental/tests_with_expectations.dart

My plan is to convert these tests to individual YAML files,
as I think YAML files are easier to manage than Dart constants.

Change-Id: Icaa923d99ed1308c2c3efba4ea74a298eba5ad51
Reviewed-on: https://dart-review.googlesource.com/24107
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2017-11-28 11:36:29 +00:00
Peter von der Ahé 6f687277f5 Write logs when running tests
Change-Id: Ib5b59d936d0f0dbc9a6640a8f155b4a7165822b8
Reviewed-on: https://dart-review.googlesource.com/16545
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Peter von der Ahé <ahe@google.com>
2017-10-30 13:52:05 +00:00
Paul Berry 6cdc718d20 Skip DDC when running front end analyzer checks.
Change-Id: Ic44572baf41abdf034870a9d8d20c0f7c862936d
Reviewed-on: https://dart-review.googlesource.com/14921
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2017-10-18 21:36:08 +00:00
Aske Simon Christensen 60be83aed4 Reland "Suite for Fasta crashes and verification errors in language tests"
Remove obsolete "language" suite.

Original review: https://dart-review.googlesource.com/13741

Change-Id: I713fa2684fe478f6e9123d33ee7b7d2a961b1c00
Reviewed-on: https://dart-review.googlesource.com/14460
Reviewed-by: Peter von der Ahé <ahe@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
2017-10-17 13:54:40 +00:00
Martin Kustermann 25dc42f5d8 Revert "Error on setter having not exactly one parameter"
This reverts commit 4bb83e9311
This reverts commit f1b07b2789.

Reason for revert on analyzer bots:

    Analyzing pkg/analyzer...
      error • Undefined name 'source' at pkg/analyzer/test/generated/compile_time_error_code_kernel_test.dart:625:9 • undefined_identifier
      error • Undefined name 'CompileTimeErrorCode' at pkg/analyzer/test/generated/compile_time_error_code_kernel_test.dart:625:18 • undefined_identifier
      error • Undefined name 'source' at pkg/analyzer/test/generated/compile_time_error_code_kernel_test.dart:626:13 • undefined_identifier
      error • Undefined name 'source' at pkg/analyzer/test/generated/compile_time_error_code_kernel_test.dart:635:9 • undefined_identifier
      error • Undefined name 'CompileTimeErrorCode' at pkg/analyzer/test/generated/compile_time_error_code_kernel_test.dart:635:18 • undefined_identifier
      error • Undefined name 'source' at pkg/analyzer/test/generated/compile_time_error_code_kernel_test.dart:636:13 • undefined_identifier
      error • Undefined name 'source' at pkg/analyzer/test/generated/compile_time_error_code_kernel_test.dart:645:9 • undefined_identifier
      error • Undefined name 'CompileTimeErrorCode' at pkg/analyzer/test/generated/compile_time_error_code_kernel_test.dart:645:18 • undefined_identifier
      error • Undefined name 'source' at pkg/analyzer/test/generated/compile_time_error_code_kernel_test.dart:646:13 • undefined_identifier
      error • Undefined name 'source' at pkg/analyzer/test/generated/compile_time_error_code_kernel_test.dart:655:9 • undefined_identifier
      error • Undefined name 'CompileTimeErrorCode' at pkg/analyzer/test/generated/compile_time_error_code_kernel_test.dart:655:18 • undefined_identifier
      error • Undefined name 'source' at pkg/analyzer/test/generated/compile_time_error_code_kernel_test.dart:656:13 • undefined_identifier
    12 errors found.

Change-Id: Ie2035bf40e50c48f85b514c7a3786141cd0f2453
Reviewed-on: https://dart-review.googlesource.com/14061
Reviewed-by: Martin Kustermann <kustermann@google.com>
2017-10-16 16:32:13 +00:00
Aske Simon Christensen 4bb83e9311 Suite for Fasta crashes and verification errors in language tests
Remove obsolete "language" suite.

Change-Id: I8daad8b7fd2d6e19124850626a5815aa9dcca347
Reviewed-on: https://dart-review.googlesource.com/13741
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
2017-10-16 16:01:55 +00:00
Peter von der Ahé b43fd6dd80 Update exclude patterns for testcases.
Change-Id: I738c1a42941dc4fb734394b4d7308a856b805088
Reviewed-on: https://dart-review.googlesource.com/10880
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2017-10-04 13:04:16 +00:00
Peter von der Ahé f88bd6af3d Add testing target for dart2js with kernel.
Change-Id: I60c22a7df03e67e14b9328502b80aa697ced4d4c
Reviewed-on: https://dart-review.googlesource.com/8500
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2017-09-28 16:25:38 +00:00
Konstantin Shcheglov 146590d18a Keep exported nodes during shaking.
R=ahe@google.com, paulberry@google.com, sigmund@google.com

Bug:
Change-Id: I9475c6582025efa84b0c04d4990ae3b9dc515c03
Reviewed-on: https://dart-review.googlesource.com/3744
Reviewed-by: Peter von der Ahé <ahe@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2017-09-07 15:30:24 +00:00
Peter von der Ahé bb90bb5b30 Ensure all tests are analyzed.
R=johnniwinther@google.com

Review-Url: https://codereview.chromium.org/3012643002 .
2017-08-31 17:10:01 +02:00
Konstantin Shcheglov 37b301e21a Restructure outline shaker tests.
1. Instead of using a single lib/lib.dart, use a couple of small shared
   libraries, and special libraries for each case we want to test.

2. Give tests meaningful structured names, with "source_*" tests
   testing that we take into account referenced *from* somewhere.
   And "target_*" tests for testing that we include referenced entities.
   And "transitive_*" tests for including complete transitive closure
   of referenced entities.

We don't yet include full transitive closure, this CL is just for
tests and results produced at the moment. Implementation and test
fixes will follow.

We also don't yet take exports into account.

R=ahe@google.com, paulberry@google.com, sigmund@google.com
BUG=

Review-Url: https://codereview.chromium.org/3011663002 .
2017-08-30 13:33:27 -07:00
Paul Berry c9b42f6a41 Remove the "kompile" mode of running the front end.
This mode was needed in the early days of the front end when we were
contemplating the idea of building the analyzer AST representation of
code first, and then converting it to kernel.  Now that we build
kernel directly, it is no longer needed.

Further CLs will follow to remove code that is no longer used after
this change.

R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2980013002 .
2017-07-13 10:52:55 -07:00
Paul Berry b87556e00d Start copying resolution/inference data from front end to analyzer ASTs.
This CL lays the groundwork for integrating the front end with
analyzer by creating a mechanism to copy resolution and type inference
information (produced by the front end's type inference engine) into
analyzer ASTs (produced by AstBuilder).

The general technique is to parse each function twice: once with
BodyBuilder as a listener and once with AstBuilder as a listener.  The
BodyBuilder generates a kernel representation of the function, but
this isn't used; instead, type inference and resolution information is
captured using ResolutionStorer (which is a TypeInferenceListener).
Later, this information is applied to the analyzer AST generated by
AstBuilder using ResolutionApplier (which is an analyzer AST visitor).

At the moment the intermediate data exchanged between ResolutionStorer
and ResolutionApplier is simply a list of types (one for each
subexpression, in a post-order traversal of the program syntax).  For
debugging and validation purposes, this is augmented with a list of
file offsets, so that if the ResolutionStorer and ResolutionApplier
get out of sync we can diagnose the problem easily.

In later CLs, more data will need to be exchanged between
ResolutionStorer and ResolutionApplier (e.g. a list of elements to
which identifiers are resolved).

This CL doesn't tackle the problem of translating between the kernel
and analyzer representation of types; for now we simply map each type
to `dynamic`.  This is sufficient for early development, since it is
still enough to let us verify that ResolutionStorer and
ResolutionApplier stay in sync.

R=ahe@google.com, scheglov@google.com

Review-Url: https://codereview.chromium.org/2981693002 .
2017-07-13 08:55:29 -07:00
Peter von der Ahé f1b7a97744 Move testing.json and status files to more natural locations.
R=johnniwinther@google.com

Review-Url: https://codereview.chromium.org/2957623002 .
2017-06-23 14:27:53 +02:00