Commit Graph

4835 Commits

Author SHA1 Message Date
Johnni Winther c18311933b Cleanup after removing MirrorsData
Closes #23873

Change-Id: Iaa7e0b1d4f0426280bdc496d47d7799ce30543fa
Reviewed-on: https://dart-review.googlesource.com/55167
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-05-16 09:54:18 +00:00
Johnni Winther fc7f18a420 Delete MirrorsData
Change-Id: Ic5330226349dafc33c27291aa576bfe4d0ea09e8
Reviewed-on: https://dart-review.googlesource.com/55160
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-05-16 09:54:18 +00:00
Johnni Winther 1f20129650 Remove mirrors analyses
Change-Id: I1a4a0d2bd1d87a5877864d46636ff68d0426a09c
Reviewed-on: https://dart-review.googlesource.com/55127
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-05-16 09:54:18 +00:00
Johnni Winther 47a67b2b8f Delete AST nodes
Change-Id: Iab9396b3a21cd9502c455fb73633216faed777ef
Reviewed-on: https://dart-review.googlesource.com/55126
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-05-16 09:54:18 +00:00
Johnni Winther f4fb1fe932 Remove most references to tree/tree.dart
Change-Id: I2ebcfdc616ee204e8e39277537e7e3c622caee42
Reviewed-on: https://dart-review.googlesource.com/55121
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-05-16 09:54:18 +00:00
Stephen Adams 38f0d8faef [dart2js] Check type bounds before value parameters
Change-Id: Ibd75aa67b478b201f1115e9f3dc682bcc5f108c6
Reviewed-on: https://dart-review.googlesource.com/55275
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2018-05-15 23:18:57 +00:00
Stephen Adams 8cf81446a3 Add method stubs to support instantiation stubs
Change-Id: Id9cce10b6319d268eb4ec2745465df5f06d3b906
Reviewed-on: https://dart-review.googlesource.com/55081
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2018-05-15 20:32:46 +00:00
Johnni Winther 3fc7925894 Add impact_test
Change-Id: Ic607d69375d1ad41f6aac349822e47c7dbf77b5a
Reviewed-on: https://dart-review.googlesource.com/54906
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-05-15 13:53:56 +00:00
Johnni Winther 6fe26e7e55 Delete ElementVisitor, equivalence_helper and move live Elements functions
Change-Id: I0af209210d4a471ba12f939bd8e3a429dab100df
Reviewed-on: https://dart-review.googlesource.com/54913
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-05-15 08:37:29 +00:00
Johnni Winther 0cd377fe33 Delete ConstantCompilerBase
Change-Id: Ib2d748d380713b742110c772fac2fe7d428b7ded
Reviewed-on: https://dart-review.googlesource.com/54911
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-05-15 08:37:29 +00:00
Johnni Winther af37d7def3 Remove ConstantCompiler
Change-Id: I5c8681de4d5b9865da6a6fbb42900d2a7d2b21c3
Reviewed-on: https://dart-review.googlesource.com/54910
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-05-15 08:37:29 +00:00
Johnni Winther f493274ce8 Delete more parts of resolution
Change-Id: I1c9ab31efa7c4a97f283275d5122c7b9a8762fb8
Reviewed-on: https://dart-review.googlesource.com/54908
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-05-15 08:37:29 +00:00
Johnni Winther 330271ed2b Delete modelx
Change-Id: I8f69655ee251cef097b46d80ddfbb7d2434b1051
Reviewed-on: https://dart-review.googlesource.com/54903
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-05-15 08:37:29 +00:00
Johnni Winther 351b90cb59 Delete NativeDataResolver
Change-Id: I91d2e1cb8d03bb1d0da7e175c810fa3cf3216962
Reviewed-on: https://dart-review.googlesource.com/54901
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-05-15 08:37:29 +00:00
Johnni Winther a86621318d Delete CompileTimeConstantEvaluator
Change-Id: I025566965d992829e93e84912d68317f145d96b2
Reviewed-on: https://dart-review.googlesource.com/54885
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-05-15 08:37:29 +00:00
Johnni Winther 76ab610097 Remove parser listeners and partial elements
Change-Id: Ifb5fffdca3a0e4f2bca7c35ae3c1a99490978ebf
Reviewed-on: https://dart-review.googlesource.com/54882
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-05-15 08:37:29 +00:00
Johnni Winther aeaa3b05c4 Remove more parts of resolution
Change-Id: Ic32851c32f4119b9682bb8538cfd7aa745ca7f09
Reviewed-on: https://dart-review.googlesource.com/54880
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-05-15 08:37:29 +00:00
Johnni Winther 4d76600b22 Delete SemanticSendVisitor
Change-Id: I0ccf8527e973dc5cfeac19caaaac026f91795e17
Reviewed-on: https://dart-review.googlesource.com/54860
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2018-05-15 08:37:29 +00:00
Johnni Winther 049d41ee36 Delete AST-based SSA builder
Change-Id: I16aa702eae335a01163a3b79d36bf4e60561756e
Reviewed-on: https://dart-review.googlesource.com/54841
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-05-15 08:37:29 +00:00
Johnni Winther 4fbd22c9e2 Remove AST-based inference
Change-Id: I368630e15d08ecbc0fdee288985746f90477159b
Reviewed-on: https://dart-review.googlesource.com/54822
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-05-15 08:37:29 +00:00
Stephen Adams 65c4eebcf6 [dart2js] $async$self does not require a temp
Change-Id: Ief44aa36b67928cf33176410ebf1dfd5c794b024
Reviewed-on: https://dart-review.googlesource.com/55040
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2018-05-15 00:29:48 +00:00
Sigmund Cherem a06f7c9241 Remove dart:_isolate_helper.
The rest of the code was used in a single place, so I've moved the code to the
appropriate library.

Change-Id: Idd0416bf7365e3de05f20ab1184428ae7ae614b2
Reviewed-on: https://dart-review.googlesource.com/54745
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2018-05-15 00:21:28 +00:00
Sigmund Cherem be77569d57 Remove old mirrors library now that the old-frontend is being deleted
Change-Id: Iea1cbb0c4422fa51e632ac03c9cd01e4916181fc
Reviewed-on: https://dart-review.googlesource.com/54744
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2018-05-14 21:38:07 +00:00
Harry Terkelsen fe51bb1b14 Don't eagerly enqueue JS helpers when we see a native class
We no longer eagerly enqueue defineProperty, toStringForNativeObject,
or hashCodeForNativeObject. We only enqueue convertDartClosureToJS
when needed.

For the following 'Hello World' program, code size dropped from 33175 to 10066:

```
import 'dart:html';

main() {
  window.console.log('Hello World');
}
```

Change-Id: I47860b44b572f7a162fc95c9cccefdc9012810dd
Reviewed-on: https://dart-review.googlesource.com/54500
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Harry Terkelsen <het@google.com>
2018-05-14 18:11:09 +00:00
Johnni Winther d0d265b5a7 Remove GraphBuilder.commonMasks
Change-Id: I477054bf4d05772e1c2e3d14a0862b8528661fcb
Reviewed-on: https://dart-review.googlesource.com/54390
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-05-14 08:29:57 +00:00
Johnni Winther c71e680152 Delete ResolverVisitor and friends
Change-Id: I012a86ca2d0f1986b226f1e4fea20ee295ccb6ed
Reviewed-on: https://dart-review.googlesource.com/54409
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-05-14 08:14:07 +00:00
Johnni Winther f75db77597 Delete ScannerTask, DietParserTask and TypeCheckerTask
Change-Id: I5dede24df4583a7bd6d6d493e8f55c257bc8f0bc
Reviewed-on: https://dart-review.googlesource.com/54408
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-05-14 08:14:07 +00:00
Johnni Winther 14537e3a2f Delete LibraryLoader and patch parser
Change-Id: I0ea824541ec3b5b204577d4cd1da32ffba30c071
Reviewed-on: https://dart-review.googlesource.com/54405
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-05-14 08:14:07 +00:00
Johnni Winther 506c8819ae Delete CompilerResolution, ResolutionFrontEndStrategy at al.
Change-Id: I13698f02d5c9af878750290ad1aef8d32777684f
Reviewed-on: https://dart-review.googlesource.com/54403
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-05-14 08:14:07 +00:00
Johnni Winther d4c7a444fe Support isTry optimization in phi-nodes for kernel
Change-Id: Ia9c4b239b135eab7a7d02773b89b614407119156
Reviewed-on: https://dart-review.googlesource.com/54389
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2018-05-14 08:12:09 +00:00
Stephen Adams c75cbdff05 [dart2js] unreachable-throw experiment
Make functions that are unreachable throw if entered.
Use like this:

DART_VM_OPTIONS='-Dunreachable-throw=true' dart2js ...

TBR=sigmund@google.com

Change-Id: Ia4ebab797143886f87f36bc696accfb65b36f478
Reviewed-on: https://dart-review.googlesource.com/54740
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-05-11 23:27:42 +00:00
Stephen Adams ef6e19a83a [dart2js] Implementation of extractTypeVariables
Change-Id: I80272dade861e30440f64fe36c1bf4bb5cd2eb8a
Reviewed-on: https://dart-review.googlesource.com/54625
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-05-11 01:37:45 +00:00
Sigmund Cherem ca7a70ff41 Omit type-bound checks on type parameters when '--omit-implicit-checks' is enabled
Change-Id: Idd721d4b36a04afc5b855e280f8494367e97430f
Reviewed-on: https://dart-review.googlesource.com/54627
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2018-05-10 20:48:15 +00:00
Sigmund Cherem c25a9fd46b Remove support for dart:isolate in dart2js.
Change-Id: I1216a0ac91d8a1d13b441809596e1a8b5e51bb34
Reviewed-on: https://dart-review.googlesource.com/54526
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2018-05-10 01:20:17 +00:00
Stephen Adams b294e48bdf Hack to fix sort order
TBR=sigmund@google.com

Change-Id: I3771405638f85d2f6d3b3a883d00b88114fc49d3
Reviewed-on: https://dart-review.googlesource.com/54525
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2018-05-09 21:10:57 +00:00
Stephen Adams e5820f7e94 Place generator body in same unit as entry
Change-Id: I897bf8011bde7fcc1acb081c75f17429b948e109
Reviewed-on: https://dart-review.googlesource.com/54524
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2018-05-09 20:45:47 +00:00
Stephen Adams 6efd3b3654 Refactor output code for generators
sync*/async/async* generators have two parts: an entry, which does
checks and computes the element type of the result, and a body, which
is transformed after lowering to JavaScript.

The split ensures that the code for checks is done at function call
time, rather than e.g. in the moveNext method of a sync* iterator.

A following CL with optimize the split to generate one function when
there are no checks and the type argument is simple enough for textual
substitution.

Change-Id: I5414109ca851f9267871aa113a2e29b16236986d
Reviewed-on: https://dart-review.googlesource.com/54308
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2018-05-09 18:22:07 +00:00
Sigmund Cherem 3ec1b929e3 Remove dependencies on isolates.
This starts removing support for isolates. I've kept around the
isolate library for now, but I stopped injecting the isolate logic
unless you directly access an isolate API.

Concrete changes:

* Timer no longer uses the event queue: this was only used in worker
isolates, soon to be removed.

* Checking for whether the code is run within a worker is not dependent
   on initializing the isolates global state. This was important to allow
   deferred-loading to work without the isolate logic.

* Workers no longer track pending async calls correctly. This may make it possible
   to terminate worker isolates early, again this wont be relevant shortly.

Bug: https://github.com/dart-lang/sdk/issues/32684
Change-Id: I05025418e05c3641ba1a3bc34ea75ca558a28fbd
Reviewed-on: https://dart-review.googlesource.com/54160
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2018-05-09 16:36:26 +00:00
Johnni Winther df9af04061 Remove CompilerOptions.useKernel
Change-Id: I9ea69addeb18e061280329c233a110fe2d8ca763
Reviewed-on: https://dart-review.googlesource.com/54240
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-05-09 10:13:32 +00:00
Johnni Winther 4c7926107e Remove support for --use-old-frontend option
Change-Id: Ia6e7ded5e312cce4841ded8170fc01a51f07b098
Reviewed-on: https://dart-review.googlesource.com/54229
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-05-09 09:11:01 +00:00
Lasse Reichstein Holst Nielsen 862a894de6 Make cast do the same things as retype.
Deprecate `retype` and forward it to `cast`.

Change-Id: Ie17ffdd1eef0d3f19582bf638c5349927c7b5ebd
Reviewed-on: https://dart-review.googlesource.com/53802
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2018-05-09 08:00:08 +00:00
Sigmund Cherem 3beb7fe860 Fix how we pass the type-parameter to StreamIterator in for-in
Change-Id: If2b33bc9bbee93e67f6da621db0287730b61b223
Reviewed-on: https://dart-review.googlesource.com/54311
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2018-05-08 23:01:58 +00:00
Johnni Winther 51fa3f3b0c Decouple HNode from TypeMask
Change-Id: Ie13d928d51ad7e080ad13402bed3c974da66a2c4
Reviewed-on: https://dart-review.googlesource.com/54020
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2018-05-08 11:20:44 +00:00
Johnni Winther d3c7df35b4 Revive AbstractValueDomain
- to decouple inference results from TypeMask.

Change-Id: Ibe2ec234e84262c5bff169ec7068ca1419706029
Reviewed-on: https://dart-review.googlesource.com/53942
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-05-08 11:20:44 +00:00
Johnni Winther 4b53f7e0d2 Remove useOldFrontend testing from TypeEnvironment
Change-Id: I0d62b83073ce5c7008f85c0c32b74c9b70cc4eb0
Reviewed-on: https://dart-review.googlesource.com/53960
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-05-08 08:31:43 +00:00
Johnni Winther 27ae11e4d8 Filter instantiation stubs
Closes #32992

Change-Id: Ib0521f24eb734b42a1a55663119204220f263265
Reviewed-on: https://dart-review.googlesource.com/53740
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2018-05-08 07:46:33 +00:00
Sigmund Cherem 2e1c17e5c1 Revert "dump-info: Use relative paths for library canonicalUri..."
This reverts commit 7fe8659613.

Reason for revert: we decided to take an alternative approach to solve the problem.

Original change's description:
> dump-info: Use relative paths for library canonicalUri...
> 
> ...if they are within the working directory
> 
> Makes output from dump-info more stable, especially with pkg:build
> 
> Change-Id: I3e6c444a0aa7df55c10e1bdff4b59ef035d2acc3
> Reviewed-on: https://dart-review.googlesource.com/53168
> Reviewed-by: Harry Terkelsen <het@google.com>
> Commit-Queue: Kevin Moore <kevmoo@google.com>

TBR=kevmoo@google.com,het@google.com

# Not skipping CQ checks because original CL landed > 1 day ago.

Change-Id: I701847cf8879599c3d129a83809b8fe1c9d9d172
Reviewed-on: https://dart-review.googlesource.com/54141
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2018-05-08 02:00:52 +00:00
Johnni Winther 3cd0a1f5e4 Remove old_frontend and mirrors tests
Change-Id: I1e10d65c25298eb084619ed156daa3d2069f92e1
Reviewed-on: https://dart-review.googlesource.com/53741
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-05-07 10:07:40 +00:00
Johnni Winther add1e67295 Include generic type arguments in deferred load computation.
Closes #33046

Change-Id: I1273b631e3f5b5aca8d4042b0afd972709a00068
Reviewed-on: https://dart-review.googlesource.com/53805
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-05-07 09:21:48 +00:00
Stephen Adams e5e4871a04 Simplify 'this' caching in constructors.
Change-Id: Ibf8659ac8f354a8cd8f6b69819b6f1154fa2227e
Reviewed-on: https://dart-review.googlesource.com/53694
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2018-05-03 23:33:34 +00:00