Konstantin Shcheglov
4d48fa56d0
Listen for context add/remove and unit invalidation to update the index.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1783503004 .
2016-03-09 14:52:19 -08:00
Stephen Adams
9292d1bc2b
Revert "dart2js: Destroy some type inference graph edges after type inference."
...
BUG=
Review URL: https://codereview.chromium.org/1775253004 .
2016-03-09 14:07:48 -08:00
danrubel
14983f0a26
extract resource path test utils
...
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/1777913003 .
2016-03-09 16:26:14 -05:00
Konstantin Shcheglov
00b6f98166
Separate index objects for each analysis context.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1778113002 .
2016-03-09 13:24:12 -08:00
Stephen Adams
42070892a4
Create map for dump_info on demand.
...
Saves about 1% of heap for non --dump-info compile.
R=sigmund@google.com
Review URL: https://codereview.chromium.org/1777823002 .
2016-03-09 13:15:05 -08:00
Brian Slesinsky
ae009e0870
Fix regression for import suggestions
...
Imports weren't being suggested for implicit source files,
for example files from other analysis roots.
BUG=
R=brianwilkerson@google.com , scheglov@google.com
Review URL: https://codereview.chromium.org/1759333002 .
2016-03-09 12:59:46 -08:00
Stephen Adams
e85ac19134
dart2js: Destroy some type inference graph edges after type inference.
...
Removing the `_assignments` and `users` collections from TypeInformation
nodes causes interior nodes (e.g. Phi, Narrow) to become unreachable and
available for GC. This seems to trim 1%-5% off the final heap of an SSA
compile.
R=sigmund@google.com
Review URL: https://codereview.chromium.org/1776533002 .
2016-03-09 12:47:10 -08:00
Konstantin Shcheglov
5a927c7373
Add hacks into build_sdk_summaries to workaround bugs in build tools.
...
Paul thinks that there is a bug in gyp or make, and we should generate
only one output. So, we generate the whole bundle with all summaries
and index information. And then we have separate actions that take
this bundle and extract one output each - spec.sum and strong.sum files.
R=paulberry@google.com , whesse@google.com
BUG=
Review URL: https://codereview.chromium.org/1775973003 .
2016-03-09 11:37:17 -08:00
Konstantin Shcheglov
21ed1750ce
Issue 25962. Check for the number of arguments vs. number of required parameters.
...
Unfortunately I was not able to reproduce the problem.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/25962
Review URL: https://codereview.chromium.org/1776353003 .
2016-03-09 11:33:01 -08:00
pq
e7e205f00b
Add error codes to server protocol ( #25958 ).
...
See: https://github.com/dart-lang/sdk/issues/25958
BUG=
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/1774913006 .
2016-03-09 10:44:03 -08: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
pq
fb3eae598a
CLI support for enableConditionalDirectives
.
...
BUG=
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/1778683004 .
2016-03-09 10:04:41 -08:00
pq
402f27e26d
Fix enableConditionalDirectives
option handling.
...
Net-net: we weren't copying this value over when copying context options.
BUG=
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/1774213003 .
2016-03-09 10:01:28 -08:00
Asger Feldthaus
40f6c6934c
dart2js cps: Do field calls directly instead going through the adapter.
...
E.g. obj.foo$1(x) becomes obj.foo.call$1(x).
BUG=
R=kmillikin@google.com
Review URL: https://codereview.chromium.org/1776473006 .
2016-03-09 15:59:49 +01:00
Asger Feldthaus
cb46f224f6
dart2js cps: Inline constructor bodies that are only called once.
...
ConstructorBodyElements do not exist in the type inference graph, so
we can't rely on it to tell us if such a method has a single call site.
BUG=
R=kmillikin@google.com
Review URL: https://codereview.chromium.org/1779723002 .
2016-03-09 14:00:25 +01:00
Johnni Winther
7b7cfb66ab
Add source information to variable declarations in CPS.
...
This adds a source mapping to variable declarations in the beginning of a JS function, that points to the start of the corresponding Dart method:
foo: function() {
var a, b;
^
maps to
foo() {
^
R=sigmund@google.com
Review URL: https://codereview.chromium.org/1772703002 .
2016-03-09 10:02:16 +01:00
Bob Nystrom
528f6c01a7
Clean up some copy/paste in a test.
...
Almost all of these tests had the same few steps, so I pulled that out
into a helper function and used that.
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/1780623002 .
2016-03-08 17:40:46 -08:00
Stephen Adams
d367741ead
Recognize identical() ConstantValues as equal.
...
This fast path is not used when interning ConstantValues but is
beneficial when the ConstantValue is the key of a HashMap.
BUG=
R=sigmund@google.com
Review URL: https://codereview.chromium.org/1777483006 .
2016-03-08 17:18:27 -08:00
Konstantin Shcheglov
5b117e9e18
Use the fact that some index lists are sorted.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1776143002 .
2016-03-08 13:43:43 -08:00
Konstantin Shcheglov
3af20476d1
Add AnalysisContext.onResultInvalidated(descriptor).
...
This method will be used to remove index entries corresponding to
invalidated resolved units.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1776023002 .
2016-03-08 12:55:06 -08:00
Konstantin Shcheglov
15bfead120
Sort strings in the index.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1774253002 .
2016-03-08 12:45:29 -08:00
Paul Berry
c497c026fe
Fix summary generation in "package-summary-only" mode.
...
If we aren't doing full analysis, then we can't use
`context.librarySources` to find out the set of library sources (because
it doesn't include sources that haven't been examined yet). Instead, we
have to query each source to find out its type.
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1770323003 .
2016-03-08 12:14:11 -08:00
Bob Nystrom
cb7aa02116
Type check for-in statements.
...
This does nominal checking on the iterable expression used in a for-in
statement:
1. It must implement Iterable.
2. The type argument to Iterable must be assignable to the variable's
type.
R=brianwilkerson@google.com , jmesserly@google.com
Review URL: https://codereview.chromium.org/1771153002 .
2016-03-08 11:25:49 -08:00
Stephen Adams
ea480cdf0f
Fix typo in TypeInformationSystem.joinTypeMasks
...
R=sigmund@google.com
Review URL: https://codereview.chromium.org/1771253002 .
2016-03-08 10:55:15 -08:00
Paul Berry
1f8ea5448e
Add an analyzer_cli option to disable analysis (for faster summary generation)
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1772923002 .
2016-03-08 09:25:20 -08:00
Brian Wilkerson
d8786ac278
Change when enum constant elements are created to fix bug in re-creating ASTs from existing element models
...
R=paulberry@google.com , scheglov@google.com
Review URL: https://codereview.chromium.org/1771243002 .
2016-03-08 08:45:44 -08:00
Asger Feldthaus
7772152fa1
dart2js cps: Keep interceptors in a separate field.
...
Previously, the "receiver" of an InvokeMethod would be either be the
"Dart receiver" or an interceptor, depending on the calling convention.
Likewise, the argument list was possibly prefixed by the Dart receiver.
Now, the receiver is always the Dart receiver, and the arguments are
the Dart arguments and the interceptor is in a field specific for the
interceptor.
The old way was very inconvenient in the CPS, it has led to several
bugs already, and it's just unintuitive that "receiver" can mean two
very different things.
FunctionDefinition no longer has a thisParameter, but
instead a receiverParameter and an interceptorParameter. These are
named to correspond exactly with the names used in InvokeMethod.
The concept of 'this' has been removed from the CPS IR to hopefully
avoid confusion between 'Dart this' and 'JS this'. There is now only
receiver and interceptor, and which one corresponds to the JS 'this'
is irrelevant.
The Tree IR has not changed. The Tree IR builder is thus responsible
for translating the calling convention into the JS receiver and
argument list. The Tree needs to know the order in which the operands
are evaluated, so it makes sense to keep this form in the Tree.
R=sra@google.com
Review URL: https://codereview.chromium.org/1761903002 .
2016-03-08 13:43:20 +01:00
Johnni Winther
7cbfcd69ca
Updates from comments.
...
BUG=
R=sigmund@google.com
Review URL: https://codereview.chromium.org/1683063002 .
2016-03-08 10:36:58 +01:00
Johnni Winther
583fd470d8
Add source location to function declarations.
...
Temporarily adds source location to function declarations in the new source info system.
R=sigmund@google.com
Review URL: https://codereview.chromium.org/1773553002 .
2016-03-08 10:30:13 +01:00
pq
24ac0d4e2d
Fix cycle in override check.
...
BUG=
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1769253002 .
2016-03-07 14:09:58 -08:00
Konstantin Shcheglov
b9ee5c20eb
Implement SearchEngine.searchMemberReferences().
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1768353002 .
2016-03-07 13:41:12 -08:00
pq
4528052e98
Validation of @mustCallSuper
overrides.
...
Carried over and refined from https://codereview.chromium.org/1767843002/ .
BUG=
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/1773803002 .
2016-03-07 13:37:35 -08:00
Konstantin Shcheglov
f2111c2497
Search for direct and indirect subclasses.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1770083002 .
2016-03-07 11:30:44 -08:00
Konstantin Shcheglov
2293a22b7f
Implement searchMemberDeclarations() / searchTopLevelDeclarations().
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1770953002 .
2016-03-07 11:14:05 -08:00
Brian Wilkerson
687119c56d
Prepare to publish a new alpha version for DDC
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1768303002 .
2016-03-07 11:01:25 -08:00
Konstantin Shcheglov
5f62cca534
Record IS_ANCESTOR_OF relations.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1772823002 .
2016-03-07 11:00:49 -08:00
Leaf Petersen
6a9af860d0
Fix method inference crasher.
...
During class member inference, only instantiate the type formals of
an overridden method when there are type formals to instantiate.
BUG=
R=jmesserly@google.com
Review URL: https://codereview.chromium.org/1763013003 .
2016-03-07 10:49:57 -08:00
Konstantin Shcheglov
8dbbb55a2e
Implement search for names defined in index.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1771903002 .
2016-03-07 10:40:01 -08:00
Brian Wilkerson
508492d048
Fixes to associating existing elements with an AST
...
R=paulberry@google.com , scheglov@google.com
Review URL: https://codereview.chromium.org/1768713002 .
2016-03-07 10:36:36 -08:00
Sigmund Cherem
385f3350c5
Update status of cpsir tests in checked mode: skipping for now, since more than
...
75% fail for one reason, once we fix that we can triage in more detail.
Review URL: https://codereview.chromium.org/1771893002 .
2016-03-07 10:20:41 -08:00
Konstantin Shcheglov
28f8a64210
Remove SearchEngine.searchElementDeclarations().
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1769063002 .
2016-03-07 09:57:15 -08:00
pq
f506639391
Back out ignore quick-fix.
...
As per, https://github.com/dart-lang/sdk/issues/25926 , we'll migrate this behavior to the IDE side.
BUG=
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1770733002 .
2016-03-07 09:25:28 -08:00
William Hesse
f5d284ca9c
Update status for a slow test and a crashing test.
...
BUG=
R=eernst@google.com
Review URL: https://codereview.chromium.org/1768193002 .
2016-03-07 17:59:16 +01:00
Florian Loitsch
d41bce8cda
Don't assume that we always have a HowToFix and remove failing test.
...
Also fix a typo.
Review URL: https://codereview.chromium.org/1769043002 .
2016-03-07 17:36:34 +01:00
Konstantin Shcheglov
9f448d00fe
Support for searching of libraries, import prefixes and import elements.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1767113002 .
2016-03-07 08:34:34 -08:00
Florian Loitsch
dd326beee1
Move more messages.
...
Migrates some of the 'undefined' messages to the shared file.
R=brianwilkerson@google.com , johnniwinther@google.com
Review URL: https://codereview.chromium.org/1750143005 .
2016-03-07 16:39:12 +01:00
Florian Loitsch
65b4256b9e
Support multiple categories per message.
...
Also move more messages to use this feature.
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/1763373002 .
2016-03-07 16:37:57 +01:00
Brian Wilkerson
e0f7b4f314
Add an optional parameter to the Required annotation
...
R=pquitslund@google.com
Review URL: https://codereview.chromium.org/1770653002 .
2016-03-07 07:08:07 -08:00
Florian Loitsch
c7de97729c
Use error-names for 'specializationOf'.
...
The sub-ids are harder to read and maintain.
R=johnniwinther@google.com
Review URL: https://codereview.chromium.org/1770703002 .
2016-03-07 11:37:41 +01:00
William Hesse
7f9e4b7456
Update status for dart2js --cps_ir --host_checked.
...
BUG=https://github.com/dart-lang/sdk/issues/25911
BUG=https://github.com/dart-lang/sdk/issues/24485
R=sgjesse@google.com
Review URL: https://codereview.chromium.org/1773523002 .
2016-03-07 11:35:11 +01:00