Commit Graph

7047 Commits

Author SHA1 Message Date
John McCutchan dfc35faaf9 Make exclude list also exclude contexts
- Only create a context if the directory/.packages/pubspec.yaml is not excluded.
- Add tests.

Fixes: https://github.com/dart-lang/sdk/issues/23941

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

Review URL: https://codereview.chromium.org//1263443005 .
2015-08-03 13:54:17 -07:00
danrubel 9d5154a1fd include exported library namespace in prefixed import suggestions
Closes #23946

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//1263093003 .
2015-08-03 13:52:44 -07:00
Konstantin Shcheglov 64ff591f56 Organize directives implementation.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//1266393002 .
2015-08-03 13:49:57 -07:00
Konstantin Shcheglov e5b4713f03 'Import library' and 'Create class' Quick Fixes for unresolved class-like name in list literals.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//1269043003 .
2015-08-03 13:03:28 -07:00
Florian Loitsch 98edcfaee5 dart2js: support checked setters in startup-emitter.
R=sigmund@google.com

Review URL: https://codereview.chromium.org//1249833005 .
2015-08-03 18:07:10 +02:00
Florian Loitsch 0231f6ba39 dart2js: fix named arguments with Function.apply in the startup emitter.
This includes a full rewrite of the Function.apply in the runtime.

R=sigmund@google.com

Review URL: https://codereview.chromium.org//1252533003 .
2015-08-03 18:06:31 +02:00
Florian Loitsch f6b142c5f4 dart2js: Support const symbols in the startup emitter.
R=sigmund@google.com

Review URL: https://codereview.chromium.org//1253443003 .
2015-08-03 17:56:34 +02:00
Florian Loitsch 8d6063d806 dart2js: support isolates in the startup-emitter.
R=sigmund@google.com

Review URL: https://codereview.chromium.org//1249023002 .
2015-08-03 17:48:43 +02:00
Florian Loitsch 3880150e3a dart2js: Add an empty "MANGLED_NAMES" embedded global to the startup-emitter.
There will be another update on this embedded global. In fact it is needed for const symbols.

For simplicity I would prefer committing this CL first (to avoid too much merging/rebasing).

R=sigmund@google.com

Review URL: https://codereview.chromium.org//1250023002 .
2015-08-03 17:47:45 +02:00
Florian Loitsch 5d30039ccc dart2js: Use the correct hashes for deferred code in the startup-emitter.
Also support source-maps.

R=sigmund@google.com

Review URL: https://codereview.chromium.org//1235973004 .
2015-08-03 17:46:39 +02:00
Florian Loitsch 9a633402a7 dart2js: Support natives in the startup emitter.
R=sigmund@google.com

Review URL: https://codereview.chromium.org//1234623002 .
2015-08-03 17:45:23 +02:00
Florian Loitsch fd6e27c11d dart2js: Add embedded globals to startup emitter.
R=sigmund@google.com

Review URL: https://codereview.chromium.org//1233693002 .
2015-08-03 17:42:08 +02:00
Florian Loitsch 62b49eadc6 dart2js: support tear-offs in the startup emitter.
R=sigmund@google.com

Review URL: https://codereview.chromium.org//1229923005 .
2015-08-03 17:02:31 +02:00
Konstantin Shcheglov aa30cad380 Proposal for the 'edit.organizeDirectives' request.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/23921

Review URL: https://codereview.chromium.org//1258563008 .
2015-08-03 07:59:26 -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
Brian Wilkerson 24189ea4f9 Make PathFilter use the resource providers path context
R=paulberry@google.com

Review URL: https://codereview.chromium.org//1260443006 .
2015-07-31 10:06:38 -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
Johnni Winther 0a1b5dfbef Handle super index SendSet operations.
BUG=
R=floitsch@google.com

Review URL: https://codereview.chromium.org//1262363003.
2015-07-31 15:42:05 +02:00
pq 818229cbae Server options file rename.
Clone of https://codereview.chromium.org/1256113004/ which I couldn't cleanly land...

Review URL: https://codereview.chromium.org//1261203003 .
2015-07-30 16:15:44 -07:00
pq 88b8fb8e1e Server options handling.
R=brianwilkerson@google.com, scheglov@google.com

Review URL: https://codereview.chromium.org//1270593002 .
2015-07-30 12:58:58 -07:00
Brian Wilkerson f909ed8adf Add test for references in comments
R=scheglov@google.com

Review URL: https://codereview.chromium.org//1256333008 .
2015-07-30 11:20:00 -07:00
Paul Berry 4c0ad1fe0c Bump analyzer version to 0.26.0 in preparation for publishing.
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//1256323007 .
2015-07-30 09:54:25 -07:00
Paul Berry 4c67a266ed Bump analyzer version in preparation for publishing.
We need to publish a new version of analyzer so that analyzer_cli and
analysis_server can take advantage of support for DEP 34.

Also update changelog.

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//1258343005 .
2015-07-30 06:23:02 -07:00
Johnni Winther e8a19f42af Refactor resolution index SendSet operations.
BUG=
R=floitsch@google.com

Review URL: https://codereview.chromium.org//1258073010.
2015-07-30 13:00:36 +02:00
pq 587697ea02 Ensure actual URIs are properly processed.
R=brianwilkerson@google.com, paulberry@google.com

Review URL: https://codereview.chromium.org//1262213002 .
2015-07-29 13:16:15 -07:00
Florian Loitsch dcb76e65e6 dart2js: fill in the basic functionality of the startup emitter.
R=sigmund@google.com

Review URL: https://codereview.chromium.org//1234493003 .
2015-07-29 19:17:32 +02: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
Johnni Winther 31a62b5505 Add AccessSemantics.INVALID for invalid expressions.
BUG=
R=herhut@google.com

Review URL: https://codereview.chromium.org//1261623002.
2015-07-29 10:26:40 +02:00
Paul Berry e93b52a66f Deprecate option "enableNullAwareOperators" in analysis server.
As of analyzer version 0.25.2, this option is no longer needed;
null-aware operators are always enabled.

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//1255113005 .
2015-07-28 11:31:03 -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
Anders Johnsen 98772b9726 Expose getter and setter invocations by name, in dart2js 'World'.
BUG=
R=johnniwinther@google.com

Review URL: https://codereview.chromium.org//1258243002 .
2015-07-28 13:17:46 +02:00
Sigmund Cherem 2cb9fc4343 dart2js: fix typo
TBR= johnniwinther@google.com

Review URL: https://codereview.chromium.org//1260733002 .
2015-07-27 09:25:46 -07:00
Sigmund Cherem e09981a6d0 dart2js: fix crash when annotations have syntax errors (fix #23983)
BUG= https://github.com/dart-lang/sdk/issues/23893
R=johnniwinther@google.com

Review URL: https://codereview.chromium.org//1257513002 .
2015-07-27 09:20:52 -07:00
Johnni Winther 783ed933ff Fix boolean conversion bug in dart2js + update JSRegExp accordingly.
BUG=
R=herhut@google.com

Review URL: https://codereview.chromium.org//1259473005.
2015-07-27 14:19:26 +02:00
Karl Klose 2a137d16db dart2js cps: Fix performance issues in optimization passes.
Type propagation, shrinking reductions, and let sinking each took
more than 2 minutes on a stress test, where now they take a few
seconds.

Huge hash tables (Map/Set) were a big problem, especially when used as
worklists.

Let sinking had an issue with a linear-time search for the enclosing
continuation of an expression. This has been replaced with a visitor
state.

The stress test was:

  tests/co19/src/LibTest/collection/ListBase/ListBase_class_A01_t02

This was only slow because negative constants get translated to
intercepted calls. That itself should be fixed, but the IR should
still be able to handle the stress.

The change in shrinking reductions altered the redex priority from
FIFO to LIFO which has a negative effect on code quality in
unwrapException (in any test case with a try/catch). It seems like
an existing issue that has surfaced.

Since I am going on vacation, I ask that someone would please
commit this on my behalf (assuming things are looking good).
--asgerf

BUG=
R=karlklose@google.com

Review URL: https://codereview.chromium.org//1252883003 .
2015-07-27 12:12:06 +02:00
Paul Berry f5dab3fd2b Convert ContextManager to recursively watch analysis roots.
Previously ContextManager watched the contents of each context folder
independently; this was redundant in the case where one context folder
was nested inside another.  Also it led to some race conditions, since
we had to examine the contents of a folder in order to determine
whether there should be a context associated with it, but we couldn't
begin watching those files for that context until after the context
was created; this left a small window of time where a change to the
files might go unnoticed.

Note that a minor functional change is introduced: if "pub list"
indicates that the package resolution for a given folder is dependent
upon a file outside that folder, we no longer watch that file for
changes.  This shouldn't be a problem, since in practice "pub list"
always lists exactly two files as dependencies, and both of those
files are inside the folder (pubspec.yaml and pubspec.lock).

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//1257933002 .
2015-07-26 20:56:43 -07:00
Paul Berry cdfa46faa5 Improve package root tests.
Partially fixes #23909.  Previously, these tests didn't work at all.
Now they verify that the FolderDisposition is based on the correct
package root, but they don't yet verify that the package map is
generated correctly.

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//1257913002 .
2015-07-26 15:08:58 -07:00
Paul Berry 641284a263 Generalize the dependency tracking mechanism used by ContextManager.
Previously, we tracked "pub list" dependencies using
ContextInfo.packageMapInfo.dependencies, but that mechanism could only
be used for folders that resolved packages using "pub list".  Other
dependencies were tracked ad hoc (such as dependencies on ".packages",
or anti-dependencies* on "pubspec.yaml"); others weren't tracked at
all (such as dependencies on ".analysis_options").

(*In this context, an "anti-dependency" is a dependency on the fact
that a file is absent.  E.g. when we decide not to create a separate
context for a subfolder, it is in part because that subfolder lacks
its own "pubspec.yaml" file.)

This CL migrates the "pub list" dependencies to a more general
mechanism; future CL's will migrate the other ad hoc dependencies to
use the same mechanism.

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//1258723002 .
2015-07-24 14:52:05 -07:00
Konstantin Shcheglov 14e1cdc86c Fix for 'analysis.getNavigation' implementation.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//1260503002 .
2015-07-24 14:27:20 -07:00
Paul Berry 46c284abdf Stop optimizing uses of "pub list".
The use case which made this optimization necessary is now gone, and
it's getting in the way of refactoring ContextManager.

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//1256793006 .
2015-07-24 10:42:25 -07:00
danrubel ddf17fa575 performance measurement improvements and README update
BUG=
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//1250343002 .
2015-07-24 10:14:11 -04:00
Paul Berry 7fb62213cf Introduce FolderDisposition class hierarchy for use in ContextManagerCallback.
The new class hierarchy encapsulates the packageUriResolver and
packages parameters that were previously used in the
ContextManagerCallback API.  In a future CL, I intend to use it more
extensively within ContextManagerImpl in order to make the algorithm
for choosing contexts more declarative.

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//1258473003 .
2015-07-24 06:42:54 -07:00
Paul Berry 391741a2de Clean up bogus codepath in ContextManager._computePackageUriResolver.
This codepath was only exercised during unit tests and race
conditions.  The fact that it was executed during unit tests at all
was due to a bug (see #23909).  The behavior during race conditions
was incorrect (it tried to set up package resolution using a folder
that didn't exist).

This CL fixes the race condition behavior and disables the affected
tests.  In a future CL I will fix the underlying bug that caused the
unit tests to execute incorrectly, and re-enable the tests.

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//1253803002 .
2015-07-24 06:39:21 -07:00
Kevin Moore 6ba9aebc3f pkg/analyzer: document alternative to deprecated api
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//1242263008 .
2015-07-23 17:22:00 -07:00
danrubel 5397035e2f performance measurement readme
BUG=
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//1244023003 .
2015-07-23 15:34:23 -04:00
Paul Berry 37bf862fe4 Get rid of ContextManager._contexts.
This data structure was redundant with the tree of contexts maintained
in ContextManager._rootInfo.

R=scheglov@google.com

Review URL: https://codereview.chromium.org//1243063003 .
2015-07-23 11:03:44 -07:00
Brian Wilkerson 673b94c489 Fix highlight range for missing enum constant in switch (issue 23904)
R=scheglov@google.com

Review URL: https://codereview.chromium.org//1252123004 .
2015-07-23 09:30:43 -07:00
Johnni Winther 3ba94ff882 Temporarily disable source_map_operators_test while fixing underlying error.
BUG=

Review URL: https://codereview.chromium.org//1249253002.
2015-07-23 16:27:37 +02:00
Johnni Winther d7fcc59318 Split MessageKind into a MessageKind key and a MessageTemplate.
R=karlklose@google.com

Review URL: https://codereview.chromium.org//1248483008.
2015-07-23 14:42:34 +02:00