Johnni Winther
e4b809f0e6
Add unit testing of (some) invoke dynamic specializers
...
Change-Id: I7c3b100da899050a7eb234d53a70d235b3186675
Reviewed-on: https://dart-review.googlesource.com/c/91829
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2019-02-04 10:24:03 +00:00
Johnni Winther
0fd1679620
Sort named parameters in native methods by declaration.
...
Change-Id: Ic4a7f9ad6cf0d362b6582a59c783cc05cc404a31
Reviewed-on: https://dart-review.googlesource.com/c/91828
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2019-02-04 10:02:23 +00:00
Johnni Winther
68d110ac2a
Add test for codegen of optional parameters on native functions.
...
Change-Id: Ice329d52be74f98653e5434b148b2b2c8f46c7d6
Reviewed-on: https://dart-review.googlesource.com/c/91661
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2019-02-01 09:23:55 +00:00
Stephen Adams
37a1f79360
[dart2js] Move letBindings to StackFrame
...
This makes letBindings safe for recursive inlining.
Change-Id: I1ffddbc33f75a62c651adf7b6166e2695556578a
Reviewed-on: https://dart-review.googlesource.com/c/91243
Commit-Queue: Stephen Adams <sra@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2019-02-01 01:31:52 +00:00
Stephen Adams
ece54f3c43
[dart2js] Don't inline direct recursion
...
This avoids a bug in handling ir.Let bindings.
Change-Id: I0ccd932248a550a5017dfe565209e8ef62299ff3
Reviewed-on: https://dart-review.googlesource.com/c/91241
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Stephen Adams <sra@google.com >
2019-01-26 01:32:10 +00:00
Johnni Winther
c7f6c86128
Fix registration of (un)provided parameters.
...
Change-Id: I5cf1b7543561a728a219a62c8fa6633d4d25846a
Reviewed-on: https://dart-review.googlesource.com/c/91223
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2019-01-25 21:20:42 +00:00
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
Daco Harkes
591b52f1c5
[frontend] report transformation error messages through library loader
...
Change-Id: I7280d02e42785742fc800f7e44b1913408dcada5
Reviewed-on: https://dart-review.googlesource.com/c/90460
Commit-Queue: Daco Harkes <dacoharkes@google.com >
Reviewed-by: Peter von der Ahé <ahe@google.com >
2019-01-23 10:39:07 +00:00
Stephen Adams
1020a22290
[dart2js] Do more native method inlining
...
Check if the call is typesafe instead of inlining only when type
checks are disabled.
Change-Id: Ie391bd7013941ffd3852fb8e2421e8827f41b6d0
Reviewed-on: https://dart-review.googlesource.com/c/89926
Commit-Queue: Stephen Adams <sra@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2019-01-17 20:21:36 +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
Johnni Winther
3e7801294e
Remove unneeded code in OrderedTypeSet
...
* _supertypes was accidentally a multiset instead of a set, but is no
longer needed (types.tail contains the same set)
* _reporter and reportMultiInheritanceIssue is no longer needed
Change-Id: Ic8310fe79f604a280938689a92c4868d8ed24ab4
Reviewed-on: https://dart-review.googlesource.com/c/89520
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2019-01-16 08:22:09 +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
Sam Rawlins
c54bc11770
Split DEPRECATED_MEMBER_USE_FROM_SAME_PACKAGE off; fixes #30084 and
...
fixes https://github.com/dart-lang/linter/issues/1349
Bug: https://github.com/dart-lang/sdk/issues/30084
Change-Id: I4954b883c1baf019a62776fec108eac60960b22e
Reviewed-on: https://dart-review.googlesource.com/c/88881
Commit-Queue: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2019-01-15 03:25:27 +00:00
Johnni Winther
f81dd1da9f
Handle super* in ir/impact.dart
...
Change-Id: I91a5f76f45e1f3d5248b31322e107a5dc00d69af
Reviewed-on: https://dart-review.googlesource.com/c/89150
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2019-01-11 22:44:06 +00:00
Stephen Adams
99a9ae66c3
[dart2js] run dartfmt --fix-doc-comments on stragglers
...
Files outside of pkg/compiler/lib/src
TBR=sigmund@google.com
Change-Id: Ic322c7bcca2e0203bdc48f06abdc69842724ae29
Reviewed-on: https://dart-review.googlesource.com/c/89165
Auto-Submit: Stephen Adams <sra@google.com >
Reviewed-by: Stephen Adams <sra@google.com >
Commit-Queue: Stephen Adams <sra@google.com >
2019-01-11 22:19:06 +00:00
Stephen Adams
f0c7d971c4
[dart2js] Run dartfmt --fix-doc-comments
...
Change-Id: I004a5da3f3e3adb5fc6f3088ba8dc3ca5082fbef
Reviewed-on: https://dart-review.googlesource.com/c/89163
Commit-Queue: Stephen Adams <sra@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2019-01-11 21:13:17 +00:00
Sigmund Cherem
e636e1fa6f
Accept experimental flags in dart2js and enable set-literal tests, now supported
...
once we accept the flag.
Note: 3 tests are missing compile-time errors from the CFE. This is a known CFE
issue, we need to mark the tests as failng using the new workflow before we land
the CL.
Change-Id: I0eaf6c1d7e903e035c83d3338054a8f92d2d9296
Reviewed-on: https://dart-review.googlesource.com/c/88763
Commit-Queue: Sigmund Cherem <sigmund@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2019-01-11 19:32:46 +00:00
Sigmund Cherem
7cea3cba29
Several dump-info fixes.
...
Includes:
* avoid prettyPrint in dump-info (which removes inconsistencies from shadowing
when using fast-startup), instead log start and end offsets and record the
emitted string.
* fix startup emitter to track a few more things (class names, inherit calls,
lazy initializers, etc)
Change-Id: I213edf526173212e918129440dc6dec996a9dd55
Reviewed-on: https://dart-review.googlesource.com/c/89084
Reviewed-by: Stephen Adams <sra@google.com >
Commit-Queue: Sigmund Cherem <sigmund@google.com >
2019-01-11 18:47:55 +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
5340fea835
Move more parts of impact builder to ir/impact.dart
...
Change-Id: I64ef1add990548208f2eda28c8486d88f00504a3
Reviewed-on: https://dart-review.googlesource.com/c/88950
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
Stephen Adams
e2e2a85744
[dart2js] Add --no-minify flag for compiler devs
...
Change-Id: Iec1600c801087b4dd836d833f515b4cb728f78d5
Reviewed-on: https://dart-review.googlesource.com/c/89082
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Stephen Adams <sra@google.com >
2019-01-11 00:41:19 +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
d44ec3a57e
Remove full emitter version of Function.apply
...
Change-Id: Ib6abb717c815ec97964943c992d9cfd0d4dceec9
Reviewed-on: https://dart-review.googlesource.com/c/88884
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Stephen Adams <sra@google.com >
2019-01-10 23:16:51 +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
Johnni Winther
d00f1e7e8e
Introduce kernel based impact builder
...
This is a step towards computing impact modularly without the need for a K-model.
Change-Id: Ie94ff7bc73b409acc99abe58b74502541ae5218f
Reviewed-on: https://dart-review.googlesource.com/c/88824
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2019-01-10 08:15:37 +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
Peter von der Ahé
50ea6344f5
Use TypeEnvironment.getTypeAsInstanceOf instead of ClassHierarchy
...
Change-Id: I1682baeb336b8be3cb6c5874715ef8ba730561e0
Reviewed-on: https://dart-review.googlesource.com/c/88803
Commit-Queue: Peter von der Ahé <ahe@google.com >
Commit-Queue: Kevin Millikin <kmillikin@google.com >
Auto-Submit: Peter von der Ahé <ahe@google.com >
Reviewed-by: Kevin Millikin <kmillikin@google.com >
2019-01-09 10:08:03 +00:00
Johnni Winther
cc4da96fb5
Decouple runtime type analysis from the K-world
...
Change-Id: I56730796de4117b6500e22b86cf3c5d6b047646c
Reviewed-on: https://dart-review.googlesource.com/c/88714
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2019-01-09 08:57:16 +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
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
5334524f2b
Remove conditional sync async code
...
Closes #35466
Change-Id: Ic8a7e6ec4814e9f0ebd6086fea8458f3056786c4
Reviewed-on: https://dart-review.googlesource.com/c/87969
Auto-Submit: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Stephen Adams <sra@google.com >
Reviewed-by: Stephen Adams <sra@google.com >
2019-01-03 19:10:00 +00:00
Stephen Adams
70d5438254
Redo "Extend allocator-initialization to some primitive types"
...
Change-Id: Ib9495232da4d6abf1fee4485784ef45dbc50e5ed
Reviewed-on: https://dart-review.googlesource.com/c/88234
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Stephen Adams <sra@google.com >
2019-01-03 18:54:16 +00:00
Stephen Adams
a9906d2cfb
Revert "Extend allocator-initialization to some primitive types"
...
This reverts commit 5d3fb9f140 .
Custom element constructors should not be involved in this
optimization since the fields should be assigned in the upgrade
constructor. It worked accidentally for 'null' since unassigned fields
were 'undefined'.
TBR=johnniwinther@google.com
Change-Id: I802673f1b92dad6b8f628473070278819adcd159
Reviewed-on: https://dart-review.googlesource.com/c/88232
Reviewed-by: Stephen Adams <sra@google.com >
Commit-Queue: Stephen Adams <sra@google.com >
Auto-Submit: Stephen Adams <sra@google.com >
2019-01-02 23:30:28 +00:00
Stephen Adams
5d3fb9f140
Extend allocator-initialization to some primitive types
...
Change-Id: I9eac35a357dd5e75ba803db81b6120d3fff5b7f0
Reviewed-on: https://dart-review.googlesource.com/c/88100
Commit-Queue: Stephen Adams <sra@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2019-01-02 21:33:56 +00:00
Stephen Adams
3a0da16796
Select to rely on ToBoolean conversion for null test
...
+ with '&&'
Change-Id: I3facd278bf0ac65053fa12313f6135fc4f1c2abb
Reviewed-on: https://dart-review.googlesource.com/c/85020
Commit-Queue: Stephen Adams <sra@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2018-12-28 23:29:46 +00:00
asiva
dff358223e
[VM/Runtime] Delete flag --sync-async and it's uses.
...
Remove all references to the --sync-async flag which was added as a transition step
when the feature was being introduced.
Change-Id: Ic5b1c8c8b3e2d92a70d954d401afeddfd43f5e92
Reviewed-on: https://dart-review.googlesource.com/c/87381
Commit-Queue: Siva Annamalai <asiva@google.com >
Reviewed-by: Alexander Markov <alexmarkov@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2018-12-20 23:37:45 +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
Stephen Adams
278299c73b
Ensure variable holder is a fast-mode object
...
Change-Id: I660e987f319bd4b23b9347a8c819635ceaddae68
Reviewed-on: https://dart-review.googlesource.com/c/87611
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Stephen Adams <sra@google.com >
2018-12-19 00:39:36 +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