Commit Graph

17 Commits

Author SHA1 Message Date
Jens Johansen fd26343f98 Fix invalidation not sticking on compile error
Before this CL, the invalidated URLs would be cleared sooner than we
threw away the old "userCode".
On a compile time error (issuing an erroneousComponent) we restore
the old userCode, thus in practical terms forgetting about whatever
had been invalidated prior to that.

This CL introduces a test and fixes the problem.

Change-Id: I8f5329c2f499ec3842d0b7d67e2eda1de1e7d938
Reviewed-on: https://dart-review.googlesource.com/52321
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2018-05-15 14:25:16 +00:00
Kevin Millikin 8dbe716085 Remove the unused GenericCovariantInterface bit
None of the back ends are using it and it imposes a cost to have to
compute it and try to preserve it.

Change-Id: I217e1191b535829021fa11f2698cadd8d4baf1c8
Reviewed-on: https://dart-review.googlesource.com/54383
Commit-Queue: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2018-05-09 15:04:43 +00:00
Dmitry Stefantsov 4f586e265e [fasta] Update expectation files after CL 50941
Change-Id: I85aba2501a7b8a911e122f0a802dfc21b7e87e1e
Reviewed-on: https://dart-review.googlesource.com/51620
Reviewed-by: Peter von der Ahé <ahe@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
2018-05-08 10:53:47 +00:00
Jens Johansen 16696ca9d5 Cleanup in incremental compiler test
Address comments from https://dart-review.googlesource.com/c/sdk/+/49642.

Change-Id: I80bc2f851d5f65b81d9e44e2c412f2b0b2d208c2
Reviewed-on: https://dart-review.googlesource.com/50200
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
2018-04-17 09:39:46 +00:00
Jens Johansen df6055d876 Only bypass cache when .packages is invalidated
In a86b864fa9 the incremental compiler was
updated to always bypass the cache when getting a UrlTranslator to be
able to handle the case where .packages had been updated.

This was driven by Flutter not invalidating .packages.

This has now been introduced in flutter with
https://github.com/flutter/flutter/pull/16467
and we can now limit when we bypass the cache to when the .packages file
has been invalidated.

This CL does just that, and further more adds tests where .packages either
appears or disappears.

Change-Id: I3e2d001a993a59c115bc00fcf714f97094357d35
Reviewed-on: https://dart-review.googlesource.com/50940
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
2018-04-12 11:40:44 +00:00
Jens Johansen 5aec8ad6fb Delete invalidated builder loaded from dill
Prior to this CL a builder loaded from a dill file - but where the
file has now been deleted (and we've previously been told about it) -
was kept around, meaning that it could get resurrected in a later
call to computeDelta.

This CL introduces a test and fixes the problem.

Change-Id: Ia18639a1387b37f8d641f803f202288dd185af5c
Reviewed-on: https://dart-review.googlesource.com/50722
Reviewed-by: Peter von der Ahé <ahe@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2018-04-12 10:27:24 +00:00
Jens Johansen e6962790a1 Use import URIs when invalidating files
Fixes https://github.com/flutter/flutter/issues/16368
Note that this is mostly a copy of
https://dart-review.googlesource.com/c/sdk/+/48180

Change-Id: Ibdf7719d8b362a4c179fd7a4a6ab5ae7028a5429
Reviewed-on: https://dart-review.googlesource.com/50420
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
2018-04-10 13:52:42 +00:00
Jens Johansen a86b864fa9 Handle updated .packages in incremental compiler
Change-Id: I6de6cb643b14b14ce54944f57b9e15f502750206
Reviewed-on: https://dart-review.googlesource.com/49901
Reviewed-by: Peter von der Ahé <ahe@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2018-04-10 10:57:31 +00:00
Jens Johansen b2d7749643 Fix issue with missing sources
Before this CL, if initializing from a dill file, and then,
at a subsequent call to computeDelta asks for the full Component,
the sources from the originally loaded libraries was missing.
This also meant that some fileUris were missing.

This can basically break Flutter.

This CL introduces tests that catch this, fixes the issue and bumps the
kernel version to force recompilation in Flutter.

Change-Id: I9f62962db017cec232855377835103ffc324820b
Reviewed-on: https://dart-review.googlesource.com/49642
Reviewed-by: Peter von der Ahé <ahe@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2018-04-05 13:23:07 +00:00
Siva Annamalai 2676c132cb Revert "Cleanup in incremental compiler"
This reverts commit 5367304ba5.

Reason for revert: Please see issue 32776
https://github.com/dart-lang/sdk/issues/32776

Original change's description:
> Cleanup in incremental compiler
> 
> This CL addresses comments from previous CLs, renaming variables and
> handles change package versions.
> 
> Change-Id: I83cf4a33bffe82ec137a32710cd6e8ff7f25ec8b
> Reviewed-on: https://dart-review.googlesource.com/49161
> Reviewed-by: Peter von der Ahé <ahe@google.com>
> Commit-Queue: Jens Johansen <jensj@google.com>

TBR=ahe@google.com,jensj@google.com

Change-Id: I29a7d5cbd842fd2dddf0373c4e7d0e2ff55da31a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/49626
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2018-04-05 05:07:37 +00:00
Jens Johansen 5367304ba5 Cleanup in incremental compiler
This CL addresses comments from previous CLs, renaming variables and
handles change package versions.

Change-Id: I83cf4a33bffe82ec137a32710cd6e8ff7f25ec8b
Reviewed-on: https://dart-review.googlesource.com/49161
Reviewed-by: Peter von der Ahé <ahe@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2018-04-04 13:11:43 +00:00
Jens Johansen 8ac9fa5de2 Rename simple to basic; get rid of name in tests
This CL follows up on a previous CL, renaming "simple tests" to
"basic tests" and gets rid of names in tests, as they no longer matter.

Change-Id: Id66368f26f8e2e36a8034d237f1708b30562de86
Reviewed-on: https://dart-review.googlesource.com/49160
Reviewed-by: Peter von der Ahé <ahe@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2018-04-04 13:11:33 +00:00
Peter von der Ahé e21b54159f Tests incremental compilation of parts in packages.
Change-Id: Ic432bc255df1fe356f281779132a92391e3a0c6c
Reviewed-on: https://dart-review.googlesource.com/48100
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Peter von der Ahé <ahe@google.com>
2018-03-23 09:30:25 +00:00
Jens Johansen 83bfbcdd96 Incremental compilation: computing class hierarchy for reachable things only
When incrementally compiling, we can have builders for things that aren't
included anymore. Such builders should not introduce errors.

Change-Id: Ia0487d84819028913d54f6b55a2882e620009bd9
Reviewed-on: https://dart-review.googlesource.com/47223
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
2018-03-22 09:08:46 +00:00
Jens Johansen 0dd2a8dbdb Incremental compiler: Only include libraries loaded from dill if used
Prior to this CL, if loading a library from the dill file what ends
up being unused in the new program it would still be included in the
output. This CL introduces a test and fixes the problem.

Change-Id: I60dd9c3b6bdb959e103f0d2a5653d036b6653140
Reviewed-on: https://dart-review.googlesource.com/46983
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
2018-03-22 09:08:46 +00:00
Jens Johansen bb2bf609be Incremental compiler: Deal with disappearing package
Prior to this CL, if incrementally compiling something and the .packages
file changed we could get a crash when trying to translate a package url.
This CL introduces a test and fixes the problem.

Change-Id: Ie1874780df7ade394eecef05835b0d9203f4c2b5
Reviewed-on: https://dart-review.googlesource.com/46982
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
2018-03-22 08:57:36 +00:00
Jens Johansen 2e366e8c9a [fasta] Refactor incremental_load_from_dill_test
Split into 2:
- One with a "smoke-test" of dart2js.
- One with several small examples that has caused problems in the past.

The latter of the two is now based on package:testing and the test-cases
are saved as yaml files.

Change-Id: I8b588e9b42edc73f58a07292a1226e37cc458d89
Reviewed-on: https://dart-review.googlesource.com/45505
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
2018-03-22 08:57:36 +00:00