Commit graph

22084 commits

Author SHA1 Message Date
Dan Rubel e4c3fa0a9c Improve recovery when parsing named constructor invocation with invalid type arguments
The parser now generates a ConstructorWithTypeArguments error and a new
handleInvalidTypeArguments event after a begin/endTypeArguments event pair
when those type arguments are in a syntatically invalid location.

For example: `new C.n<int>();` in
```
class C<T> { T f; C.n() {} }
main() { var x = new C.n<int>(); }

Most listeners handle this event by dropping the invalid type arguments,
but AstBuilder now preserves those invalid type arguments in the AST
to support better code quick-fixes/quick-assists/refactoring.

Change-Id: I5b22bd4903cd9ee3645936b9a108598b603cf9ca
Reviewed-on: https://dart-review.googlesource.com/c/79300
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-10-11 19:57:22 +00:00
Samir Jindel 3e7ce992cf [vm/tfa] Implementation of type arguments tracking in TFA.
Change-Id: I9398186e27ae7a040e249df010ae16fb6ab6da89
Cq-Include-Trybots: luci.dart.try:vm-kernel-win-release-x64-try, vm-kernel-optcounter-threshold-linux-release-x64-try, vm-kernel-precomp-linux-debug-x64-try, vm-kernel-precomp-linux-release-simarm-try, vm-kernel-precomp-linux-release-simarm64-try, vm-kernel-precomp-linux-release-x64-try, vm-kernel-precomp-win-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/74962
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2018-10-11 19:09:42 +00:00
Danny Tuppeny e4842a293b Remove extra spaces in headers
Change-Id: I401ad4537e7a8c3ea4bc3f693cf45b5f7ef31267
Reviewed-on: https://dart-review.googlesource.com/c/79340
Commit-Queue: Danny Tuppeny <dantup@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-10-11 18:05:37 +00:00
Konstantin Shcheglov fab5d0a50d In InheritanceManager remove unused, and deprecate used (in lints) methods.
Also, remove it from ErrorVerifier.

R=brianwilkerson@google.com

Change-Id: I35f6f7fd2f8c6680ec470e7bf7da4780a3c69df3
Reviewed-on: https://dart-review.googlesource.com/c/79360
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-10-11 17:57:35 +00:00
Danny Tuppeny 2989116219 Add some special cases for types we can't/don't need to parse
Includes a fabricated base type for file operations to avoid a List of a Union.

Change-Id: I0ddc7c6428cc8f1535c3a8d7d0b042b1725969f3
Reviewed-on: https://dart-review.googlesource.com/c/79323
Commit-Queue: Danny Tuppeny <dantup@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-10-11 17:51:10 +00:00
Paul Berry 49b121f20d Remove TypeParameterSerializationContext.location.
Its only use was in formatting an internal error message that
generally only fires in unit tests if we have significant bugs in
summary logic.  Eliminating it doesn't really make the error any more
difficult to debug, since it is easy enough to stop the unit test in
the debugger and examine the data structures manually.

Addresses code review comment
https://dart-review.googlesource.com/c/sdk/+/79145/1/pkg/analyzer/lib/src/dart/element/element.dart#7737

Change-Id: I17f18e1e4abfac4c5dd9067706fabc9bc4de7cff
Reviewed-on: https://dart-review.googlesource.com/c/79282
Commit-Queue: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Auto-Submit: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2018-10-11 17:49:30 +00:00
Peter von der Ahé 244e6c7ffc Infer package URIs
Closes https://github.com/dart-lang/sdk/issues/33076

Change-Id: I73db84eadaf3ba723c2f1323f9b883077a4df9df
Reviewed-on: https://dart-review.googlesource.com/c/78246
Commit-Queue: Peter von der Ahé <ahe@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2018-10-11 17:41:50 +00:00
Paul Berry cc884b3449 Remove optional argument from FunctionTypeImpl.forTypedef.
It didn't work properly anyhow (see issue #34657).  Changed the call
sites to use GenericTypeAliasElementImpl.instantiate, which does have
the correct behavior.

Change-Id: I4b9c6cc8ddfcf3b0bebe40b7d874c4630c4b5ae4
Reviewed-on: https://dart-review.googlesource.com/c/79283
Commit-Queue: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Auto-Submit: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-10-11 17:36:20 +00:00
Danny Tuppeny 931202df27 Improve wrapping of lists and *notes* in LSP spec comments
Change-Id: I32d9056e56a76588f9f26e36ebe040b0457dcd4d
Reviewed-on: https://dart-review.googlesource.com/c/79320
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Danny Tuppeny <dantup@google.com>
2018-10-11 17:30:30 +00:00
Danny Tuppeny 23e7f9d1eb Handle references to other classes in comments
Change-Id: I0a29355e0bbcb2a441dff90bc2cfc3475e8c1cd3
Reviewed-on: https://dart-review.googlesource.com/c/79321
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Danny Tuppeny <dantup@google.com>
2018-10-11 17:27:53 +00:00
Jenny Messerly 472c898c87 [dartdevc] fix for-in loop variable shadowing a var used in initialzer
Dart for-in loops allow `var x = [1]; for (var x in x) {}`, which is not
allowed in JS. If this pattern is detected, a temporary variable is
introduced so the for-in initializer expression is evaluated outside of
the JS for-of loop.

(This issue seems to be unique to for-in loops. For loops and other
kinds of variable declarations of the form `var x = ...` are not
allowed to use `x` in the initializer, even if `x` is declared in an
outer scope.)

Also fixes an out-of-date comment in the DDC+Analyzer backend.

Change-Id: I35b272a5a311f7b6f104cc82a99cc83a6ed5c247
Reviewed-on: https://dart-review.googlesource.com/c/79142
Commit-Queue: Alan Knight <alanknight@google.com>
Auto-Submit: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Alan Knight <alanknight@google.com>
2018-10-11 17:07:39 +00:00
Paul Berry e12538fff0 Move package bundle functionality into SummaryBaseTestStrategy.
The methods addBundle and createPackageBundle were previously in the
derived class SummaryLinkerTestStrategy, but there's no reason they
have to be there; they don't rely on any functionality that's specific
to linker tests.  Moving them will allow additional summary tests to
make use of package bundles.

Change-Id: I988147c76e6dcfef5ef0f000d66b1639b4b3ecf7
Reviewed-on: https://dart-review.googlesource.com/c/79280
Auto-Submit: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2018-10-11 16:09:04 +00:00
Danny Tuppeny 96737787e2 Add LSP spec code-gen output
Change-Id: Ib1f72b064172153bd677b3ac33ac12ed02b28f47
Reviewed-on: https://dart-review.googlesource.com/c/79207
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Danny Tuppeny <dantup@google.com>
2018-10-11 15:54:14 +00:00
Danny Tuppeny fc0decc262 Improvements to the Dart code generated from the LSP spec.
Working towards making it compile, free of lint errors, formatting correctly.

Change-Id: I61d5ed6e89fdf24c97079745a3816b1b303e2820
Reviewed-on: https://dart-review.googlesource.com/c/79201
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Danny Tuppeny <dantup@google.com>
2018-10-11 14:59:25 +00:00
Konstantin Shcheglov efcca1132b Switch ErrorVerifier and OverrideVerifier to InheritanceManager2.
R=brianwilkerson@google.com

Change-Id: I2f1f03684611fcd6a183ea494d3b3d71a67fb170
Reviewed-on: https://dart-review.googlesource.com/c/79181
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-10-11 14:48:18 +00:00
Konstantin Shcheglov 5e1bf1d135 Create LibraryScope once per library analyzer.
R=brianwilkerson@google.com

Change-Id: I1f84b2df53834f98e98defbb61e89a2396b2ca3a
Reviewed-on: https://dart-review.googlesource.com/c/79182
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-10-11 14:13:10 +00:00
Dmitry Stefantsov 8648d782ae Reland "[fasta] Report errors for bounds violations"
The original commit:
aa6fb2d3a4

Change-Id: I34287ec856fde16d56e9369ef2620311ba9bb722
Reviewed-on: https://dart-review.googlesource.com/c/79200
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2018-10-11 10:20:01 +00:00
Peter von der Ahé 49d7fb39ac Temporarily ignore --strong option in flutter builds
Change-Id: Ib9f80ef29cc301b0a8354bcaeddaf47177784d9c
Reviewed-on: https://dart-review.googlesource.com/c/79203
Auto-Submit: Peter von der Ahé <ahe@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Peter von der Ahé <ahe@google.com>
2018-10-11 09:40:09 +00:00
Peter von der Ahé 5b32ab3be6 Remove the word "strongMode" from some package:kernel libraries.
Temporarily using "legacyMode" instead, but I plan to rid these soon.

Change-Id: Iff8bcde03b6ebe4ad95f963f456c855e73e58926
Reviewed-on: https://dart-review.googlesource.com/c/79042
Auto-Submit: Peter von der Ahé <ahe@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2018-10-11 08:50:43 +00:00
Peter von der Ahé dfb8e97b86 Report errors on members hiding prefixes
Fixes https://github.com/dart-lang/sdk/issues/34498

Change-Id: I7aef905f88502805e15deed8ebd453f7896daac1
Reviewed-on: https://dart-review.googlesource.com/c/79047
Auto-Submit: Peter von der Ahé <ahe@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Peter von der Ahé <ahe@google.com>
2018-10-11 07:30:13 +00:00
Brian Wilkerson 90e362f63c Deprecate the last non-deprecated EMPTY_LIST
Change-Id: Ia857df0f8f2652dfcdd5126316ddaebf2a419ac7
Reviewed-on: https://dart-review.googlesource.com/c/79088
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-10-11 00:21:45 +00:00
Paul Berry 0ab8e42fea Use a special context for serializing generic function types.
This is necessary to ensure that type parameters that refer to the
enclosing context get serialized correctly.

Change-Id: I1e95cc4e83be76bf003faa037eff80728c1fb748
Reviewed-on: https://dart-review.googlesource.com/c/79145
Auto-Submit: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-10-11 00:10:48 +00:00
Paul Berry c47879d354 Remove one-phase summary logic.
This experiment didn't work out--it turns out that too many clients
were relying on the performance characteristics of unlinked summaries.

Change-Id: I3e7c54c18b5b02ee0df17ef5d62e1f6a7e35da68
Reviewed-on: https://dart-review.googlesource.com/c/79144
Commit-Queue: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Auto-Submit: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2018-10-11 00:06:05 +00:00
Paul Berry b9dd229e35 Convert element.dart to triple-slash comment style.
Change-Id: I9fd0b2031ceb7c7831a7131c11c3848dbf3f336e
Reviewed-on: https://dart-review.googlesource.com/c/79143
Auto-Submit: Paul Berry <paulberry@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-10-10 23:25:24 +00:00
Alexander Markov 5deb1c6e81 [vm] Remove strong mode and sync-async flags from pkg/vm
Change-Id: Icd2920274ca4c402b38e5774bb408d6b5e529169
Reviewed-on: https://dart-review.googlesource.com/c/79082
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Auto-Submit: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2018-10-10 20:11:35 +00:00
G?nter Z?chbauer 2da0b9f4f1 fix some typos
Closes #34738
https://github.com/dart-lang/sdk/pull/34738

GitOrigin-RevId: d211bbacfe65355cf7304c990ffb6c79d7a229cf
Change-Id: If690e6d378e543b300e1f6a353ceae73e39c29db
Reviewed-on: https://dart-review.googlesource.com/c/78900
Reviewed-by: Alexander Thomas <athom@google.com>
2018-10-10 19:15:30 +00:00
Jenny Messerly f320477ff9 [dartdevc] add module-name option to kernel backend
This name is not used by most module formats, but we do use it with the
legacy format.

Change-Id: I8d2f36b12a60b37d0460b57d5a360ba21b4e0476
Reviewed-on: https://dart-review.googlesource.com/c/78923
Reviewed-by: Jake Macdonald <jakemac@google.com>
Commit-Queue: Jenny Messerly <jmesserly@google.com>
2018-10-10 18:09:03 +00:00
Konstantin Shcheglov 340e74629f Clean up OverrideVerifier.
But still keep it using the old InheritanceManager.

R=brianwilkerson@google.com

Change-Id: I58f9187a97fc161215614ed55d6e08007f31595c
Reviewed-on: https://dart-review.googlesource.com/c/79080
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-10-10 17:53:31 +00:00
Brian Wilkerson f11e746c2e Initial implementation of fixes for type arguments on named constructor invocations
Change-Id: I71fe90c53c5a15e7172bcc27abfbfffd8119d7ff
Reviewed-on: https://dart-review.googlesource.com/c/79061
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Dan Rubel <danrubel@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-10-10 17:11:36 +00:00
Dan Rubel ac4b8a7306 Hook up FixProcessor to fix errors in dartfix
Change-Id: I0f4b427ce1f6c89c7d146651b7daead05d7facaf
Reviewed-on: https://dart-review.googlesource.com/c/78881
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-10-10 16:52:16 +00:00
Danny Tuppeny 6d9cc6fa03 Add skeleton for parsing LSP spec from Markdown/TypeScript to generate Dart data classes
- Fixes to generation from spec
- Add basic code-gen with (very incomplete) tests
- Add some basic parsing of TypeScript interfaces in the LSP spec
- Add a group to the test
- Add code for extracting TypeScript codeblocks from Markdown

Change-Id: I733756d43744d89307b77527bd083cfacf670f56
Reviewed-on: https://dart-review.googlesource.com/c/79046
Commit-Queue: Danny Tuppeny <dantup@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-10-10 16:33:50 +00:00
Konstantin Shcheglov bc4d2f5d1b Switch InheritanceManager2Test to DriverResolutionTest.
R=brianwilkerson@google.com

Change-Id: I21b39555f6b7975fd8e621aba80e23e4878dd2c3
Reviewed-on: https://dart-review.googlesource.com/c/78924
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-10-10 16:26:09 +00:00
Konstantin Shcheglov e221a6288b Move reporting MISMATCHED_GETTER_AND_SETTER_TYPES for classes to using new interfaces.
R=brianwilkerson@google.com

Change-Id: I07e8af54ffebd446a1492fab667e4148468cc2f8
Reviewed-on: https://dart-review.googlesource.com/c/78925
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-10-10 16:25:49 +00:00
Danny Tuppeny be39eacf00 Rename convertPathForImport -> convertAbsolutePathToUri
Also remove any calls that aren't required. The function still works if you pass it a relative path (for convenience, if you have a variable) but it's not required for relative paths.

Change-Id: I567e098f5956a7c2b5fe2d6d7d7fb16a263a72cc
Reviewed-on: https://dart-review.googlesource.com/c/79025
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Danny Tuppeny <dantup@google.com>
2018-10-10 16:03:58 +00:00
Dmitry Stefantsov a539d2ef5f Revert "[fasta] Report errors for bounds violations"
The CL is reverted because it didn't account for the case when a check
of a user-specified type argument against the bound depends on another
type that is only known after type inference is done.

Change-Id: I1fd140af95ed37b9191a5b161a281d4639e3453f
Reviewed-on: https://dart-review.googlesource.com/c/79048
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2018-10-10 15:31:27 +00:00
Peter von der Ahé f1d902f4a0 Ignore --supermixin and -D options
Change-Id: Ia817ad9236ee0947a87faa4c570eedc239a1a84a
Reviewed-on: https://dart-review.googlesource.com/c/78542
Reviewed-by: Jens Johansen <jensj@google.com>
2018-10-10 13:38:57 +00:00
Peter von der Ahé f1b6d81404 Remove Target.strongMode
Change-Id: I60f72904f4a9ae3427b2a2633a22f70a6b6f8ea9
Reviewed-on: https://dart-review.googlesource.com/c/79020
Commit-Queue: Peter von der Ahé <ahe@google.com>
Auto-Submit: Peter von der Ahé <ahe@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2018-10-10 12:49:18 +00:00
Martin Kustermann 16ddfc1565 [VM] Use assert assignable implementation for explicit downcasts
This makes explicit downcasts more efficient by re-using the
optimizations we already have for implicit downcasts.

For implicit/explicit as checks we use the symbol to distinguish which
exception to throw if the check fails.  So this does not actually
require unification of _CastError and _TypeError.

Issue https://github.com/dart-lang/sdk/issues/34582
Issue https://github.com/dart-lang/sdk/issues/30632
Issue https://github.com/dart-lang/sdk/issues/30571

Change-Id: I7b8818d2698e249c90a3e1b8790bad69ada649a9
Reviewed-on: https://dart-review.googlesource.com/c/78748
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-10-10 12:36:42 +00:00
Peter von der Ahé 8c872e0e3a Remove TargetFlags.strongMode
Change-Id: Ibf8661e5444d16666c54f1d81c626893b000521a
Reviewed-on: https://dart-review.googlesource.com/c/78986
Commit-Queue: Jens Johansen <jensj@google.com>
Auto-Submit: Peter von der Ahé <ahe@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2018-10-10 12:11:41 +00:00
Peter von der Ahé ee97806084 Replace strongMode with legacyMode in CompilerOptions
Also, remove --strong and --strong-mode flags (use --legacy-mode
flag to enable legacy mode).

Change-Id: I577ab5f755a2bee88f0f4d63915a6e852e792f06
Reviewed-on: https://dart-review.googlesource.com/c/79000
Commit-Queue: Jens Johansen <jensj@google.com>
Auto-Submit: Peter von der Ahé <ahe@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2018-10-10 12:04:26 +00:00
Dmitry Stefantsov aa6fb2d3a4 [fasta] Report errors for bounds violations
Fixes #33308.

Bug: http://dartbug.com/33308
Change-Id: Iae087928468ed6883c438db95644135dc7ef0a6a
Reviewed-on: https://dart-review.googlesource.com/c/57621
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Samir Jindel <sjindel@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
2018-10-10 12:03:36 +00:00
Peter von der Ahé f942af451b Remove kernel interpreter
The test isn't normally run, and all 12 testcases caused a crash.

Change-Id: Ie1576e32b70f01aa775c3305bff2bc992eebf86f
Reviewed-on: https://dart-review.googlesource.com/c/78940
Auto-Submit: Peter von der Ahé <ahe@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2018-10-10 08:42:21 +00:00
Jens Johansen 7007567685 Fix issue with --unsafe-package-serialization
--unsafe-package-serialization saves the frontend_server from having to
re-serialize everything all the time.

Before this CL, though, things could go wrong:

If you had a situation where you had previously compiled a file that
depend on a package A, and where (some of) package A depends on
package B this would happen:
- All of package A was serialized together.
- All of package B was serialized together.

When later, you compile something that depend less on package A - namely
on only on parts that does not depend on package B, but is included in
the previously serialized package A, the following would happen:
- The new (non-package) libraries would be serialized.
- Package A serialization would be reused.

This is basically fine: Running the app would be fine, everything it
actually depend on is there.

However, if the VM is forced to compile everything it now also compiles
stuff that was included - but really unused - from package A - namely
also the libraries that depend on package B --- which is not included.

This CL changes the last part by also including package B.

The result is that even more unused libraries are included, but that
the VM can survive a forceful compile.

Note that the --unsafe-package-serialization is only used for tests,
so the "including even more unused" part is probably not a big deal,
and all in all there's still a big speed advantage to doing this.

Change-Id: Iac06ba6f40c2caaacce641c5853e9491496dce53
Reviewed-on: https://dart-review.googlesource.com/c/78541
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2018-10-10 06:35:49 +00:00
Paul Berry ba5e14b195 Store return type and parameters separately in GenericFunctionTypeElementForLink.
This will allow us to create a synthetic
GenericFunctionTypeElementForLink representing the function type
defined by an old-style typedef.  That in turn will be necessary to
fix some incompatibilities between the summary linker and element
model representations of typedefs.

Change-Id: Ia3622d58cac25976022bf79a0ac47b190f1f411c
Reviewed-on: https://dart-review.googlesource.com/c/78920
Commit-Queue: Paul Berry <paulberry@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Auto-Submit: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-10-09 23:09:16 +00:00
Brian Wilkerson ba1b30af37 Add AST support for type arguments on named constructors
Change-Id: If64ec8db3cf63858ea2ff446118be34cd3c3c203
Reviewed-on: https://dart-review.googlesource.com/c/78870
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2018-10-09 22:19:16 +00:00
Ivan Naydonov ed6c557d1a Add cli parameters to kernel_sdk.dart to get all paths explicitly
To allow ddc sdk kernel generation internally, add a way to provide
paths to dependent files explicitly, instead of assuming relative from
Platform.script.

Also remove .packages file parameter. We don't have this file internally
and sdk shouldn't depend on any of packages anyway, so it just work
without this option.

Change-Id: Iec892cbb640d35e64d107c6af36d214632815bae
Reviewed-on: https://dart-review.googlesource.com/c/77485
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Jenny Messerly <jmesserly@google.com>
Auto-Submit: Ivan Naydonov <inayd@google.com>
2018-10-09 22:15:06 +00:00
Paul Berry b3af151325 Rework detection of uninstantiated bound errors.
We now determine whether a type is simply bounded in the summary
linker, so that we can take advantage of the linker's circularity
detection logic.

Fixes #34635.
Fixes #34636.

Change-Id: I6c5040dbaeb79957d8a84e3f76e6a51834b57f05
Reviewed-on: https://dart-review.googlesource.com/c/78867
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2018-10-09 22:07:02 +00:00
Konstantin Shcheglov f35465dafd Remove DynamicElementImpl.library property.
R=brianwilkerson@google.com

Change-Id: I2be6a79916639564605ef519a1b55475cb55a36e
Reviewed-on: https://dart-review.googlesource.com/c/78340
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-10-09 20:51:54 +00:00
Konstantin Shcheglov 9cde31ba1d Try interface candidates in reverse order.
R=brianwilkerson@google.com

Change-Id: I616cdc280299da321834140678d39c28e5ecb614
Reviewed-on: https://dart-review.googlesource.com/c/78711
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-10-09 20:12:46 +00:00
Dan Rubel 5561e69f4e Replace dartfix confirm apply changes with --force
Change-Id: I1d0777e90dd47b13463c3d063f668df859d7995e
Reviewed-on: https://dart-review.googlesource.com/c/78880
Commit-Queue: Dan Rubel <danrubel@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-10-09 19:16:13 +00:00