Commit Graph

17 Commits

Author SHA1 Message Date
Johnni Winther 18407141b7 Split deferred load entity computation by class, member and local function
Change-Id: Ifb612de6ac945d2ececa96871f0eb3fc5ceb4052
Reviewed-on: https://dart-review.googlesource.com/55896
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-05-24 09:52:50 +00:00
Johnni Winther ada23cde0b Add deferred test for local functions
Change-Id: I9f4b67de9435e74378af72d2a0c0fc711c0b0252
Reviewed-on: https://dart-review.googlesource.com/55891
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-05-18 19:33:48 +00:00
Johnni Winther d0112f4431 Remove old frontend equivalence tests
Change-Id: I18b4b9979aea44b4dec64a5f1a32e67118b54a97
Reviewed-on: https://dart-review.googlesource.com/54222
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-05-09 07:55:08 +00:00
Johnni Winther add1e67295 Include generic type arguments in deferred load computation.
Closes #33046

Change-Id: I1273b631e3f5b5aca8d4042b0afd972709a00068
Reviewed-on: https://dart-review.googlesource.com/53805
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-05-07 09:21:48 +00:00
Johnni Winther 62670f05ad Update rti and deferred tests to run strong mode
Change-Id: I3b209f720c7f35f4dd977c2d2b373e45d063f29d
Reviewed-on: https://dart-review.googlesource.com/49502
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-04-06 21:20:12 +00:00
Sigmund Cherem 521188f838 Fix deferred loading in the presence of type parameters too
(and get rid of a TODO(redemption) that I should have fixed eons ago...)

Change-Id: I218a7bddcc8256ff84b4ec03b54a858e8f5d8687
Reviewed-on: https://dart-review.googlesource.com/40180
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Emily Fortuna <efortuna@google.com>
2018-02-09 00:25:26 +00:00
Sigmund Cherem 3b6d39cc2c Correctly defer typedef references
Change-Id: I61fb5ebb399dcfca5193b7ae870badc10add23e5
Reviewed-on: https://dart-review.googlesource.com/37880
Reviewed-by: Emily Fortuna <efortuna@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2018-01-31 21:10:29 +00:00
Sigmund Cherem 72c3c8ea61 Several deferred loading improvements:
- fix some discrepancies between old and new deferred loading.
  * Kernel is now using the correct world impact
  * For the old FE, I'm more careful about avoiding metadata nodes when mirros
    are disabled as well.
  * Better approximate when a constant is deferred in the kernel codegen

- make 'dump()' independent of the IR, so we can easily compare them side by
  side.

- exclude primitives in kernel since we don't need to track them. I
  didn't change the old front end because it is not as easy to do. I did this
  change because kernel was processing many more constants than the old frontend
  (the old frontend skipped constants that were never evaluated, we have no way
  to do it selectively like that in the new front end).

Change-Id: I337d3fd818753125476b7390da5d900ebdc02709
Reviewed-on: https://dart-review.googlesource.com/34509
Reviewed-by: Emily Fortuna <efortuna@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2018-01-13 01:42:32 +00:00
Johnni Winther b11cf5e3b5 Support class data in equivalence test
Change-Id: I084af2503ba783de4280f520c5a3000f0b84abe7
Reviewed-on: https://dart-review.googlesource.com/32560
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-01-08 10:38:55 +00:00
Sigmund Cherem 497d592ac7 Fixes for deferred constants in the kernel pipeline.
The constant collector was inconsistent with the old frontend: we were
skipping primitives and we were not going into the body of closures.

Change-Id: I3321426da7e684d203f0ac7a2a2c7028f3138a7b
Reviewed-on: https://dart-review.googlesource.com/32663
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Emily Fortuna <efortuna@google.com>
2018-01-05 23:37:58 +00:00
Sigmund Cherem 747772b02d Add regression test for #31306
I ended up fixing this bug during my refactoring to support
deferred-constant-values in kernel (1ddb7db237).
The issue was that ssa/builder.dart was using the output unit of the deferred
import instead of the output unit of the deferred constant field.

(fixes #31306)
Bug: https://github.com/dart-lang/sdk/issues/31306
Change-Id: I557983c5ec85f2aa6adb486961dd2f79852e8d5a
Reviewed-on: https://dart-review.googlesource.com/32201
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2018-01-04 00:16:25 +00:00
Sigmund Cherem 1ddb7db237 Add support for deferred globals in kernel.
Change-Id: I24adb7e4c67b7c1d077efd6705b9bce92406deac
Reviewed-on: https://dart-review.googlesource.com/31680
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Emily Fortuna <efortuna@google.com>
2017-12-29 07:17:53 +00:00
Sigmund Cherem eae0dda31e Ensure that missing-ids is empty
Change-Id: I3a1526645a385e2ab75240841cd8def58712e792
Reviewed-on: https://dart-review.googlesource.com/31741
Reviewed-by: Emily Fortuna <efortuna@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2017-12-28 23:46:43 +00:00
Sigmund Cherem 9250db194c Add test for deferred-constants, skip for kernel for now
Change-Id: I8164857666787241294cc6ca389932d96d7d6a82
Reviewed-on: https://dart-review.googlesource.com/31740
Reviewed-by: Emily Fortuna <efortuna@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2017-12-28 23:33:53 +00:00
Emily Fortuna fa9e576a40 Adjust importsTo so that you can get the import chain for entities other than memberEntities.
Also added some more tests to the deferred equivalence test.


Bug:
Change-Id: Ia5ca50728a96020ff76b7b519558cdb5847d598e
Reviewed-on: https://dart-review.googlesource.com/31600
Commit-Queue: Emily Fortuna <efortuna@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2017-12-28 19:31:13 +00:00
Sigmund Cherem c03a8a8944 Show output unit of top-level constants in deferred tests.
We might want to later do this for all constants in the code, but this is a start.

Change-Id: I797c0d7b95dc81ca6f5a84b300a221cc5ff6c44a
Reviewed-on: https://dart-review.googlesource.com/31640
Reviewed-by: Emily Fortuna <efortuna@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2017-12-28 19:03:23 +00:00
Emily Fortuna 21891a965f Do id equivalence testing for deferred imports.
Also allows us to more generally compare annotations in multi-file tests.

Bug:
Change-Id: I2f4ac34b918cc80400ebc417dfcc2caf56457ac2
Reviewed-on: https://dart-review.googlesource.com/30923
Commit-Queue: Emily Fortuna <efortuna@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2017-12-22 20:04:44 +00:00