Commit graph

11817 commits

Author SHA1 Message Date
Brian Wilkerson f87e62ef14 Convert subclasses of Enum
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2365553004 .
2016-09-23 06:54:26 -07:00
Paul Berry fe2c152ee2 Revert "Issue 27300. Report HintCode.ABSTRACT_SUPER_MEMBER_REFERENCE."
This broke the analyzer bots.  See for example https://build.chromium.org/p/client.dart/builders/analyzer-mac10.11-release-be/builds/337/steps/analysis%20server%20unit%20tests/logs/stdio

This reverts commit 77ba5fd087.

TBR=scheglov@google.com

Review URL: https://codereview.chromium.org/2361393002 .
2016-09-23 05:24:53 -07:00
Paul Berry 5d1dcde18c Revert "Issue 27375. Use ContextBuilder to find analysis options file in analyzer_cli."
This broke the analyzer bots.  See for example: https://build.chromium.org/p/client.dart/builders/analyzer_experimental-linux-release-be/builds/9135/steps/tests%20--host-checked%20--checked/logs/stdio

This reverts commit 75a4f968be.

TBR=scheglov@google.com

Review URL: https://codereview.chromium.org/2366913002 .
2016-09-23 05:12:42 -07:00
Johnni Winther 3d533a08f2 More kernel_impact.
R=het@google.com

Review URL: https://codereview.chromium.org/2360773003 .
2016-09-23 11:01:53 +02:00
Johnni Winther bad12f912b Move towards using WorldImpact for codegen
CustomElementsAnalysis, TypeVariableHandler, LookupAnalysis and metadata
constants no longer require a [Registry] but instead collect their impact.

R=het@google.com, sra@google.com

Committed: 0a79576ed0

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

Reverted:  2a1ae8a3ce
2016-09-23 10:43:12 +02:00
Johnni Winther a52683ff9b Handle calls to redirecting factories.
R=het@google.com

Review URL: https://codereview.chromium.org/2361783002 .
2016-09-23 10:03:49 +02:00
John Messerly adc71ab396 re-land fix #27110 with proper DDC side of changes
R=leafp@google.com

Review URL: https://codereview.chromium.org/2362563004 .
2016-09-22 15:47:55 -07:00
Konstantin Shcheglov 75a4f968be Issue 27375. Use ContextBuilder to find analysis options file in analyzer_cli.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/27375

Review URL: https://codereview.chromium.org/2355413005 .
2016-09-22 15:11:15 -07:00
Konstantin Shcheglov 92ee0b2488 Fix for the new hint in super_mixin_example.dart in analyzer_cli.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2364763002 .
2016-09-22 15:03:06 -07:00
Konstantin Shcheglov 77ba5fd087 Issue 27300. Report HintCode.ABSTRACT_SUPER_MEMBER_REFERENCE.
There are no positives in analyzer/server, dev_compiler or dart2js.

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

Review URL: https://codereview.chromium.org/2364733002 .
2016-09-22 14:27:47 -07:00
Brian Wilkerson fd7bb76a4b Add some errors related to nnbd
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2362873002 .
2016-09-22 13:43:37 -07:00
Konstantin Shcheglov 65d2a2ce82 Issue 27392. Fix for invoking objects with function-bounds type parameter types.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/27392

Review URL: https://codereview.chromium.org/2360303003 .
2016-09-22 11:50:24 -07:00
Stephen Adams 5cafe42577 Use indexing for type variable access when the receiver type constrains the substitution(s)
Often we are accessing Iterable.E from a precisely known class.

BUG=
R=johnniwinther@google.com

Review URL: https://codereview.chromium.org/2352913003 .
2016-09-22 11:32:26 -07:00
Brian Wilkerson 74686371b3 Add support for getting the sessionId from instrumentation and sending it to the client
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2359233002 .
2016-09-22 10:26:13 -07:00
Konstantin Shcheglov 1e744f3dc2 Skip dev_compiler/gen while testing analyzer.
There are about 400 failures in them.

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

Review URL: https://codereview.chromium.org/2358393003 .
2016-09-22 10:19:03 -07:00
Konstantin Shcheglov 5703f5adb1 Replace using reprecated 'package:analyzer/src/generated/error.dart'.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2364643002 .
2016-09-22 10:10:53 -07:00
Konstantin Shcheglov 163931ffdd Fix couple hints.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2362753002 .
2016-09-22 09:59:40 -07:00
William Hesse 92cd3e10f5 Fix test.py and tests to use an explicit --packages flag.
BUG=https://github.com/dart-lang/sdk/issues/27412
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2361813003 .
2016-09-22 17:51:09 +02:00
Johnni Winther 7a570f1b80 Roll kernel to latest and add baseline test.
The added visitor_test tests that the IR generated by the KernelVisitor
in dart2js matches the spec-mode IR.

R=asgerf@google.com, het@google.com

Review URL: https://codereview.chromium.org/2360603002 .
2016-09-22 10:16:11 +02:00
Konstantin Shcheglov 5a668422ff Fix for test of linking with unused type parameter.
R=paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org/2354383002 .
2016-09-21 18:04:34 -07:00
Vijay Menon aae63b7e21 Regenerate DDC SDK
BUG=
R=jmesserly@google.com

Review URL: https://codereview.chromium.org/2358323002 .
2016-09-21 16:39:24 -07:00
Harry Terkelsen 3a01cbd31c kernel->ssa: Implement for-loops and while-loops
This involved splitting out the loop handling logic from the
original SSA builder and sharing it with the kernel builder.
This was just the easiest way to do this for now, but in the future
we should write the loop handler for kernel to take into account
the simplified structure that kernel provides.

R=sra@google.com

Review URL: https://codereview.chromium.org/2360673003 .
2016-09-21 16:38:10 -07:00
John Messerly 738b481052 fix #27411, avoid capture for instance creation
R=leafp@google.com

Review URL: https://codereview.chromium.org/2363503003 .
2016-09-21 16:19:36 -07:00
Vijay Menon a22b3b6205 Runtime fixes on DDC tests
TBR=jmesserly@google.com

Review URL: https://codereview.chromium.org/2354383003 .
2016-09-21 16:12:30 -07:00
Vijay Menon 8e943b8c59 Fix tests
This fixed the original 5 static errors from this morning.

TBR=jmesserly@google.com

Review URL: https://codereview.chromium.org/2356413002 .
2016-09-21 13:59:55 -07:00
Konstantin Shcheglov 3325004461 Include referenced declared variables and their values into the linked bundle hash.
R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org/2358213002 .
2016-09-21 13:34:58 -07:00
Konstantin Shcheglov e0150c45b1 Fix 'compareTypeParameterElements' to use TypeParameterElement, not Impl.
TBR

This fixes the problem exposed by 5eea83396e.

R=paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org/2359953002 .
2016-09-21 11:27:41 -07:00
Paul Berry dac96d0584 Add SyntacticEntity, an interface shared by AstNode and Token.
This allows types to be tightened up for AstNode.childEntities.

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/2357803002 .
2016-09-21 11:23:46 -07:00
Harry Terkelsen b114cfc724 kernel->ssa: support string concatenations/interpolations
R=johnniwinther@google.com

Review URL: https://codereview.chromium.org/2357513005 .
2016-09-21 10:42:46 -07:00
Stephen Adams 2a1ae8a3ce Revert "Move towards using WorldImpact for codegen"
-36% on DromeaoDRT Benchmark?benchmark=dom-query-getElementsByTagName(div)

TBR=johnniwinther@google.com
BUG=

Review URL: https://codereview.chromium.org/2359923002 .
2016-09-21 10:41:16 -07:00
Konstantin Shcheglov 5eea83396e Fix for out of scope type parameters in members.
...by always using the substituted type in members.

This might increase memory usage. However members are mosly used in
method bodies, and we now aggressively flush resolved ASTs from cache.

I don't see any noticeable increase on analyzer + analysis_server code.

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

Review URL: https://codereview.chromium.org/2351133004 .
2016-09-21 10:19:26 -07:00
Konstantin Shcheglov e82cbea8fe Issue 27386. Fix for 'use similar' Quick Fix for import-prefixed identifiers.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/27386

Review URL: https://codereview.chromium.org/2361483002 .
2016-09-21 10:02:20 -07:00
Brian Wilkerson 454289dbe3 (TBR) Fix test failure
Review URL: https://codereview.chromium.org/2357303002 .
2016-09-21 09:10:40 -07:00
Konstantin Shcheglov bdc024a303 Move PackageIndexAssembler into analysis_server.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2357283002 .
2016-09-21 08:54:46 -07:00
Brian Wilkerson d947a7ba89 Async is no longer optional
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2361433002 .
2016-09-21 08:29:34 -07:00
Brian Wilkerson 6062d5d6bd Fix mustCallSuper to ignore methods from interfaces
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2348383006 .
2016-09-21 08:03:09 -07:00
Brian Wilkerson 2d9e690e6c Fix newly introduced errors and warnings
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2357553003 .
2016-09-21 08:01:04 -07:00
Johnni Winther 0a79576ed0 Move towards using WorldImpact for codegen
CustomElementsAnalysis, TypeVariableHandler, LookupAnalysis and metadata
constants no longer require a [Registry] but instead collect their impact.

R=het@google.com

Review URL: https://codereview.chromium.org/2349163003 .
2016-09-21 12:31:38 +02:00
Johnni Winther ca3c2882ae Introduce OpenWorld.
R=het@google.com

Review URL: https://codereview.chromium.org/2320583002 .
2016-09-21 11:48:10 +02:00
Johnni Winther 012229ec83 Split Universe into ResolutionUniverse and CodegenUniverse
Main changes in universe.dart

R=het@google.com, sigmund@google.com

Review URL: https://codereview.chromium.org/2318593003 .
2016-09-21 11:24:26 +02:00
Johnni Winther b7d424f6fd Handle local functions in kernel_impact.
R=het@google.com

Review URL: https://codereview.chromium.org/2359453002 .
2016-09-21 11:18:03 +02:00
Johnni Winther 614cde5b1c Split World usage into open, inference, and closed world.
This is a step towards separating the backend element model from the frontend model.

Main changes in world.dart.

R=het@google.com

Review URL: https://codereview.chromium.org/2314703002 .
2016-09-21 10:54:34 +02:00
Johnni Winther 7ea9f8b8bc Handle string interpolation/juxtaposition in kernel_impact.
R=het@google.com

Review URL: https://codereview.chromium.org/2357433003 .
2016-09-21 10:44:57 +02:00
John Messerly aa85651820 fix #27403, use AST summaries in DDC
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2353133004 .
2016-09-20 17:55:09 -07:00
Stephen Adams 3d9bbdaa9a dart2js load elimination: Look through refinements for locations
We have to look through the refinements (via .nonCheck()) for locations in order to avoid mistaking two different refinements for two separate locations.

R=het@google.com

Review URL: https://codereview.chromium.org/1459273002 .
2016-09-20 16:12:55 -07:00
Vijay Menon e825d6d63e Update ddc pubspec.yaml
Fixing build ... should we be doing something differently?  E.g., not check in the lock file?

TBR=jmesserly@google.com,rnystrom@google.com

Review URL: https://codereview.chromium.org/2353193002 .
2016-09-20 15:08:05 -07:00
Konstantin Shcheglov ff22a0fe89 Fix 'new KnownClass.unresolvedConstructor()' type computation.
R=paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org/2356843002 .
2016-09-20 14:00:51 -07:00
Paul Berry 36a0807331 Test summary resynthesis of unresolved annotations.
Unresolved annotations were being summarized properly, but this was
untested, and testing them required some bug fixes to the test
infrastructure (mostly due to quirks introduced by dartbug.com/25706).

R=scheglov@google.com

Review URL: https://codereview.chromium.org/2357513004 .
2016-09-20 13:43:41 -07:00
Konstantin Shcheglov 1401a38d59 We do and test only AST based summaries.
There are 3 tests failing.

According to the Spec 'void' and 'dynamic' cannot be prefixes.
"It is a compile-time error if a built-in identifier is used as the declared name of a prefix, class, type parameter or type alias."
So, most probably these tests should be changed to test that the prefix is null.

I will look into "fail_invalid_prefix_type_parameter" in a separate CL.

R=paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org/2353993002 .
2016-09-20 10:48:56 -07:00
Harry Terkelsen 636084afa2 kernel->ssa: implement top-level getters and setters
See https://github.com/dart-lang/sdk/issues/27394

R=johnniwinther@google.com

Review URL: https://codereview.chromium.org/2353793002 .
2016-09-20 10:18:08 -07:00