Commit Graph

1972 Commits

Author SHA1 Message Date
Kevin Millikin 1df5fb3d57 [cfe] Build some annotations during outlining
During the outline phase, after top-level type inference, compile
annotations for libraries, classes, fields, procedures, and
constructors.

Change-Id: I95ca65fd58ad88d9452a28d5a0652bee44aeda3a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103806
Commit-Queue: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-05-30 07:29:12 +00:00
Dmitry Stefantsov 39dbaecfc1 Remove tests relying on contravariant uses of varaibles in supertypes
Change-Id: Ie614d8f96bbe534117f83528b41fe63fdfa9c9c1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103525
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
2019-05-28 09:56:43 +00:00
Dmitry Stefantsov e6e2020fb2 [fasta] Allow only covariant uses of type parameters in supertypes
Closes #35792.

Bug: http://dartbug.com/35792
Change-Id: I1c647c74e1e8f8892fd76b735085b457e770f5b4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103521
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2019-05-28 09:56:43 +00:00
Dan Rubel ec1ddcdb83 improve extension message missing body error message
This improves the missing class, mixin, and extension method body
error messages and lays the groundwork for improving other
missing body error messages such as switch statement, finally clause,
and others.

Change-Id: I0a4d1338fe91eee3cfe7d61652e168df1302d212
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103570
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-05-24 17:03:25 +00:00
Kevin Millikin 07a45e9d4c [cfe] Transform collections before set literals
The VM uses the collection and set literal transformations.  The set
literal transformation assumes that collections have already been
transformed.  This was not done correctly when translating a
list (e.g., constructor initializers).

Fixes https://github.com/dart-lang/sdk/issues/37027

Change-Id: If7a6bda55f8cf0efd761fd8932d3a9e2c60db19b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103134
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
Auto-Submit: Kevin Millikin <kmillikin@google.com>
2019-05-22 07:30:46 +00:00
Dmitry Stefantsov f62ab5ed3d [fasta] Allow super-bounded types as bounds of type variables
Change-Id: If1f10d8e5b6d6288696926dc3cab6ad8a3b8d446
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/79701
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2019-05-21 12:25:10 +00:00
Dmitry Stefantsov a0290f823c [fasta] Report invalid-type errors eagerly when possible
Change-Id: If1d111eb6ee4f93e1ab2b5901cc9492db96a37b0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101820
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2019-05-09 07:43:56 +00:00
Jens Johansen dcc157633d Offset from class when reporting errors on synthetic constructors
Bug: 36669
Change-Id: I11b5312e4023cd7368a4a3e36cff66398dadd69c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100960
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-05-02 06:57:43 +00:00
Jens Johansen b36734f4da Fix crash when duplicate fields have annotations
Fixes #36793.

Change-Id: I007699978219dc642e23951ab78858504a192c03
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100646
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-05-01 06:38:36 +00:00
Jens Johansen 30e21f3dc0 Don't crash when additional exports contain duplicate names
Fixes #36647

Change-Id: I45019b2113fde5bcd1f5e4227f7a1d86c570001f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100645
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-05-01 06:38:34 +00:00
Lasse R.H. Nielsen 1dd0f88c84 Don't allow null as argument to StreamIterator constructor.
Change-Id: I10c8de2cd12660876908f719ee562006cd3f2c07
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98001
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2019-04-30 13:27:48 +00:00
Jens Johansen 43937aa9ca Don't let expression compilation bleed into real library
If an expression compilation issues problems of any sort, they are saved
in the target-libraries problemsAsJson field. That's not ideal,
as it means that they can be re-issued later, as well as possibly being
serialized into the dill file.

This CL resets the problemsAsJson field of the real library,
thus fixing the issue.

Change-Id: I765c2cc50059c6bcda6a56bb749869dd4b181876
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96800
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2019-04-30 11:38:48 +00:00
Jens Johansen 054d1a301c Another test for reissuing problems
Test that we don't reissue problems for unreferenced libraries.

Change-Id: I5cf223ead48d2cd1dac293899495a46f92f4a495
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96785
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2019-04-30 11:05:53 +00:00
Jens Johansen 0325d50db2 [CFE] Add disambiguation for type parameters if needed
Change-Id: I440d8aabbc0eb3fe4242c769cca5ccef2dfe8948
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99150
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2019-04-30 11:00:58 +00:00
Jens Johansen ed8e4255a4 Proposed fix to #36644
TL;DR: Unbind canonical names doesn't do what you think it does and
probably shouldn't (ever) be used. This CL stops using it in a few places.

Longer version:

When loading a dill file it:
- First loads the table of canonical names. These have no references yet.
- When a canonical name is asked for its reference it creates one if it
  doesn't yet have one.
- When loading, for instance, a library, it asks for the reference.

When unbinding a canonical name:
- It removes itself (the canonical name) from the reference
- It removes the reference in itself
- Note: Whatever has a pointer to the reference keeps it, and the
  reference points to whatever node it already pointed to.

This also means, that if we have a dill file that's split in two and:
- Load #1
- Load #2
that works fine, but if we
- Load #1
- Unbind canonical names
- Binds canonical names
- Load #2
stuff is not bound correctly (and an error is thrown).

And - the cause of this bug:
- Load #1
- Load #2
everything is fine
- Unbind canonical names
- Binds canonical names
- Load #2'
stuff is not bound correctly --- references points to stuff loaded as #2,
not as #2'. On top of being weird, wrong and confusing it also caused wrong
things to be but into the class hierarchy which ultimatly caused the crash.

This CL fixes it by not calling unbind and force loading of dill files
(at specific call sites) to create new libraries
(and in the process overwriting references ".node").

Revert "[dartdevc] Retry ddc incremental compile on crash"

This reverts commit ecdbdf00b8.

Revert "[kernel_worker] retry on failure"

This reverts commit 43eebea5a3.

Fixes #36644

Bug: #36644
Change-Id: Id8f548179e6a409b01f2ebfa3219f94cb64b1c05
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100380
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
Reviewed-by: Jenny Messerly <jmesserly@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-04-26 07:18:28 +00:00
Sigmund Cherem 4b7d256a06 Revert "Enable constant-update-2018 by default." and "Update .expect files in pkg/front_end after e9ca6a53"
This reverts commit e9ca6a5335 and d3e00fd35e.

Change-Id: I346d6156be19c4fceffa202a7ce9bfa931c7c14b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99560
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2019-04-16 20:20:12 +00:00
Kevin Millikin e42a8032fb [cfe] Remove uninferred initializers from outlines
When performing top-level type inference based on overrides for fields
that have initializers, we never perform type inference for the
initializers.  Since type inference is the thing that rewrites shadow
AST nodes with their Kernel translation, we are left with
untransformed shadow nodes that cannot be serialized.

Instead, remove these initializers.  Fixes
https://github.com/dart-lang/sdk/issues/36498

Change-Id: I044fadd897e9f2d0e37f5ce0e5adaadb0e42a992
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99120
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-04-15 16:17:35 +00:00
Dmitry Stefantsov d3e00fd35e Update .expect files in pkg/front_end after e9ca6a53
TBR=askesc@google.com

Change-Id: I65e263c7ee627f94bc314346a322953f9e954899
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99174
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
2019-04-15 14:40:24 +00:00
Jens Johansen 460d00616c Better printing of imports
Before a import of, say "hello.dart" was printed as
"import './hello.dart'".
Now instead it is printed as "import 'hello.dart'".

At the same time we get rid of a dependency.

Change-Id: I352f0f507168fde75358704ec9bf0e248bb8179d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98480
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-04-11 11:43:23 +00:00
danrubel 896f1c4bb9 CFE tests for issue 36400
Change-Id: I05139ce86177fe32cae857e410f759d365dc7bde
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98503
Commit-Queue: Dan Rubel <danrubel@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-04-04 15:48:30 +00:00
Brian Wilkerson e58a8fade5 Fix typos in the diagnostic messages
Change-Id: I65a11e52933c37a63cb9d0a14b1961a20e16271f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98600
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-04-04 13:47:40 +00:00
Dmitry Stefantsov 9f3e9f37a0 [cfe] Make checks on individual leaves of collection element sub-trees
Closes #36456.

Bug: http://dartbug.com/36456
Change-Id: Ic604fecbabe78eede44cedb2251a68b71f608c41
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98567
Auto-Submit: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
2019-04-03 13:54:03 +00:00
Dmitry Stefantsov e1e5bb59c9 [cfe] Check that the condition in if-elements is a bool
Change-Id: If089fa603d586169ca2a368ba7fbf7fffc7ec8d3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98484
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2019-04-03 09:17:24 +00:00
Dmitry Stefantsov c5f1614bcc [fasta] Don't use invalidCollectionElement when ui-as-code is enabled
Closes #36413.

Bug: http://dartbug.com/36413
Change-Id: Ie9f0b82bab63c802fddb4c5642d374d7cc43455e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98466
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2019-04-03 09:17:24 +00:00
Dmitry Stefantsov 4a1b153fe1 [cfe] Enable type promotion in if-elements of literal collections
Closes #36396.

Bug: http://dartbug.com/36396
Change-Id: I223267cdee1aca38d69354e4f97df7dcc76e9553
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98461
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2019-04-02 13:33:19 +00:00
Dmitry Stefantsov 45bd79c119 [cfe] Fix inference on variable declarations in for-elements
Closes #36395, closes #36393.

Bug: http://dartbug.com/36395
Change-Id: Ifd35ce2e1a646b484b7fcc83d9fb1a0f9d3ae978
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98333
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2019-04-02 13:33:19 +00:00
Jens Johansen 8ce2d7a4e1 [CFE] Better error messages on errors with user definable operators
Fixes #36383

Change-Id: I24fd51bdb3ead75973009fe515819f9c8354e1b0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98332
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2019-04-02 10:46:18 +00:00
Kevin Millikin c71888d537 [cfe] Async translation of block expressions
Translate block expressions in the VM's async translation.  Closes
https://github.com/dart-lang/sdk/issues/36277

Change-Id: I606b155bfe1364e948d18043c167a272007411e0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98339
Commit-Queue: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-04-02 10:00:53 +00:00
Dmitry Stefantsov f21d521d0e [cfe] Fix pre-inference set/map disambiguation
Closes #36377

Bug: http://dartbug.com/36377
Change-Id: I0a486f467bdc999e6188fb3206f4eed1d8ffb67a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98341
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2019-03-29 17:18:55 +00:00
Dmitry Stefantsov 6b19aa821b [cfe] Do type checks on spreads during inference
Change-Id: I9eb72681a5a019ff7f7e030cf5f500144293bd4e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98180
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2019-03-29 17:18:55 +00:00
Dmitry Stefantsov 1a5ed8247f [fasta] Fix typos and copy-paste errors in a test case
Change-Id: I5d65f4ec44cb358767b1a8902d862dba1be1bb6e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98019
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2019-03-29 17:18:55 +00:00
Dmitry Stefantsov 584affcffa [cfe] Add initial support for 'for' and for-in elements in maps
Change-Id: I9fade4b8ac193f4d9a4df33c71447c0cb5fc3590
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98015
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2019-03-29 17:18:55 +00:00
Dmitry Stefantsov fa7e0c7531 [cfe] Add element type checks in spreads
Closes #36348

Bug: http://dartbug.com/36348
Change-Id: I2952e4430409bc84a97e611b43cf8885a5f5a6f5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98003
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2019-03-29 17:18:55 +00:00
Jens Johansen 4fe2f6f349 Add more tests to the incremental compiler
Add a test that reproduces a error we had in flutter code when
for instance 51da94da76 was HEAD.

Add a test for constant sets.

Change-Id: Ibae4891623bb23b93473aae6b29387cfcb66bf3a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98340
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-03-29 12:20:12 +00:00
Jens Johansen a977273262 Re-allow the incremental compiler to load modules
This reverts commit 4d43abdd9f2f3026ccfabaa5495499b3ea220430 and adds a
fix.

Change-Id: Id80186aba02dd80171aac3843d63aa4f42c5ca17
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98017
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-03-28 12:53:01 +00:00
Dmitry Stefantsov 7b33a8fdc4 [cfe] Fix type inference in map literals with spreads
Closes #36223

Bug: http://dartbug.com/36223
Change-Id: Id274361628f5b769609ca9c9513e48dbfaa42374
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97963
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2019-03-28 12:30:41 +00:00
Dmitry Stefantsov 864b22d3ce [cfe] Add inference and type checks to if-elements in maps
Change-Id: I3cacaee173320dd52bead6688fac24e4e4a01f0f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97962
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2019-03-28 12:30:41 +00:00
Jens Johansen cf768254fd Temporarily disable 'Allow the incremental compiler to load modules'
Caused weird test failures. Disabling while investigating.

Change-Id: I566a209175a1ad6a4384ee815f54ba04bdb75570
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98120
Reviewed-by: Jens Johansen <jensj@google.com>
2019-03-28 09:59:29 +00:00
Jens Johansen 32a5fa0a83 Allow incremental compiler to just create outline
Change-Id: I996787821f01f21bb41be837e6d4c25a2114e017
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95384
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
2019-03-28 08:44:56 +00:00
Jens Johansen 83e6e9f8e6 Allow the incremental compiler to load modules
Change-Id: I63bbbdfc94ac6ab0b7b8cce104fe38c4ba592f34
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95382
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2019-03-28 08:39:41 +00:00
Dmitry Stefantsov fbc70da0d3 [cfe] Add inference and type checks in for-elements in lists and sets
Change-Id: Ib8e85f674caf0565b25cf29642f4981a4a1534e5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97934
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2019-03-26 17:23:10 +00:00
Dmitry Stefantsov 49a7fa1c11 [cfe] Add inference and type checks for if-elements in lists and sets
Change-Id: Iad4e6a6ed86e17f97f6bb7ad16f2bff20ab84fae
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97925
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2019-03-26 17:23:10 +00:00
Kevin Millikin 1af9f99a5f [cfe] Compile loops in map literals
Add support for compiling for and for-in loops in map literals.  They
are lowered to block expressions.

Change-Id: I555401257ba028543310edbd0547166d7c6a26a2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97929
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-03-26 13:45:52 +00:00
Kevin Millikin ac21076110 [cfe] Implement compilation of loops in lists and sets
Implement the translation of for and for-in loops in non-const lists
and sets.  They are lowered to block expressions containing a loop.
It is impossible to target these loops with a break or continue
because they do not contain statements in their body.

Type inference is not yet implemented.

Change-Id: I35ff1650fde54cd376fe0b444891010435c74507
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97922
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-03-26 12:16:22 +00:00
Kevin Millikin e5374a688c [cfe] Add front-end support for for and for-in
In collection literals, support for and for-in in Fasta's body
builder.  They are removed when encountered during type inference and
their lowering to block expressions is not yet implemented.

Change-Id: I41e6a7a4aca7ffafdc12119e1503e9c0df5a6589
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97628
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2019-03-26 09:45:29 +00:00
Vyacheslav Egorov c9ecdabe5d Revert "Combine override checks and override-based inference in one phase"
This reverts commit 9db4119b67.

Revert "Change default of 'keepFields' in constant transformation to true"

This reverts commit b1e14cbe5f.

Revert "[fasta] Don't create forwarding stub if there's already a member"

This reverts commit 51da94da76.

These commits are reverted to unblock rolls into Flutter.

b1e14cbe5f is reverted because it contained
changes that prevented clean revert of the other CLs.

Change-Id: I8d3c00f0c1b146f4debe7f1a1a7de75be154e265
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97802
Commit-Queue: Alexander Aprelev <aam@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2019-03-25 19:40:26 +00:00
Dmitry Stefantsov 51da94da76 [fasta] Don't create forwarding stub if there's already a member
Change-Id: I5c7fd3ef5bfa5538f14b6b143de0f57e8dde3142
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97636
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
2019-03-25 14:09:26 +00:00
Peter von der Ahé 9db4119b67 Combine override checks and override-based inference in one phase
Change-Id: I2760f72f4eaa44bd192747179e843f017db30874
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97301
Commit-Queue: Peter von der Ahé <ahe@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-03-22 08:59:48 +00:00
Kevin Millikin 0cacd6c28d [CFE] Compile if map entries in map literals
The compilation of if map entries is similar to the way that if list
and set elements are compiled.

Change-Id: I8a3a97f01a176922c8ecc9a7d8636fad18124be3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97310
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Kevin Millikin <kmillikin@google.com>
2019-03-21 11:57:10 +00:00
Jens Johansen eb344e2072 Keep live libraries and uri to source in sync
This CL removes the sources from uriToSource for libraries
the incremental compiler doesn't keep around.

This includes:
* Explicitly invalidated libraries, also if in a package.
* Transitively invalidated libraries, also if in a package.
* Libraries that are now no longer referenced in the resulting whole
  program, unless it's in a package.
* Libraries from packages that are implicitly invalidated by an
  updated .packages file (e.g. if the .packages file no longer
  reference it or reference a new version of it).

This does *NOT* include:
* Libraries from packages that are not invalidated and that are still
  mentioned in .packages, even if the actual libraries are no longer
  referenced in the resulting whole program. The reason is that these
  libraries are kept around in the incremental compiler.

Bug: 36197
Change-Id: I0ed41567ab54828585326ffd4dcb3722980bf874
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97201
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-03-21 10:08:30 +00:00