Sigmund Cherem
996277d427
Entity-fy the non-frequence minifier so it can be supported under the CFE.
...
This minifier is used only when passing --no-frequency-based-minification.
Closes #32600
Bug: https://github.com/dart-lang/sdk/issues/32600
Change-Id: I91ae293c78f4cfe3dd0421493162d9e5744a9217
Reviewed-on: https://dart-review.googlesource.com/47303
Reviewed-by: Emily Fortuna <efortuna@google.com >
Commit-Queue: Sigmund Cherem <sigmund@google.com >
2018-03-20 20:28:53 +00:00
danrubel
08d305bbd7
Inline modifiers into endTopLevelFields and endFields events
...
Change-Id: I9681e22ae96c43626558ff567cbf4a12117095fa
Reviewed-on: https://dart-review.googlesource.com/47240
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Dan Rubel <danrubel@google.com >
2018-03-20 15:00:35 +00:00
Dan Rubel
adb9f8cc0b
Inline modifiers into beginClassDeclaration and beginNamedMixinApplication
...
Change-Id: I0d95029c203a77d4a9e9dc2d8f1b40bced7535c5
Reviewed-on: https://dart-review.googlesource.com/47186
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Dan Rubel <danrubel@google.com >
2018-03-20 13:28:17 +00:00
Johnni Winther
8eb749e032
Fix sourcemaps/name_test for kernel
...
Change-Id: I77e60ae236cf8a17edc3854496fc900d67915bd0
Reviewed-on: https://dart-review.googlesource.com/47040
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2018-03-20 11:35:49 +00:00
Dan Rubel
06949dc985
Inline modifiers into beginFactoryMethod event
...
Change-Id: Ibc1053126b020577625279f4fab0bcff71aa5d15
Reviewed-on: https://dart-review.googlesource.com/47182
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Dan Rubel <danrubel@google.com >
2018-03-19 22:04:37 +00:00
Dan Rubel
8fde515354
Inline modifiers into beginTopLevelMethod event
...
Change-Id: I40423fcd53dc6a374a1c5be280d1806c31f34a6d
Reviewed-on: https://dart-review.googlesource.com/47120
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Dan Rubel <danrubel@google.com >
2018-03-19 20:20:37 +00:00
Sigmund Cherem
0c75857ad8
Fix old2new API conversion to use utf8.encode
...
Pub still uses the old API to provide inputs. Source files are provided as
String, which were were incorrectly provided as codeunits. The FE expected the
binary input to be utf8 encoded.
As a separate follow up, I can update pub to provide binary data directly, or
even move it to use the new API instead so we can delete the old API soon.
Because pub-build is being replaced, I'm inclined to only do a small fix there.
Closes #32561
Bug= dartbug.com/32561
R=johnniwinther@google.com
Change-Id: I69d9ac896d534427a918ded721ee946aa5c0fc34
Reviewed-on: https://dart-review.googlesource.com/46945
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Sigmund Cherem <sigmund@google.com >
2018-03-19 19:55:16 +00:00
Johnni Winther
c3f177b8cc
Add FutureOr to dart2js static type system
...
Change-Id: I0e26c82fffaa41d2e3fc02ba4d2b253c3673ce1a
Reviewed-on: https://dart-review.googlesource.com/46260
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2018-03-19 11:50:55 +00:00
Emily Fortuna
db21add40c
Adding test for async closures with type variables, and fixing how we emit stubs
...
with type parameters in the meanwhile.
Change-Id: I5fe1e94e7423af30adf4020b46269b8ea81ac07f
Reviewed-on: https://dart-review.googlesource.com/46700
Commit-Queue: Emily Fortuna <efortuna@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2018-03-16 17:46:18 +00:00
Dan Rubel
b2dd274e08
Remove modifiers from local function event structures
...
This removes pushing and popping modifiers when parsing a local function
declaration since they cannot have modifiers.
Change-Id: Iabbc6bb050d7006d07d4ec5d2220947593d62fd6
Reviewed-on: https://dart-review.googlesource.com/46880
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Dan Rubel <danrubel@google.com >
2018-03-16 16:05:07 +00:00
Peter von der Ahé
e5c84938f2
Update names derived from Program
...
Change-Id: Ifdb072506fef909ccf5ad2e5270b1976ae61e3cc
Reviewed-on: https://dart-review.googlesource.com/31143
Commit-Queue: Peter von der Ahé <ahe@google.com >
Reviewed-by: Kevin Millikin <kmillikin@google.com >
2018-03-16 09:33:07 +00:00
Peter von der Ahé
4f2bdff90b
Rename Program to Component
...
Change-Id: I1a3cc03fba9783807fa637a9d42fdbad68ee7686
Reviewed-on: https://dart-review.googlesource.com/31040
Commit-Queue: Peter von der Ahé <ahe@google.com >
Reviewed-by: Kevin Millikin <kmillikin@google.com >
2018-03-15 12:22:23 +00:00
Emily Fortuna
ecdd7df091
Correctly return type signature on async closures.
...
Change-Id: Icd7472185a08245e9b8e7c0b7adb1132e384c43c
Reviewed-on: https://dart-review.googlesource.com/46400
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Emily Fortuna <efortuna@google.com >
2018-03-14 01:03:38 +00:00
Sigmund Cherem
c438f8b3f4
Dart2js defaults to the new common front-end
...
Change-Id: Id0f69d258b010a746b56e259335185bcca7dafec
Reviewed-on: https://dart-review.googlesource.com/45143
Commit-Queue: Sigmund Cherem <sigmund@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2018-03-13 19:25:59 +00:00
Johnni Winther
b08bedee7e
Update RuntimeTypesNeed to disable rti optimization
...
- for local signatures in strong mode.
Change-Id: I0cafead24b24a534813449b6bf710eeafcb569bd
Reviewed-on: https://dart-review.googlesource.com/46064
Reviewed-by: Emily Fortuna <efortuna@google.com >
2018-03-13 10:09:26 +00:00
Johnni Winther
42e7598f5d
Don't emit function signatures for non-closure classes in Dart 2
...
Change-Id: I144ddd60abebe41549c1f5304d73cb56042c7289
Reviewed-on: https://dart-review.googlesource.com/46043
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2018-03-13 09:50:39 +00:00
Peter von der Ahé
8a9956d4a7
[dart2js] Handle Windows file names correctly.
...
Closes https://github.com/dart-lang/sdk/issues/31899
Change-Id: I0577e9cd5bab7083df53ccbee7ffb2258f08a442
Reviewed-on: https://dart-review.googlesource.com/46080
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Peter von der Ahé <ahe@google.com >
2018-03-13 09:15:48 +00:00
Johnni Winther
1df3150d05
Compute emitted function signatures in RuntimeChecksBuilder
...
Change-Id: I9801df4e14ca70ac17bbec3d7fb5b53a138582f0
Reviewed-on: https://dart-review.googlesource.com/45702
Reviewed-by: Emily Fortuna <efortuna@google.com >
2018-03-13 09:14:36 +00:00
Stephen Adams
70d715f115
Substitute return type too
...
TBR=johnniwinther@google.com
Change-Id: I82cc6d6e7af8fb42956fbe538d770de66a449bd3
Reviewed-on: https://dart-review.googlesource.com/45924
Commit-Queue: Stephen Adams <sra@google.com >
Reviewed-by: Stephen Adams <sra@google.com >
2018-03-10 03:44:28 +00:00
Stephen Adams
b8093e3323
Generate signature of instantiated generic function from uninstantiated function
...
Change-Id: I8c02404e5a17f577d831f3a3b58ff075ad73e878
Reviewed-on: https://dart-review.googlesource.com/45755
Commit-Queue: Stephen Adams <sra@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2018-03-09 21:05:38 +00:00
Johnni Winther
26e689de05
More work on signatures
...
Change-Id: Ifd8c20f1947149d60cca7c69e40ad85533519746
Reviewed-on: https://dart-review.googlesource.com/45700
Reviewed-by: Emily Fortuna <efortuna@google.com >
2018-03-09 08:30:28 +00:00
Emily Fortuna
feac6cfc20
Deal with Function type parameter contexts in closure conversion.
...
They don't have a context, so just set context as "null" for the TypeVaribleTypeWithContext.
Change-Id: I50944c787d4bd88dd55b402d137da1ca99a55566
Reviewed-on: https://dart-review.googlesource.com/45748
Reviewed-by: Stephen Adams <sra@google.com >
Commit-Queue: Emily Fortuna <efortuna@google.com >
2018-03-09 02:31:17 +00:00
Stephen Adams
b93c74092a
Make isInterceptedCall a field
...
Change-Id: I88a16189d8a6a30fa52be61bc3d015a703368baa
Reviewed-on: https://dart-review.googlesource.com/45583
Commit-Queue: Stephen Adams <sra@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2018-03-08 23:50:57 +00:00
Johnni Winther
0fdbc331f6
Fix dynamic type dependencies in codegen
...
Change-Id: Id3d8e89d55cc4ad8cc23c4be4012b4798d5abe4e
Reviewed-on: https://dart-review.googlesource.com/45424
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2018-03-08 09:51:55 +00:00
Emily Fortuna
24507da9da
Fix stack overflow when analyzing type variables in generic methods.
...
Change-Id: Id182bb5f0511911662c1a758fce7792c686538c4
Reviewed-on: https://dart-review.googlesource.com/45560
Reviewed-by: Stephen Adams <sra@google.com >
2018-03-07 22:49:11 +00:00
Stephen Adams
23a7b62c42
Use type of receiver for setter target identification
...
This 'almost typo' was preventing any setters from being inlined.
Change-Id: Idca5ba35df34f2328e3f926790e093ce02ac8863
Reviewed-on: https://dart-review.googlesource.com/45367
Commit-Queue: Stephen Adams <sra@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2018-03-07 20:48:52 +00:00
Emily Fortuna
7290c950d0
Change name of 'signature' to ':signature' to not conflict with a DOM member.
...
Change-Id: Iff924ac9ef47abdb79d21a5eb9a9f69cf7135d28
Reviewed-on: https://dart-review.googlesource.com/45541
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2018-03-07 20:09:27 +00:00
Johnni Winther
8f4db274f1
Compute which selectors that need type arguments
...
Change-Id: I0e48ff67353d676ea77d13008ae46f79bb69336e
Reviewed-on: https://dart-review.googlesource.com/45321
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2018-03-07 13:46:49 +00:00
Johnni Winther
8831dd1308
Remove failing assertion
...
Change-Id: Idfc2656460e2e6e63948172d63f90585be65d19d
Reviewed-on: https://dart-review.googlesource.com/45320
Reviewed-by: Emily Fortuna <efortuna@google.com >
2018-03-07 12:22:33 +00:00
Johnni Winther
6b91b4f2d2
Remove RuntimeTypesNeed.classUsesTypeVariableLiteral
...
Change-Id: Ibd9ccb5308b9170296f81ed18a35f212283b9afa
Reviewed-on: https://dart-review.googlesource.com/44783
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2018-03-07 12:02:31 +00:00
Johnni Winther
f69da8e36b
Move tests to /model/
...
Change-Id: I70fc06e51951eabbb123b4cf83a8e04ccb8f7eb6
Reviewed-on: https://dart-review.googlesource.com/44781
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2018-03-07 11:54:24 +00:00
Peter von der Ahé
18fe31ab11
Remove useOptimizedMixins from dart2js
...
Change-Id: I677e96cf0d27c6c9e1f1eede57e9c248d6514769
Reviewed-on: https://dart-review.googlesource.com/45280
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2018-03-06 15:15:57 +00:00
Johnni Winther
d3c3ac48a3
Remove implicit 'implements Function' for strong mode
...
Change-Id: Ie3e3e11a727f7fbe3c8d7af17c84dedfbdfcdf3a
Reviewed-on: https://dart-review.googlesource.com/44422
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2018-03-06 09:18:48 +00:00
Johnni Winther
6baae53a5b
Check functionTypeIndex in rti_emission_test
...
Change-Id: Icffa0174cc0cfeedca98b11fe9ea95ee9ac24626
Reviewed-on: https://dart-review.googlesource.com/44140
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2018-03-06 07:58:46 +00:00
Stephen Adams
f5e4f88c71
Skip assertions in InlineWeeder unless enabled
...
Change-Id: I889a7aee208b68cbadb8bda01d5c1176e7dfe581
Reviewed-on: https://dart-review.googlesource.com/44920
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Stephen Adams <sra@google.com >
2018-03-05 18:15:20 +00:00
Dan Rubel
e74e2b3c3e
Pass varFinalOrConst in beginVariablesDeclaration event
...
This CL refactors the fasta parse variable declaration functionality
to pass the modifier with the begin event rather than using the
handleModifer and handleModifiers events.
* Refactor modifier parsing as described above
* Update same modifier parsing to use ModifierRecoveryContext2
* Cleanup functionality of ModifierRecovery2
* Remove 2 unused fasta parser methods
Change-Id: Ib3a6b24428dcf6ad3cb462a979a05600fe7ee673
Reviewed-on: https://dart-review.googlesource.com/44860
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Dan Rubel <danrubel@google.com >
2018-03-03 21:51:31 +00:00
Stephen Adams
8e8287f4e0
Add classes for instantiations
...
Change-Id: Iee9df3ad673012776cd1867448ff12ba692a863f
Reviewed-on: https://dart-review.googlesource.com/41564
Commit-Queue: Stephen Adams <sra@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2018-03-03 00:50:59 +00:00
Sigmund Cherem
7fd5294bb3
Add rules to build dart2js platform in strong mode
...
This must land after we make the libraries strong clean.
Change-Id: I3a49a2be3b2bcb15842434266f55ce49e3800fc6
Reviewed-on: https://dart-review.googlesource.com/42140
Commit-Queue: Sigmund Cherem <sigmund@google.com >
Reviewed-by: Stephen Adams <sra@google.com >
Reviewed-by: Zach Anderson <zra@google.com >
2018-03-02 22:19:19 +00:00
Sigmund Cherem
1ce131b317
fix section for update_from_log
...
TBR=sra@google.com
Change-Id: I60465498268cb7e8ffd5d824df70f794aa911613
Reviewed-on: https://dart-review.googlesource.com/44662
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Reviewed-by: Stephen Adams <sra@google.com >
Commit-Queue: Sigmund Cherem <sigmund@google.com >
2018-03-02 01:33:18 +00:00
Sigmund Cherem
9ed595b4b3
Use $fasta instead of $dart2js_with_kernel in our status files.
...
Note: $fasta is true when passing --dart2js-with-kernel. This change will make it
easier to flip the default: the plan is that $fasta will be true by default
later on, and passing --dart2js-old-frontend will make it false.
TBR=sra@google.com
Change-Id: Ib917d55b2d14db954c56513af057dd9a37b9c825
Reviewed-on: https://dart-review.googlesource.com/44601
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Sigmund Cherem <sigmund@google.com >
2018-03-01 21:02:18 +00:00
Emily Fortuna
e9b3ce9619
Make the actual signature function use our entity-based signature code.
...
Change-Id: I99b4dd4a7b9d549fcec60e4cc341512402c19ced
Reviewed-on: https://dart-review.googlesource.com/43264
Commit-Queue: Emily Fortuna <efortuna@google.com >
Reviewed-by: Stephen Adams <sra@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2018-02-27 18:53:58 +00:00
Johnni Winther
6931a7a288
Use [localFunctionNeedsSignature] to determine when to add JSignatureMethod
...
Closes #32078
Change-Id: Ib1c9c08b1fdf33e3d94c02595135cf430357fed6
Reviewed-on: https://dart-review.googlesource.com/43742
Reviewed-by: Emily Fortuna <efortuna@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2018-02-27 12:33:53 +00:00
Johnni Winther
85cf0961ee
Include type arguments passed through generic calls in rti emission
...
Change-Id: Id757caaebb0bd802e8afa978c9a4bc5b4d6273fe
Reviewed-on: https://dart-review.googlesource.com/43670
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2018-02-27 10:01:14 +00:00
Johnni Winther
9a0307043d
Test internal data in rti_emission_test.
...
Change-Id: I09e43bbe0470d0928478d15a629232d5ffef902f
Reviewed-on: https://dart-review.googlesource.com/43667
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2018-02-27 09:51:24 +00:00
Sigmund Cherem
e33f4f7c2e
Fail if mirrors are really used.
...
Some legacy libraries may import dart:mirrors, but not use it. This CL turns them
into a runtime error temporarily to give some time for the library
maintainers to remove the import to dart:mirrors in the future.
Change-Id: I876133908d2a61300256915aab54730bdff51649
Reviewed-on: https://dart-review.googlesource.com/43640
Commit-Queue: Sigmund Cherem <sigmund@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Emily Fortuna <efortuna@google.com >
2018-02-27 04:57:27 +00:00
Aske Simon Christensen
bb088347f0
Separate severity for context messages
...
Change-Id: I8c0f9f0eae141e38e1f57afce4a30b6f95e8e412
Reviewed-on: https://dart-review.googlesource.com/43721
Reviewed-by: Peter von der Ahé <ahe@google.com >
Commit-Queue: Aske Simon Christensen <askesc@google.com >
2018-02-26 16:24:13 +00:00
Johnni Winther
011cd01875
Handle local initializers in constant constructors
...
Change-Id: Ifcbaf4b19f4411cd499db35242523eea215c77c4
Reviewed-on: https://dart-review.googlesource.com/40820
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2018-02-26 10:04:58 +00:00
Johnni Winther
7c2d96490d
Support forwarding bounds in function type variables
...
Change-Id: Ifeab9ad06f512d9b6a5db02fc89d45250c25c054
Reviewed-on: https://dart-review.googlesource.com/40821
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2018-02-26 09:45:56 +00:00
Johnni Winther
216c0ae8c2
Don't override .constructor property
...
- on named mixin applications with --fast-startup.
Change-Id: Ia58e1b8e9a06d2c8d2ce14b3435b3c76aeef6fbc
Reviewed-on: https://dart-review.googlesource.com/40743
Reviewed-by: Florian Loitsch <floitsch@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2018-02-26 09:39:43 +00:00
Sigmund Cherem
5021d24e4b
Add an '--use-old-frontend' flag (noop right now)
...
Change-Id: I4a75f9a6742c87d86206c96cf667e6e81064b926
Reviewed-on: https://dart-review.googlesource.com/43498
Reviewed-by: Emily Fortuna <efortuna@google.com >
Commit-Queue: Sigmund Cherem <sigmund@google.com >
2018-02-24 01:03:17 +00:00