Commit Graph

3034 Commits

Author SHA1 Message Date
Brian Wilkerson 6359735d93 Disable flaky test under Windows (and fix formatting from an earlier CL)
R=paulberry@google.com

Review URL: https://codereview.chromium.org//1287513002 .
2015-08-10 13:32:07 -07:00
Brian Wilkerson 67f82df1b6 Provide more data on failure
R=paulberry@google.com

Review URL: https://codereview.chromium.org//1283783004 .
2015-08-10 12:40:44 -07:00
Brian Wilkerson f05106f7d1 Fix ToStringVisitor to handle external functions (issue 23968)
R=scheglov@google.com

Review URL: https://codereview.chromium.org//1269393002 .
2015-08-05 08:27:52 -07:00
Brian Wilkerson 908708d655 More fixes for failures on the Windows bot
R=paulberry@google.com

Review URL: https://codereview.chromium.org//1266923004 .
2015-08-05 08:13:28 -07:00
Brian Wilkerson 58199fbad9 Propagate a type in asynchonous for-in statements (issue 23945)
R=scheglov@google.com

Review URL: https://codereview.chromium.org//1268733004 .
2015-08-03 17:23:35 -07:00
Konstantin Shcheglov b125399a95 Update LineInfo during incremental resolution.
R=brianwilkerson@google.com
BUG= https://github.com/dart-atom/dartlang/issues/116

Review URL: https://codereview.chromium.org//1262453007 .
2015-07-31 10:37:33 -07:00
Konstantin Shcheglov 8eb0de07f3 Issue 23919. Fix for line starts in multiline comments.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/23919

Review URL: https://codereview.chromium.org//1271553002 .
2015-07-31 08:33:38 -07:00
Paul Berry fcfea00af8 Implement DEP 34 (less restricted mixins) in analysis engine.
The feature is disabled by default; enable it by setting the option
"enableSuperMixins".  (This name was chosen to match the
"--supermixin" flag accepted by the VM).

The feature is not yet exposed through analysis server or the
analyzer_cli.

R=scheglov@google.com

Review URL: https://codereview.chromium.org//1262163002 .
2015-07-29 08:50:49 -07:00
Brian Wilkerson 2ec502a583 Code clean-up, mostly constructors
R=scheglov@google.com

Review URL: https://codereview.chromium.org//1265453005 .
2015-07-28 11:12:51 -07:00
Paul Berry 0e98c58190 Fix analyzer interpretation of 'ClassName?.staticMember'.
Previously, trying to access a static member of a class using '?.' was
not allowed.  But the spec was changed in
b11670f899 so that
'ClassName?.staticMember' is now equivalent to
'ClassName.staticMember'.

This CL updates analyzer to follow the spec, and updates the tests in
"tests/language" accordingly.  VM and dart2js still need fixing
(see #23794 and #23795).

Fixes #23464.

R=scheglov@google.com

Review URL: https://codereview.chromium.org//1255293005 .
2015-07-28 09:49:35 -07:00
pq f013d3868c Actual URI support for package URI resolution.
R=brianwilkerson@google.com, paulberry@google.com

Review URL: https://codereview.chromium.org//1245263002 .
2015-07-21 15:53:56 -07:00
Brian Wilkerson f241b383a9 Implement a strong-mode option in analyzer
R=jmesserly@google.com

Review URL: https://codereview.chromium.org//1241243003 .
2015-07-20 12:30:05 -07:00
Brian Wilkerson d37ac8d4d0 Fixed bug in implicit analysis notification and renamed tests
R=scheglov@google.com

Review URL: https://codereview.chromium.org//1236013003 .
2015-07-17 12:43:59 -07:00
Brian Wilkerson 503e2b68f1 Add hook for listening to implicitly analyzed files
R=paulberry@google.com

Review URL: https://codereview.chromium.org//1239863002 .
2015-07-16 08:10:38 -07:00
Paul Berry 4b83219847 Switch on null-aware operators by default in analyzer.
Patches to update analyzer_cli and analysis_server will follow once a
new version of analyzer has been published.

BUG=dartbug.com/23793
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//1239513005 .
2015-07-13 15:56:21 -07:00
Brian Wilkerson 4d2bb64183 Generic method support in element model
R=leafp@google.com, scheglov@google.com

Review URL: https://codereview.chromium.org//1217373005 .
2015-07-10 13:53:35 -07:00
pq 81f8d4fa54 Fix for URI resolution w/ file scheme set in package map.
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//1224693014 .
2015-07-08 09:18:04 -07:00
Brian Wilkerson 27f600058e Improve propagation in binary expressions
R=scheglov@google.com

Review URL: https://codereview.chromium.org//1226823003 .
2015-07-08 08:02:05 -07:00
Konstantin Shcheglov aa4efb8c6e One more fix for making removing overlays incremental changes.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//1214853028 .
2015-07-07 14:51:44 -07:00
pq 01af0560bb Package map source factory support [FIXED].
A rework of https://codereview.chromium.org/1206323005/ with better handling of the case where a .packages config file is not specified.

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//1223833008 .
2015-07-07 09:10:54 -07:00
pq bb196a27fc Revert "Package map source factory support."
This reverts commit e3a4ff55d7.

BUG=

Review URL: https://codereview.chromium.org//1228493003.
2015-07-06 11:45:32 -07:00
pq e3a4ff55d7 Package map source factory support.
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//1206323005.
2015-07-06 11:13:17 -07:00
Konstantin Shcheglov 2a2259aec7 Try to use incremental resolution after removing overlays.
Mostly for IDEA, because Editor updates overlays before removing them.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//1218573003.
2015-07-06 09:19:26 -07:00
Brian Wilkerson 773c0cfc14 Exclude members from Object when adding members from mixins (issue 23606)
R=scheglov@google.com

Review URL: https://codereview.chromium.org//1216393002.
2015-07-01 09:41:41 -07:00
Paul Berry cf790b0829 Clean up constructors for ScopedVisitor and derived classes.
Previously, the classes ScopedVisitor, ResolverVisitor,
TypeResolverVisitor, and VariableResolverVisitor each had 4
independently maintained constructors, used respectively by
LibraryResolver (and DDC), the task model, the incremental resolver,
and LibraryResolver2.  This was difficult to maintain, and it was
about to get worse with the introduction of diet resolution.

This CL merges the constructors into one, using named optional
parameters where possible to reduce the burden on callers.

A few of the old constructors are kept on a temporary basis because
they are used by DDC, but they are deprecated; these can be removed
once DDC resolution is fully integrated with analyzer.

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//1207383005.
2015-06-30 15:37:17 -07:00
Konstantin Shcheglov 5bcd357802 Invalidate both hints and lints on incremental resolution.
We don't have new LINTS result descriptor yet, once we have, we need
to update the new AnalysisContext implementation.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//1222433003.
2015-06-30 15:31:36 -07:00
Paul Berry 7671bce82a Compute mixin application constructors in the ClassElement.constructors getter.
Previously we computed them during resolution, but this created a
problem: since the set of constructors for a mixin application depends
on the constructors in the superclass, and the superclass might itself
be a mixin application, it might theoretically be necessary to analyze
all files in the transitive import/export closure before it is
possible to compute the set of constructors for a class.  As a result,
in order to produce completion results after a non-incremental change
to file X, we have to re-analyze the entire transitive closure of
files importing or exporting X.  This takes prohibitively long.

This change moves the computation into the ClassElement.constructors
getter.  The computation is not cached, so now a change to file X only
requires rebuilding the element models for files directly importing X
(or directly importing files that contain X in their transitive export
closure).

Since the result of the computation is not cached, this will produce
an increase in analysis time, however since mixin applications are
used so rarely, the performance impact should be negligible.

Fixes #23732.

R=scheglov@google.com

Review URL: https://codereview.chromium.org//1215053003.
2015-06-30 07:35:26 -07:00
Brian Wilkerson e575dfe1d8 Remove dead code for an unused (old) task
R=scheglov@google.com

Review URL: https://codereview.chromium.org//1215433008.
2015-06-29 13:23:38 -07:00
Brian Wilkerson 508e6ca49b Fix incremental resolver test
R=scheglov@google.com

Review URL: https://codereview.chromium.org//1214853004.
2015-06-29 12:33:20 -07:00
Brian Wilkerson 0513859704 Re-implement the status page for the new task model
R=scheglov@google.com

Review URL: https://codereview.chromium.org//1211243003.
2015-06-29 12:20:19 -07:00
Konstantin Shcheglov 8dc7502884 Try incremental analysis before limiting invalidation.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//1220633003.
2015-06-29 10:00:52 -07:00
Brian Wilkerson 09fd112781 Add parsing support for generic methods
R=scheglov@google.com

Review URL: https://codereview.chromium.org//1216873002.
2015-06-29 08:39:15 -07:00
Brian Wilkerson 3b48abedfd AST changes necessary for generic method support
R=leafp@google.com, scheglov@google.com

Review URL: https://codereview.chromium.org//1212683002.
2015-06-26 12:07:39 -07:00
Brian Wilkerson c9069537d8 Get more tests passing using the new task model
R=scheglov@google.com

Review URL: https://codereview.chromium.org//1211993003.
2015-06-26 07:43:27 -07:00
John Messerly 646eeb7af1 fix NodeReplacer for AwaitExpression
similar fix to https://github.com/dart-lang/sdk/commit/fa5b8ce45607827d12532c9f78bb30c3273094a5

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//1216463002.
2015-06-25 15:00:17 -07:00
John Messerly fa5b8ce456 fix NodeReplacer for YieldStatement
it was missing a return, so it always fell through to the visitNode error case

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//1213503002.
2015-06-25 10:59:20 -07:00
pq 09842b1508 Test cleanup.
R=scheglov@google.com

Review URL: https://codereview.chromium.org//1212533002.
2015-06-25 10:06:42 -07:00
pq 2cd5cc0c50 SourceFactoryTest extraction.
R=scheglov@google.com

Review URL: https://codereview.chromium.org//1209773002.
2015-06-24 14:37:05 -07:00
Paul Berry 160645fba6 Add an analyzer method to flush resolved ASTs (for testing).
This should allow us to avoid referring to some private implementation
details of analyzer from analysis server.

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//1210603002.
2015-06-24 13:16:58 -07:00
Brian Wilkerson a087d36d78 Deprecate old HTML support
R=scheglov@google.com

Review URL: https://codereview.chromium.org//1200913002.
2015-06-22 09:32:18 -07:00
Konstantin Shcheglov e9c3b2d7b1 Move cache consistency validation into Analysis Server.
This speeds up the add/analyze/remove/analyze cycle from 1600 ms to
1300 ms, i.e. on about 20%.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//1195183002.
2015-06-22 08:19:44 -07:00
Paul Berry 9c90a66d0d Update analyzer to reflect new rules for prefixes.
As of commit 67b99e4b33, it is now
consistently a compile error for a prefix not to be followed by '.'.
(Previously, there were two exceptions in which a prefix not followed
by '.' was treated as though it was preceded by "this.")

This CL updates analyzer to be consistent with the new spec langauge,
and modifies the tests in tests/language accordingly.

Dart2js and the VM do not yet produce the correct compile-time error
in all circumstances.  See issues #23611 and #23612.

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//1186033004.
2015-06-18 10:03:07 -07:00
Paul Berry 13c3c10f22 Refactor least upper bound computation; support bottom correctly.
Previously, the least upper bound code was only half-written--it
computed correct results if both types were interface types, and
otherwise returned null.  Now we always return a non-null type.

Unfortunately, the full least upper bound algorithm in the spec
requires referencing types not reachable from the types being
compared; thus in order to execute it we need access to the
TypeProvider.  We can't do this with the existing API.  So that API
has been deprecated.  The new API uses a class TypeSystem which
contains a pointer to the TypeProvider.  This new class should also be
a useful starting point in case we need to make the type system more
pluggable in the future.

Clients that use the old API will see no change in behavior--they will
still get the half-written algorithm.

Still to be addressed in future CL's:
- Deprecate getSmartLeastUpperBound.
- Fix calls to getLeastUpperBound and getSmartLeastUpperBound in analysis
  server.
- Implement least upper bound computation for function types.
- Make sure type parameters function correctly in the presence of F-bounded
  polymorphism.
- Implement shared tests.

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//1179343004.
2015-06-17 10:10:38 -07:00
Dan Rubel 1c1a87e820 associate @deprecated with enum element
BUG=
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//1162013007
2015-06-17 10:44:53 -04:00
Brian Wilkerson cb8b774fef Re-enable and add new HTML support
R=paulberry@google.com

Review URL: https://codereview.chromium.org//1182303006.
2015-06-16 09:52:18 -07:00
Konstantin Shcheglov 96670b0e97 Fix for explicit dart:core import.
This fixes the rest of the co19/ tests.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//1181663004.
2015-06-12 13:26:12 -07:00
Konstantin Shcheglov 5538e1f105 Add self-reference sources into INCLUDED_PARTS.
It's an error of course, but unless we add it in the first place, we
cannot detect this error in the library element building task.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//1183773002.
2015-06-12 12:30:09 -07:00
Konstantin Shcheglov 9634a03393 Explicitly compute library errors in tests.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//1183723002.
2015-06-12 12:28:24 -07:00
Konstantin Shcheglov d2ea3330d8 Fix tests with 'part' without 'library'.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//1180043006.
2015-06-12 11:27:36 -07:00
Konstantin Shcheglov cdced40bd5 Add AnalysisContext.onResultComputed().
Add RESOLVED_UNIT_NO_CONSTANTS as a public result.

Document results that are computed with the task model.
We need this to be able to use onResultComputed() in Analysis Server and
know that we will get enough information.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//1181603004.
2015-06-11 10:44:11 -07:00