Commit graph

42900 commits

Author SHA1 Message Date
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
Lasse Reichstein Holst Nielsen
843bb96813 Change how the language specification describes control flow.
Changed to compositionally describing how an expression or statement can
complete (normally, throw, return, break, continue), and propagating the
completion to the surrounding statements handling those behaviors.

This should not change the current behavior except in a few cases where
the existing specification was vague, misleading or just wrong.

Actual changes:
- The super call in an initializer list is now always called at the end,
  even if it is allowed to be written earlier. This matches existing
  VM behavior.
  Initialization of initializer expressions are specified
  as part of constructor execution, not something happening
  at the `new` operator.
- The cancel call to a stream subscription when exiting an async for-in
  loop is now made explicit, and its returned future is explicitly
  awaited for.
  Previously it was unclear what happened with that future.
- Pausing a surrounding async-for loop has been added everywhere
  the body of the loop can suspend, just before the suspension.
  The loop subscription is not resumed until reaching the end of the body,
  which is equivalent to resuming it after each suspend
  and then pausing it again when the synchronous execution reaches
  the next suspend.
  So, easier and doesn't change the behavior of the loop itself,
  but it's a visible change if you check the onPause/onResume
  of the loop stream.
  Spec now recognizes that the pause call may throw on an invalid
  implementation of StreamSubscription.

Addresses issues #25859, #25856, #25850, #25848, #25847, #25749, #25634, #25539, #25421, #25412, #25381, #25234, #25005, #24859, #24748, #23779, #23700, #23628, #22908, #21858 (and likely more).

BUG= http://dartbug.com/25859 http://dartbug.com/25856 http://dartbug.com/25850 http://dartbug.com/25848 http://dartbug.com/25847 http://dartbug.com/25749 http://dartbug.com/25634 http://dartbug.com/25539 http://dartbug.com/25421 http://dartbug.com/25412 http://dartbug.com/25381 http://dartbug.com/25234 http://dartbug.com/25005 http://dartbug.com/24859 http://dartbug.com/24748 http://dartbug.com/23779 http://dartbug.com/23700 http://dartbug.com/23628 http://dartbug.com/22908 http://dartbug.com/21858
R=eernst@google.com

Review URL: https://codereview.chromium.org/2399343002 .
2016-11-25 09:30:17 +01:00
Vyacheslav Egorov
584788a47c VM: [Kernel] Don't emit ReturnInstr that are not connected to the graph.
This breaks inlining because it expects that all collected ReturnInstr
are strongly connected to the rest of the graph.

Source based FlowGraphBuilder achieves that by eagerly stopping construction
as constructed fragment is closed (e.g. Throw is emitted).

R=kustermann@google.com
BUG=

Review URL: https://codereview.chromium.org/2528673002 .
2016-11-24 16:19:53 +01:00
Vyacheslav Egorov
73ef820ec1 VM: [Kernel] Relax assertions in SSA construction and in Kernel loading.
- Kernel-to-IL translation leaves behind some unused constants without temp indices assigned.

- Let compile time errors propagate instead of failing with FATAL error in the post load class finalization.

R=kustermann@google.com
BUG=

Review URL: https://codereview.chromium.org/2528763002 .
2016-11-24 16:19:22 +01:00
William Hesse
81b71e74f8 Revert "Roll co19 tests and status files"
This reverts commit 27883bfbc0.
We will reland this once the status file updates are (nearly) perfect.

BUG=
R=sortie@google.com

Review URL: https://codereview.chromium.org/2530863002 .
2016-11-24 15:19:31 +01:00
William Hesse
27883bfbc0 Roll co19 tests and status files
This updates co19 to commit 2e98931a4d40781110220d4b2d131efa6fc4669d
Merge branch 'co19patch' into rebased_co19_patch

Sort status lines ignoring alphabetical order

Status files updated according lates buildbot run results

Status files updated according the latest Chrome run

dart2js files updated for FF and Chrome on Linux

DEPS and VM status files updated

status file updated according Linux run

Status files updated according latest Dartium run

dart2js status file updated according the last tests run on FF

dart2js status file updated according the last tests run on Chrome and FF

Analyzer and VM status files are updated according last versions of co19 and sdk

BUG=
R=sortie@google.com

Review URL: https://codereview.chromium.org/2528953002 .
2016-11-24 15:01:53 +01:00
Kevin Millikin
c33789c4f5 Dart VM: Simplify token positions in the translation of await.
We can reuse the token position given by ST(node->token_pos()).  This
allows the token positions for the final result to fit the pattern
assumed by MakeName.

R=hausner@google.com
BUG=

Review URL: https://codereview.chromium.org/1875643002 .
2016-11-24 09:44:40 +01:00