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
Sigmund Cherem
fa9ff9a061
Fix regression in deferred loading.
...
Ensure closures are not moved out of the main output unit accidentally.
This was seen in a large app, I haven't yet come up with a small repro for our
unit tests.
Change-Id: Ie1d4b3b5396eeeb41528e355c7f0d4abdfca7154
Reviewed-on: https://dart-review.googlesource.com/57521
Reviewed-by: Stephen Adams <sra@google.com >
Commit-Queue: Sigmund Cherem <sigmund@google.com >
2018-05-31 00:12:41 +00:00
Emily Fortuna
2911f1f107
More dart2js strong mode cleanup.
...
Change-Id: Id54951ebac50e465a31914c78d1ce859e8599229
Reviewed-on: https://dart-review.googlesource.com/57484
Commit-Queue: Emily Fortuna <efortuna@google.com >
Reviewed-by: Stephen Adams <sra@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2018-05-30 22:26:01 +00:00
Emily Fortuna
0e3ca9a668
Fix strong mode runtime error in dart2js.
...
Change-Id: Ib736576a094388f88183c981f9d04733142c8860
Reviewed-on: https://dart-review.googlesource.com/57480
Commit-Queue: Emily Fortuna <efortuna@google.com >
Reviewed-by: Stephen Adams <sra@google.com >
2018-05-30 20:13:10 +00:00
Johnni Winther
9d9eff44c9
Support sharing function signatures in deferred parts for fast startup
...
Change-Id: I2ee08817241512269fe04d7fb0e3367df847d37a
Reviewed-on: https://dart-review.googlesource.com/56940
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Stephen Adams <sra@google.com >
2018-05-30 13:25:48 +00:00
Emily Fortuna
7b33203f8e
Fixes to make hackernews run strong mode clean
...
Change-Id: I3ca5fcd0a4d8daf3aaca3cc39ba034a608f5f760
Reviewed-on: https://dart-review.googlesource.com/56707
Commit-Queue: Emily Fortuna <efortuna@google.com >
Reviewed-by: Stephen Adams <sra@google.com >
2018-05-29 18:58:36 +00:00
Alexander Markov
1ca17b6d03
[vm/kernel] Recognize desugared mixin applications in dart:mirrors
...
Kernel mixin transformation desugars mixin applications into normal
classes. Mixed-in type is pulled into interfaces list.
However, dart:mirrors needs to know the original mixed-in type of
a mixin application.
This change solves this problem by propagating a 'isTransformedMixinApplication'
attribute of a class through kernel AST, kernel binary and VM objects
into dart:mirrors implementation.
Fixes: https://github.com/dart-lang/sdk/issues/33240
Change-Id: I98ca69294e1ad445402a5ca91d90c30447aabcb2
Reviewed-on: https://dart-review.googlesource.com/56721
Commit-Queue: Alexander Markov <alexmarkov@google.com >
Reviewed-by: Ryan Macnak <rmacnak@google.com >
Reviewed-by: Siva Annamalai <asiva@google.com >
Reviewed-by: Kevin Millikin <kmillikin@google.com >
2018-05-29 18:12:26 +00:00
Peter von der Ahé
2514a67614
Import link.dart directly
...
I'd like to deprecate and remove the Link class,
as best as I can tell, it doesn't offer the same
performance benefits as I've seen on other platforms.
Fasta mostly uses "null" to represent empty lists, and
after the old dart2js front was deleted, there are few
uses remaining.
This CL makes it easier to find the remaining uses.
Change-Id: I73ac9b6b8b1bf5fed9669ae939cb3252cedbef0f
Reviewed-on: https://dart-review.googlesource.com/56781
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Peter von der Ahé <ahe@google.com >
2018-05-29 07:40:27 +00:00
Peter von der Ahé
990c85276b
Avoid allocation and bottom-type on Link
...
Change-Id: Ib23e596edf55285cc63e3a391da3712b2bcb1224
Reviewed-on: https://dart-review.googlesource.com/56761
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2018-05-29 07:40:27 +00:00
Johnni Winther
6b7f3d5f54
Share non-generic signatures through init.types
...
Change-Id: Ie132bbe805780022c91e5578c8dc4636c3c4cc8b
Reviewed-on: https://dart-review.googlesource.com/56671
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Stephen Adams <sra@google.com >
2018-05-28 07:40:24 +00:00
Emily Fortuna
785f36853f
Last changes to make dart2js strong mode clean when compiling itself!
...
Change-Id: I43b6869cc5dccb2b2d0f41133402225e0f55e433
Reviewed-on: https://dart-review.googlesource.com/56626
Commit-Queue: Stephen Adams <sra@google.com >
Reviewed-by: Stephen Adams <sra@google.com >
2018-05-24 22:00:35 +00:00
Emily Fortuna
00a5197542
More changes to make dart2js dart 2 strong mode clean.
...
Change-Id: I796ac4b71ca9b91ec43ac72a02127ed87872f954
Reviewed-on: https://dart-review.googlesource.com/56460
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Reviewed-by: Stephen Adams <sra@google.com >
2018-05-24 20:50:51 +00:00
Johnni Winther
89514bd8cf
Cleanup library_loader.
...
Change-Id: I0255580cd9292bcd3a5997c7d97d83b25d888372
Reviewed-on: https://dart-review.googlesource.com/55960
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2018-05-24 09:52:50 +00:00
Johnni Winther
21b65a9732
Remove unused typedef code
...
We only use the name of typedef type literals. These are passed through
TypeConstantExpression to TypeConstantValue and used directly as the
nominal identity (!) of the emitted typedef type literal constant value.
Note that the emitted typedef type literal has no relation to its alias.
Change-Id: I1cdc5a88a9b3d75faa0786ecd07226b5075df1c4
Reviewed-on: https://dart-review.googlesource.com/55898
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2018-05-24 09:52:50 +00:00
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
0ec82e24ce
Avoid late creation of entities.
...
This changes has been reviewed as part of https://dart-review.googlesource.com/c/sdk/+/55898
Change-Id: I28d41110919a592499ee7b5b7605728638bd5ea2
Reviewed-on: https://dart-review.googlesource.com/56481
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2018-05-24 08:01:00 +00:00