Commit Graph

34 Commits

Author SHA1 Message Date
Konstantin Shcheglov 9f986d2501 Migrate package:analyzer to null safety.
Change-Id: Iffe4370431587e46a141ddc72a86ceec29c163b2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/176486
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2021-02-01 18:56:04 +00:00
Sam Rawlins 6bf946bbfc analyzer: Always declare return types.
Change-Id: I23d89bb572310a1a8deef8e173630d9bb59c9a50
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152708
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2020-06-26 23:54:28 +00:00
Sam Rawlins baa5717f78 Use ///-style doc comments in analyzer/lib/src/generated
Bug: https://github.com/dart-lang/sdk/issues/33892
Change-Id: I0cee47b71702a210c5ace9455ce9aaf914355d05
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152683
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2020-06-26 17:31:58 +00:00
Konstantin Shcheglov 8a0d30d4e2 Fix annotate-overrides in analyzer.
R=brianwilkerson@google.com

Change-Id: I7a587daf9715ded6450b28ecf3892ce4181aeb37
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/129421
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-12-23 00:02:37 +00:00
Konstantin Shcheglov 8b204d477d Remove StringUtilities.startsWithChar()
R=brianwilkerson@google.com

Change-Id: If05d2fcf0f60c3bd2b2319cf38cf463dcdc0e336
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128768
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-12-17 23:14:00 +00:00
Sam Rawlins 2d332ee1d3 Make private fields final where possible
Change-Id: I16ee52f1b23e8d708e40cb482c5150f1e04d2417
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128524
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-12-17 06:12:39 +00:00
Sam Rawlins 5dfa750393 Convert all function parameters and typedefs to generic syntax
Change-Id: I18f8644ecbe61555b2929ed09d446733d33ec2a3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128521
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-12-16 23:36:38 +00:00
Konstantin Shcheglov 54b7543c55 Fix unnecessary_const in analyzer.
The only non-mechanical change is update for tool/diagnostics/generate.dart
to handle MethodInvocation, because without resolution and without
explicit `new` and `const` we get MethodInvocation(s).

R=brianwilkerson@google.com

Change-Id: Ib89ce9c37066e9b27ad03aed96b349ef36f11d43
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127453
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-12-06 15:03:00 +00:00
Konstantin Shcheglov 364dd8936b Fix unnecessary_new in analyzer.
R=brianwilkerson@google.com

Change-Id: I70f80baa3da4b14c0a52c1f28da16a9ad26d7dda
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127424
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-12-06 01:11:30 +00:00
pq 8f90265176 de-lint collection size checks
Change-Id: Id8e7ce2ec59ad7cd2b0b9c961594a37d4fef621a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/108522
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2019-07-10 13:46:43 +00:00
Brian Wilkerson 469e1e2e64 Remove unnecessary library directives
Change-Id: I7a157080e4d7fd80d64489a13de4e996b5870930
Reviewed-on: https://dart-review.googlesource.com/c/79474
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-10-13 00:44:04 +00:00
Brian Wilkerson 6c448b6938 Move exception support to its own library
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2328043002 .
2016-09-10 11:04:19 -07:00
Konstantin Shcheglov e976e692be Replace and remove JavaException(s).
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2326813002 .
2016-09-08 15:56:33 -07:00
Brian Wilkerson f0d249e269 Clean up package imports and library names
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1513643009 .
2015-12-10 08:11:56 -08:00
Brian Wilkerson 29b3e53207 Remove duplicated stack trace from error notifications
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1480663002 .
2015-11-25 09:15:47 -08:00
Konstantin Shcheglov c095ba1f91 Extract 'computeLineStarts' utility.
R=brianwilkerson@google.com, pquitslund@google.com
BUG=

Review URL: https://codereview.chromium.org/1411253007 .
2015-10-27 14:03:44 -07:00
Brian Wilkerson 24b24a3569 Reformat code to reduce churn
R=scheglov@google.com

Review URL: https://codereview.chromium.org//1322513004 .
2015-09-09 08:19:41 -07:00
brianwilkerson@google.com 98b7382071 Reformat
R=paulberry@google.com

Review URL: https://codereview.chromium.org//975453004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44149 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-02 21:34:46 +00:00
scheglov@google.com 41ea78aeed Use better hash computer.
This gives us another 2% of performance.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//928613002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43779 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-13 20:54:28 +00:00
scheglov@google.com b8da9bc651 Format and sort analyzer and analysis_server packages.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//725143004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41792 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-17 22:23:53 +00:00
brianwilkerson@google.com 877291fb07 Remove ArrayUtils
R=scheglov@google.com

Review URL: https://codereview.chromium.org//660563005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41303 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-26 18:38:26 +00:00
scheglov@google.com f13b775902 Translate Engine utilities tests.
This adds 442 more tests.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//674223006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41301 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-25 18:12:37 +00:00
paulberry@google.com 238ea2c84e Fixes to CaughtException and AnalysisException
Two issues:

1. Some exceptions don't derive from Exception (for example
   NoSuchMethodError).  So to avoid problems in checked builds,
   CaughtException.exception needs to have type Object.

2. When an exception is caught by the unittest framework, it prints it
   using its toString() method.  So in order to see the stack trace of
   the CaughtException nested in an AnalysisException, we need
   AnalysisException's toString() to print both the exception and its
   cause (if any).

R=brianwilkerson@google.com, jwren@google.com, scheglov@google.com

Review URL: https://codereview.chromium.org//304293010

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37186 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-10 17:16:48 +00:00
brianwilkerson@google.com 04cc76da9f Add intern support to analyzer.
In tests, this reduces the memory requirements for engine by about 15%. I have only enabled it for the command-line analyzer, though, because other uses will need to guard against memory leaks.

R=scheglov@google.com

Review URL: https://codereview.chromium.org//325473002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37112 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-07 15:57:01 +00:00
scheglov@google.com 555bc4ef2d New analyzer snapshot.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//294903015

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36511 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-22 16:58:29 +00:00
scheglov@google.com af851cdcdc New analyzer snapshot (with CaughtException).
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//285423002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36256 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-16 01:43:54 +00:00
scheglov@google.com 862a54b592 New analyzer snapshot.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//267293006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35872 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-07 22:06:01 +00:00
scheglov@google.com e5652e0e90 New analyzer snapshot with MapIterator.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//229653004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34891 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-09 20:18:01 +00:00
scheglov@google.com 12558a8511 New analzyer snapshot.
Replace isInstanceOf() with a predicate.

Tweaks for other packages.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//186153005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33304 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-04 21:50:40 +00:00
scheglov@google.com 7f73657ad6 New analyzer snapshot.
No 'isInstanceOf' changes yet.
Just current state with changes required to adopt to the API changes in Java.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//184893003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33176 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-28 22:52:15 +00:00
scheglov@google.com 37b6debef7 New analyzer snapshot.
There are some problems with JDT and line comments.
Interesting, that it works almost everywhere, and also worked coupld weeks ago.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//137143010

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32052 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-28 04:24:41 +00:00
scheglov@google.com 217d980fcd Analyzer snapshot.
Rewrite TimeCounter to use Stopwatch.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//128443003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31623 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-08 20:27:55 +00:00
scheglov@google.com 59b87d2dc3 Implement hashCode for classes with equals().
These problems were reported by dart2js.

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

Review URL: https://codereview.chromium.org//93433007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31068 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-11 16:32:56 +00:00
scheglov@google.com 7ac0b7d0bd Rename analyzer_experimental to analyzer.
R=jmesserly@google.com, pquitslund@google.com, danrubel@google.com
BUG=

Review URL: https://codereview.chromium.org//45573002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29302 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-25 23:59:38 +00:00