Commit Graph

224 Commits

Author SHA1 Message Date
Konstantin Shcheglov 5ea30b4e3d Rename performace_logger.dart to performance_logger.dart
R=paulberry@google.com, sigmund@google.com

Bug:
Change-Id: Ib7b6d122dff3ddabde3db2270daa777a269e04ed
Reviewed-on: https://dart-review.googlesource.com/18512
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2017-11-03 20:24:00 +00:00
Konstantin Shcheglov ffadd1ed3d When running analyzer_cli with --preview-dart-2, load SDK from vm_outline.dill.
We need this to be able to access classes that are required by Fasta,
but come from VM patches.

R=brianwilkerson@google.com, paulberry@google.com

Bug:
Change-Id: I4d29e1dca42e016446516a2dab0fae138cb74548
Reviewed-on: https://dart-review.googlesource.com/16863
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2017-10-26 23:34:18 +00:00
Konstantin Shcheglov aab22a8f9b When analyzer_cli is given --preview-dart-2, use KernelDriver.
R=brianwilkerson@google.com, paulberry@google.com

Bug:
Change-Id: Ibde08b9732c3e750cf78bd0af48cfa3ef17fa4a4
Reviewed-on: https://dart-review.googlesource.com/14881
Reviewed-by: Paul Berry <paulberry@google.com>
2017-10-18 19:35:41 +00:00
Konstantin Shcheglov 0dbc39cb5f Revert "When analyzer_cli is given --preview-dart-2, use KernelDriver."
This reverts commit 7d28e6fc21.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> When analyzer_cli is given --preview-dart-2, use KernelDriver.
> 
> R=​brianwilkerson@google.com, paulberry@google.com
> 
> Bug:
> Change-Id: I91484f906a691fba80917f8fd8ec1c0628c0815f
> Reviewed-on: https://dart-review.googlesource.com/14505
> Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>

TBR=paulberry@google.com,scheglov@google.com,brianwilkerson@google.com

Change-Id: Ib440303cd82d6ebb14ef7d14efdb6b535cc0bf88
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/14580
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2017-10-17 19:06:11 +00:00
Konstantin Shcheglov 7d28e6fc21 When analyzer_cli is given --preview-dart-2, use KernelDriver.
R=brianwilkerson@google.com, paulberry@google.com

Bug:
Change-Id: I91484f906a691fba80917f8fd8ec1c0628c0815f
Reviewed-on: https://dart-review.googlesource.com/14505
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2017-10-17 18:10:04 +00:00
Brian Wilkerson fbd7619b2e Remove missed references to enableAssertInitializers
Change-Id: I2403d8bbc5db877bfdf28cc05f4e498d95b1b06d
Reviewed-on: https://dart-review.googlesource.com/11260
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2017-10-05 17:44:20 +00:00
Brian Wilkerson 082bbdb6a7 Remove flag and enable asserts in initializers by default
Change-Id: Ia81f5ec936981dc08ff4c740f3511c6b7c9e6eb6
Reviewed-on: https://dart-review.googlesource.com/10740
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2017-10-04 18:45:09 +00:00
Sigmund Cherem 436ed70100 Add preview-dart-2 flag to analyzer cli and plumb it through test.py.
This allows us to collect stats about language-style tests as follows:

 ./tools/test.py -m release -c dart2analyzer -r none --preview-dart-2 --report \
      language language_2 corelib corelib_2

As of this morning, the command above has 87% of the tests passing.

Change-Id: I0f84211d5f33659d5923601267367be90c578107
Reviewed-on: https://dart-review.googlesource.com/3381
Reviewed-by: William Hesse <whesse@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Dan Rubel <danrubel@google.com>
2017-09-07 20:13:40 +00:00
Konstantin Shcheglov 1b4239d2e4 Export ByteStore and its implementations from front_end.
R=ahe@google.com, paulberry@google.com, sigmund@google.com

Bug:
Change-Id: Ie2e3413a7f143e270cec2bd3ae4564ad7cc315b1
Reviewed-on: https://dart-review.googlesource.com/3840
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2017-09-07 19:23:21 +00:00
Konstantin Shcheglov 455984bbf9 Fix fuzzy arrow warnings in analyzer and analysis_server.
There is one warning which I'd like to fix in a separate CL.

The rest is because of package:test predicate().
I think Leaf fixed it in https://github.com/dart-lang/matcher/commit/3625f13698346576da0f5baf44e95abc9c56fb49


R=brianwilkerson@google.com

Bug:
Change-Id: I060f7ced55dbcc460185916251c47ebbd5c838d3
Reviewed-on: https://dart-review.googlesource.com/3404
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2017-09-06 00:26:18 +00:00
Konstantin Shcheglov 90a037aae3 Use runAsync() when perform request.
R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/3003823002 .
2017-08-25 08:10:49 -07:00
Konstantin Shcheglov 776b7eb9cd Cache PackageBundle instances in AnalyzerWorkerLoop and reuse for multiple requests.
There are many Bazel targets that have huge number of dependencies,
hundreds and thousands of them, and these dependencies are the same
as for other targets. So, we want to keep corresponding PackageBundle
instances, partially decoded, in memory and reuse.

R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review-Url: https://codereview.chromium.org/3006543002 .
2017-08-24 11:32:20 -07:00
Devon Carew 13346cab3d Put the analytics UI behind a flag.
BUG=
R=brianwilkerson@google.com

Review-Url: https://codereview.chromium.org/3003783002 .
2017-08-24 11:17:37 -07:00
Konstantin Shcheglov 9475c47db1 Use single logger for AnalyzerWorkerLoop and BuildMode instances.
I might need to pass this instance into worker level caches, which we
will add to improve workers performance.

R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2994853002 .
2017-08-11 08:15:07 -07:00
Konstantin Shcheglov 5b29ae48ad Don't record dependencies in SummaryDataStore.
It was added for DDC, but DDC does not use it anymore. At the same time,
URIs operations are expensive, and this code is showing in Observatory.

R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review-Url: https://codereview.chromium.org/2996783002 .
2017-08-09 17:45:13 -07:00
Konstantin Shcheglov 0567e8cbd8 Decorate build mode with using PerformanceLog.
So, that we can redirect it into a file and see performance during
large internal builds with using workers.

R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review-Url: https://codereview.chromium.org/2996773002 .
2017-08-09 13:50:49 -07:00
Konstantin Shcheglov 11b8c54e22 Switch build mode to Analysis Driver.
R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review-Url: https://codereview.chromium.org/2994763002 .
2017-08-08 11:11:37 -07:00
Konstantin Shcheglov ce4f0d40a3 Prepare all unlinked units before linking.
This change expects that build mode is always hermetic, i.e. the all
unlinked units that are used for linking are given us as inputs.

We need to separate computing unlinked units from linking, because
linking is synchronous, and access to unlinked units will becore
asynchronous when we switch to using Analysis Driver.

R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review-Url: https://codereview.chromium.org/2994753002 .
2017-08-08 09:37:07 -07:00
Konstantin Shcheglov 6515a80b21 Make AnalyzerWorkerLoop AsyncWorkerLoop.
BuildMode will be switched to AnalysisDriver, so will become async.

R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review-Url: https://codereview.chromium.org/2998603002 .
2017-08-08 08:11:06 -07:00
Paul Berry 89c910b9c1 Move byte_store.dart and file_byte_store.dart to their own subdirectory.
This allows us to use the subpackage relationships test to verify that
they don't import any other parts of front_end, which paves the way
for the possibility of moving them to their own package in the future.

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

Review-Url: https://codereview.chromium.org/2990323002 .
2017-08-07 11:04:48 -07:00
Leaf Petersen 1eb480d266 Add --no-declaration-casts option to analyzer.
Adds a flag to disable and enable declaration casts independently
from other casts.

Fixes #29546

BUG=
R=brianwilkerson@google.com, rnystrom@google.com

Review-Url: https://codereview.chromium.org/2976963002 .
2017-07-20 15:55:07 -07:00
Konstantin Shcheglov 0827191d87 Refactor creating AnalysisOptionsImpl and declared variables.
We need to separate declared variables from AnalysisContext because
we're going to replace AnalysisContext with AnalysisDriver.

R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review-Url: https://codereview.chromium.org/2976683002 .
2017-07-11 11:29:35 -07:00
Konstantin Shcheglov 711e37295a Remove the --build-summary-only-diet option.
R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review-Url: https://codereview.chromium.org/2968403002 .
2017-07-07 09:15:48 -07:00
Devon Carew a2e9519279 Make exception reporting best effort.
BUG=
R=brianwilkerson@google.com

Review-Url: https://codereview.chromium.org/2965263002 .
2017-07-06 13:36:28 -07:00
Devon Carew d4abd49df7 Add analytics to analyzer-cli and analysis server.
BUG=
R=brianwilkerson@google.com, scheglov@google.com, zra@google.com

Review-Url: https://codereview.chromium.org/2963323002 .
2017-07-05 23:29:46 -07:00
Brian Wilkerson 895f898b9b Make analyzer respect exclusions from the analysis options file
R=devoncarew@google.com

Review-Url: https://codereview.chromium.org/2967883002 .
2017-07-05 07:52:48 -07:00
Konstantin Shcheglov 3d831505a4 Cache AnalysisOptionsImpl objects for context directories.
This fixes the performance degradation which we had to introduce
in the previous CL.

R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2963583002 .
2017-06-27 12:18:41 -07:00
Konstantin Shcheglov bc34583661 Issue 29960. Both CommandLineOptions and AnalysisOptions must be equal to reuse the context.
Unfortunately this makes running shared tests about 30% slower, because we have to perform I/O while trying to find analysis_options.yaml files corresponding to the files to be analyzed.

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

Review-Url: https://codereview.chromium.org/2956093002 .
2017-06-27 09:33:00 -07:00
Brian Wilkerson e28064f405 Restore partial analysis of analysis options files
R=devoncarew@google.com

Review-Url: https://codereview.chromium.org/2946313003 .
2017-06-22 08:00:50 -07:00
Brian Wilkerson 62d0376231 Run the sorter to reduce code churn
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2933753002 .
2017-06-12 07:37:14 -07:00
Devon Carew 0b79e4d20d update the analyzer and analysis server perf tags
BUG=
R=brianwilkerson@google.com, scheglov@google.com

Review-Url: https://codereview.chromium.org/2917183003 .
2017-06-03 19:51:27 -07:00
Paul Berry 42ef3eb144 Analyzer CLI: fix machine format in build mode.
R=brianwilkerson@google.com

Review-Url: https://codereview.chromium.org/2885063002 .
2017-05-16 09:01:49 -07:00
Konstantin Shcheglov a4fd5d814f Extract PerformanceLogger from AnalysisDriver.
I also added the runAsync().

R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review-Url: https://codereview.chromium.org/2883633002 .
2017-05-12 14:27:50 -07:00
Devon Carew f1a5503fcc Add --fatal-infos; hide --fatal-hints.
BUG=
R=brianwilkerson@google.com, danrubel@google.com

Review-Url: https://codereview.chromium.org/2874043002 .
2017-05-10 11:45:11 -07:00
Konstantin Shcheglov bd1ee32543 Move [file_]byte_store.dart into pkg/front_end/test/src/incremental/.
We are going to reuse ByteStore in front_end, also for incremental
compilation.

R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review-Url: https://codereview.chromium.org/2869803004 .
2017-05-09 09:12:15 -07:00
Devon Carew 5d0056df88 Make the exit code for dartanalyzer more deterministic.
BUG=
R=brianwilkerson@google.com

Review-Url: https://codereview.chromium.org/2857203002 .
2017-05-03 11:38:35 -07:00
Brian Wilkerson 511a06ee00 Fix some issues with options handling
R=danrubel@google.com

Review-Url: https://codereview.chromium.org/2844663003 .
2017-04-27 10:22:37 -07:00
Devon Carew 66ac96c4a6 Use the dart:io Platform.resolvedExecutable API to locate the Dart SDK.
BUG=
R=brianwilkerson@google.com, danrubel@google.com, pquitslund@google.com

Review-Url: https://codereview.chromium.org/2844883005 .
2017-04-27 09:29:08 -07:00
Jacob MacDonald 466d951c25 Add support for unlinked summary inputs through --build-summary-unlinked-input
BUG=
R=paulberry@google.com

Review-Url: https://codereview.chromium.org/2836873005 .
2017-04-26 09:11:33 -07:00
Devon Carew 3bad1dfb4c Refactoring analyzer_cli for code hygiene.
BUG=
R=brianwilkerson@google.com

Review-Url: https://codereview.chromium.org/2840703002 .
2017-04-24 16:55:34 -07:00
Devon Carew eae2bf2747 Fix an issue with duplicate reported analysis errors.
BUG=
R=brianwilkerson@google.com, danrubel@google.com

Review-Url: https://codereview.chromium.org/2793813002 .
2017-04-23 21:05:10 -07:00
Devon Carew d392382d10 Fix several typos.
BUG=
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2829963006 .
2017-04-22 11:15:03 -07:00
Vijay Menon a3d2e49198 Revert "Revert "Report error if the same uri appears in multiple summaries.""
Relanding after fixing package_bundle_reader_test.dart.

Note, original CL (already reviewed here: https://codereview.chromium.org/2781483007/) is patch set 1.

Test fix is patch set #2.

R=brianwilkerson@google.com

Review-Url: https://codereview.chromium.org/2825503002 .
2017-04-17 10:11:21 -07:00
Vijay Menon dcdccf4750 Revert "Report error if the same uri appears in multiple summaries."
This reverts commit 2afa21bb2c.

Breaking the bots.

TBR=jmesserly@google.com
BUG=

Review-Url: https://codereview.chromium.org/2821933002 .
2017-04-17 08:07:36 -07:00
Vijay Menon 2afa21bb2c Report error if the same uri appears in multiple summaries.
Fixes #27025

R=brianwilkerson@google.com, jmesserly@google.com

Review-Url: https://codereview.chromium.org/2781483007 .
2017-04-17 07:32:59 -07:00
pq 1d4d0d769f CLI support for enableAssertInitializers.
R=brianwilkerson@google.com

Review-Url: https://codereview.chromium.org/2809793004 .
2017-04-12 10:38:30 -07:00
Konstantin Shcheglov 021d99e05d Issue 29288. Resynthesize Import/Export/PartElement for every directive.
We need all of them because there might be associated annotations,
which should be applied to corresponding AST nodes.

https://github.com/dart-lang/sdk/issues/29288
https://github.com/dart-lang/sdk/issues/29188

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

Review-Url: https://codereview.chromium.org/2809523002 .
2017-04-09 10:12:43 -07:00
Jacob MacDonald 3e623d7df1 Add --build-summary-only-unlinked flag, which makes the output summary be an unlinked summary instead of a linked one.
BUG=
R=paulberry@google.com

Review-Url: https://codereview.chromium.org/2796953002 .
2017-04-04 12:22:20 -07:00
Brian Wilkerson dd49e79f74 Add context information to driver and add hooks for plugin management
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2795743002 .
2017-04-03 10:13:45 -07:00
Devon Carew b51d1fd8e3 Use ansi color in the dartanalyzer cli output.
BUG=
R=brianwilkerson@google.com, danrubel@google.com

Review-Url: https://codereview.chromium.org/2775633002 .
2017-03-25 15:02:47 -07:00