Commit Graph

7984 Commits

Author SHA1 Message Date
danrubel 38cec67d03 step toward new completion API
- separate new CompletionContributor and DartCompletionContributor APIs
- revise new APIs and implementations to be Futures based
- revise InheritedContributor to use new Futures based contributor API
- remove unused classes

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

Review URL: https://codereview.chromium.org/1467023002 .
2015-11-23 12:50:12 -05:00
Konstantin Shcheglov 1e05c35650 Issue 25021. Fix for adding new required parameters when optional exist.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/25021

Review URL: https://codereview.chromium.org/1468913004 .
2015-11-23 09:21:11 -08:00
Konstantin Shcheglov ac24bd115c Don't run 'pub list-package-dirs' if there is no pubpsec.lock file.
This should help on DAS startup - if we don't have to run Pub, this saves as much as 400ms for each pubspec.yaml file.
Without pubspec.yaml we won't get any results anyway.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1470793002 .
2015-11-23 09:19:10 -08:00
danrubel 6ce9b7faeb (TBR) fix completion test
Review URL: https://codereview.chromium.org/1469963002 .
2015-11-23 12:09:52 -05:00
Paul Berry ce7625a22c Buildbot fixes after 8c324a5b8d
- Regenerate tasks.dot

- Mark a test as passing that previously failed
  (fail_finalPropertyInducingVariable_classMember_instance_unprefixed)

Note that there are three other tests that I would have expected to
start passing as well (see
fail_finalPropertyInducingVariable_classMember_instance_*), but they
still fail.

TBR=scheglov@google.com

Review URL: https://codereview.chromium.org/1469093002 .
2015-11-23 09:04:43 -08:00
danrubel 85334bed8a (TBR) update completion test to expect pass now that this is fixed #23001
Review URL: https://codereview.chromium.org/1465143003 .
2015-11-23 11:15:22 -05:00
danrubel b091bb0b18 general completion contributor cleanup
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1465013002 .
2015-11-23 11:03:01 -05:00
Johnni Winther 8a4995dfb7 Remove WorldImpact from caches when no longer needed.
BUG=
R=sigurdm@google.com

Committed: https://github.com/dart-lang/sdk/commit/ecea5e5dc047f37fc16894bbc175ac752c9e0744

Reverted:  https://github.com/dart-lang/sdk/commit/b28df3dc5d1026f4b7bbe8e41a542e79b4860656

This test fails:
python tools/test.py -mrelease -cdart2js -rd8 --minified --dart2js-batch --host-checked -t960 dart2js_extra/deferred/deferred_function_test

Review URL: https://codereview.chromium.org/1464773002.
2015-11-23 15:51:48 +01:00
Asger Feldthaus cb8d7994ce dart2js cps: Refactor CallExpressions into Primitives.
(Work-in-progress, but mostly done)

InvokeMethod and friends no longer take a continuation, but are instead
primitives bound by LetPrim.

This touches a lot of code. Some general housekeeping came along in the
process.

InvokeMethod has a "calling convention" enum on it to enable
dartReceiver and getDartArgument convenience methods.

There is a new UnsafePrimitive class to help type propagation
constant-fold InvokeMethods.  I expect the class will go away after
some changes to type propagation.

Most optimizations work exactly as before, but not all are 100%
consistent.  The consecutive push rewrite was removed entirely because
V8 does not like that.

BUG=
R=kmillikin@google.com, sra@google.com

Review URL: https://codereview.chromium.org/1458703007 .
2015-11-23 12:29:43 +01:00
Konstantin Shcheglov 53e9cce24d Quick assist for converting block documentation comments into line ones.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1470753002 .
2015-11-22 19:57:03 -08:00
Konstantin Shcheglov 8c324a5b8d Propagate types of final/const top-level variables and fields.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/23001

Review URL: https://codereview.chromium.org/1460213005 .
2015-11-21 09:40:37 -08:00
danrubel 11f9386857 add compiltion unit accessor to completion target
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1457873007 .
2015-11-21 10:07:07 -05:00
pq 3b296c3d1c Analyzer version bump.
Version bump pre publishing of `_embedder.yaml` support.

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/1466663003 .
2015-11-20 16:40:36 -08:00
Stephen Adams b28df3dc5d Revert "Remove WorldImpact from caches when no longer needed."
Revert while breakage can be investigated

TBR=johnniwinther@google.com

Review URL: https://codereview.chromium.org/1467733002 .
2015-11-20 15:23:14 -08:00
Brian Wilkerson 277ec360d2 Initial work toward a stress test
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1471443002 .
2015-11-20 15:05:19 -08:00
Konstantin Shcheglov bb1914e175 Make FixContributor asynchronous.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1461313004 .
2015-11-20 14:57:00 -08:00
pq c0466f28f5 Rolling average work queue diagnostic (#24933).
Background: https://github.com/dart-lang/sdk/issues/24933

Salient bits:

* sampling will only start if a client registers interest in diagnostics.
* sampling will stop if clients stop requesting diagnostics.
* sample results are coming back as a string (but a double would be better).
* the mapping of context folders to averages in not garbage collected; since it's only potentially leaking `_Average` objects (and not contexts) when folders are deleted, I think that's fairly benign.

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

Review URL: https://codereview.chromium.org/1463923003 .
2015-11-20 14:24:47 -08:00
Paul Berry 84c3cdb048 Add a unit index to prelinked type references in summaries.
In order to avoid having to reconstitute the entire element model when
deserializing a library summary, we'll need to be able to create element
handles for any elements referenced by the library.  Since element
handles operate using a "location", and the "location" records
information about the compilation unit containing the element, this
means that the library summary needs to track which unit each referenced
element lives in (even though this information would otherwise not be
semantically relevant).

R=scheglov@google.com

Review URL: https://codereview.chromium.org/1468583002 .
2015-11-20 14:10:42 -08:00
Brian Wilkerson 4ae8540383 Revert "Clean-up the registration of plugins"
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1465983004 .
2015-11-20 14:04:53 -08:00
Brian Wilkerson b2728c15a6 Revert "Fix test failures on the bots"
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1468623002 .
2015-11-20 14:04:11 -08:00
pq 8d613feaf9 Migrate mockito mocks to typed_mock (#24994).
BUG=24994
R=brianwilkerson@google.com, scheglov@google.com

Review URL: https://codereview.chromium.org/1462393002 .
2015-11-20 13:57:56 -08:00
Konstantin Shcheglov 0f477023a4 Don't update incrementally invalid results.
Invalid results don't have correct dependencies, so if we make them valid,
they will never get invalidated later.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1463833003 .
2015-11-20 12:29:20 -08:00
Konstantin Shcheglov ae1bee3859 Make AssistContributor asynchronous.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1461343002 .
2015-11-20 12:18:26 -08:00
Brian Wilkerson 6b45d6544c Fix test failures on the bots
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1467623002 .
2015-11-20 11:48:35 -08:00
pq 968617b67a Status file update (vm only tests SkipByDesign).
Follow-up to https://codereview.chromium.org/1464833002/.

Rather than ignore, mark as `SkipByDesign` as CLI tests are designed for the VM.

R=sigmund@google.com

Review URL: https://codereview.chromium.org/1463593003 .
2015-11-20 10:19:29 -08:00
pq 8b6fb86397 Status file updates (analyzer_cli on dart2js).
We're hitting an issue that on the surface looks like the one discussed in https://github.com/dart-lang/sdk/issues/24914 (compilation time-outs).

This status file update gets us moving pending further investigation.

Aside: I'm using the big glob hammer here since we're certain to see more failures as we re-enable cli tests moving forward.

R=paulberry@google.com

Review URL: https://codereview.chromium.org/1464833002 .
2015-11-20 09:18:06 -08:00
Brian Wilkerson 1367d2d47d Clean-up the registration of plugins
R=pquitslund@google.com

Review URL: https://codereview.chromium.org/1460123002 .
2015-11-20 08:14:14 -08:00
Konstantin Shcheglov 2b59830f49 Convert into block documentation comment assist.
I found out that I don't like the /// style.
So, I'm going to convert the Angular2 analysis plugins to the block style.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1466623002 .
2015-11-20 08:11:28 -08:00
Johnni Winther ecea5e5dc0 Remove WorldImpact from caches when no longer needed.
BUG=
R=sigurdm@google.com

Review URL: https://codereview.chromium.org/1464773002.
2015-11-20 15:16:26 +01:00
Johnni Winther 4c0c3e54e1 Revert "Register super field set explicitly in the universe."
This reverts commit 2345d845f5.

BUG=

Review URL: https://codereview.chromium.org/1462333002.
2015-11-20 14:11:20 +01:00
Johnni Winther 2345d845f5 Register super field set explicitly in the universe.
Closes #24781

R=sra@google.com

Committed: https://github.com/dart-lang/sdk/commit/df5bc72927e48479a9cc4599578e99fb14a3c441

Reverted: https://github.com/dart-lang/sdk/commit/2b30d5919a2a19708399828ee1a471df78a1e3fc

Review URL: https://codereview.chromium.org/1435053002.
2015-11-20 13:10:34 +01:00
pq 7c15fa857c More bot-unfriendly test fixing [TBR].
Remove tests pending update.

Background: https://github.com/dart-lang/sdk/issues/25001

BUG=25001

Review URL: https://codereview.chromium.org/1463133002 .
2015-11-19 16:52:14 -08:00
pq c58e064b67 Remove bot-unfriendly tests (#25001).
Remove tests pending update.

Background: https://github.com/dart-lang/sdk/issues/25001

BUG=25001

Review URL: https://codereview.chromium.org/1459083005 .
2015-11-19 16:15:18 -08:00
pq 9ae1265ff5 analyzer_cli move to SDK.
Tracking bug: https://github.com/dart-lang/sdk/issues/24731

Note, dartium build changes are in a separate CL: https://codereview.chromium.org/1453413006/

Some tests had to be disabled for want of mockito in the SDK; tracking their reimplementation is here: https://github.com/dart-lang/sdk/issues/24994

BUG=24731
R=whesse@google.com

Review URL: https://codereview.chromium.org/1459683003 .
2015-11-19 14:52:54 -08:00
Nathan Kerr 83d8f91397 Remove duplicate word 2015-11-19 14:06:01 -08:00
pq 5cc9a288bb Revert "Move analyzer_cli into the SDK."
This reverts commit a573ed31f1.

BUG=
R=whesse@google.com

Review URL: https://codereview.chromium.org/1462143002 .
2015-11-19 11:28:52 -08:00
pq a573ed31f1 Move analyzer_cli into the SDK.
Build changes to follow.

Tracking bug: https://github.com/dart-lang/sdk/issues/24731

BUG=24731
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/1464553003 .
2015-11-19 11:11:17 -08:00
Brian Wilkerson 1e140291c5 Add back a utility method needed by tests
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1457313003 .
2015-11-19 10:52:42 -08:00
Konstantin Shcheglov a689bf4180 Report error for ignored priority file. Ignore subscription for ignored files.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1462693002 .
2015-11-18 17:31:58 -08:00
pq 3972dd5e6b Missed import.
Build fix: http://build.chromium.org/p/client.dart/builders/analyzer_experimental-linux-release-be/builds/4658/steps/tests%20/logs/stdio

Review URL: https://codereview.chromium.org/1460843003 .
2015-11-18 17:22:51 -08:00
pq 3a1a3ee094 Embedded options discovery (#24943).
Merges analysis options extracted from `_embedder.yaml` files (potentially) with local overrides.

Background: https://github.com/dart-lang/sdk/issues/24943

For test coverage of merging, see: `analyzer/test/src/util/yaml_test.dart`.

BUG=24943
R=brianwilkerson@google.com, johnmccutchan@google.com

Review URL: https://codereview.chromium.org/1445363002 .
2015-11-18 16:41:27 -08:00
Kevin Moore 3d43d6d51c pkg/js: prepare for 0.6.0 release
R=sigmund@google.com

Review URL: https://codereview.chromium.org/1456223002 .
2015-11-18 15:34:54 -08:00
Konstantin Shcheglov b46dd600d0 Remove unused declarations - skip summaries and completion.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1462463004 .
2015-11-18 15:21:01 -08:00
Konstantin Shcheglov abe8d87e0e Implement AnalysisServer.getContainingContext() using ContextManager.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1455163005 .
2015-11-18 14:10:35 -08:00
Brian Wilkerson bc0f99c95a Generalize API, fix bug, format/sort
R=paulberry@google.com

Review URL: https://codereview.chromium.org/1461763002 .
2015-11-18 14:07:44 -08:00
John Messerly 2ce06f5325 sort type_system_test.dart
R=leafp@google.com

Review URL: https://codereview.chromium.org/1460853002 .
2015-11-18 13:26:17 -08:00
Paul Berry 0aebd7d6b2 Implement support for generic methods in summaries.
In theory generic top level functions are also supported, but they
aren't tested due to lack of parser support.

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

Review URL: https://codereview.chromium.org/1455863003 .
2015-11-18 10:26:28 -08:00
Brian Wilkerson 905cb67e99 Add support for running git in tests
Review URL: https://codereview.chromium.org/1453213002 .
2015-11-18 09:37:14 -08:00
Brian Wilkerson 9d01b15fd2 Fix a bug parsing generic methods
R=paulberry@google.com

Review URL: https://codereview.chromium.org/1459543002 .
2015-11-18 06:17:50 -08:00
Asger Feldthaus 392bed583c dart2js: Recanonicalize selectors in static fields between runs.
This fixes a bug in batch-mode.

Selectors are canonicalized upon construction, so two equal selectors
are always the same object.

To avoid memory leaks in batch mode, the compiler clears the canonical
cache before each run.

However, some selectors were stored in static fields and thus shared
between runs.  These selectors lost their canonical status when the
cache was cleared.  This patch "fixes" that by reinserting them in
the cache after clearing it.

BUG=
R=johnniwinther@google.com

Review URL: https://codereview.chromium.org/1457733002 .
2015-11-18 13:55:15 +01:00