Commit graph

42906 commits

Author SHA1 Message Date
Johnni Winther
c102d3f72a Remove direct access to enqueuer through use of WorldImpact
R=het@google.com

Review URL: https://codereview.chromium.org/2527973002 .
2016-11-29 09:05:53 +01:00
Johnni Winther
bf13fc1b28 Handle assert with message in type inference
Closes #27882

R=sra@google.com

Review URL: https://codereview.chromium.org/2528043003 .
2016-11-29 08:36:27 +01:00
Siva Annamalai
280d6ede9d Temporary workaround to isolate memory leak issue.
BUG=
R=kulakowski@google.com

Review URL: https://codereview.chromium.org/2535683003 .
2016-11-28 19:08:49 -08:00
Konstantin Shcheglov
95ae62b20b Request SearchResult(s) of multiple kinds at once.
This helps to reduce the number of times CompilationUnitElement is
created for each file when we search for more than one kind of relation.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2534833004 .
2016-11-28 18:11:43 -08:00
Ryan Macnak
0cf02040f8 Add a version of heap snapshots that use only fields and stack frames as roots and only include instances.
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2502283003 .
2016-11-28 16:00:06 -08:00
Ryan Macnak
e60c9d52b6 Fuchsia: Enable newly working socket tests; use MX_CLOCK_UTC.
R=kulakowski@google.com, zra@google.com

Review URL: https://codereview.chromium.org/2536943002 .
2016-11-28 15:50:54 -08:00
Emily Fortuna
86ddd0ea18 Correct link for front page readme (!).
BUG=
R=rnystrom@google.com

Review URL: https://codereview.chromium.org/2538563002 .
2016-11-28 14:57:50 -08:00
Matthias Hausner
6e84b56256 Fix dartium test expectations
Fallout from initializing formal access change.

BUG=
R=whesse@google.com

Review URL: https://codereview.chromium.org/2535083002 .
2016-11-28 14:04:14 -08:00
Konstantin Shcheglov
d8ac1076d9 Don't search if the driver cannot reference the element.
This is just a performance optimization to avoid analyzing the element file in a driver that does not use the file yet.

We use library/unit URIs to search in index, so search in extra drivers would not produce extra results.

R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org/2533853005 .
2016-11-28 13:51:34 -08:00
Konstantin Shcheglov
564be5bc3b Time box _FilesReferencingNameTask.
Relinquishing execution flow and running event loop after every piece
of work in _FilesReferencingNameTask works, but has too much overhead.
If we instead use a fixed time quantum, we can spend less time overall.

E.g. time to search in analyzer files is 400 microseconds.

R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org/2535053002 .
2016-11-28 13:22:02 -08:00
Paul Berry
ad68013cea Update CHANGELOG to reflect breaking change to PartOfDirective constructor.
The breaking change was made in b923dafd25.

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/2528353005 .
2016-11-28 13:21:35 -08:00
Matthias Hausner
b48435197a Turn on initializing formal access
Change default value of --initializing_formal_access to true.

BUG=27892
R=regis@google.com

Review URL: https://codereview.chromium.org/2540453002 .
2016-11-28 13:15:15 -08:00
Paul Berry
e926a84ec2 Remove support for summary "fallback mode" from analyzer.
This feature was added as a stopgap in case summaries proved
unreliable.  It is no longer needed.

Fixes #27916.

R=scheglov@google.com

Review URL: https://codereview.chromium.org/2538503002 .
2016-11-28 12:12:03 -08:00
Konstantin Shcheglov
27a3275495 Search for top-level elements and class members.
No search for imports, import prefixes, libraries and units yet.

R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org/2532203002 .
2016-11-28 11:08:57 -08:00
Paul Berry
f4baeb20d7 Create a new AstFactory class to be used by analyzer and its clients.
Unlike the previous AstFactory (now called AstTestFactory), this class
is not just for testing; it is intended to be able to create all
analyzer AST objects used in production.  Also, its methods are
non-static.

For now, all users of the new AstFactory access it using the final
variable `astFactory` in standard_ast_factory.dart.  In future CLs I
intend to plumb a reference to the AstFactory through various analyzer
classes so that it can be used in a dependency injection style.

Also, the classes CommentType and UriValidationCodeImpl have been
moved out of the AST implementation file
(pkg/analyzer/lib/src/dart/ast/ast.dart) and to their own files so
that the AST interface will be able to continue to use them without
depending on the AST implementation.

In follow-up CLs I will change the analyzer and its clients to use the
AstFactory rather than the redirecting constructors in the AST
interface file, and then remove those redirecting constructors.

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/2522143003 .
2016-11-28 10:50:20 -08:00
Konstantin Shcheglov
1fea2bb238 AnalysisErrorWithProperties cannot be reported with the new analysis driver.
Add a check for now to avoid crashes.

R=paulberry@google.com, brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2533043002 .
2016-11-28 10:43:49 -08:00
Konstantin Shcheglov
5ee52c415f Fixes for documentation.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2533013002 .
2016-11-28 10:30:07 -08:00
Martin Kustermann
f81bcb660a VM: [Kernel] Update status file for precompiled (release) builders
R=vegorov@google.com

Review URL: https://codereview.chromium.org/2537543002 .
2016-11-28 19:23:23 +01:00
Konstantin Shcheglov
a573765c18 Status page for the new analysis driver.
Probably more info should be added with time.
But this lets us see drivers and files.

R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org/2530273004 .
2016-11-28 09:15:31 -08:00
Konstantin Shcheglov
5cbd824762 Fix for search references when the element is null.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2526363002 .
2016-11-28 08:51:40 -08:00
Konstantin Shcheglov
5ff8db3a5f Filter out AnalysisErrors with null 'errorCode'.
We have an error report:

My guess is that `errorCodeByUniqueName` returned `null`.

It might be either a bug in `errorCodeByUniqueName`, or a shortcoming
or our current data version mechanism (which we know about - it should
be a hash of sources or something like this).

Either way, a missing error is better than a crash.

R=paulberry@google.com, brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2527423002 .
2016-11-28 08:43:18 -08:00
William Hesse
0bb0386634 Increase subprocess timeout in standalone/io/test_runner_test.
A passing subtest was sometimes taking more than 10 seconds, and
timing out.

BUG=https://github.com/dart-lang/sdk/issues/20351
R=kustermann@google.com

Review URL: https://codereview.chromium.org/2535773003 .
2016-11-28 17:42:47 +01:00
Konstantin Shcheglov
f189796d68 Implement getLinkedBundle() for MockSdk in analysis_server.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2525203002 .
2016-11-28 08:32:34 -08:00
William Hesse
6f7005ee71 Update status for co19 tests on browsers.
BUG=
R=kustermann@google.com

Review URL: https://codereview.chromium.org/2538443002 .
2016-11-28 16:32:41 +01:00
Martin Kustermann
e697ce94af VM: [Kernel] Remove assertion in TranslateStatement() - we use it inside let expressions
Review URL: https://codereview.chromium.org/2535823002 .
2016-11-28 16:17:04 +01:00
Vyacheslav Egorov
8eceda053f VM: [Kernel] Don't add implicit getters for top level fields into the library dictionary.
Tree shaker can't cope with this and produces incorrect snapshots that contains tree shaken classes.

R=kustermann@google.com
BUG=

Review URL: https://codereview.chromium.org/2536683002 .
2016-11-28 15:50:24 +01:00
Martin Kustermann
0c6beaca1c VM: [Kernel] Need to keep stack_ correct, fixes failures in debug JIT mode
R=vegorov@google.com

Review URL: https://codereview.chromium.org/2535813002 .
2016-11-28 15:40:40 +01:00
Martin Kustermann
aaec324001 Add more flags to the blacklist of reproduction commands
Currently failures on the buildbot will look for example like this:

Short reproduction command (experimental):
    python tools/test.py -cdartk -t120 --write-debug-log --write-test-outcome-log --copy-coredumps --exclude-suite pkg language/transitive_private_library_access_test

But developers only would like to see

    python tools/test.py -cdartk -t120 language/transitive_private_library_access_test

R=whesse@google.com

Review URL: https://codereview.chromium.org/2532123002 .
2016-11-28 14:18:27 +01:00
Asger Feldthaus
50c199c224 Skip kernel unit tests on jsshell due to #26103.
BUG=
R=kmillikin@google.com

Review URL: https://codereview.chromium.org/2536633002 .
2016-11-28 13:44:34 +01:00
Asger Feldthaus
0ae961f428 Document that setter expressions return their right-hand side.
BUG=
R=kmillikin@google.com

Review URL: https://codereview.chromium.org/2530203003 .
2016-11-28 12:27:08 +01:00
Asger Feldthaus
8f12489839 Add --verify-ir flag to dartk and test.py.
This replaces the old --sanity-check flag from dartk. Some files have
been renamed to avoid the wording "sanity check".

Compared to --sanity-check, the following checks have been added:
- variables are not referenced out of scope
- variables are not redeclared
- class type parameters are not referenced from static context

A unit test has been added to check that the verifier rejects certain
invalid ASTs.

BUG=
R=kmillikin@google.com

Review URL: https://codereview.chromium.org/2531873002 .
2016-11-28 12:21:19 +01:00
Lasse R.H. Nielsen
c05eb97461 Add message to assert in specification.
R=eernst@google.com

Review URL: https://codereview.chromium.org/2530083002 .
2016-11-28 09:19:28 +01:00
Lasse Reichstein Holst Nielsen
7957a1c256 Make EfficientLength extend Iterable.
This should help least-upper-bound computations to not think of EfficientLength
as completely separate from Iterable even though they are always used together.

It doesn't solve all problems with the least-upper-bound computation,
but at least some of the more often occuring ones.

R=floitsch@google.com

Review URL: https://codereview.chromium.org/2467113003 .

Committed: b08fb1373f
2016-11-28 08:04:04 +01:00
Stephen Adams
b20b10a0af dart2js-kernel: Implement Let and PropertySet.
The Accessor builders capture some subexpressions to help map kernel
Nodes to Ast Nodes.

R=asgerf@google.com

Review URL: https://codereview.chromium.org/2526123002 .
2016-11-26 12:42:37 -08:00
Matan Lurey
d92107e01d Remove scary warning from dart:convert#Codec (#27897)
Seems unnecessarily scary given that a breaking change here would now be a huge breaking change.
2016-11-25 15:42:01 -08:00
Konstantin Shcheglov
a69b7f3fb0 Add AnalysisDriver.getIndex().
AnalysisResult.index is not quite enough.

While the index can be used to find where an element is used in the file,
we need to know also the enclosing Element, which we can find from the
full CompilationUnitElement.

R=paulberry@google.com, brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2526373002 .
2016-11-25 09:51:05 -08:00
Konstantin Shcheglov
d16dfdc2c9 Store individual LinkedLibrary objects instead of PackageBundle(s).
R=paulberry@google.com, brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2531723002 .
2016-11-25 09:38:40 -08:00
Konstantin Shcheglov
483fa6de3a Prefer a driver to which the file is added.
R=paulberry@google.com, brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2533533002 .
2016-11-25 09:28:07 -08:00
Erik Ernst
1edb84bf8f Removed status entries for initformal tests with dart2js/browser.
Needed after landing https://codereview.chromium.org/2141023002/.

Review URL: https://codereview.chromium.org/2532733002 .
2016-11-25 17:21:24 +01:00
Brian Wilkerson
b923dafd25 Add parser support for using a URI in a part-of directive
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2526063002 .
2016-11-25 08:16:45 -08:00
William Hesse
c3333f9c40 Update dartium status for issue 26644
BUG=https://github.com/dart-lang/sdk/issues/26644

Review URL: https://codereview.chromium.org/2526283005 .
2016-11-25 14:49:12 +01:00
William Hesse
52cb4500b5 Update co19 status for issue 26644
BUG=https://github.com/dart-lang/sdk/issues/26644

Review URL: https://codereview.chromium.org/2528103003 .
2016-11-25 14:32:01 +01:00
William Hesse
177f9c690f Update MacOS dartium status for co19 tests
BUG=
R=sortie@google.com

Review URL: https://codereview.chromium.org/2534583002 .
2016-11-25 13:51:47 +01:00
William Hesse
30db1d7ab0 Update status for passing co19 tests
BUG=https://github.com/dart-lang/co19/issues/68
BUG=https://github.com/dart-lang/co19/issues/81
R=sortie@google.com

Review URL: https://codereview.chromium.org/2531033002 .
2016-11-25 13:15:02 +01:00
Erik Ernst
f234278474 Status updates required after CL 2141023002.
Review URL: https://codereview.chromium.org/2524363004 .
2016-11-25 12:16:49 +01:00
Sergey G. Grekhov
76425f920f Update co19 test suite dependency to commit f05d5aee5930
co19 test suite updated to commit f05d5aee5930bfd487aedf832fbd7b832f502b15 of dart-lang/co19 repository, dated Nov 21 2016.

Status files are updated for this roll.
2016-11-25 12:06:39 +01:00
Asger Feldthaus
084bd8add2 Speed up kernel sanity checks.
Sanity checks now run in a single pass rather than two, and
instead of building a set consisting of all members, it uses
a bit from the transformer flags to remember which members are
not orphaned.

As an additional check, it now checks that members are not
declared more than once.

R=kmillikin@google.com

Review URL: https://codereview.chromium.org/2529973002 .
2016-11-25 12:02:05 +01:00
Asger Feldthaus
963e1ebc55 Do not sort named parameters on FunctionNode.
This was originally done to be consistent with FunctionType,
where the named parameters are sorted, but for FunctionNode
it is not necessary.

It causes issues for natives that expect parameters to be
declared in a certain order. It is also an issue if we
ever want to reuse the kernel format for summaries, where
it is also preferable to present the named parameters in
their original order.

BUG=
R=kmillikin@google.com

Review URL: https://codereview.chromium.org/2527933002 .
2016-11-25 11:22:37 +01:00
Kevin Millikin
c0bfda8a08 Remove an unnecessary (empty) scope, streamline the function parsing code.
The scope containing function expressions is always empty.

R=hausner@google.com

Review URL: https://codereview.chromium.org/2013233003 .
2016-11-25 10:24:17 +01:00
Erik Ernst
4912fd1501 Make initializing formal access available by default
This CL changes dart2js such that the effect that we used to get with
option '--initializing-formal-access' is now obtained unconditionally,
i.e., that extension is now enabled by default.

dart2js will continue to accept the option, such that scripts passing
the option will not break.

The CL is _not_ intended to be landed at this time, the plan is to
enable the feature in a coordinated manner when all tools are ready.

R=johnniwinther@google.com

Review URL: https://codereview.chromium.org/2141023002 .
2016-11-25 10:15:21 +01:00