Sigmund Cherem
bb4a880777
Report duplicate set entries with a different error
...
It will take some time until the CFE will take on reporting this error (and
duplicate keys in maps).
For now: detect whether a map is used as the implementation of a set literal,
and if so report the error differently.
Change-Id: I9f657189c79a4532023f615aa91bf63602f27664
Reviewed-on: https://dart-review.googlesource.com/c/91102
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Sigmund Cherem <sigmund@google.com >
2019-01-25 17:12:43 +00:00
Johnni Winther
e97ddcbf64
Add member_usage test for dynamic invocation of generic methods.
...
Change-Id: Iee549ef1471301eedeb28b130bdb730d434d7b25
Reviewed-on: https://dart-review.googlesource.com/c/90704
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2019-01-24 07:50:40 +00:00
Stephen Adams
3770ffb53e
[js_runtime] Not worth inlining TypeImpl.==
...
Change-Id: I7d04aa903abb653f6cec12631b4153cd493bd66c
Reviewed-on: https://dart-review.googlesource.com/c/90581
Commit-Queue: Stephen Adams <sra@google.com >
Reviewed-by: Stephen Adams <sra@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2019-01-23 21:27:55 +00:00
Rick Earnshaw
5724158d58
Use the crossorigin attribute of the main script on deferred hunks.
...
If the main script is loaded using a CORS request the deferred hunks
will be as well preventing errors from being muted.
Bug: 35594
Change-Id: I3283307b5d9e1d6708a4808e1e3fd7689a672a9b
Reviewed-on: https://dart-review.googlesource.com/c/89141
Commit-Queue: Sigmund Cherem <sigmund@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2019-01-18 19:08:44 +00:00
Johnni Winther
430560d928
Track parameter use in invocations in MemberUsage
...
Change-Id: I53b4ad1ff533d913bdff7e48558fdc56ce016e3f
Reviewed-on: https://dart-review.googlesource.com/c/89525
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2019-01-17 08:48:48 +00:00
Stephen Adams
9cdce03e16
[dart2js] Improve null receiver guard removal near JS code
...
Null receiver guards (which look like "t1.toString;") are removed in more cases
where the following JS fragment would throw a TypeError on the same value.
Change-Id: I3872f00c90432077199542f4485b8e991f82fa21
Reviewed-on: https://dart-review.googlesource.com/c/89765
Commit-Queue: Stephen Adams <sra@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2019-01-16 23:59:28 +00:00
Johnni Winther
966e007b63
Pass CallStructure on dynamic and static use in ResolutionWorldBuilder
...
This is a preparation for using the collected call structures to inline
optional parameters that are never passed a call sites.
Change-Id: I9603f931967cbab53e9593dc19b29ad3ce717fa3
Reviewed-on: https://dart-review.googlesource.com/c/89549
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2019-01-16 09:16:19 +00:00
Sam Rawlins
3154bb0d37
Stop using external deprecated members in front_end
...
Change-Id: I3fa03de568f72bfc3adb46efcfa2b61b781c706b
Reviewed-on: https://dart-review.googlesource.com/c/89020
Commit-Queue: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Reviewed-by: Peter von der Ahé <ahe@google.com >
2019-01-15 18:55:10 +00:00
Johnni Winther
b61a085c60
Use custom thisType to signal static type precision.
...
This also removes the dependency on the state (!) in ir.TypeEnvironment.
Change-Id: I0180d111ecf45b685c4abce12c6a9bd52c1f308e
Reviewed-on: https://dart-review.googlesource.com/c/88968
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2019-01-11 12:17:14 +00:00
Johnni Winther
7b2aae5498
Handle dynamic/instance access in ir/impact.dart
...
Change-Id: Iaae339550bc5f693d592012e1798c9e64002f4ec
Reviewed-on: https://dart-review.googlesource.com/c/88965
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2019-01-11 09:30:38 +00:00
Johnni Winther
5cb13961db
Use typeEnvironment.nullType for null and custom type for 'does not complete'
...
Change-Id: Iab2baf491227c722c8bafe3dfede44907bc0d09a
Reviewed-on: https://dart-review.googlesource.com/c/88961
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2019-01-11 09:30:38 +00:00
Johnni Winther
cff0d20247
Use better static types for RuntimeTypeUse
...
+ remove the use ir.Expression.getStaticType
Change-Id: I4fa7908e44505b9336cd366a2025f20a7ba45a59
Reviewed-on: https://dart-review.googlesource.com/c/88834
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2019-01-11 09:14:27 +00:00
Johnni Winther
3d7ca147a4
Add FeaturesDataInterpreter
...
Change-Id: I40a7baca235c2e729629f4330d8d51f148264ece
Reviewed-on: https://dart-review.googlesource.com/c/88963
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2019-01-11 08:11:09 +00:00
Sigmund Cherem
a1ff5f7cd5
Ensure inlining of getter/setters is recorded in our source-map extension
...
Change-Id: I6eac59f756b2a6a87842e5a4b1d8aa47df619042
Reviewed-on: https://dart-review.googlesource.com/c/88580
Commit-Queue: Sigmund Cherem <sigmund@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2019-01-10 23:40:28 +00:00
Stephen Adams
4ef8de99ac
Remove full emitter
...
Change-Id: Iaabca4423570a851bf7d8969d1829c81c94850a8
Reviewed-on: https://dart-review.googlesource.com/c/88882
Commit-Queue: Stephen Adams <sra@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2019-01-10 17:38:34 +00:00
Stephen Adams
651d19cdaa
Ignore --fast-startup flag, assume true
...
Change-Id: I7a41160bf7f5bb403177b19613de2889e0fa2b44
Reviewed-on: https://dart-review.googlesource.com/c/87424
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2019-01-09 21:22:57 +00:00
Johnni Winther
2bc015b03a
Remove dependency on TypeEnvironment.hierarchy
...
Change-Id: Ibc675aa37bf1d5f90640b41471d094025ae3da86
Reviewed-on: https://dart-review.googlesource.com/c/88805
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Auto-Submit: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Peter von der Ahé <ahe@google.com >
2019-01-09 11:21:36 +00:00
Johnni Winther
fef600a998
Remove effectively empty type holders
...
+ correctly join with path with less information.
Change-Id: I44921f5b1d1613934d5321d87840db689b3b4b0b
Reviewed-on: https://dart-review.googlesource.com/c/88573
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2019-01-08 09:19:29 +00:00
Johnni Winther
477de6b84b
Cleanup unittests
...
- remove use of '_strong', '_trust', and '_checked' suffices
- test omit-implicit-checks by default
Change-Id: I2a83f6fb23a22c894cc7867c51ab460abb4cc524
Reviewed-on: https://dart-review.googlesource.com/c/88454
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2019-01-07 15:01:10 +00:00
Johnni Winther
e14472c46b
Use getters/setters found through the static types.
...
This uses the information from the static types now used in inference which
can improve the precision in particular for generic classes. Since type
masks lose the type argument information, we cannot expect locating members
based on the type mask to be more precise than what has been found through
the static types.
This CL also expands the unit test framework to support unit test of
optimizations and the emission model, including tests of the improved
field access handling.
Closes #35433
Change-Id: Ia5de15efaf8b60c8723943bb34de6eec7d380798
Reviewed-on: https://dart-review.googlesource.com/c/88440
Reviewed-by: Stephen Adams <sra@google.com >
2019-01-07 15:01:10 +00:00
Stephen Adams
8deb5aabba
Reinstate reduction for closure call to known static method
...
This was accidentally removed during the migration to kernel.
Change-Id: Ib4998074269b1bf5b1dd3feedebcb50dc1164c5d
Reviewed-on: https://dart-review.googlesource.com/c/88229
Commit-Queue: Stephen Adams <sra@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2019-01-03 22:44:53 +00:00
Johnni Winther
5fdab895a2
Use static types in inferrer
...
Change-Id: I284ca47dbaab452bd67c688b461fcbbe9a69e751
Reviewed-on: https://dart-review.googlesource.com/c/87402
Commit-Queue: Sigmund Cherem <sigmund@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2018-12-20 19:23:52 +00:00
Peter von der Ahé
e45e334548
Rename strong mode to legacy mode in package:kernel
...
Change-Id: Ia4a8a9cac7817a8db5771ec82541b556c705f7c8
Reviewed-on: https://dart-review.googlesource.com/c/86353
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
2018-12-20 18:06:34 +00:00
Sigmund Cherem
6c2d8bc8c1
Record getter and setter names in the minified-name table
...
Change-Id: I373babecdf3ccece386483d5aa4fcde320675b80
Reviewed-on: https://dart-review.googlesource.com/c/87480
Commit-Queue: Sigmund Cherem <sigmund@google.com >
Reviewed-by: Stephen Adams <sra@google.com >
2018-12-18 22:05:18 +00:00
Johnni Winther
8c7be910d0
Support compilation with the trivial abstract value domain
...
Change-Id: I1b42ee48f440db9e424448e794a8f8cc9d8f5f3a
Reviewed-on: https://dart-review.googlesource.com/c/86921
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2018-12-18 12:20:36 +00:00
Johnni Winther
6d4d3c6b07
Remove TrustTypeAnnotations
...
Change-Id: I7404d10c30642f5282d079e36cb4a20ee2066060
Reviewed-on: https://dart-review.googlesource.com/c/87401
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2018-12-18 11:00:09 +00:00
Johnni Winther
ec1dfa8716
Add @pragma('dart2js:disableFinal')
...
Change-Id: I9b3f878803f946d08979144028d08b1a4dc4612f
Reviewed-on: https://dart-review.googlesource.com/c/86924
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Auto-Submit: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2018-12-13 09:35:13 +00:00
Stephen Adams
54a47243e5
Fix for 35356 - and/or/xor
...
Change-Id: Ia7c7422fa4864b2a5873e241e0a21529b67c2322
Reviewed-on: https://dart-review.googlesource.com/c/86824
Auto-Submit: Stephen Adams <sra@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Sigmund Cherem <sigmund@google.com >
2018-12-11 01:14:57 +00:00
Johnni Winther
be532c0fc5
Use AbstractBool in AbstractValueDomain and add TrivialAbstractValueDomain
...
Change-Id: I01c8ca95d48b89c47748e91ba7e4709c3e6f2e78
Reviewed-on: https://dart-review.googlesource.com/c/86700
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2018-12-10 09:39:21 +00:00
Johnni Winther
b5d2400d82
Always include members of Null in subtype access.
...
Change-Id: I8e7fa2d418b9dd948b17b385b6d8e8e266582239
Reviewed-on: https://dart-review.googlesource.com/c/86566
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2018-12-07 21:20:52 +00:00
Johnni Winther
c987c9e5a7
Propagate cached static types to inference and ssa
...
+ use it to skip unnecessary casts.
Change-Id: Ib503a6fb74907f7e6367c8ee44548268e03045cf
Reviewed-on: https://dart-review.googlesource.com/c/86560
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2018-12-07 19:57:05 +00:00
Johnni Winther
7d78f7caf9
Handle FutureOr in runtimeType analysis.
...
Closes #35341
Change-Id: I2c6daba8d72fa6236739f191af989c548b694348
Reviewed-on: https://dart-review.googlesource.com/c/86561
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2018-12-07 18:13:28 +00:00
Johnni Winther
3cb3fd2b20
Move types/* to inferrer/*
...
Change-Id: Iff27cf92c6e0fec2c304dfbc0d2e4cb8901403cc
Reviewed-on: https://dart-review.googlesource.com/c/86567
Auto-Submit: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Sigmund Cherem <sigmund@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2018-12-07 18:06:35 +00:00
Sigmund Cherem
2a39f63c2a
Record deferred accesses in kernel world impacts and use it for splitting only
...
under a flag.
This reapplies commit 70e1517d98 , but adds a flag
to gradually migrate users before enabling it by default.
Patchset 1 matches the old CL
Change-Id: Iaf7ee3dec8d4aa658f0b4334549b507e5a610a68
Reviewed-on: https://dart-review.googlesource.com/c/86444
Reviewed-by: Stephen Adams <sra@google.com >
Commit-Queue: Sigmund Cherem <sigmund@google.com >
2018-12-06 23:20:38 +00:00
Sigmund Cherem
adf595dc62
Revert "Record deferred accesses in kernel world impacts and use it for splitting."
...
This reverts commit 70e1517d98 .
Reason for revert: saw unexpected regression on acx-gallery as well. I'd like to look in more detail and reland if it is justified.
Original change's description:
> Record deferred accesses in kernel world impacts and use it for splitting.
>
> On large apps this cuts down the time spent in the deferred loading algorithm by
> two thirds. To address issue #35311 , this CL keeps things sound and may load in
> the main unit more code.
>
> On some large apps, it appears the effect of this change is not that measurable,
> and we even see an improvement. I'm still validating the data, but I believe
> this is in part because there was a different bug
> in the previous algorithm: constructors were never deferred
> because we were looking for the constructor-name, usually '', instead of the
> enclosing class name.
>
> My current data is that, the main unit of some large app shows:
> old algorithm: 13,213,191
> sound algorithm: 13,150,145
> unsound algorithm*: 13,147,282
> fixed old algorithm: 13,146,509
>
> * ignoring return type of closures
>
>
> Change-Id: I7d3e525393ef38979b26051b4d354fc1001560af
> Reviewed-on: https://dart-review.googlesource.com/c/85725
> Commit-Queue: Sigmund Cherem <sigmund@google.com >
> Reviewed-by: Johnni Winther <johnniwinther@google.com >
TBR=johnniwinther@google.com ,sigmund@google.com
Change-Id: I6992279bebcc99578f94087a17d6c327b32a0876
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/86246
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Sigmund Cherem <sigmund@google.com >
2018-12-05 19:16:32 +00:00
Sigmund Cherem
70e1517d98
Record deferred accesses in kernel world impacts and use it for splitting.
...
On large apps this cuts down the time spent in the deferred loading algorithm by
two thirds. To address issue #35311 , this CL keeps things sound and may load in
the main unit more code.
On some large apps, it appears the effect of this change is not that measurable,
and we even see an improvement. I'm still validating the data, but I believe
this is in part because there was a different bug
in the previous algorithm: constructors were never deferred
because we were looking for the constructor-name, usually '', instead of the
enclosing class name.
My current data is that, the main unit of some large app shows:
old algorithm: 13,213,191
sound algorithm: 13,150,145
unsound algorithm*: 13,147,282
fixed old algorithm: 13,146,509
* ignoring return type of closures
Change-Id: I7d3e525393ef38979b26051b4d354fc1001560af
Reviewed-on: https://dart-review.googlesource.com/c/85725
Commit-Queue: Sigmund Cherem <sigmund@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2018-12-05 17:40:27 +00:00
Johnni Winther
c18225d98c
Implement guarded type promotion in dart2js
...
Change-Id: Ic284990c73ff5cb4b201ed4bbcc57ec0d7b0b66f
Reviewed-on: https://dart-review.googlesource.com/c/85923
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2018-12-05 11:52:26 +00:00
Johnni Winther
0a2ed86935
Infer general flow through && and ||
...
Closes #34993
Change-Id: Ifb849e4525ba9e5518932b8fba2ae556fb49acb3
Reviewed-on: https://dart-review.googlesource.com/c/85502
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2018-11-30 08:32:11 +00:00
Kevin Moore
be5d0cca5c
Remove sha1 impl from dart2js
...
pkg:crypto has a fine implementation
Change-Id: Ibefd6c294259c58cd4eb3ac8f5718a078894a39b
Reviewed-on: https://dart-review.googlesource.com/c/85415
Auto-Submit: Kevin Moore <kevmoo@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2018-11-29 04:28:02 +00:00
Johnni Winther
406d0b3e9c
Remove unused code from LocalsHandler
...
+ add test for issue 34993
Change-Id: Icd73c865e80ac9dca0e126c6b7e2c6c5320aef94
Reviewed-on: https://dart-review.googlesource.com/c/85240
Auto-Submit: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2018-11-27 14:07:01 +00:00
Johnni Winther
82f9884289
Support exact class and this expression relations in StrongModeConstraint
...
Change-Id: I32e6e5b6f55d4ef4240b6ba87eb26dfc2a699130
Reviewed-on: https://dart-review.googlesource.com/c/85166
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2018-11-27 13:50:04 +00:00
Johnni Winther
9cfab12d36
Reorganize imports to decouple dart2js_target.dart from dart2js
...
Change-Id: Ie958dbbf75f5cac20074b2a64a4eefb9de636116
Reviewed-on: https://dart-review.googlesource.com/c/85290
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2018-11-27 09:15:34 +00:00
Johnni Winther
bb4e2388b8
Use BasicInfo.resetIds
...
Change-Id: I69770f2d4f2e24b25cbeff644747ef605e14d4b9
Reviewed-on: https://dart-review.googlesource.com/c/85167
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2018-11-23 08:51:52 +00:00
Sigmund Cherem
02f6395606
Cleanup library-loader: rename as kernel producer, remove some dependencies
...
Once we remove the frontend strategy object, we might want to remove some additional dependencies on KernelResult
Change-Id: I27ef1fbb12e671748b59a87d2dd249100501e02a
Reviewed-on: https://dart-review.googlesource.com/c/85060
Commit-Queue: Sigmund Cherem <sigmund@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2018-11-21 17:59:18 +00:00
Johnni Winther
0fded45406
Handle serialization with --dump-info
...
Change-Id: I626eb8c7dca0b4e92f2aca79429f6e7336215840
Reviewed-on: https://dart-review.googlesource.com/c/84846
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2018-11-21 09:40:02 +00:00
Johnni Winther
e62951fd3d
Use assigned variables data to infer static types for effectively final locals.
...
Change-Id: I3687d28628b0476c6a848f135bbda97e594449c2
Reviewed-on: https://dart-review.googlesource.com/c/84629
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2018-11-21 09:16:21 +00:00
Johnni Winther
3bf6a550ea
Add static type tests
...
Change-Id: I4282a1261ad4f4f4641750bd5ca492e5a943b6f0
Reviewed-on: https://dart-review.googlesource.com/c/84628
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Stephen Adams <sra@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2018-11-20 14:02:39 +00:00
Johnni Winther
b943fa897c
Move closure scope classes to ir/
...
Change-Id: Ib14696e9ab8572e30343e0880c1d028cfc26b377
Reviewed-on: https://dart-review.googlesource.com/c/84621
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2018-11-20 14:02:39 +00:00
Johnni Winther
2776108a8f
Remove LocalsHandler._capturedAndBoxed
...
Change-Id: I1f91a59d1e64dedad61dec77dd74aa6cd8e360dd
Reviewed-on: https://dart-review.googlesource.com/c/84524
Reviewed-by: Stephen Adams <sra@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2018-11-16 07:58:56 +00:00
Sigmund Cherem
5a14f9e619
Remove unnecessary setupPackages step.
...
Since we switched to the CFE we no longer use this, the CFE recomputes the package-configuration internally.
Change-Id: Icdc2a3eeff1aa75e560157ecf0d5320208096d21
Reviewed-on: https://dart-review.googlesource.com/c/84362
Reviewed-by: Stephen Adams <sra@google.com >
Commit-Queue: Sigmund Cherem <sigmund@google.com >
2018-11-14 19:28:40 +00:00