Commit Graph

35 Commits

Author SHA1 Message Date
Johnni Winther f3502f9051 Fix bug in RTI optimization
Change-Id: Iec3026f0a79ac54dd125e15f00e4beb21e9a371c
Reviewed-on: https://dart-review.googlesource.com/58020
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-06-01 22:20:59 +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 d13bf49870 Check type-variable bounds on generic methods
Closes #32711

Change-Id: I86c123f5a8b9eda393b276248cdd27d1b109354b
Reviewed-on: https://dart-review.googlesource.com/53201
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-05-03 09:36:58 +00:00
Johnni Winther f373cfed83 Add omit-implicit-checks mode to equivalence tests.
Change-Id: Ifd98727384943d167b0ef39caaa9c1351b16e9ee
Reviewed-on: https://dart-review.googlesource.com/52805
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-05-01 12:41:59 +00:00
Johnni Winther 93511d523c Track RTI for noSuchMethod
Change-Id: I1fd66c48061556f8950bad471744eab4e2f40eb7
Reviewed-on: https://dart-review.googlesource.com/52560
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2018-04-26 08:07:02 +00:00
Johnni Winther f74ee52c70 Optimize signature need computation.
Change-Id: Ied6dfbfe71a9d323e189dbcacdb5ae2985c3fbb8
Reviewed-on: https://dart-review.googlesource.com/52221
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-04-23 08:00:02 +00:00
Johnni Winther 74a69a03c4 Add tests for method/local function signatures
Change-Id: I608303b91e0a4ed0d83130841719f0f5116102de
Reviewed-on: https://dart-review.googlesource.com/52105
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-04-20 20:26:07 +00:00
Johnni Winther 1f2f8be33a Add tests for closure/rti optimization
Change-Id: Iedf1d63cb7d87ecd87a059988b1fd95431aeab6a
Reviewed-on: https://dart-review.googlesource.com/51641
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-04-19 12:51:50 +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 8d689fcca7 step 4 of ??: add omit-implicit-checks and preview-dart-2 flags, strong-mode
defaults to include implicit checks.

Closes https://github.com/dart-lang/sdk/issues/32332

Change-Id: Iad5311234dec50a3f8dbd6557264b3feeb92afc8
Reviewed-on: https://dart-review.googlesource.com/48459
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2018-03-29 22:13:09 +00:00
Johnni Winther 36c2a71fcf Handle FutureOr in RuntimeTypeNeed/Checks computations.
Change-Id: I3b5b3f3feb665ff2f34b0975fb0062515a7b6ffd
Reviewed-on: https://dart-review.googlesource.com/48400
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-03-27 08:03:32 +00:00
Johnni Winther 85720e4eb3 Fix status of dart2js-with-kernel tests
Change-Id: I2f5a1589b800fc1d453f5dd6f941f77c42250acc
Reviewed-on: https://dart-review.googlesource.com/46242
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2018-03-13 11:22:44 +00:00
Johnni Winther b08bedee7e Update RuntimeTypesNeed to disable rti optimization
- for local signatures in strong mode.

Change-Id: I0cafead24b24a534813449b6bf710eeafcb569bd
Reviewed-on: https://dart-review.googlesource.com/46064
Reviewed-by: Emily Fortuna <efortuna@google.com>
2018-03-13 10:09:26 +00:00
Johnni Winther 42e7598f5d Don't emit function signatures for non-closure classes in Dart 2
Change-Id: I144ddd60abebe41549c1f5304d73cb56042c7289
Reviewed-on: https://dart-review.googlesource.com/46043
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-03-13 09:50:39 +00:00
Johnni Winther 26e689de05 More work on signatures
Change-Id: Ifd8c20f1947149d60cca7c69e40ad85533519746
Reviewed-on: https://dart-review.googlesource.com/45700
Reviewed-by: Emily Fortuna <efortuna@google.com>
2018-03-09 08:30:28 +00:00
Johnni Winther 8f4db274f1 Compute which selectors that need type arguments
Change-Id: I0e48ff67353d676ea77d13008ae46f79bb69336e
Reviewed-on: https://dart-review.googlesource.com/45321
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-03-07 13:46:49 +00:00
Sigmund Cherem 7fd5294bb3 Add rules to build dart2js platform in strong mode
This must land after we make the libraries strong clean.

Change-Id: I3a49a2be3b2bcb15842434266f55ce49e3800fc6
Reviewed-on: https://dart-review.googlesource.com/42140
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
2018-03-02 22:19:19 +00:00
Johnni Winther 41118c438e Reimplement runtime type checks computation
Change-Id: Ic1baa96e60db30cf9afe3414e605f0200361583b
Reviewed-on: https://dart-review.googlesource.com/37560
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-02-12 13:29:30 +00:00
Johnni Winther ca8aacc981 Add rti_emission_test.dart
Closes #32055

Change-Id: Ic33be29a70b88dee2271d121958c25716dc4e6db
Reviewed-on: https://dart-review.googlesource.com/38540
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-02-12 10:35:20 +00:00
Lasse R.H. Nielsen 6f78471687 New methods on Iterable, List, Set, Queue, Map.
Changes signature of Iterable.singleWhere.
Makes LinkedHashMap no longer be a HashMap.

Change-Id: I7a12fea533d42b0fc8357086649df38ad01f3cdd
Reviewed-on: https://dart-review.googlesource.com/39140
Commit-Queue: Leaf Petersen <leafp@google.com>
Reviewed-by: William Hesse <whesse@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2018-02-07 06:12:53 +00:00
William Hesse 9c35cff5cd Revert "New methods on Iterable, List, Set, Queue, Map."
This reverts commit 0b59f24f97.

Reason for revert: Creates crashes in dart2js with kernel, see
https://luci-milo.appspot.com/buildbot/client.dart/dart2js-linux-d8-minified-1-5-be/9751

Original change's description:
> New methods on Iterable, List, Set, Queue, Map.
> Changes signature of Iterable.singleWhere.
> Makes LinkedHashMap no longer be a HashMap.
> 
> Change-Id: Ibd7e56e1ac03cb9fb10d19d1328d452fcd06d89f
> Reviewed-on: https://dart-review.googlesource.com/32541
> Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
> Reviewed-by: Leaf Petersen <leafp@google.com>

TBR=lrn@google.com,leafp@google.com

Change-Id: Iab904f5885a5213ae2e16ef496eed0b6843185f3
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/39060
Reviewed-by: William Hesse <whesse@google.com>
2018-02-06 13:32:19 +00:00
Lasse R.H. Nielsen 0b59f24f97 New methods on Iterable, List, Set, Queue, Map.
Changes signature of Iterable.singleWhere.
Makes LinkedHashMap no longer be a HashMap.

Change-Id: Ibd7e56e1ac03cb9fb10d19d1328d452fcd06d89f
Reviewed-on: https://dart-review.googlesource.com/32541
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2018-02-06 11:17:46 +00:00
Johnni Winther abaabd4773 Remove unneeded RuntimeTypeChecks object
Change-Id: Ia0d7e842edff4694a74a6d3e43c3c912093c3e9b
Reviewed-on: https://dart-review.googlesource.com/37520
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2018-01-31 08:00:31 +00:00
Johnni Winther 9b0d9a2882 Track type variable tests through generic method invocations.
Change-Id: Ibb4fdf92ca1085034db5d10c3f10b46f60c70c16
Reviewed-on: https://dart-review.googlesource.com/36941
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-01-29 09:20:02 +00:00
Johnni Winther f0b5e3466a Refactor collection and printing features for annotations.
Change-Id: Ib1c1790d883acd51c690237fd4d3374d6e0b92e5
Reviewed-on: https://dart-review.googlesource.com/36740
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-01-29 08:30:11 +00:00
Johnni Winther 09bb73427e Compute implicit is-tests more precisely.
Closes #21969

Change-Id: If446df1e1ae4cdfb4d32580abb7f12fb213d678c
Reviewed-on: https://dart-review.googlesource.com/35865
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-01-26 22:26:17 +00:00
Johnni Winther 588a60f15b Add test for needed runtime checks
This is added as a precursor to
https://dart-review.googlesource.com/c/sdk/+/35865 to detect to an error
in dart2js_extra/inline_generic_test/04 otherwise introduced.

Change-Id: I25e475709ee821d01694904ef0cade8100b7548b
Reviewed-on: https://dart-review.googlesource.com/36640
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-01-26 21:51:41 +00:00
Johnni Winther ffd18a37ef Track type arguments of static and dynamic calls
- and use these to optimize for type argument need on instance
methods and closurized static methods.

Change-Id: Id41d8f8aa7639da15fbd24844e397a4524b6ed20
Reviewed-on: https://dart-review.googlesource.com/35261
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-01-19 22:31:37 +00:00
Johnni Winther 73e35eb035 Update RTI optimization to handle type literal uses
... for generic methods and local function. Also update capture
conversion to recognize the new kinds of type variables.

Change-Id: I9b8771b0ebe6c9e926712fa31b0bdea966cc6a25
Reviewed-on: https://dart-review.googlesource.com/34600
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Emily Fortuna <efortuna@google.com>
2018-01-17 15:12:55 +00:00
Johnni Winther c7447281f7 Handle type argument to instance members.
Change-Id: I40404d2f6da74cbaed68e23bc2fab0ebfb3e2cc8
Reviewed-on: https://dart-review.googlesource.com/33724
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-01-11 08:13:28 +00:00
Johnni Winther 8e8915f538 Support generic closures in rti analysis
Change-Id: I1d393cff5b83f8db69e7bddb8ecfcd4a5205854f
Reviewed-on: https://dart-review.googlesource.com/32700
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-01-08 11:36:40 +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
Johnni Winther 534dcf6874 Register methods depending on the rti need of classes.
Change-Id: I634d78152fc56167b6f32819ffce5d2221da600a
Reviewed-on: https://dart-review.googlesource.com/32320
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-01-05 10:28:00 +00:00
Johnni Winther 4f8682f162 Start computing which generic methods need type arguments
+ rename runtime type concepts

Change-Id: I4d5a73a1327abd62a34c91582ed7a2c9b46a9bc4
Reviewed-on: https://dart-review.googlesource.com/32260
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-01-05 10:01:14 +00:00
Johnni Winther 985eba5139 Refactor RuntimeTypesNeed(Builder) and make them testable
Change-Id: I67234dd2b076327c138e5b1d7de47ee3edc987d1
Reviewed-on: https://dart-review.googlesource.com/31901
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-01-04 08:35:31 +00:00