Commit Graph

4770 Commits

Author SHA1 Message Date
Peter von der Ahé 723053f214 Incremental compiler that holds Fasta right
Change-Id: I240c7d5ef250014b5688e7f379e7299809148880
Reviewed-on: https://dart-review.googlesource.com/27162
Reviewed-by: Jens Johansen <jensj@google.com>
2017-12-07 14:25:56 +00:00
Peter von der Ahé 7d8c3ab494 Revert my previous changes to IKG API
Also, clean up incremental_test.dart a bit.

Change-Id: I4215760b7352f981f21852c160c10b6ac2f89664
Reviewed-on: https://dart-review.googlesource.com/27160
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Peter von der Ahé <ahe@google.com>
2017-12-07 13:03:56 +00:00
Peter von der Ahé 6a9d144dc4 Improve logged progress information
Change-Id: I07d45c0ca69a4dfe5f52f948d26c0d2297ad704a
Reviewed-on: https://dart-review.googlesource.com/27140
Commit-Queue: Peter von der Ahé <ahe@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2017-12-07 12:29:25 +00:00
Paul Berry b75502513a Fix type inference of closures using '=>' syntax.
This CL fixes type inference of closures using '=>' syntax so that
they infer consistently with an equivalent closure defined using block
syntax ('{}').

Fixes #31436.

Change-Id: I5463dd0ba986e9953ebabbc24ce3ced9a7220007
Reviewed-on: https://dart-review.googlesource.com/27084
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2017-12-07 04:52:10 +00:00
Sigmund Cherem e8672f164e Consistently turn off strong-mode for dart2js until we add the flag
Change-Id: I5bef71468fe7ab6f5585dbebac550570f7de4414
Reviewed-on: https://dart-review.googlesource.com/27080
Reviewed-by: Emily Fortuna <efortuna@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2017-12-07 03:59:11 +00:00
Paul Berry 5710de9c78 Do assignability checks on return/yield using the greatest closure of the context.
Without this fix, there is a risk that the unknown type ("?") will
leak into kernel code via the "as" expression inserted for an implicit
downcast.

Change-Id: Iea7276c8489eff80fe32f33e53efd42571c94a89
Reviewed-on: https://dart-review.googlesource.com/26861
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2017-12-06 22:41:50 +00:00
Paul Berry 115d54f0b4 Implement strong mode "invalid cast" rules.
When an implicit cast can be proven by the front end to always fail,
due to the form of the expression being cast, the front end now
reports this as a compile-time error.  (This feature is not new--it is
part of the analyzer's implementation of strong mode).

Newly failing tests are marked with issue #31537.

Change-Id: Ib3fc068352bb91dd283fa4b81d8104fa213eafe9
Reviewed-on: https://dart-review.googlesource.com/26420
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2017-12-06 20:01:02 +00:00
Dan Rubel 1cd64fd472 Implement fasta parser parseDirectives
Change-Id: Ic8d9ba44184f66c90086b0b46df0ce9f43bd9282
Reviewed-on: https://dart-review.googlesource.com/26660
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2017-12-06 18:21:40 +00:00
Paul Berry e3308c2023 Fix overzealous inference of setter parameter types.
Previous to this CL, if a setter had an implicit return type, we
inferred both the return type of the setter and the parameter type,
even if the parameter type was specified.

Change-Id: I24ca8ceddbe021f0d779ffcad4bc63052ed5d87b
Reviewed-on: https://dart-review.googlesource.com/26565
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2017-12-06 13:59:14 +00:00
Dan Rubel 108de2f354 Add fasta parser argument list recovery
Change-Id: If6cbda065c798147871d6c8a016f0fd3c07d2a69
Reviewed-on: https://dart-review.googlesource.com/26403
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2017-12-06 13:04:59 +00:00
Jens Johansen 078f25acf9 [CFE/dart2js] Create dart2js-specific CFE entry point
This CL creates the initial dart2js-specific CFE entry point.
It is currently mostly a matter of copying the dart2js code for running the
front-end into the front-end, although it also applies a workaround for
making batch-mode faster.

Running the same dart2js with kernel tests as on the bots locally I get
this:

* Before: [09:11 | 100% | +10507 | -    0]
* Now [04:46 | 100% | +10507 | -    0]

Change-Id: I68f147fd7aadb0281807b4688b9f6fdc5aa24c28
Reviewed-on: https://dart-review.googlesource.com/25300
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2017-12-06 08:24:28 +00:00
Konstantin Shcheglov ef7a229264 Apply resolution to 'is!'.
R=brianwilkerson@google.com, paulberry@google.com

Bug:
Change-Id: I8d805c4bd46446005880ea271c2baac5f6c99bda
Reviewed-on: https://dart-review.googlesource.com/26560
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2017-12-06 06:00:13 +00:00
Sigmund Cherem a10da3ae66 Copy typedef reference when doing operations on function types (like substitutions)
Closes #31521
Bug: https://github.com/dart-lang/sdk/issues/31521
Change-Id: I045974823257cc4e43e3ba348757781a409b92ff
Reviewed-on: https://dart-review.googlesource.com/25722
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2017-12-05 19:12:38 +00:00
Konstantin Shcheglov 58a9f14822 Apply resolution to for-identifier-in.
R=brianwilkerson@google.com, paulberry@google.com

Bug:
Change-Id: Ifeacd8a091af93043c0cb8d967b36ff48905216a
Reviewed-on: https://dart-review.googlesource.com/26362
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2017-12-05 19:05:31 +00:00
Konstantin Shcheglov 1c003c8967 Apply resolution to binary logical expressions.
R=brianwilkerson@google.com, paulberry@google.com

Bug:
Change-Id: I96f01f5e19696b43bdd58c2eca5866d6af7c08ee
Reviewed-on: https://dart-review.googlesource.com/26322
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2017-12-05 18:26:10 +00:00
Brian Wilkerson d522e93a56 Convert replaceToken to accept the token before the token to be replaced
Change-Id: Ibcb730cb500f35352a88394d3ec49e27f23e6cdd
Reviewed-on: https://dart-review.googlesource.com/26340
Reviewed-by: Dan Rubel <danrubel@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2017-12-05 18:22:02 +00:00
Dan Rubel ddd6e1611a Recover when named parameter is outside { }
Change-Id: I945545278895e370ba51bf7a9e5bce209e1389b6
Reviewed-on: https://dart-review.googlesource.com/26320
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2017-12-05 16:44:22 +00:00
Konstantin Shcheglov ca4b1fcdc3 Use offsets to distinguish StaticGet and PropertyGet for Analyzer's PrefixedIdentifier.
R=brianwilkerson@google.com, paulberry@google.com

Bug:
Change-Id: I458facf24099d25a1a0d3632acf1ee562930cec5
Reviewed-on: https://dart-review.googlesource.com/26080
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2017-12-05 01:49:34 +00:00
Konstantin Shcheglov 93a6d43f31 Apply resolution to 'a ?? b'.
R=brianwilkerson@google.com, paulberry@google.com

Bug:
Change-Id: If0a6c91c99af10992a1cc3465bf1f954c8baca39
Reviewed-on: https://dart-review.googlesource.com/26082
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2017-12-05 00:23:56 +00:00
Paul Berry e8091b27b1 Implement "unknown getter/setter/method" compile time errors in the front end.
Fixes #21938 (Front end does not warn on function calls on Object).

A small number of tests begin failing with this change--these tests
have been marked with issue #31533 for later triage.

Change-Id: I3a956410a6780772fe90098d8604fb10718504df
Reviewed-on: https://dart-review.googlesource.com/26045
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2017-12-05 00:14:54 +00:00
danrubel 9dbaa323e0 fix AstBuilder missing method body recovery
Change-Id: I875cfb2dbe96f12fd1369a7176cf575afa0d2bd5
Reviewed-on: https://dart-review.googlesource.com/26060
Commit-Queue: Dan Rubel <danrubel@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2017-12-04 23:18:24 +00:00
Dan Rubel 04b009cc8e Add fasta parser combinator recovery
Change-Id: Ie3453899f9c52dc41329836097015117ecf2856d
Reviewed-on: https://dart-review.googlesource.com/26041
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2017-12-04 22:21:05 +00:00
Sigmund Cherem 0b304fc172 Use multiroot in ddk to get absolute URIs relative to the app root location.
Change-Id: Ia9ec2463096d05e456ee41ae8b1b3d2781b17a8e
Reviewed-on: https://dart-review.googlesource.com/25681
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
2017-12-04 22:20:34 +00:00
Sigmund Cherem 6bb7c5529a Remove multiroot option from CompilerOptions.
Closes #31163

Bug:  https://github.com/dart-lang/sdk/issues/31163
Change-Id: I38e9c0d6a1edd151077a82f77f92b36a23c70b14
Reviewed-on: https://dart-review.googlesource.com/25504
Reviewed-by: Jake Macdonald <jakemac@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2017-12-04 22:04:14 +00:00
Konstantin Shcheglov 60f5bbfbe9 Replace more String(s) with Uri(s) in KernelDriver.
Bug:
Change-Id: Id08437eeda4bdd48d3fdd5fc30ba9da4f3c9d35d
Reviewed-on: https://dart-review.googlesource.com/26003
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2017-12-04 18:58:26 +00:00
Paul Berry 2a460c7f61 In instrumentation, handle annotation offsets that are between tokens
Change-Id: I8843cde7ed59735ea1f6744dd2d662a470236fd8
Reviewed-on: https://dart-review.googlesource.com/26001
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2017-12-04 18:44:04 +00:00
Brian Wilkerson 0c9e351ff1 Convert TopLevelMethodModifierContext.parseRecovery to return the last consumed token
Change-Id: I26b9a101e2a0d5147a6cdcf86c76f43347050876
Reviewed-on: https://dart-review.googlesource.com/26021
Reviewed-by: Dan Rubel <danrubel@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2017-12-04 18:37:55 +00:00
Dan Rubel feecdd8571 Add fasta parser if statement expression recovery
Change-Id: Ie9840b0fa584cb8cfe7800932e3a38475899c449
Reviewed-on: https://dart-review.googlesource.com/26000
Commit-Queue: Dan Rubel <danrubel@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2017-12-04 17:57:24 +00:00
Brian Wilkerson 7f720c266d Prepare to convert replaceToken
Change-Id: I1d2f9f16f49dd9edae179463eba068c34e365e5e
Reviewed-on: https://dart-review.googlesource.com/26020
Reviewed-by: Dan Rubel <danrubel@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2017-12-04 17:50:26 +00:00
Dan Rubel 2a883a9c33 More fasta parser expression recovery
Change-Id: Ie3a71d4febcb9e0c277ddd6038eb1cc40c6fdf26
Reviewed-on: https://dart-review.googlesource.com/24240
Commit-Queue: Dan Rubel <danrubel@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2017-12-04 16:22:04 +00:00
Peter von der Ahé f53fe4db53 Speed up testing of incremental compiles by reusing platform.dill
Change-Id: Id98488448d2f3b4589b49c37a52eb0175bed2e32
Reviewed-on: https://dart-review.googlesource.com/25960
Commit-Queue: Peter von der Ahé <ahe@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2017-12-04 15:01:14 +00:00
Paul Berry c800a1cc29 Fix error recovery for invalid assignment.
Previously, the front end recovered from an invalid assignment by
producing an "as" expression, e.g.:

    int x;
    String y;
    x = y;

Would produce an "invalid assignment" error, as well as this kernel
code:

    int x;
    String y;
    x = y as{TypeError} int;

The rationale was that the "as" check was guaranteed to fail, so this
code would produce a runtime error at the correct location.  However,
there were two problems:

1. (Minor problem) the "as" doesn't actually fail if the RHS is null.

2. (Major problem) for type inference, the type of an assignment
expression is defined to be the type of the RHS.  This means that if
the invalid assignment gets used for type inference, we generate
mal-typed kernel code, e.g.:

    int x;
    String y;
    var z = (x = y);

Gets compiled to:

    int x;
    String y;
    String z = (x = y as{TypeError} int);

This CL addresses both problems by changing the kernel representation
so that it evaluates the RHS and then throws an exception.  Since a
"throw" expression has type Bottom, the kernel representation is
guaranteed to be properly typed.  This also ensures that an exception
gets thrown if the RHS is null.  Finally, as a side bonus, it makes
the error-recovered kernel code more similar to the kernel code we
generate in other error recovery scenarios.

Change-Id: Iac74e0c726ce029ac0560d271413e85c15bfec5c
Reviewed-on: https://dart-review.googlesource.com/24140
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2017-12-04 14:38:04 +00:00
Jens Johansen 9bc232be12 [CFE/DDC] Create initial DDC-specific CFE entry point
This CL creates the initial DDC-specific CFE entry point.
It is currently mostly a matter of copying the DDC code for running the
front-end into the front-end, although it also applies a workaround for
making batch-mode faster.

Local timings of running
tools/test.py -mrelease -cdartdevk -rnone --strong --checked language_2
before and after change:

* Before: [05:49 | 100% | + 5136 | -    0]
* After: [00:20 | 100% | + 5136 | -    0]

Change-Id: I799b54b406970c4aa8653b71aaffa2ba476ee9d9
Reviewed-on: https://dart-review.googlesource.com/24921
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
2017-12-04 14:35:02 +00:00
Brian Wilkerson 40d266b242 Convert skipBlock to accept the last consumed token
Change-Id: Ie6e29f662ff5e2b28e46095e5b9782f430f246f6
Reviewed-on: https://dart-review.googlesource.com/25780
Reviewed-by: Dan Rubel <danrubel@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2017-12-04 13:39:45 +00:00
Peter von der Ahé e14726a3f4 Use absolute URIs instead of relative paths
We change the type of FileUriNode.fileUri from String to Uri, which in principle
doesn't change the binary format. However, we did notice that LibraryParts
weren't serialized as specified in binary.md, so we also fixed that.

Since fileUris are stored as strings in a separate table, Uri.parse is only called
once per unique URI.

Fasta only uses relativizeUri when printing diagnostics, and URIs stored in
expectation files (golden files) are relativized using String.replaceAll.

Change-Id: Ib2dc1b80c03a0cdaf84e48b8b3ba73b16bdf8a40
Reviewed-on: https://dart-review.googlesource.com/25421
Commit-Queue: Peter von der Ahé <ahe@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2017-12-04 11:34:24 +00:00
Samir Jindel bf797e6507 [kernel] Re-land assert initializers.
This change updates Dart2js and DDC.
Thanks to johnniwinther@ for the Dart2js updates.

The original revision is in patchset 2.

Change-Id: I26db33312f003f88ccccb67b27998ef21a1f667f
Reviewed-on: https://dart-review.googlesource.com/25820
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Commit-Queue: Samir Jindel <sjindel@google.com>
2017-12-04 11:22:34 +00:00
Peter von der Ahé d4cfecb106 Revert "Apply resolution to AdjacentStrings."
This reverts commit 1699831282.

Reason for revert: I didn't say LGTM to this, and I'm not convinced this change is necessary.

Original change's description:
> Apply resolution to AdjacentStrings.
> 
> R=​brianwilkerson@google.com, paulberry@google.com
> 
> Bug:
> Change-Id: Iae09b39be41f1ddcd05a5a5ded554a1b7f9c09f3
> Reviewed-on: https://dart-review.googlesource.com/25800
> Reviewed-by: Paul Berry <paulberry@google.com>
> Commit-Queue: Konstantin Shcheglov <scheglov@google.com>

TBR=paulberry@google.com,scheglov@google.com,brianwilkerson@google.com

Change-Id: I11a947708e8e2de6a4591396fb2a32cb8833dc6d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/25541
Reviewed-by: Peter von der Ahé <ahe@google.com>
Commit-Queue: Peter von der Ahé <ahe@google.com>
2017-12-04 09:09:36 +00:00
Konstantin Shcheglov 1699831282 Apply resolution to AdjacentStrings.
R=brianwilkerson@google.com, paulberry@google.com

Bug:
Change-Id: Iae09b39be41f1ddcd05a5a5ded554a1b7f9c09f3
Reviewed-on: https://dart-review.googlesource.com/25800
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2017-12-04 05:30:03 +00:00
Dan Rubel bc5b3f28e4 Fix syntheticPreviousToken
Change-Id: I985bdcf51ac78b510caf6f1400315c647a63b456
Reviewed-on: https://dart-review.googlesource.com/25762
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2017-12-03 18:31:23 +00:00
Brian Wilkerson 24562beebb Convert parseModifier to accept the last consumed token
Change-Id: I590b15070c1f507a89946982c2e3d3658b395a71
Reviewed-on: https://dart-review.googlesource.com/25761
Reviewed-by: Dan Rubel <danrubel@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2017-12-03 18:20:44 +00:00
danrubel 0520d51fd9 Add more type reference recovery
Change-Id: Ia5e052d36abb48b8ec1881367639e6b83736a96c
Reviewed-on: https://dart-review.googlesource.com/24980
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2017-12-03 17:01:03 +00:00
Brian Wilkerson cf7584b5fd Changes to simplify converting parseModifier
Change-Id: I92f63cb839352ba53ff1c8a18830dabae5382bf7
Reviewed-on: https://dart-review.googlesource.com/25664
Reviewed-by: Dan Rubel <danrubel@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2017-12-03 16:40:54 +00:00
Brian Wilkerson b37e33cee7 Fix the highlighting of the error when an annotation is provided for an enum constant
Change-Id: I52c28facc2509c2104b37ea59127b93697c6e7fb
Reviewed-on: https://dart-review.googlesource.com/25700
Reviewed-by: Dan Rubel <danrubel@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2017-12-02 16:35:05 +00:00
Brian Wilkerson bf531b66d6 Add a couple of tests based on some open issues
Change-Id: I02bc789e7278dd2a772d4a1799a7c59a978acff0
Reviewed-on: https://dart-review.googlesource.com/25582
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2017-12-02 16:34:56 +00:00
Konstantin Shcheglov 2804d6db9b Apply resolution to null-aware local variable assignment.
R=brianwilkerson@google.com, paulberry@google.com

Bug:
Change-Id: Ib7e4621169063b433ec9f52b7f293d909e3cae20
Reviewed-on: https://dart-review.googlesource.com/25509
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2017-12-02 03:55:53 +00:00
Paul Berry 7d65fec76e Reland "Route all messages through Loader."
This is the same as https://dart-review.googlesource.com/24481, but
with additional status file fixes.

Change-Id: Ic076c4dbf9c07e0fdf316298ca1ee1b6ce25002b
Reviewed-on: https://dart-review.googlesource.com/25508
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2017-12-01 22:47:06 +00:00
Konstantin Shcheglov 4740885c5a Apply resolution to ConditionalExpression.
R=brianwilkerson@google.com, paulberry@google.com

Bug:
Change-Id: I26bfba9d1e03fac01fbc84911de740b3c1435e6c
Reviewed-on: https://dart-review.googlesource.com/25683
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2017-12-01 22:39:12 +00:00
Konstantin Shcheglov b1beebeb8a Support for translating inferred FunctionType(s) of members.
The goal here is to create Analyzer FunctionType that remembers the
Element a function or a method it is associated with. We could just
translate Kernel FunctionType into a "detached" Analyzer FunctionType,
but that would be a breaking change.

Alternatively, we could accept that staticInvokeType in
InvocationExpression might be detached, and it the client needs the
exact element, it can be accessed using for example
MethodInvocation.methodName.staticElement. Practically, move closer
to the front-end way of dealing with types.

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

Bug:
Change-Id: I1de0b76c53f003dca837e714df4a9eee64c4ac9b
Reviewed-on: https://dart-review.googlesource.com/25280
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2017-12-01 21:18:22 +00:00
Ryan Macnak a646f51a5b Revert "Route all messages through Loader."
This reverts commit 8e4b0bda23.

Reason for revert: Failures on most kernel bots

Original change's description:
> Route all messages through Loader.
> 
> This ensures that all messages are passed to instrumentation.
> 
> Issues addressed in this CL:
> 
> * When I added addCompileTimeError, I forgot to remove addError.
> 
> * All messages now all arrive in a single location (Loader). SourceLoader adds instrumentation by overriding recordMessage.
> 
> * As I changed the type inferrer to use addCompileTimeError, I broke DDC. This is because the front_end API (generateKernelInternal in kernel_generator_impl.dart) returns null if there are any errors reported via addCompileTimeError (and this didn't happen with addError, that shouldn't have been there anyways).
> 
> * Due to the previous problem, I changed generateKernelInternal to ignore errors, but then I started getting missing compile-time errors. This turned out to be due to the the silent parameter used during outline- and diet-parsing.
> 
> * I've removed all the "silent" parameters. This didn't work reliably and have been confusing Brian, Dan, and me several times when making parser changes. Instead we detect duplicated messages and avoid reporting them more than once.
> 
> * Types in error messages got names that where using a global object (globalDebuggingNames in pkg/kernel/lib/text/ast_to_text.dart). This meant that the #lib prefix would vary depending on how many tests were run which affected the serialized error message in pkg/front_end/testcases/invalid_assignment.dart.strong.expect.
> 
> Change-Id: I3d89372d6593a6e7e50cce733f61eedb881e15ed
> Reviewed-on: https://dart-review.googlesource.com/24481
> Commit-Queue: Peter von der Ahé <ahe@google.com>
> Reviewed-by: Paul Berry <paulberry@google.com>
> Reviewed-by: Kevin Millikin <kmillikin@google.com>

TBR=paulberry@google.com,ahe@google.com,kmillikin@google.com

Change-Id: I9f7b345a8ff040fc7aa73c5cb605190e47fd284b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/25660
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2017-12-01 20:37:45 +00:00
Brian Wilkerson 7494ff92a0 Recover from semicolons in place of members in class bodies (issue 31078)
Change-Id: Ic6d064098a5d9d23f860c0fcd96ff33875808bb7
Reviewed-on: https://dart-review.googlesource.com/25460
Reviewed-by: Dan Rubel <danrubel@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2017-12-01 19:50:09 +00:00