Brian Wilkerson
723f8bca05
Convert parseMetadataStar and partially convert parseMetadata
...
Change-Id: I546206f1b7de042827a519f4ac9c721b98a3038e
Reviewed-on: https://dart-review.googlesource.com/19020
Reviewed-by: Dan Rubel <danrubel@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2017-11-07 16:14:50 +00:00
Johnni Winther
0cb8876756
Extract a NoSuchMethodData object from NoSuchMethodRegistry
...
Change-Id: Ie20797a25f61be4222278b26dcec9c31370c31b2
Reviewed-on: https://dart-review.googlesource.com/18821
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2017-11-07 09:03:38 +00:00
Harry Terkelsen
12baebc768
Set outer closure needs 'this' if inner needs 'this' for rti
...
Change-Id: I46850f2a28abb499fa64266480fc108b38ecbfb9
Reviewed-on: https://dart-review.googlesource.com/18904
Commit-Queue: Harry Terkelsen <het@google.com >
Reviewed-by: Emily Fortuna <efortuna@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2017-11-07 00:17:21 +00:00
Sigmund Cherem
14843eb067
Create deferred-load-task from the front-end strategy.
...
This CL also moves code around a bit to prepare for the kernel implementation.
There are minimal changes, most of the code is the same. The refactor will make
the diff on the next CL much simpler
Change-Id: I4fff9c6511a5c19264c5573c4e2a0fffa2d61bfd
Reviewed-on: https://dart-review.googlesource.com/18681
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Sigmund Cherem <sigmund@google.com >
2017-11-06 23:34:00 +00:00
Sigmund Cherem
46c859152a
Add output unit data: an intermediate representation of the resuls of deferred loading
...
Change-Id: I54fb3eb49338f137c127113fd884ce54a1187a64
Reviewed-on: https://dart-review.googlesource.com/18508
Reviewed-by: Stephen Adams <sra@google.com >
2017-11-06 17:15:40 +00:00
Johnni Winther
29f3cc0db1
Various fixes for erroneous cases
...
Change-Id: I1c370dd220ff5e27196dcc8294d3c8eeda80462c
Reviewed-on: https://dart-review.googlesource.com/18483
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2017-11-06 08:42:46 +00:00
Stephen Adams
c566db6227
Use full name for more elements in DUMP_IR output
...
Names now match old version.
TBR=sigmund@google.com
Change-Id: Ieecceef3fc66f18c926ed2eb8e8f234e18678efb
Reviewed-on: https://dart-review.googlesource.com/18684
Reviewed-by: Stephen Adams <sra@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Stephen Adams <sra@google.com >
2017-11-04 00:23:24 +00:00
Sigmund Cherem
c53c2f948d
Support caching impacts with the kernel frontend. This is needed by deferred
...
loading.
To make this possible, this CL explicitly models the impact cache and deleter.
Change-Id: I444625a7a14155d9c530a390854a42d277055aaa
Reviewed-on: https://dart-review.googlesource.com/18463
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2017-11-03 17:52:21 +00:00
Johnni Winther
b7e53e4966
Detect non-nullness of postfix results in the old inferrer
...
Change-Id: I51b0607371bfac4bead70bfc2852060aa3b1ed96
Reviewed-on: https://dart-review.googlesource.com/18280
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2017-11-03 10:29:59 +00:00
Stephen Adams
64656316ec
dart2js kernel: make JClosureField implement PrivatelyNamedJSEntity for nicer names
...
This change reduces the number of diffs between AST and Kernel by a factor of 3.
I changed the order of adding closure fields - adding fields for
boxes, then 'this', then values and types. This makes the order more
consistent with the old backend. We can undo this later.
Change-Id: I54d7c601cae89b6debce5166045dbb4d54add91f
Reviewed-on: https://dart-review.googlesource.com/18160
Commit-Queue: Stephen Adams <sra@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Reviewed-by: Emily Fortuna <efortuna@google.com >
2017-11-03 01:06:30 +00:00
Harry Terkelsen
9c78203f19
Add KTypedef to K element model
...
Change-Id: Iac058d920265381122886101d55e93ac10a865f4
Reviewed-on: https://dart-review.googlesource.com/18420
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Harry Terkelsen <het@google.com >
2017-11-02 23:16:00 +00:00
Johnni Winther
d3f3846207
Remove .getClosureInfoForMember
...
- and use ScopeInfo.forEachBoxedVariable instead of ClosureRepresentationInfo.forEachBoxedVariable.
Change-Id: I9d0c67eb06b7633a27d48745dc81d03d30f7e7ae
Reviewed-on: https://dart-review.googlesource.com/18186
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Emily Fortuna <efortuna@google.com >
2017-11-02 14:06:38 +00:00
Johnni Winther
0373526d82
Fix refinements order on updates.
...
Change-Id: I2677792bb23d90ce5c63f159156c27653ed69f5f
Reviewed-on: https://dart-review.googlesource.com/17800
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2017-11-02 13:03:47 +00:00
Johnni Winther
74022b9902
Refine receiver before arguments in method invocation
...
Change-Id: I6c32ade4d2342489299b010c841fb5c928f96b9a
Reviewed-on: https://dart-review.googlesource.com/17783
Reviewed-by: Emily Fortuna <efortuna@google.com >
2017-11-02 11:50:29 +00:00
Brian Wilkerson
f95e1475fc
Remove the unused Listener.beginDottedName
...
Change-Id: I1c5752a9610f21dad62db6655972b4006ce632e9
Reviewed-on: https://dart-review.googlesource.com/17862
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Peter von der Ahé <ahe@google.com >
Reviewed-by: Dan Rubel <danrubel@google.com >
2017-11-01 18:35:45 +00:00
Brian Wilkerson
87a096e992
Remove the unused Listener.beginIdentifierList
...
Change-Id: I3644aaff3fa7a8a97b9e9bcc83f549f628a1fb71
Reviewed-on: https://dart-review.googlesource.com/17861
Reviewed-by: Peter von der Ahé <ahe@google.com >
Reviewed-by: Dan Rubel <danrubel@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2017-11-01 17:21:05 +00:00
Johnni Winther
1852cbab70
Use the right receiver mask in expose this computation
...
Change-Id: I298eeb12fca7b1e78b904b63e64ceb6414d0996a
Reviewed-on: https://dart-review.googlesource.com/17440
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2017-11-01 09:14:59 +00:00
Stephen Adams
9c4c9b5f3f
Keep ClassEnv members in a list
...
Process the ir.Class members by fields/procedures/constructors rather
than via the get:members (which is constructed on demand).
The list of (non-constructor) members is sorted by location to keep
getters and setters in same relative order.
The list of members is iterated frequently, so iterating should be
simpler.
Unfortunately it is not possible to pre-compute the MemberEntities
since the lookup happens with both K- and J- element maps, so we still
have to create a closure in forEachMember to iterate the members.
Remaining differences:
- The position of patched members is at the whim of the file order in the sdk.
- Libraries could be similarly processed to move setters back to their relative position.
Change-Id: I1cfe1efc7bf66fd4ddaf0b0e8881e5a291656cac
Reviewed-on: https://dart-review.googlesource.com/17064
Commit-Queue: Stephen Adams <sra@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2017-10-31 00:43:55 +00:00
Leaf Petersen
4270b99d75
Fix dynamic as bottom uses in front end and dart2js.
...
Re-enable the dynamic as bottom hint in analysis_options.yaml and fix
the code to be hint clean again.
Fixes #30589
Fixes #30590
Bug:
Change-Id: Idb7910b3ab1c6d931a3ead3eed885d8bd172e621
Reviewed-on: https://dart-review.googlesource.com/17062
Commit-Queue: Leaf Petersen <leafp@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2017-10-30 19:54:26 +00:00
Johnni Winther
395095b21d
Make semantics of isExternal consistent between frontends
...
Change-Id: Ieda4b47442d9e4ec7e4fcdef159e72bcf28c99e6
Reviewed-on: https://dart-review.googlesource.com/16946
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2017-10-30 10:03:32 +00:00
Stephen Adams
b3a93f44eb
Add dart2js noInline and tryInline annotations to package:meta
...
There will be a follow-up change to remove NoInline from package:expect.
Change-Id: I6dc33241ea6d8b6a8994da6a8ec5295dab30f4da
Reviewed-on: https://dart-review.googlesource.com/17043
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2017-10-27 21:21:13 +00:00
Johnni Winther
4fdbf54473
Revert "Improve precision of instantiated types for redirecting constructor"
...
This reverts commit f41896052c .
Change-Id: Ice6eb30c46b77e6a10faee2d6025eb92af80f03a
Reviewed-on: https://dart-review.googlesource.com/16947
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2017-10-27 11:38:16 +00:00
Johnni Winther
855388b629
Treat getter access as non-constant.
...
Change-Id: I2d4a07629be5984f25f6a58d2c540d8d8bb7aa6b
Reviewed-on: https://dart-review.googlesource.com/16800
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2017-10-27 08:08:36 +00:00
Johnni Winther
f41896052c
Improve precision of instantiated types for redirecting constructor
...
This also eliminates some of the noise from the old frontend compared to the new frontend.
Change-Id: Ie943063ec59d3f0e1ee7662ca1b130733cf11b9e
Reviewed-on: https://dart-review.googlesource.com/16442
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2017-10-27 07:49:30 +00:00
Stephen Adams
13aca35586
dart2js kernel: closure fields are not assignable
...
TBR=efortuna@google.com
Change-Id: I8644a627ad45da6f3cbc422e07f7b132e6861db6
Reviewed-on: https://dart-review.googlesource.com/16902
Reviewed-by: Stephen Adams <sra@google.com >
2017-10-27 00:02:05 +00:00
Stephen Adams
b55f646683
dart2js: Add SSA tracing for kernel builder
...
Change-Id: I35e9a6e83fc390cd9828e921912990954fa304ac
Reviewed-on: https://dart-review.googlesource.com/16690
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2017-10-26 23:44:37 +00:00
Dan Rubel
a02662c47e
improve errors and recovery for factory methods
...
Change-Id: I55711bdb0f98c0747c7055bebda173702c2c138f
Reviewed-on: https://dart-review.googlesource.com/16720
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Peter von der Ahé <ahe@google.com >
2017-10-26 21:21:00 +00:00
Harry Terkelsen
8b12b7b7a4
Remove unused method in ssa graph builder
...
Change-Id: Ibc3eef48e4591c55b41f3a414e02d6036a5b656a
Reviewed-on: https://dart-review.googlesource.com/16682
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Harry Terkelsen <het@google.com >
2017-10-25 21:28:08 +00:00
Brian Wilkerson
5b6260ce13
Add support for reporting errors that span multiple tokens
...
Change-Id: I257225465d79e1831392af14d98e0799f0a8b184
Reviewed-on: https://dart-review.googlesource.com/16660
Reviewed-by: Dan Rubel <danrubel@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2017-10-25 21:19:58 +00:00
Harry Terkelsen
c9aa3a688b
Add custom element support to the kernel ssa builder
...
Change-Id: I06ec8bc2f53dd88116abb11655c83783de1d48cd
Reviewed-on: https://dart-review.googlesource.com/16328
Commit-Queue: Harry Terkelsen <het@google.com >
Reviewed-by: Emily Fortuna <efortuna@google.com >
2017-10-25 16:36:29 +00:00
Stephen Adams
9a6509f68c
dart2js: replace closure call to static tear-off with static call
...
Bug:
Change-Id: I675ec4a231773a492385992b093ba509bbc06ad8
Reviewed-on: https://dart-review.googlesource.com/15862
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Stephen Adams <sra@google.com >
2017-10-24 18:11:58 +00:00
Emily Fortuna
0b69394c49
Usage of type variables with mixins.
...
Bug:
Change-Id: I8c7fdf203e76e63164b3f28c23d9c0e2c9939cd8
Reviewed-on: https://dart-review.googlesource.com/15986
Reviewed-by: Stephen Adams <sra@google.com >
Commit-Queue: Emily Fortuna <efortuna@google.com >
2017-10-24 18:00:18 +00:00
Harry Terkelsen
df4bd6c398
Don't check for cycles in constructors in const evaluation
...
You can use the same constructor multiple times in a single constant
evaluation. For example:
class A {
final List<A> deps;
const A({this.deps: const []});
}
const a = const A();
const b = const A(deps: const [a]);
main() { print(b); }
The program above will evaluate the 'A' constructor multiple times
when compiling the constant for 'b', but that's okay, as long as
we don't examine the same field (or local) multiple times.
Change-Id: Icda198ccb47ea91a046134f55deba9041fcf1f4a
Reviewed-on: https://dart-review.googlesource.com/15989
Commit-Queue: Harry Terkelsen <het@google.com >
Reviewed-by: Emily Fortuna <efortuna@google.com >
2017-10-24 16:31:08 +00:00
Johnni Winther
4c8e2af760
Handle [] in _spanFromTokens
...
Change-Id: I42e734a1a00ee3e9ad0bca1d445e1a8ab0bd1c5c
Reviewed-on: https://dart-review.googlesource.com/16200
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2017-10-24 09:47:59 +00:00
Johnni Winther
313ded4e1c
Revert "Handle synthesized multiple inheritance"
...
This reverts commit 898a1ae1aa .
Change-Id: Ifca20a405a017299da3dd585fbe2f7727638d8e5
Reviewed-on: https://dart-review.googlesource.com/16220
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2017-10-24 09:39:47 +00:00
Dan Rubel
dde9eb69a9
add handleInvalidMember to improve recovery
...
* add handleInvalidMember event
* update NodeListener to track invalidMemberCount
* update ClassMethodModifierContext to trigger handleInvalidMember
event, reducing number of superflous errors.
Also, address comment
https://dart-review.googlesource.com/c/sdk/+/16040/1/pkg/analyzer/lib/src/fasta/ast_builder.dart#1580
Change-Id: I4c630faeee7731e2f85bbfaf0a6790bf6f4382b3
Reviewed-on: https://dart-review.googlesource.com/16100
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Dan Rubel <danrubel@google.com >
2017-10-24 02:58:28 +00:00
Brian Wilkerson
9575182790
Pass the period in field formal parameters to listeners to enable recovery
...
Change-Id: I04975f3fb1aeb3b3b6b842e3373a792f13a91685
Reviewed-on: https://dart-review.googlesource.com/16000
Reviewed-by: Dan Rubel <danrubel@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2017-10-23 20:57:00 +00:00
Brian Wilkerson
6d11a2e3b4
Explicitly pass the colon following the default case in a switch to allow better recovery
...
Change-Id: I7e39727e1dd0a005e8e6ed565ec16cc8c503d049
Reviewed-on: https://dart-review.googlesource.com/15960
Reviewed-by: Dan Rubel <danrubel@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2017-10-23 20:55:29 +00:00
Johnni Winther
898a1ae1aa
Handle synthesized multiple inheritance
...
The reuse of mixin applications employed by kernel introduces unneeded
multiple inheritance (the same class implemented with different type arguments).
The type system in dart2js does not support multiple inheritance and flags such
cases as compile-time errors.
With this CL such synthesized cases are bypassed, while regular cases are still flagged.
Change-Id: Ieb07d2b6559e15a7b745baeddc80c07acff7a3d1
Reviewed-on: https://dart-review.googlesource.com/15886
Reviewed-by: Emily Fortuna <efortuna@google.com >
2017-10-23 18:04:22 +00:00
Johnni Winther
9bf7fc9130
Add test of index operations
...
Change-Id: I34e5cf8ba7bdd38a2b4094c71bc0e71c4a68c613
Reviewed-on: https://dart-review.googlesource.com/13802
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2017-10-23 08:26:43 +00:00
Johnni Winther
222af2dd08
Compute side effects during inference.
...
Change-Id: Iad5567cb76c8725b19446b6a802e6e704d42e99e
Reviewed-on: https://dart-review.googlesource.com/13800
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2017-10-23 07:37:18 +00:00
Johnni Winther
b2e7058747
Specialize list constructors in inferrer
...
+ handle native methods and js-interop constructors
Change-Id: I901301bf6d4926e6ecb1e427e3d16e512d888aab
Reviewed-on: https://dart-review.googlesource.com/13722
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2017-10-23 07:29:51 +00:00
Emily Fortuna
ba3cc12592
Entity-ify trustType in type_builder.
...
Bug:
Change-Id: Ie58b98f5a23268e97d2730f4f694d125ae9baf93
Reviewed-on: https://dart-review.googlesource.com/15060
Reviewed-by: Stephen Adams <sra@google.com >
2017-10-19 17:15:20 +00:00
Harry Terkelsen
f36b1f49d6
Only set model.scopeInfo for the outer member, not nested closures
...
Change-Id: I848e18e1000158b4a198782227bfb2524104e805
Reviewed-on: https://dart-review.googlesource.com/14700
Reviewed-by: Emily Fortuna <efortuna@google.com >
2017-10-18 21:00:06 +00:00
Emily Fortuna
2b33f79dd1
Update localsMap when inlining or looking at super constructors.
...
Bug:
Change-Id: I60b2d0d87d84901817d7d03b685a068c9d2f6100
Reviewed-on: https://dart-review.googlesource.com/14621
Commit-Queue: Emily Fortuna <efortuna@google.com >
Reviewed-by: Stephen Adams <sra@google.com >
2017-10-18 17:58:32 +00:00
Emily Fortuna
af3bbc194b
Fix up dart2js argument passing of 'platform-binaries' so that it actually recognizes the flag.
...
Bug:
Change-Id: I632dc8ea1e1c145cbb93a8cb7ba061c0d2ebc948
Reviewed-on: https://dart-review.googlesource.com/14508
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Emily Fortuna <efortuna@google.com >
2017-10-17 21:02:31 +00:00
Peter von der Ahé
6cc2014b3d
Fix computePlatformBinariesLocation for Windows.
...
Change-Id: Ic64e9c7a10923fe2e3f99ef708c2f19bb9ae802e
Reviewed-on: https://dart-review.googlesource.com/14420
Reviewed-by: Peter von der Ahé <ahe@google.com >
Commit-Queue: Peter von der Ahé <ahe@google.com >
2017-10-17 12:46:10 +00:00
Peter von der Ahé
b96ac4520a
Update most clients to use computePlatformBinariesLocation.
...
Change-Id: I6e6960c471b2fab3f0cd8a672da05d7699217410
Reviewed-on: https://dart-review.googlesource.com/12291
Commit-Queue: Peter von der Ahé <ahe@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2017-10-17 10:48:40 +00:00
Emily Fortuna
e3d0a7093c
Test TypeVariables in isTest correctly (and non-type variables) in Kernel.
...
Bug:
Change-Id: I624e7a111841bcab77d370163ac21d2c5cc3010a
Reviewed-on: https://dart-review.googlesource.com/13681
Reviewed-by: Stephen Adams <sra@google.com >
2017-10-14 00:20:44 +00:00
Harry Terkelsen
cbfb3b642d
Treat async-for-in statements as if they are wrapped in a try-finally
...
Change-Id: Ide40e69f93db199e2b452a4ee5acbbabe331bcbf
Reviewed-on: https://dart-review.googlesource.com/13921
Reviewed-by: Stephen Adams <sra@google.com >
Reviewed-by: Emily Fortuna <efortuna@google.com >
2017-10-13 22:19:46 +00:00