Sigmund Cherem
46710a77dd
Make checked flag again only enable assertions in Dart 2.0
...
This regressed when we swap the default to Dart 2.0 because the strongMode flag
is no longer explicit.
Fixes #33639
Change-Id: If808987efda0d11e15a9b53b81c0979c239749df
Reviewed-on: https://dart-review.googlesource.com/62442
Commit-Queue: Sigmund Cherem <sigmund@google.com >
Reviewed-by: Stephen Adams <sra@google.com >
2018-06-26 23:47:58 +00:00
Stephen Adams
e0905b979a
Revert "Add ClassHierarchy to share code between J/KClosedWorld"
...
This reverts commit a8e930caf3 .
Compile time regression on some large apps.
TBR=johnniwinther@google.com
Change-Id: Ic1b736a5d50814ed8b8d24a9dc4a2d910e5f70df
Reviewed-on: https://dart-review.googlesource.com/62446
Reviewed-by: Stephen Adams <sra@google.com >
Commit-Queue: Stephen Adams <sra@google.com >
2018-06-26 23:40:48 +00:00
Johnni Winther
a8e930caf3
Add ClassHierarchy to share code between J/KClosedWorld
...
+ improve the commonSubclasses implementation to support the
implementation of FlatTypeMask.intersection and RuntimeEquals.equals
computation.
Change-Id: I51c4d229e9dc6d5de101aff33e56bb44bf93bc0d
Reviewed-on: https://dart-review.googlesource.com/61927
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2018-06-26 07:46:24 +00:00
Stephen Adams
e661c9ef54
Simplify 'as T' for simple T
...
Example change:
return H.subtypeOfRuntimeTypeCast(this.$index(0, "name"), P.String);
--->
return H.stringTypeCast(this.$index(0, "name"));
Change-Id: I65752a3e9516c5d391cff4e7a0c4b74c877c81af
Reviewed-on: https://dart-review.googlesource.com/60827
Commit-Queue: Stephen Adams <sra@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2018-06-25 23:22:23 +00:00
Stephen Adams
9146cea63a
Print times in seconds
...
Change-Id: I4adcb9847d7a1ce4e91f93e7c484a3fd59310f52
Reviewed-on: https://dart-review.googlesource.com/62001
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Stephen Adams <sra@google.com >
2018-06-23 00:50:15 +00:00
Stephen Adams
aeba82ef9a
[dart2js] Fix for issue 33572
...
Change-Id: If33e59880c882885b4368a8be91663298deb207c
Reviewed-on: https://dart-review.googlesource.com/61965
Commit-Queue: Stephen Adams <sra@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2018-06-22 20:50:45 +00:00
Johnni Winther
7c6211b1d8
Make unittests work with Dart 2
...
Change-Id: Ic2c105747dfba067464fc15e158f58417c8636a8
Reviewed-on: https://dart-review.googlesource.com/61922
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2018-06-22 20:25:05 +00:00
Johnni Winther
a8d805055a
Handle covariant parameters in function types
...
Closes #33575
Change-Id: I743a951f5864ca538b588441ecba2680eba2081f
Reviewed-on: https://dart-review.googlesource.com/61924
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2018-06-22 20:24:55 +00:00
Sigmund Cherem
4c697085be
dart2js: Make bazel-input-provider dart2 compliant.
...
Change-Id: Ia832982852720c3c591621091ba15b81b922d553
Reviewed-on: https://dart-review.googlesource.com/61914
Reviewed-by: Stephen Adams <sra@google.com >
Commit-Queue: Sigmund Cherem <sigmund@google.com >
2018-06-22 18:26:25 +00:00
Jens Johansen
6888bc2824
Compile time error for web int literals that cannot be represented exactly
...
Bug: #33351
Change-Id: I2b99858dfc276dc70c3a36c289030e801145af86
Reviewed-on: https://dart-review.googlesource.com/61180
Commit-Queue: Jens Johansen <jensj@google.com >
Reviewed-by: Kevin Millikin <kmillikin@google.com >
2018-06-22 10:47:54 +00:00
Johnni Winther
075c713a93
Register type arguments on inlining
...
Closes #33529
Change-Id: I992552a400199490959d10de8c838e56015159e5
Reviewed-on: https://dart-review.googlesource.com/61522
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2018-06-22 08:24:13 +00:00
Stephen Adams
5ccc497678
Inline constructor bodies that are called once
...
Change-Id: I74b2518fed543a78f1531b54510f4dcbe3a57192
Reviewed-on: https://dart-review.googlesource.com/60324
Commit-Queue: Stephen Adams <sra@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2018-06-20 22:12:02 +00:00
Johnni Winther
1c4b362ba5
Support noSuchMethod forwarders in dart2js
...
Closes #32750
Change-Id: Ib2f358b14ae5a079e3df8413013ecfc006f0e69b
Reviewed-on: https://dart-review.googlesource.com/60250
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2018-06-20 10:15:41 +00:00
Stephen Adams
75f485d6d9
[dart2js] Fix for issue 33500
...
Fix check for whether to lower JSArray.add to Array.push.
Change-Id: I22149bf7d31442b8a4bba6b6431239f5f031e55b
Reviewed-on: https://dart-review.googlesource.com/61104
Commit-Queue: Stephen Adams <sra@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2018-06-20 05:07:32 +00:00
Sigmund Cherem
c96f23243b
Enable Dart2 in dart2js by default
...
Change-Id: Id197fc734bcb45f0805e49e89c0d03419384bb0b
Reviewed-on: https://dart-review.googlesource.com/60448
Reviewed-by: Stephen Adams <sra@google.com >
Commit-Queue: Sigmund Cherem <sigmund@google.com >
2018-06-19 19:20:36 +00:00
Johnni Winther
532b9aaa93
Flatten *WorldBuilder hierarchies.
...
Change-Id: I59bfa08f151f2e238816a4da6163a39e6df2dc9c
Reviewed-on: https://dart-review.googlesource.com/60544
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2018-06-19 08:16:03 +00:00
Johnni Winther
b558a9c2f4
Handle missing compile-time errors
...
Closes #33468
Change-Id: I6da12012103ed465257335ce5bb81ba1fc54c81a
Reviewed-on: https://dart-review.googlesource.com/60500
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Stephen Adams <sra@google.com >
2018-06-18 07:34:46 +00:00
Sigmund Cherem
bc8d77231d
Improve flags documentation, reenable hints in dart2js.
...
Now that #32111 has been fixed, we can reenable hints in dart2js. Tested on a
large consumer app and there are no unncessary hints at this time.
Change-Id: Idfe39abb319a0a8d54b4439dc74b9315d2cc1b41
Reviewed-on: https://dart-review.googlesource.com/60445
Commit-Queue: Sigmund Cherem <sigmund@google.com >
Reviewed-by: Emily Fortuna <efortuna@google.com >
2018-06-15 21:01:59 +00:00
Johnni Winther
f59389b688
Optimize .runtimeType impact based on usage
...
Change-Id: If6c24d4115241dcb8ac2ed82eee58c4025e3d8e2
Reviewed-on: https://dart-review.googlesource.com/59090
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2018-06-15 19:51:14 +00:00
Sigmund Cherem
a63cf8e0cb
Add --no-preview-dart-2 flag.
...
Currently it is a noop, it will change once we update the default to 2.0
Change-Id: Id0f0b43d4742dddc25d2c9e4ddb77c55d397caaf
Reviewed-on: https://dart-review.googlesource.com/60440
Reviewed-by: Emily Fortuna <efortuna@google.com >
Commit-Queue: Sigmund Cherem <sigmund@google.com >
2018-06-15 18:25:10 +00:00
Johnni Winther
37425618d5
Narrow to static types in invoke/get in inference
...
Change-Id: Ifb085cf881c21a6161a22cb1f2b6058a9947f321
Reviewed-on: https://dart-review.googlesource.com/55920
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2018-06-13 13:11:10 +00:00
Peter von der Ahé
3d98cce456
Replace Severity.nit by Severity.ignored
...
Change-Id: Ib249c2e383c25173bd25b965bdb0d67c9a487cb4
Reviewed-on: https://dart-review.googlesource.com/59085
Reviewed-by: Aske Simon Christensen <askesc@google.com >
2018-06-13 08:12:34 +00:00
Emily Fortuna
8e472acd37
No arguments to process with signature functions.
...
Change-Id: I741b6c1e698385b40cad15682658254edea9a58b
Reviewed-on: https://dart-review.googlesource.com/60022
Commit-Queue: Emily Fortuna <efortuna@google.com >
Reviewed-by: Stephen Adams <sra@google.com >
2018-06-12 22:06:23 +00:00
Stephen Adams
14dfd82d69
[dart2js] Chain null-field initializers
...
Change-Id: I1fff4143ee5698dd1c8c1c833fcb99828d1f8223
Reviewed-on: https://dart-review.googlesource.com/59860
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Stephen Adams <sra@google.com >
2018-06-12 17:51:40 +00:00
Lasse R.H. Nielsen
0b91676362
Remove the retype method.
...
See #33075 .
Bug: http://dartbug.com/33075
Change-Id: I1ee2f587afbc672dd08ac61ac003bbdc85bb95e2
Reviewed-on: https://dart-review.googlesource.com/59091
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com >
Reviewed-by: Leaf Petersen <leafp@google.com >
2018-06-12 14:36:09 +00:00
Johnni Winther
e7ad806bf1
Provide default type variable bounds on inlining.
...
+ use the 'any' type to avoid failing on bounds with type variables, which we currently don't support.
Change-Id: I57d74d17fa9eee598bd86c8e76790778438cddfd
Reviewed-on: https://dart-review.googlesource.com/59540
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Stephen Adams <sra@google.com >
2018-06-12 09:05:09 +00:00
Johnni Winther
7321f938d5
Use default type for type variable bounds.
...
Change-Id: I5d21a16a76eb6cd898e8e11104d0be0f7e669426
Reviewed-on: https://dart-review.googlesource.com/59420
Reviewed-by: Stephen Adams <sra@google.com >
2018-06-12 09:05:09 +00:00
Johnni Winther
52d7a3043a
Track RTI dependency through instantiations
...
Closes #33093
Change-Id: Ia7d9cd1235cd4fe60858f37533689f5eeb600540
Reviewed-on: https://dart-review.googlesource.com/59400
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Stephen Adams <sra@google.com >
2018-06-12 08:00:09 +00:00
Stephen Adams
1fb845c2f4
[dart2js] Apply stub should default type parameters
...
Change-Id: Ie01ade9b6e561a96a3ac06bf13617bb679122c63
Reviewed-on: https://dart-review.googlesource.com/59020
Commit-Queue: Stephen Adams <sra@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2018-06-12 01:10:39 +00:00
Stephen Adams
4596881c9e
[dart2js] Remove more entry checks
...
Remove checks on generator bodies, constructor bodies and constructor
factories, as these are all called from statically resolved contexts.
Add a TargetChecks type to convey which checks are required.
Change-Id: Ib354956d039078a5d1428de4706b7427401b08d9
Reviewed-on: https://dart-review.googlesource.com/58681
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Stephen Adams <sra@google.com >
2018-06-07 19:43:30 +00:00
Johnni Winther
c39c2c8ac1
Handle type variables in optional function typed parameter in jsinterop methods
...
Closes ##33162
Change-Id: If31e7c793cc9312e584817cf4c373b8f10ff3bc1
Reviewed-on: https://dart-review.googlesource.com/58460
Reviewed-by: Stephen Adams <sra@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2018-06-06 11:06:10 +00:00
Johnni Winther
d17ec7c131
Move inference data from JClosedWorld to GlobalTypeInferenceResults.
...
Change-Id: I19fdd6771c78c022fd5ca9a3f63c01064bc34d07
Reviewed-on: https://dart-review.googlesource.com/58220
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Stephen Adams <sra@google.com >
2018-06-06 07:49:08 +00:00
Emily Fortuna
134e00fd73
Treat 64 bit ints as unsigned until conversion to JS.
...
Change-Id: Idb9c5d4a3562f59bc75a5bb7eef4b7af8f5df992
Reviewed-on: https://dart-review.googlesource.com/57714
Commit-Queue: Emily Fortuna <efortuna@google.com >
Reviewed-by: Stephen Adams <sra@google.com >
2018-06-06 00:28:28 +00:00
Emily Fortuna
b667be4861
Fix source maps strong mode runtime failure in dart2js.
...
Fix for https://github.com/dart-lang/sdk/issues/33332
Change-Id: I16c464b5dec85ccef55ecbe2e75d67dbf3481927
Reviewed-on: https://dart-review.googlesource.com/58480
Reviewed-by: Stephen Adams <sra@google.com >
Commit-Queue: Emily Fortuna <efortuna@google.com >
2018-06-05 18:04:37 +00:00
Emily Fortuna
c499e0021a
Remove unnecessary class type parameters now that we only have ir.Node.
...
Fixes https://github.com/dart-lang/sdk/issues/33328
a Dart 2 strong mode runtime error.
Change-Id: I10d52a6360f932cf4ab4592dfd1fb01c263fffb4
Reviewed-on: https://dart-review.googlesource.com/58423
Reviewed-by: Stephen Adams <sra@google.com >
Commit-Queue: Emily Fortuna <efortuna@google.com >
2018-06-05 01:23:09 +00:00
Stephen Adams
38467cca03
Track always-initialized-to-null fields
...
Change-Id: Idb4d3a0395ce73eaaa4fc15a8df3bceaa4821b4f
Reviewed-on: https://dart-review.googlesource.com/57525
Commit-Queue: Stephen Adams <sra@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2018-06-04 21:05:01 +00:00
Johnni Winther
82755aa303
Rename ClosedWorld to JClosedWorld and merge it with ClosedWorldRefiner
...
Change-Id: I858695194fe4b0dffb7c85a93e2d6bcc04dd6229
Reviewed-on: https://dart-review.googlesource.com/58022
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2018-06-04 09:22:41 +00:00
Johnni Winther
b58cc36ddc
Extract KClosedWorld from ClosedWorld.
...
Change-Id: I2db59cea5081fde2f0b35c6518d6b618df617ac1
Reviewed-on: https://dart-review.googlesource.com/57827
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2018-06-04 09:22:41 +00:00
Stephen Adams
41e1d2cc28
[dart2js] Fix --csp
...
TBR=efortuna@google.com
Change-Id: I5738b1432b82df9f3f391f015d845c9d664901e6
Reviewed-on: https://dart-review.googlesource.com/58140
Reviewed-by: Stephen Adams <sra@google.com >
Commit-Queue: Stephen Adams <sra@google.com >
2018-06-02 03:05:05 +00:00
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
e1549df93f
Fix regression introduced in 'Use AbstractValue in most of ssa'
...
Change-Id: Ie6159eb750ece1748ba1bb0b3c4f4d13a0dff9d6
Reviewed-on: https://dart-review.googlesource.com/58021
Reviewed-by: Stephen Adams <sra@google.com >
Commit-Queue: Stephen Adams <sra@google.com >
2018-06-01 21:18:03 +00:00
Sigmund Cherem
b930ae19b1
Fix regression in deferred loading (part2)
...
Change-Id: If38e0c40c8997af65da470285cdbd8e45a20af7d
Reviewed-on: https://dart-review.googlesource.com/57705
Reviewed-by: Stephen Adams <sra@google.com >
Commit-Queue: Sigmund Cherem <sigmund@google.com >
2018-05-31 21:42:07 +00:00
Emily Fortuna
c911a1bef6
Clean up additional dart2js strong mode runtime error and don't add method type variable in dart 1 version.
...
Change-Id: I8f8a62fe2b4fcc00c05fbab22ed9e7a55eb95ccf
Reviewed-on: https://dart-review.googlesource.com/57523
Commit-Queue: Emily Fortuna <efortuna@google.com >
Reviewed-by: Stephen Adams <sra@google.com >
2018-05-31 18:52:06 +00:00
Johnni Winther
b75da964ef
Move all type mask code to inferrer/typemasks and use it via an AbstractValueStrategy
...
Change-Id: Ib6f0089b0fee05488fea9295cbb5df944bb29d49
Reviewed-on: https://dart-review.googlesource.com/56980
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2018-05-31 16:15:32 +00:00
Johnni Winther
39b0efd613
Handle generic jsinterop classes as type arguments.
...
Change-Id: I89d8a77d632cf6d4f8adffa84f042a1c03a79f26
Reviewed-on: https://dart-review.googlesource.com/56665
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2018-05-31 07:50:52 +00:00
Johnni Winther
c6129f768e
Use AbstractValue in the rest of type inference
...
Change-Id: Ic782af55e7b9ab9942eab9809f180e3979d2b326
Reviewed-on: https://dart-review.googlesource.com/56920
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2018-05-31 07:26:52 +00:00
Johnni Winther
947760f9b2
Use AbstractValue in much of inference
...
Change-Id: I38cd4631c099ec6bd16c675804ccc453a6401889
Reviewed-on: https://dart-review.googlesource.com/56670
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2018-05-31 07:26:52 +00:00
Johnni Winther
3dd70ce67b
Usa AbstractValue in the rest of ssa
...
Change-Id: Id29d7bdaaeaa0fb6dfd4f5fbba50468cd474cd8e
Reviewed-on: https://dart-review.googlesource.com/56664
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2018-05-31 07:26:52 +00:00
Johnni Winther
bbef9aee7c
Use AbstractValue in most of ssa
...
Change-Id: I157081f817e033181d7c314f7567517e5ce85058
Reviewed-on: https://dart-review.googlesource.com/56522
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2018-05-31 07:26:52 +00:00
Johnni Winther
aecf8e8dc4
Use AbstractValue in KernelToTypeInferenceMap and KernelTypeGraphBuilder
...
Change-Id: I0af69d10223364256852248228cdbbcbca3f83fa
Reviewed-on: https://dart-review.googlesource.com/56484
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2018-05-31 07:26:52 +00:00