Commit graph

42886 commits

Author SHA1 Message Date
Konstantin Shcheglov 38635ec91e Support for AwaitExpression in unlinked expressions.
This code was failing when analyzing dev_compiler with the new driver.
var instanceVarArrowExpression = (f) async => await f;

The reason was that we:
1. Don't understand AwaitExpression in AbstractConstExprSerializer.
2. So, we throw StateError.
3. So, AbstractConstExprSerializer.serialize() marks isValidConst.
4. But we don't check 'isValidConst' in linker.
5. The list of operations is empty, so we don't have anything in stack.
6. So, we throw an exception in linker.

R=paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org/2541603002 .
2016-11-29 13:22:31 -08:00
Paul Berry 4cdb5534bf Properly resolve dependency part paths in summary linker.
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2540823002 .
2016-11-29 13:07:53 -08:00
Emily Fortuna ecb9b3618a Handle "as" in kernel with ir.AsExpression case.
BUG=https://github.com/dart-lang/sdk/issues/27394
R=sra@google.com

Review URL: https://codereview.chromium.org/2538643002 .
2016-11-29 12:46:43 -08:00
Zachary Anderson 2644362215 GN: Reset default for fallback root certs to false.
R=johnmccutchan@google.com, rmacnak@google.com

Review URL: https://codereview.chromium.org/2536273002 .
2016-11-29 12:24:48 -08:00
Paul Berry af89793c11 Use putIfAbsent in InheritanceManager._reportError.
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/2537643004 .
2016-11-29 12:07:10 -08:00
Konstantin Shcheglov 86866a3116 Don't attempt to record reference to a named parameter of a synthetic function.
R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org/2537883002 .
2016-11-29 11:41:55 -08:00
Paul Berry 636e7b559b Avoid a crash during summary linking when there are inheritance errors.
R=brianwilkerson@google.com, scheglov@google.com

Review URL: https://codereview.chromium.org/2531333006 .
2016-11-29 11:04:29 -08:00
Vijay Menon 22f85df76e Fix expectation
I copied over the new version of the test for sdk/tests and dropped the 'negative'.

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/2536903005 .
2016-11-29 10:28:27 -08:00
Stephen Adams 84aa1746e2 dart2js-kernel: Implement RAW_DART_FUNCTION_REF
BUG=
R=sigmund@google.com

Review URL: https://codereview.chromium.org/2540603002 .
2016-11-29 10:16:37 -08:00
Paul Berry be11197a6c Consolidate AST element/type interfaces.
The AST getters/setters for `bestElement`, `propagatedElement`, and
`staticElement` having type `MethodElement` are moved to a common
interface class, `MethodReferenceExpression`.

The AST getters/setters for `staticElement` having type
`ConstructorElement` are moved to a common interface class,
`ConstructorReferenceNode`.

The overrides for `propagatedInvokeType` and `staticInvokeType` are
removed from `FunctionExpressionInvocation` and `MethodInvocation`,
since these overrides are identical to the corresponding declarations
in the base class, `InvocationExpression`.

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/2536253002 .
2016-11-29 10:11:35 -08:00
Brian Wilkerson f88b824e55 Read overlay content when computing completions (issue 27887)
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2537513004 .
2016-11-29 09:58:58 -08:00
Brian Wilkerson c443aceb7e Guard against missing line information (issue 27906)
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2537753003 .
2016-11-29 09:58:43 -08:00
Brian Wilkerson 3e51e6d3c9 Fix reference to validate method
R=paulberry@google.com

Review URL: https://codereview.chromium.org/2536233002 .
2016-11-29 09:57:27 -08:00
Florian Schneider ff483c2a78 VM: Fix potential problem with visiting stack frames.
LookupDartCode would only return a non-null coe object for regular functions,
but not for stub code objects.  We should also visit pointers for stub code objects.

R=rmacnak@google.com

Review URL: https://codereview.chromium.org/2528433007 .
2016-11-29 09:57:05 -08:00
Brian Wilkerson 37bc2efa1f Update status file after enabling read-only access to initializing formals
Review URL: https://codereview.chromium.org/2538803002 .
2016-11-29 09:56:27 -08:00
keertip bb74bc6a49 fix arguments for dartdoc run
BUG=
R=whesse@google.com

Review URL: https://codereview.chromium.org/2534173003 .
2016-11-29 08:43:14 -08:00
keertip cbd36e42e7 update dartdoc version in DEPS
BUG=
R=devoncarew@google.com

Review URL: https://codereview.chromium.org/2535863003 .
2016-11-29 08:07:51 -08:00
Brian Wilkerson 7e067a6fc8 Enable read-only access to initializing formals (issue 27895)
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2532953004 .
2016-11-29 07:46:28 -08:00
Konstantin Shcheglov 987ed0661c Dispose AnalysisContext(s) used to resynthesize CompilationUnitElement(s) for IndexResult(s).
Otherwise we end up with references from SDK cache partitions to the
context private partitions, which reference AnalysisContext(s).

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

Review URL: https://codereview.chromium.org/2532353002 .
2016-11-29 07:18:45 -08:00
Asger Feldthaus 5d26d67342 Revert "Update kernel baseline tests."
This reverts commit b771d61499.

BUG=

Review URL: https://codereview.chromium.org/2540713002 .
2016-11-29 15:01:09 +01:00
Asger Feldthaus bb540416f2 Revert "Store library paths relative to a given application root folder."
This reverts commit 60adb852ad.

BUG=

Review URL: https://codereview.chromium.org/2539783002 .
2016-11-29 14:55:57 +01:00
Martin Kustermann b5e0a0060b Remove dart:mojo.internal library in FlutterTarget
R=vegorov@google.com

Review URL: https://codereview.chromium.org/2539773002 .
2016-11-29 14:41:40 +01:00
William Hesse e2a48dbf38 Update status for failing tests
BUG=https://github.com/dart-lang/sdk/issues/27925
R=eernst@google.com

Review URL: https://codereview.chromium.org/2536183002 .
2016-11-29 14:26:27 +01:00
Asger Feldthaus 640061d62e Add more checks to kernel verifier.
We now check that classes and type parameters are not redeclared.

The verify_test also verifies that its test harness has no errors,
as this would make all the other tests useless.

BUG=
R=kmillikin@google.com

Review URL: https://codereview.chromium.org/2539743002 .
2016-11-29 13:04:43 +01:00
Asger Feldthaus b771d61499 Update kernel baseline tests.
These tests are currently disabled on the buildbots, but we should
keep them up-to-date so we can re-enable them soon.

BUG=
R=kmillikin@google.com

Review URL: https://codereview.chromium.org/2533773004 .
2016-11-29 12:58:31 +01:00
Asger Feldthaus 60adb852ad Store library paths relative to a given application root folder.
In kernel, library import URIs now have the "app" scheme instead of
the "file" scheme, representing a path relative to the application root.

dartk takes an --app-root flag giving the application root. This
defaults to the current working directory.

The intention is that kernel binaries should not carry irrelevant
path information, such as the path to the home directory of the
user who compiled a given file.

It is not the intention that end-users should see an app URI.
Import paths are currently not shown to users at all, and if we need
to do this, they should be translated to file paths first.

In theory we could stick to file URIs with relative paths, but the Uri
class from dart:core makes this difficult, as certain operations on it
assume that file paths should be absolute.

Source mapping URIs are not yet affected by this change.

R=kmillikin@google.com

Review URL: https://codereview.chromium.org/2532053005 .
2016-11-29 12:40:17 +01:00
Martin Kustermann 8698589dee VM: [Kernel] Update status file for precompiled (debug) builders
Review URL: https://codereview.chromium.org/2538713002 .
2016-11-29 10:32:53 +01:00
Johnni Winther 258ed14ae3 Decouple WorkItem from Compiler
- Remove Compiler and Enqueuer arguments from WorkItem.run
- Move show progress from WorkItem.run to Compiler.showXProgress methods
- Move Compiler.analyzeElement to Resolution.computeWorldImpact
- Move Compiler.analyze to ResolutionWorkItem Move Compiler.codegen to CodegenWorkItem

R=het@google.com

Review URL: https://codereview.chromium.org/2531303002 .
2016-11-29 09:31:41 +01:00
Johnni Winther fbc69f1e9e Merge QueueFilter with EnqueuerStrategy
R=het@google.com

Review URL: https://codereview.chromium.org/2529273003 .
2016-11-29 09:22:13 +01:00
Johnni Winther 417d4d7a50 Further encapsulate Enqueuer
R=het@google.com

Review URL: https://codereview.chromium.org/2527403002 .
2016-11-29 09:14:09 +01:00
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