Konstantin Shcheglov
c26bf54391
Add InheritanceManager2 APIs to access inherited interface/class maps.
...
I'm not particularly attached to the names of new methods.
So, if you have better ideas, please tell me.
R=brianwilkerson@google.com
Bug: https://github.com/dart-lang/sdk/issues/35833
Change-Id: Ibe906c7f779c7606ca3093fd27203fc7c77392b0
Reviewed-on: https://dart-review.googlesource.com/c/91847
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2019-02-05 22:15:05 +00:00
Brian Wilkerson
01e0df71a8
Stop unnecessarily extending Object
...
Change-Id: Ib557755916b09be4e1ad1b1c2e4bed052a280513
Reviewed-on: https://dart-review.googlesource.com/c/84640
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2018-11-16 16:43:24 +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
Konstantin Shcheglov
977f5c2c21
Switch KytheDartVisitor to InheritanceManager2.
...
Also deprecate lookupOverrides(), which is the last public method
that was left. So, now production code in Analyzer and Analysis Server
does not use InheritanceManager. It is used in lints and dartdoc
though. I'd like to make a slightly bigger change for lints than just
to replace creating of one with another.
R=brianwilkerson@google.com
Change-Id: I2f1ff42360706e13436e7be8683392027aefbb8c
Reviewed-on: https://dart-review.googlesource.com/c/79470
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2018-10-12 21:11:44 +00:00
Konstantin Shcheglov
fab5d0a50d
In InheritanceManager remove unused, and deprecate used (in lints) methods.
...
Also, remove it from ErrorVerifier.
R=brianwilkerson@google.com
Change-Id: I35f6f7fd2f8c6680ec470e7bf7da4780a3c69df3
Reviewed-on: https://dart-review.googlesource.com/c/79360
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2018-10-11 17:57:35 +00:00
Konstantin Shcheglov
7ca2f56112
Stop using and deprecate InheritanceManager.getMembersInheritedFromInterfaces().
...
R=brianwilkerson@google.com
Change-Id: Ia24248cc0d80960d2a4aa40e0da519804c68abbc
Reviewed-on: https://dart-review.googlesource.com/77483
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2018-10-01 22:40:07 +00:00
Konstantin Shcheglov
64f02226b3
Stop using InheritanceManager.getMembersInheritedFromClasses().
...
R=brianwilkerson@google.com
Change-Id: I2f719f6c3c5383ac76608b9fd5b7251f3af0d6bb
Reviewed-on: https://dart-review.googlesource.com/77463
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2018-10-01 19:02:14 +00:00
Konstantin Shcheglov
9083b116f8
InheritanceManager does not produce errors, don't ask it.
...
R=brianwilkerson@google.com
Change-Id: I0b26de6d60b02574b5a13803491833d4aaf43a1d
Reviewed-on: https://dart-review.googlesource.com/77269
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2018-10-01 15:34:55 +00:00
Konstantin Shcheglov
85fb1f3de1
Fix Analyzer tests on Windows bot.
...
R=brianwilkerson@google.com
Change-Id: Ia43513d068a7676e8760efb87631cccd124b3c69
Reviewed-on: https://dart-review.googlesource.com/77265
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2018-10-01 01:02:46 +00:00
Konstantin Shcheglov
1bceca91b0
Remove the 'name' constructor parameter from CompilationUnitElementImpl()
...
It costed us about 1.2% of total analysis time.
The whole information about a unit is available in its Source.
R=brianwilkerson@google.com
Change-Id: Iffa253d1eae1a466c10766f66c6c677e19be124a
Reviewed-on: https://dart-review.googlesource.com/77220
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2018-09-28 21:53:24 +00:00
Konstantin Shcheglov
0eee800e1b
Report INCONSISTENT_METHOD_INHERITANCE for mixins.
...
R=brianwilkerson@google.com
Change-Id: I4bfcbccd20049d80deaca346cabf580bdbcaf266
Reviewed-on: https://dart-review.googlesource.com/74320
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2018-09-10 23:47:44 +00:00
Brian Wilkerson
0bcf767d4d
Clean up more preview-dart-2 related code
...
Change-Id: Id1f81a635727f0f2fafb5dea4178f303c6ca4659
Reviewed-on: https://dart-review.googlesource.com/70143
Reviewed-by: Devon Carew <devoncarew@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2018-08-15 14:43:12 +00:00
Brian Wilkerson
8819d9fe98
Update analyzer tests for preview-dart-2, part 1
...
Change-Id: I3440607f7b3892193e1d9883709a1b9d4a7463d9
Reviewed-on: https://dart-review.googlesource.com/46562
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2018-03-15 16:45:04 +00:00
Paul Berry
05a6045674
Rename AstFactory -> AstTestFactory.
...
This paves the way for introducing a new AstFactory class that will be
part of the analyzer public API.
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/2524903002 .
2016-11-22 16:09:51 -08:00
Konstantin Shcheglov
1ac36f7c38
Rename setters synthetic/static to isSynthetic/isStatic.
...
Also rename ConstructorElementImpl.const2 to isConst.
These are breaking changes.
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/2489363002 .
2016-11-10 12:22:58 -08:00
Paul Berry
0a1fb8d248
Move scanner into pkg/front_end/lib/src/scanner.
...
Several support classes also had to move to front_end along with the
scanner. Some of these support classes arguably don't belong to the
scanner itself, since they have other uses (e.g. SyntacticEntity,
ErrorCode, ErrorSeverity, ErrorType, and StringUtilities). They will
be reorganized into a more appropriate location in future CLs, at the
time that they become needed by other components of the front end.
In order to avoid dragging in a lot of dependencies, the following
changes were made:
1. Scanner no longer reports errors through Source and
AnalysisErrorListener objects passed to the constructor. Instead, it
provides an abstract reportError() method which clients may override
to perform error reporting in any way they wish. Analyzer contains an
override of Scanner that mimics the old behavior in order to maintain
compatibility.
2. Static members of ErrorCode (`values` and `byUniqueName`) have been
moved to top level, and remain in analyzer. To maintain
compatibility, these static members remain in ErrorCode (as deprecated
members that simply wrap the implementations in analyzer). This means
we have a reverse dependency (front_end depends on analyzer), but this
dependency will go away as soon as we publish the next breaking change
release of analyzer.
R=brianwilkerson@google.com , scheglov@google.com
Review URL: https://codereview.chromium.org/2486873003 .
2016-11-08 13:47:17 -08:00
Konstantin Shcheglov
5455fd0118
Remove 'initializeTestEnvironment' from 'analyzer'.
...
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/2399913002 .
2016-10-06 10:18:54 -07:00
Konstantin Shcheglov
175dad4f15
Switch 'analyzer' to 'package:test' and test_reflective_loader ^0.1.0.
...
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/2391423003 .
2016-10-06 08:46:35 -07:00
Brian Wilkerson
ecc84b26a4
Break up another large file
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/2342733002 .
2016-09-15 07:49:27 -07:00
Konstantin Shcheglov
cc6beaf56d
Pull in test_reflective_loader 0.0.4 and switch analyzer to it.
...
There are following changes:
1. DEPS to pull in test_reflective_loader 0.0.4
2. Rename runReflectiveTests() to defineReflectiveTests().
3. Remove analyzer's pkg/analyzer/test/reflective_tests.dart
4. Replace reflective_tests.dart imports with package:test_reflective_loader/test_reflective_loader.dart imports.
5. Sort/format and organize imports in the files with imports changes.
6. Fix for a couple of bugs in analysis_server exposed by the new loader.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/2298913003 .
2016-08-31 13:46:39 -07:00
Brian Wilkerson
6ccbef94fc
Convert analysis server over to use ContextBuilder
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/2286923002 .
2016-08-29 08:11:53 -07:00
Brian Wilkerson
d7d2460130
Remove more references to FileBasedSource
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/2269683002 .
2016-08-22 13:33:00 -07:00
Brian Wilkerson
8c244f03ad
Report when members indirectly inherited through a mixin are not implemented (issue 26411)
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1951363003 .
2016-05-06 11:29:44 -07:00
Paul Berry
8f9defbb50
Move InheritanceManager to its own file.
...
No changes other than code motion.
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/1903663003 .
2016-04-20 08:58:00 -07:00
Brian Wilkerson
f3b177e481
Remove references to and uses of MemberMap
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1893313004 .
2016-04-20 07:40:02 -07:00
Brian Wilkerson
9aa64259dc
Revert "Remove MemberMap in favor of HashMap"
...
Review URL: https://codereview.chromium.org/1898193004 .
2016-04-19 12:20:48 -07:00
Brian Wilkerson
fb43f1276c
Remove MemberMap in favor of HashMap
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1904433003 .
2016-04-19 11:59:44 -07:00
Brian Wilkerson
deae702994
Format everything in analyzer
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1842563003 .
2016-03-28 18:16:43 -07:00
Bob Nystrom
8defa5f77c
Split resolver_test.dart into smaller files.
...
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/1782463002 .
2016-03-09 10:42:09 -08:00