Commit graph

9961 commits

Author SHA1 Message Date
Brian Wilkerson 776000aac4 Enhance the tests for ComputeLibraryCycleTask
R=paulberry@google.com

Review URL: https://codereview.chromium.org/2052223003 .
2016-06-10 09:55:15 -07:00
Brian Wilkerson 51bb8b289e Fix the generation of URIs for scripts
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2052293002 .
2016-06-10 08:26:17 -07:00
Florian Schneider 705e9e781d Fix more flakiness in pkg tests.
I already fixed similar failures.

I recommend eliminating all uses of pumpEventQueue.

BUG=#26556
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2059503002 .
2016-06-09 15:08:06 -07:00
Brian Wilkerson 279cb449e2 Fix a broken unit test
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2055983002 .
2016-06-09 14:03:17 -07:00
Konstantin Shcheglov a986d92eb4 Optimize computing library closures - reuse already created closures.
This is not the most efficient implementation, but it still makes
incremental analysis of an Analysis Server test module about 30% faster.

Now computing MD5 takes about 50% of total time.
Not sure what to do with this :-(

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

Review URL: https://codereview.chromium.org/2046223004 .
2016-06-09 14:02:52 -07:00
pq 1eefb68c25 SDK summary creation generalization (pt 1).
Steps towards generalizing summary creation bits (to allow for, among other things, flutter SDK summary creation).  API is provisional (note still in `lib/src`).

Next up:
* move result writing out of `tool/` to allow for reuse
* `SummaryBuilder.forPackageMap(..)` factory (or similar) for use in the flutter SDK case

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

Review URL: https://codereview.chromium.org/2055543002 .
2016-06-09 12:06:36 -07:00
pq 253ef8c391 Update DEPS (and analyzer) to latest package_config.
Once incremental analysis caching is enabled this will win us a 30% boost in analyzer CLI throughput. :)

BUG=
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2048323003 .
2016-06-09 10:09:39 -07:00
Brian Wilkerson 800a54354a Conditionally enable SDK summaries in server
R=pquitslund@google.com, scheglov@google.com

Review URL: https://codereview.chromium.org/2020293004 .
2016-06-09 09:58:59 -07:00
Harry Terkelsen 3bb92ad12d rename operathor to operator now that vm bug is fixed
R=johnniwinther@google.com

Review URL: https://codereview.chromium.org/2052693002 .
2016-06-09 09:29:20 -07:00
Konstantin Shcheglov 979543e3a8 Issue 26629. Detect cache inconsistency in GetContentTask.
When it is detected, invalidate the outputs and throw an exception to
let Driver know that it should to recover.

R=brianwilkerson@google.com, paulberry@google.com
BUG= https://github.com/dart-lang/sdk/issues/26629

Review URL: https://codereview.chromium.org/2050573003 .
2016-06-09 08:31:04 -07:00
Konstantin Shcheglov d7ec8ca711 Make possible to don't track cache dependencies.
If 'trackCacheDependencies' is set to 'false', this makes DDC
compilation of Angular2 project about 10% faster.

Unfortunately I was not able to avoid creating ResultDescriptor(s) and
adding them into WorkItem.inputTargetedResults altogether. It is used
in AnalysisTask._findCyclicPath() to create InfiniteTaskLoopException
with additional information.

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

Review URL: https://codereview.chromium.org/2054453002 .
2016-06-09 08:23:15 -07:00
Brian Wilkerson f183ec3a45 Fix equality between subclasses of Source
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2050083002 .
2016-06-09 07:42:32 -07:00
Johnni Winther 286b21133b Compute and cache element NativeBehavior during resolution.
NativeBehavior for method calls and field load/store are now computed
during resolution and apply as part of the world impact. This prepares
for (full) serialization/deserialization of native elements.

R=het@google.com

Review URL: https://codereview.chromium.org/2045223002 .
2016-06-09 09:50:51 +02:00
Harry Terkelsen ddac2a8a76 Revert "check that Class and typedef refs are const"
This reverts commit 8a6a6377e7.

BUG=

Review URL: https://codereview.chromium.org/2049343002 .
2016-06-08 16:32:30 -07:00
Harry Terkelsen 8a6a6377e7 check that Class and typedef refs are const
Fixes #26580

R=sra@google.com

Review URL: https://codereview.chromium.org/2049553002 .
2016-06-08 16:02:55 -07:00
Konstantin Shcheglov 32f032a874 Add AnalysisCache.flush() utility method.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2052553003 .
2016-06-08 14:52:23 -07:00
Konstantin Shcheglov f2c17362fd Issue 26639. Set source for mock 'dart:async' library.
R=brianwilkerson@google.com, danrubel@google.com
BUG= https://github.com/dart-lang/sdk/issues/26639

Review URL: https://codereview.chromium.org/2044383003 .
2016-06-08 12:08:41 -07:00
pq 435e38ab77 @required support for super and redirecting cons (#26642).
R=brianwilkerson@google.com

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

Fixes: https://github.com/dart-lang/sdk/issues/26642
2016-06-08 11:19:43 -07:00
Konstantin Shcheglov c57052d2b4 Check versions of summaries and cache.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2048933002 .
2016-06-08 09:10:42 -07:00
Brian Wilkerson 0f9fb5d394 Slightly better debugging output (issue-26636)
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2053443002 .
2016-06-08 09:06:39 -07:00
Brian Wilkerson f772c64cfe Add bounds check in scope lookup (issue 26633)
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2047273004 .
2016-06-08 09:02:12 -07:00
Brian Wilkerson 27c0eeb0b2 Fix LUB computation in face of errors in code (issue 26631)
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2043173002 .
2016-06-08 07:54:54 -07:00
Erik Ernst c3dfe51295 Adds status entries for initializing_formal tests.
This CL should fix the problem that arose with commit
543a51ff3e. Here's the description from
that CL:

This CL adds tests for previously uncovered elements of the semantics
and includes fixes such that the desired behavior is obtained. In
particular, an `isInitializingFormal` element may now occur in contexts
where it wasn't expected until now, and changes were made to handle it.
It is also checked that a capture of an initializing formal (in a
function literal) captures the parameter, not the field.

R=johnniwinther@google.com

Review URL: https://codereview.chromium.org/2042293002 .
2016-06-08 10:50:33 +02:00
Konstantin Shcheglov 0f061f1987 Don't prevent 'isCycleFree' updating for resynthesized constructors.
We update it in ConstantEvaluationEngine which in general case does
not know whether the constructor is resynthesized or not.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2047103002 .
2016-06-07 19:21:03 -07:00
pq df4ea53593 Package map processing tests.
Follow-up from https://codereview.chromium.org/2043963004/, where a number of test cases were identified.  In particular:

> - What if the package map is empty?
> - What if the package map doesn't have a package with an embedder file?
> - What is there is no package with an ext?
> - What if we don't find either one?
> - What happens if one or both of those files are invalid?

BUG=
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/2046493006 .
2016-06-07 15:04:30 -07:00
Brian Wilkerson 4b6d9fdf39 Fix NPE when there is no keyword (issue 26630)
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2050463002 .
2016-06-07 14:14:02 -07:00
John Messerly 61a2bb4fdc Remove dead code in strong mode's warnings for null literals
This code should no longer be reachable. I think it was part of our early non-null primitive type experimentation. (Currently `null` literal is treated as bottom, so it should never be a downcast if casting from null.)

R=leafp@google.com

Review URL: https://codereview.chromium.org/2050443002 .
2016-06-07 14:03:34 -07:00
pq 995a19b26f Package map processing abstraction.
Babysteps towards a cleaner context creation story.

Comments welcome!

BUG=
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/2043963004 .
2016-06-07 14:01:18 -07:00
Brian Wilkerson e3e72aeb01 Rework the parser to improve performance
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2041723008 .
2016-06-07 13:58:29 -07:00
Harry Terkelsen 74abdfe09e typecheck erroneous members as dynamic
Fixes #26582

R=sra@google.com

Review URL: https://codereview.chromium.org/2046053002 .
2016-06-07 13:18:45 -07:00
Konstantin Shcheglov 1390dbd36a Fix for writing structures of imported libraries.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2047573003 .
2016-06-07 12:00:44 -07:00
Paul Berry f5ef3232ea Remove unnecessary overrides of PropertyAccessorElementImpl.operator== and hashCode
It turns out that these overrides aren't necessary, since the
element's location contains enough information to distinguish between
getters and setters.  Removing the overrides makes
PropertyAccessorElementImpl's behavior match that of
PropertyAccessorElementHandle, which is important when summaries are
in use.

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/2042393002 .
2016-06-07 11:26:53 -07:00
Konstantin Shcheglov 676a9f7d60 Compute IGNORE_INFO and filter DART_ERRORS.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2048713002 .
2016-06-07 09:56:14 -07:00
Konstantin Shcheglov c2f3076450 Allow analyzer to be used with crypto 2.x.x
R=brianwilkerson@google.com, kevmoo@google.com
BUG=

Review URL: https://codereview.chromium.org/2047023002 .
2016-06-07 09:49:27 -07:00
Konstantin Shcheglov 1074d44c65 Serve DART_ERRORS from incremental cache.
R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org/2045793003 .
2016-06-06 20:25:33 -07:00
Konstantin Shcheglov a42317f2de Serve INCLUDED_PARTS from incremental cache.
R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org/2044513003 .
2016-06-06 16:00:37 -07:00
pq 63b00419b1 Supertype checking cleanup.
Following up from: https://codereview.chromium.org/2045693002/.

BUG=
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/2047523002 .
2016-06-06 15:13:16 -07:00
Konstantin Shcheglov ed8154a53c Add put/getSourceErrorsInLibrary to IncrementalCache.
R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org/2042883002 .
2016-06-06 13:27:25 -07:00
pq 8b1440fd2b Fix @protected checks to play nice with generic supers (linter#257).
Fixes: https://github.com/dart-lang/linter/issues/257.

(Pardon the member-sorting churn in `hint_code_test`.)

BUG=
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2045693002 .
2016-06-06 13:14:13 -07:00
pq 8b779f33c0 Fix @protected to include closure references (linter#255).
Generalizes the check for invalid protected access.

R=brianwilkerson@google.com

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

Fixes: https://github.com/dart-lang/linter/issues/255.
2016-06-06 11:43:30 -07:00
Konstantin Shcheglov e6d2b37065 Start using crypto 1.1.1 and tweak MD5 computation.
R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org/2041963002 .
2016-06-06 11:37:08 -07:00
Konstantin Shcheglov e87a9c955c Start adding experimental incremental analysis mode into CLI analyzer.
At the moment it is not very useful, because it does not use or store
errors from incremental cache yet. But I hope to implement this soon.

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

Review URL: https://codereview.chromium.org/2039773004 .
2016-06-06 11:35:55 -07:00
Konstantin Shcheglov 2ef55609fc Resynthesize enums lazily.
Now everything is resynthesized lazily, so we can remove 'unitHolder'.

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

Review URL: https://codereview.chromium.org/2043783002 .
2016-06-06 08:55:29 -07:00
Konstantin Shcheglov df61e8d64a Resynthesize enum fields lazily.
R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org/2040673002 .
2016-06-06 08:32:07 -07:00
Erik Ernst 6d56db592b Revert "New tests for initializing formal access."
This reverts commit 543a51ff3e
because several status file updates are needed.

Review URL: https://codereview.chromium.org/2039243002 .
2016-06-06 16:07:03 +02:00
Erik Ernst 543a51ff3e New tests for initializing formal access.
This CL adds tests for previously uncovered elements of the semantics
and includes fixes such that the desired behavior is obtained. In
particular, an `isInitializingFormal` element may now occur in contexts
where it wasn't expected until now, and changes were made to handle it.
It is also checked that a capture of an initializing formal (in a
function literal) captures the parameter, not the field.

R=johnniwinther@google.com

Review URL: https://codereview.chromium.org/2039833002 .
2016-06-06 15:55:44 +02:00
danrubel 2d310f1e67 improve completions in closures and switch statements
This addresses several situations where the parser interprets "as" as
part of an "as" expression, but the user is trying to enter the "async"
keyword or an identifier starting with "as".

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/2034713004 .
2016-06-06 08:09:44 -04:00
Johnni Winther e97c1c673f Align semantics of getDefaultConstructor()
The modelx implementation of getDefaultConstructor() (surprisingly)
returned constructors with only optional arguments. This CL aligns the
modelz implementation with this, adding a TODO to figure out what the
best behavior is.

R=sigmund@google.com

Review URL: https://codereview.chromium.org/2033893004 .
2016-06-06 11:23:22 +02:00
Johnni Winther 153c36ce39 Don't crash when tree shaking is disabled
When tree shaking is disabled, type checking crashed on member lookup into serialized classes.
Also classes are now ensured to be resolved when computing lookup.

R=sigmund@google.com

Review URL: https://codereview.chromium.org/2031293002 .
2016-06-06 11:08:01 +02:00
Johnni Winther b11a92f2ed Handle use of fromEnvironment from serialized data.
This CL removes the [intEnvironment], [boolEnvironment] and [stringEnvironment]
from [Compiler] and instead determine .fromEnvironment directly from the
constructor element itself.

R=sigmund@google.com

Review URL: https://codereview.chromium.org/2033383002 .
2016-06-06 10:52:41 +02:00