sigmund@google.com
f2ccdbd73d
Minor changes in analyzer to make it easier to extend
...
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org//924943010
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43934 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-20 22:23:27 +00:00
scheglov@google.com
4da5931086
Fix for filtering unknown options.
...
R=brianwilkerson@google.com , jwren@google.com
BUG=
Review URL: https://codereview.chromium.org//944073003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43933 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-20 22:12:03 +00:00
scheglov@google.com
946d56198e
Fix for searching constructor references.
...
Currently we record constructor declarations and SearchEngine returns them as "references".
But it is not quite a reference, and it is used only as a way to get name range.
With this change to ConstructorElement we don't need to have these artificial references.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//946023003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43932 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-20 22:10:30 +00:00
jwren@google.com
bbc11c6640
Add ignore-unrecognized-flags as an option to the command line options of analysis server
...
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org//940093003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43920 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-20 17:19:53 +00:00
paulberry@google.com
c845e7cd9a
Change equality comparison for FileBasedSource to use URI.
...
Previously, we considered two FileBasedSources to be equal if they
referred to the same file. As a result, if a given file was
accessible via multiple URI's, only one cache entry would be created
for the file and we would only resolve it once; the elements created
by resolution would be nondeterministic, they would refer to the file
via whatever source happened to be used to analyze it first. Worse
yet, incremental analysis might cause some of the elements in the file
to later be replaced by elements that would refer to the file via a
different source, resulting in confusing errors.
BUG=dartbug.com/22030
R=scheglov@google.com
Review URL: https://codereview.chromium.org//944493002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43888 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-19 19:15:50 +00:00
scheglov@google.com
4e7ecb1103
Issue 22409. Restore recognizing string concatenation in const expressions.
...
R=brianwilkerson@google.com
BUG= https://code.google.com/p/dart/issues/detail?id=22409
https://code.google.com/p/dart/issues/detail?id=21000
Review URL: https://codereview.chromium.org//940853002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43879 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-19 15:35:54 +00:00
scheglov@google.com
eb3c24c089
Mask ResolvableLibrary hashCode.
...
We create these objects often, so in theory we may overflowing the smi limit.
I wonder if extracting a mixin would be as effective and help to share code.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//936823002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43852 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-18 19:43:36 +00:00
scheglov@google.com
4e34c0d247
Generate artificial hashCode for often used classes.
...
By avoiding calling Object.hashCode we analyze about 1% faster.
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org//934113002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43832 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-18 01:12:43 +00:00
brianwilkerson@google.com
0e73ada9c2
Use package: URIs for files in lib
...
R=paulberry@google.com
Review URL: https://codereview.chromium.org//914373004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43827 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-17 22:47:34 +00:00
paulberry@google.com
5090dd0228
In analyzer, track time spent computing library cycles.
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org//935673002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43826 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-17 22:38:23 +00:00
brianwilkerson@google.com
298747c23e
Add properties to the element tree
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org//934603003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43801 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-16 21:41:50 +00:00
scheglov@google.com
d305f5225d
Constant top-level variables should not have setters.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//930703002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43793 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-16 05:36:13 +00:00
brianwilkerson@google.com
c602cec2e4
Remove unnecessary state transitions
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org//927903002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43789 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-14 18:07:27 +00:00
zra@google.com
74245deeac
Adds a repeatable --url_mapping flag to dartanalyzer
...
If a Dart file does an import that is 'strange', this flag
allows the imported URI to be understood by the analyzer
so long as an explicit mapping of the URI to an absolute
path to a .dart file is supplied with this flag.
For example, a custom embedding of the Dart VM may refer
to non-SDK libraries through its own URI scheme, e.g.
import 'strange:things';
With the flag and Uri resolver added in this CL, the
analyzer can find the Dart source for 'strange:things':
dartanalyzer ... --url_mapping 'strange:things,/path/to/strange/things.dart'
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org//897593005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43788 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-14 07:19:15 +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
c7c2b4584b
Replace using runtimeType with 'is'.
...
This speeds up initial analysis of analyzer + analysis_server on about 4%.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//922383002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43773 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-13 19:16:49 +00:00
paulberry@google.com
4a5680aec8
Visit async and core library dependencies when computing library cycles.
...
Previously, we would create the Library objects for the core and async
libraries before calling _computeLibraryDependencies(). As a result,
_computeLibraryDependencies() would skip those libraries when
computing dependencies. Normally this was not a problem, because the
dependencies surrounding the core and async libraries are so richly
intertwined that all of the necessary files got included in the cycle
anyhow. However if the starting point of analysis was the
"dart:async" library, some files would be missed entirely, leading to
bogus warnings.
The solution is to let _computeLibraryDependencies() create all the
Library objects, even for the core and async libraries; this way it
won't skip any dependencies.
BUG=dartbug.com/22415
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org//921213002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43772 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-13 18:52:39 +00:00
paulberry@google.com
056909e4a7
Rework analysis server performance measurement code.
...
This change has the following advantages:
- We now keep track of the amount of time spent doing unknown
activities using its own timer.
- Several pieces of analysis server functionality are now tracked
(previously we only tracked time spent inside the "analyzer"
package).
- The set of all performance timers is tracked in PerformanceTag.all
so that new timers can be added without having to update the code
that prints out timing measurements.
- Performance measurement code has been integrated with Observatory
"user tags", so that the same categories measured by the analysis
server also show up in the VM profiler view.
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org//918383002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43745 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-12 23:54:49 +00:00
scheglov@google.com
86cfaee2ed
Issue 20050. Show corrections for errors.
...
R=brianwilkerson@google.com , danrubel@google.com
BUG= https://code.google.com/p/dart/issues/detail?id=20050
Review URL: https://codereview.chromium.org//923623002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43736 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-12 19:17:13 +00:00
brianwilkerson@google.com
01d3621fa3
Stop re-analyzing everything when adding a file
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org//909493004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43734 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-12 19:03:00 +00:00
brianwilkerson@google.com
d7a69a2912
Flush entries for unreferenced sources
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org//924563002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43730 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-12 17:50:40 +00:00
brianwilkerson@google.com
0efb52aa0f
More complete state transition data
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org//916973002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43700 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-11 22:04:51 +00:00
scheglov@google.com
303d94e89d
Add SourceEntry.CONTENT_ERRORS data descriptor.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//914283002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43698 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-11 21:04:18 +00:00
scheglov@google.com
84655a3ad3
Report an error on Dart Source reading exception.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//909373003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43694 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-11 18:22:27 +00:00
paulberry@google.com
be3c32b38b
Fix typo in error message.
...
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org//917783002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43685 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-11 15:17:44 +00:00
brianwilkerson@google.com
921e9592ad
Count task frequency in new task model
...
R=paulberry@google.com
Review URL: https://codereview.chromium.org//914783002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43682 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-11 14:26:26 +00:00
brianwilkerson@google.com
52af26ea3d
Minimal initial performance reporting
...
R=paulberry@google.com
Review URL: https://codereview.chromium.org//913853002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43672 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-10 23:09:40 +00:00
scheglov@google.com
9aaa9a6a99
Use ExitDetector.exists(node).
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//912023002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43668 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-10 20:46:47 +00:00
paulberry@google.com
acaed71dba
Clean up analyzer and analysis server hints.
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org//908283002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43667 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-10 20:40:26 +00:00
scheglov@google.com
ff4e2bfce1
Issue 22188. Verify that none or all execution flows return.
...
R=brianwilkerson@google.com , paulberry@google.com
BUG= https://code.google.com/p/dart/issues/detail?id=22188
Review URL: https://codereview.chromium.org//871013012
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43663 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-10 19:14:01 +00:00
johnniwinther@google.com
827e265786
Revert "Add sharedfrontend package"
...
This reverts commit r43635.
BUG=
Review URL: https://codereview.chromium.org//914613002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43637 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-10 11:32:18 +00:00
johnniwinther@google.com
d7118339b5
Add sharedfrontend package
...
- initial element model includes Element, LibraryElement and ClassElement
- AccessSemantics moved to sharedfrontend to be utilized from both analyzer2dart and dart2js.
BUG=
R=brianwilkerson@google.com , paulberry@google.com
Review URL: https://codereview.chromium.org//898113002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43635 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-10 10:44:56 +00:00
paulberry@google.com
6a869d5e34
Fix inference of the static type of an async function literal.
...
This implements the spec change currently under review here:
https://codereview.chromium.org/902703003
R=scheglov@google.com
Review URL: https://codereview.chromium.org//905293003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43613 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-09 21:21:36 +00:00
scheglov@google.com
d7a2309a92
Fix for incremental resolution in case of inserting a new token into elegant comments.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//913573002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43607 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-09 19:12:04 +00:00
brianwilkerson@google.com
ebad629834
Handle exception getting modification stamp
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org//913513003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43603 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-09 17:19:00 +00:00
pquitslund@google.com
5ca6eca321
Version bump pre dev pub push.
...
R=brianwilkerson@google.com , scheglov@google.com
Review URL: https://codereview.chromium.org//909743002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43583 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-09 05:13:55 +00:00
pquitslund@google.com
e3a0244b58
Tweak to error formatter to fix LINT display name.
...
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org//902383002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43582 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-08 21:01:35 +00:00
brianwilkerson@google.com
c2d3ff3b95
Handle exception and clean-up code
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org//907483004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43563 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-06 19:19:55 +00:00
brianwilkerson@google.com
d682527d1e
Fix a stack overflow
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org//908603002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43559 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-06 18:00:16 +00:00
brianwilkerson@google.com
4468038300
Rework requests in execution domain
...
R=paulberry@google.com , scheglov@google.com
Review URL: https://codereview.chromium.org//904733003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43556 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-06 15:49:44 +00:00
paulberry@google.com
cb0f691bb6
Fix analyzer type checking of "await" expressions.
...
This requires implementing the "flatten()" rule defined in the spec;
this rule also needs to be applied to static type checking of return
types in async functions.
BUG=dartbug.com/22291, dartbug.com/22293
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org//904743003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43537 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-06 03:32:57 +00:00
pquitslund@google.com
ac08a9a570
Async/await/yield[*] support for dart_fmt
...
R=brianwilkerson@google.com , paulberry@google.com , scheglov@google.com
Review URL: https://codereview.chromium.org//882233004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43529 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-05 22:37:23 +00:00
scheglov@google.com
3713a9eed7
Invalidate hints instead of computing them in the incremental resolver.
...
So, we don't need to prepare all the library parts before incremental resolution.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//901713004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43526 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-05 22:06:48 +00:00
scheglov@google.com
ae2e608ff9
Send notificatinos after no-op changes.
...
This should solve the problem when client remove some part of the code,
so removes also error markers for it, and then quickly restores it,
so for the server it looks as an empty/no-op change. But information is
lost, and the server should resend it to the client.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//899753004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43521 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-05 20:42:17 +00:00
pquitslund@google.com
f6da9b87c4
Enum handling for dart_fmt.
...
R=brianwilkerson@google.com , scheglov@google.com
Review URL: https://codereview.chromium.org//901743002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43494 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-05 03:38:15 +00:00
brianwilkerson@google.com
c7cb9dd4e8
Fix for issue 22110
...
R=jwren@google.com
Review URL: https://codereview.chromium.org//885283007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43453 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-04 01:16:57 +00:00
paulberry@google.com
d0b87e247c
Implement new "yield*" type checking rules in analyzer.
...
This updates analyzer to reflect the new static type checking rules
for yield each added in r43420.
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org//888943004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43446 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-03 23:13:09 +00:00
jwren@google.com
032115ecf3
NPE fix in ExitDetector visitor- in analyzer pkg
...
R=paulberry@google.com
Review URL: https://codereview.chromium.org//894453003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43440 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-03 22:15:18 +00:00
paulberry@google.com
3c315ba0bb
Implement new return type checking rules in analyzer.
...
This updates the analyzer to reflect the new static type checking
rules for return types added in r43420.
R=scheglov@google.com
Review URL: https://codereview.chromium.org//897673003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43427 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-03 21:25:12 +00:00
paulberry@google.com
2cd86b7e29
Add static type checking of "yield*" statements to analyzer.
...
This does not include the new static typing rules that were introduced
in revision 43420. I will address those in a later CL.
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org//895673005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43424 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-03 20:32:14 +00:00