Commit Graph

13032 Commits

Author SHA1 Message Date
Konstantin Shcheglov be0ce86f43 Run more analysis tests with the new analysis driver.
R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2628083002 .
2017-01-11 13:35:46 -08:00
Brian Wilkerson 85b1e7abbe Revert "Add support for generic function type syntax, part 1"
Review-Url: https://codereview.chromium.org/2624283003 .
2017-01-11 13:30:52 -08:00
Florian Loitsch 9007ee6a2a Fix missing parenthesis.
Review-Url: https://codereview.chromium.org/2623283003 .
2017-01-11 22:27:51 +01:00
Brian Wilkerson 1cd918533d Add support for generic function type syntax, part 1
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2613383003 .
2017-01-11 13:12:10 -08:00
Konstantin Shcheglov e197fd81ba Replace same() with equals() in TypeAssertions.
R=brianwilkerson@google.com, leafp@google.com
BUG=

Review-Url: https://codereview.chromium.org/2623283002 .
2017-01-11 12:55:04 -08:00
Vijay Menon df45dacb88 Fixes #28338
Fix await/cascade bug and corresponding test.

R=jmesserly@google.com

Review-Url: https://codereview.chromium.org/2628053002 .
2017-01-11 12:37:18 -08:00
Konstantin Shcheglov 799296e92b Extract x_Driver tests that time out on Windows bots.
R=paulberry@google.com
BUG=

Review-Url: https://codereview.chromium.org/2623253003 .
2017-01-11 11:49:34 -08:00
Konstantin Shcheglov 31f08c798a Don't instantiate a new InterfaceTypeImpl for a ClassElement without type parameters.
R=paulberry@google.com
BUG=

Review-Url: https://codereview.chromium.org/2628013002 .
2017-01-11 11:15:40 -08:00
Martin Kustermann 23cc9cca41 VM: [Kernel] Add toString() support for generated enum classes
R=vegorov@google.com

Review-Url: https://codereview.chromium.org/2625053003 .
2017-01-11 19:50:21 +01:00
Martin Kustermann 673eb56471 VM: [Kernel] Fix remaining issues with kernel-based async/await implementation
This CL brings us on-par with the VM implementation in terms of tests.

  * Ensure we have saved-try-ctx/exception/stacktrace variables hoisted out for
    try-catch **and** try-finally.

  * Instead of closing the stream controller for 'async*' functions on return we
    do it inside an try-finally block so we get there in terms of normal and
    exceptional exit.

R=vegorov@google.com

Review-Url: https://codereview.chromium.org/2627873002 .
2017-01-11 19:35:02 +01:00
Vijay Menon 46b7f79fd5 Defer all recursive mixins
This defers mixins along with the supertype.  It passes Leaf's example on the bug.  Will add that as a proper test.

Fixes #28334

R=jmesserly@google.com

Review-Url: https://codereview.chromium.org/2625913003 .
2017-01-11 10:32:23 -08:00
Florian Loitsch 71ec2f0297 Implement 'covariant' modifier for dart2js.
Also adds some tests.

Fixes #28165

BUG= http://dartbug.com/28165
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2626843003 .
2017-01-11 19:12:48 +01:00
Bob Nystrom e5a45ffb5c Fix ddc USAGE doc.
The only substantive change is adding the missing
"--dart-sdk-summary=build" parameter to building the SDK. I went ahead
and prettied up the Markdown too while I was at it.

R=vsm@google.com

Review-Url: https://codereview.chromium.org/2620203002 .
2017-01-11 09:51:37 -08:00
Konstantin Shcheglov dae3b69321 Fix the test on Windows.
TBR

R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2625143002 .
2017-01-11 09:39:22 -08:00
Konstantin Shcheglov 41f8d695b0 Fix an analysis error in tests.
TBR

R=paulberry@google.com
BUG=

Review-Url: https://codereview.chromium.org/2622323002 .
2017-01-11 09:22:14 -08:00
Konstantin Shcheglov 73e7da4976 Run the most of error generating tests with the new analysis driver.
Some tests have more failures than I feel comfortable marking as failing.
I will triage them in following CLs.

StaticTypeAnalyzer2Test
StrictModeTest
StrongModeDownwardsInferenceTest
StrongModeStaticTypeAnalyzer2Test
TypePropagationTest

R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2628743002 .
2017-01-11 08:25:21 -08:00
Asger Feldthaus 70a4d169c0 Insert covariance checks in strong mode.
"Covariance checks" are checks on certain parameters, necessary due to
the unsafe covariant subtyping rule for interface types.

The new pass generates a checked entry point for each method with
covariance checks. This entry point checks the parameters whose type
cannot be trusted, and then calls the actual method implementation.

Every typed call is then redirected to the checked entry point if the
interface taget declares any parameters with unsafe types, unless the
receiver is 'this'.

Dynamic calls and covariant overrides are not addressed by this CL,
these are still unchecked.

BUG=
R=kmillikin@google.com

Review-Url: https://codereview.chromium.org/2618393002 .
2017-01-11 16:33:04 +01:00
Paul Berry fdbdd8a4d8 Add code to ProcessedOptions to fetch the SDK summary bundle.
R=danrubel@google.com

Review-Url: https://codereview.chromium.org/2625533002 .
2017-01-11 06:19:40 -08:00
Asger Feldthaus 8dd2b15951 Insert implicit downcasts in kernel strong mode.
This is implemented as a separate pass, although going forward
I would like the new frontend to insert these checks.

R=kmillikin@google.com

Review-Url: https://codereview.chromium.org/2619193003 .
2017-01-11 13:47:40 +01:00
Jens Johansen 414d66dce6 More offsets in kernel
Added offsets to more nodes.
Added end offsets to some nodes.
Added functionnode debuggability flag.

This changes the dill format.
The new offsets et al. are read on the C++ side, but not used
for anything usefull yet.

This is step #2 in introducing these things, next step(s) will be
using it on the C++ side.

R=asgerf@google.com

Review-Url: https://codereview.chromium.org/2626613002 .
2017-01-11 09:59:52 +01:00
Paul Berry 9d5c3a9917 Fix Windows path handling in uri_resolver_test.
Fixes #28309

R=danrubel@google.com

Review-Url: https://codereview.chromium.org/2628653002 .
2017-01-10 15:09:17 -08:00
Stephen Adams 499248e4e4 Fix for 27467 - dart2js error with re-entrant static initializer
BUG=
R=lrn@google.com

Review-Url: https://codereview.chromium.org/2620123002 .
2017-01-10 14:57:26 -08:00
Konstantin Shcheglov 65ff5b5e50 Explicitly compute analysis results for sources to check errors.
R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2625783002 .
2017-01-10 12:58:58 -08:00
Vijay Menon be95523221 Cleanup references to the old DDC repo
Reachable issues migrated over.

R=jmesserly@google.com

Review-Url: https://codereview.chromium.org/2621543004 .
2017-01-10 12:56:29 -08:00
Jennifer Messerly 42341c2abc fix regression to analysis_server tests
R=brianwilkerson@google.com

Review-Url: https://codereview.chromium.org/2622953002 .
2017-01-10 11:02:32 -08:00
Konstantin Shcheglov 5a3afed30f Make error producing tests ansynchronous.
This is another preliminary test to run these tests with the new
analysis driver. Especially when we're going to replace the task based
analysis implementation with another one.

R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2624793002 .
2017-01-10 10:33:44 -08:00
Konstantin Shcheglov b5c5c1c222 Remove computeLibrarySourceErrors().
All errors are computed and validated in assertErrors().

In a 3 tests assertErrors() for the library was mved before the call
for a part to ensure library/part link establishment.

R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2626653002 .
2017-01-10 08:44:48 -08:00
Florian Loitsch 2547caab25 Reapply "reflectType() dynamic type arguments support (#26012)"
This was a pull request: 8a8033a417

MirrorsUsed doesn't transitively include reflective information. However, it must still be able to create TypeMirrors for types that are used as return- or parameter types.

Initially, the patch checked that TypeMirrors had the correct number of arguments for generic types. This is now disabled.

A better approach would be to know if a class has full reflective information, or not. But this would require much bigger changes to the system.

R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2615943004 .
2017-01-10 15:53:21 +01:00
Jens Johansen 98e96e2a29 Initialize boolean to fix checked mode error.
Vvoid 'boolean expression must not be null' error in checked mode.

BUG=
R=kmillikin@google.com

Review-Url: https://codereview.chromium.org/2619983002 .
2017-01-10 10:41:08 +01:00
Jens Johansen 3f55b8e2b7 Non-format-changing kernel offset changes
Updates to kernel that sets more offsets (and introduces end offests
and 'debuggability') - but doesn't necessarily persist them,
i.e. the format doesn't change and no C++ changes are neccessary yet.

This is step #1 in introducing these things, next step(s) will be
persisting the new stuff and using it on the C++ side.

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

Committed: https://github.com/dart-lang/sdk/commit/5edca8c4d3733f319ab2d328aa28ceb286a30904

Reopening as I reverted the change as it broke package:compiler.

Review-Url: https://codereview.chromium.org/2610133002 .
2017-01-10 09:16:19 +01:00
Brian Wilkerson 59b025adfb Fix invalid cast
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2626463003 .
2017-01-09 16:56:59 -08:00
Vijay Menon 33c8f425b6 Disable auto "debugger" call for tests
R=jacobr@google.com

Review-Url: https://codereview.chromium.org/2621823002 .
2017-01-09 15:42:42 -08:00
Vijay Menon 038a66b305 Regen DDC error expectations
Is this due to recent inference changes?

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

Review-Url: https://codereview.chromium.org/2619923002 .
2017-01-09 15:32:05 -08:00
Stephen Adams b7dc78a844 dart2js-kernel: handle 'dynamic' as an expression
BUG=
R=efortuna@google.com

Review-Url: https://codereview.chromium.org/2620593002 .
2017-01-09 15:20:57 -08:00
Paul Berry 4a0695f4d4 Mark pkg/front_end/test/src/base/uri_resolver_test as failing on Windows
This was broken by ba241c0c8d.  I will follow up with a fix.

TBR=danrubel@google.com

Review-Url: https://codereview.chromium.org/2621543003 .
2017-01-09 14:53:31 -08:00
Stephen Adams e9ea8e4d87 dart2js-kernel: handle top-level / static unresolved methods / getters / setters
R=efortuna@google.com

Review-Url: https://codereview.chromium.org/2621433002 .
2017-01-09 14:23:44 -08:00
Stephen Adams 0b00989fc4 dart2js-kernel: implement rethrow
R=efortuna@google.com

Review-Url: https://codereview.chromium.org/2616263002 .
2017-01-09 13:13:33 -08:00
Konstantin Shcheglov 619033a633 Switch AnalysisDriver tests to using the physical SDK.
R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2624563003 .
2017-01-09 13:03:44 -08:00
Jennifer Messerly 816592a941 fixes #28236, generic methods should not cause warnings in Dart 1
Instantiate universal functions in subtype tests & tear-offs. Also updates the status files and one Analyzer test that covered the tear-off type.

R=brianwilkerson@google.com

Review-Url: https://codereview.chromium.org/2621433003 .
2017-01-09 12:46:20 -08:00
Konstantin Shcheglov 1aa52a7a80 Increment AnalysisDriver data version.
Now, when linter has been fixed, we need to stop using the old cached
resolution errors.

R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2618423002 .
2017-01-09 12:21:38 -08:00
Konstantin Shcheglov 5a9c5ac1ec Issue 28068. Implement diagnostics domain for the new analysis driver.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/28068

Review-Url: https://codereview.chromium.org/2625493002 .
2017-01-09 12:07:15 -08:00
Paul Berry ba241c0c8d Use URIs rather than paths in front end API.
This carries a number of benefits:

- It allows the front end to trivially support schemes other than
  "file:" (e.g. "http:") by allowing the client to supply a FileSystem
  implementation that handles them.

- It is more consistent with the functionality of the ".packages" file
  (which allows packages to map to any kind of URI).

- It allows the "bazel root" feature to be rewritten to use a magic
  scheme rather than a magic path.  (This eliminates concerns about
  the magic path overlapping with a user's use case).  Note that this
  feature has been renamed to "multi root" since it is sufficiently
  generic to be applicable to build systems other than Bazel.

- It reduces the risk of forgetting to use the front end's FileSystem
  abstraction to access the file system, since the native file system
  interfaces do not accept URIs.

R=danrubel@google.com

Review-Url: https://codereview.chromium.org/2614063007 .
2017-01-09 11:19:38 -08:00
Konstantin Shcheglov db1950ef65 Rewrite DiagnosticDomainTest using @reflectiveTest.
R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2622493003 .
2017-01-09 10:45:33 -08:00
Konstantin Shcheglov 266280f0c4 Issue 28300. Reset refactoring when analysis started with the new analysis driver.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/28300

Review-Url: https://codereview.chromium.org/2626433002 .
2017-01-09 10:18:20 -08:00
Brian Wilkerson d1fcb1e986 Add visitors that throw by default
R=paulberry@google.com

Review-Url: https://codereview.chromium.org/2623453003 .
2017-01-09 10:08:53 -08:00
Jacob Richman badfd146d2 Fix type error in js_dart2js.dart caught by DDC.
BUG=
R=vsm@google.com

Review-Url: https://codereview.chromium.org/2611423002 .
2017-01-09 07:42:49 -08:00
Leaf Petersen 7b359178ca Revert "Ignore dev_compiler gen directory when running tests."
This reverts commit d5fc4971be.

TBR=rnystrom@google.com

BUG=

Review-Url: https://codereview.chromium.org/2618263003 .
2017-01-09 04:33:26 -08:00
Leaf Petersen 7ab0daeedf Make EventStreamSubscription DDC safe.
EventStreamSubscription.listen does a cast which is only working in
DDC because we're ignoring the failure.  This wraps the listener to
check the argument rather than casting the function.  Also picks up a
few misc changes to the main SDK that hadn't been merged into DDC.

BUG=
R=jacobr@google.com

Review-Url: https://codereview.chromium.org/2609633002 .
2017-01-09 04:13:36 -08:00
Leaf Petersen d5fc4971be Ignore dev_compiler gen directory when running tests.
BUG=
R=rnystrom@google.com

Review-Url: https://codereview.chromium.org/2609673002 .
2017-01-09 04:10:16 -08:00
Leaf Petersen 1ed1e1cb62 Make call methods definite.
Makes objects with call methods be treated as definite functions.
Fixes https://github.com/dart-lang/sdk/issues/28087 .

BUG=
R=jmesserly@google.com

Review-Url: https://codereview.chromium.org/2594873002 .
2017-01-09 04:01:57 -08:00