Commit Graph

98 Commits

Author SHA1 Message Date
Sigmund Cherem 09ff1b56f7 Add support for compiling Dart via the FE in dart2js.
This also:
 - replaces --use-kernel with --use-kernel-in-ssa
 - replaces --load-dill with --use-kernel
 - makes --use-kernel support both: compiling from .dill or from .dart
 - change the default of other options that are currently disabled when --use-kernel is on.
 - adds .status lines for all tests in language/corelib/dart2js_extra/dart2js_native

R=efortuna@google.com

 Note: this CL is built on top of another change
 (https://codereview.chromium.org/2981403002/) that adds preview_dart_2 to
 test.dart
Review-Url: https://codereview.chromium.org/2989453002 .
2017-07-24 17:10:11 -07:00
Peter von der Ahé 87700d381c Start making dart2js strong mode clean.
R=efortuna@google.com

Review-Url: https://codereview.chromium.org/2938823002 .
2017-06-14 20:34:07 +02:00
Stephen Adams d5f2138349 Use failedAt in more places
BUG=
R=johnniwinther@google.com

Review-Url: https://codereview.chromium.org/2898403002 .
2017-05-31 03:12:11 -07:00
Johnni Winther ebe69e6060 Support loading binary data in dart2js
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2897903003 .
2017-05-23 10:43:20 +02:00
Emily Fortuna 4156ca6a2b Eliminate multi-callback structure for LibraryLoader.
BUG=
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2760923004 .
2017-03-24 12:20:46 -07:00
Johnni Winther 52efadefc2 Replace Backend with JavaScriptBackend.
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2685573002 .
2017-02-08 10:50:55 +01:00
Sigmund Cherem ac6bf5926f Temporarily allow to import dart:io in client apps.
Disclaimer: I am not in favor of this approach, but it appears to be the least
worst option at the time.

Reach out to kevmoo@ or dgrove@ for details.

R=lrn@google.com, sra@google.com, dgrove@google.com, kevmoo@google.com

Review-Url: https://codereview.chromium.org/2675023002 .
2017-02-07 14:02:04 -08:00
Johnni Winther a78e2e9806 Remove code supporting incremental compilation in dart2js
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2668233002 .
2017-02-02 09:48:19 +01:00
Johnni Winther 3f977cb5d1 Extract ClosedWorldImpl from WorldImpl.
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2580403002 .
2016-12-21 09:45:57 +01:00
Johnni Winther 33303ffea5 Resolve type arguments to generic methods.
R=eernst@google.com

Review URL: https://codereview.chromium.org/2535373003 .
2016-11-30 12:44:29 +01:00
Lasse R.H. Nielsen bcdf0a1f12 Make dart2js not consider dart:io there if the library is unsupported.
R=sigmund@google.com

Review URL: https://codereview.chromium.org/2321973002 .
2016-09-13 09:21:54 +02:00
Kevin Moore 406d5e0c48 pkg/compiler: fix imports
R=sigmund@google.com

Review URL: https://codereview.chromium.org/2221893003 .
2016-08-08 14:41:50 -07:00
Sigmund Cherem b741e3f0df Make CompilerTask independent of compiler.
Now this base class only has logic for measuring time.

R=het@google.com, johnniwinther@google.com

Review URL: https://codereview.chromium.org/2000323006 .
2016-05-25 09:11:08 -07:00
Johnni Winther 42435f2643 Support multiple resolution inputs from command line.
BUG=
R=sigmund@google.com

Review URL: https://codereview.chromium.org/2004833003 .
2016-05-25 11:02:34 +02:00
Johnni Winther 6571bdb95e Support (de)serialization from command-line
R=sigmund@google.com

Review URL: https://codereview.chromium.org/1975153002 .
2016-05-18 11:52:32 +02:00
Johnni Winther b361d8ce97 Support compilation of Hello World
BUG=
R=sigmund@google.com

Review URL: https://codereview.chromium.org/1927963002 .
2016-04-29 12:57:45 +02:00
Johnni Winther 4acfa253d3 Add toStructuredText to ConstantExpression and align method names with ConstantValue
R=sigmund@google.com

Review URL: https://codereview.chromium.org/1916053003 .
2016-04-27 12:48:50 +02:00
Peter von der Ahé 33253905e7 Use Zone to correctly measure async operations.
R=johnniwinther@google.com

Review URL: https://codereview.chromium.org/1898043004 .
2016-04-26 14:27:41 +02:00
Peter von der Ahé 74144aece4 Make backend and reporter customizable.
R=johnniwinther@google.com

Review URL: https://codereview.chromium.org/1897863007 .
2016-04-25 14:31:09 +02:00
Johnni Winther 09c242e729 Reinsert (and test) handling of exceptions from user code.
Closes issue #26304

R=ahe@google.com

Review URL: https://codereview.chromium.org/1914973002 .
2016-04-25 12:56:10 +02:00
Harry Terkelsen 8f3e4cff01 dart2js: remove references to compiler in ResolvedUriTranslator
BUG=
R=johnniwinther@google.com, sigmund@google.com

Review URL: https://codereview.chromium.org/1884793002 .
2016-04-13 13:49:59 -07:00
Harry Terkelsen 29cf477139 dartfmt pkg/compiler
BUG=
R=sigmund@google.com

Review URL: https://codereview.chromium.org/1859343004 .
2016-04-07 10:00:53 -07:00
Erik Ernst 586c43ac7e Repeats and fixes the changes landed & reverted as CL 1789553003.
When landed, CL 1789553003 turned out to cause bot failures because
some libraries outside the compiler are importing compiler libraries
which have been updated. For instance, the tests in 'compiler/dart2js'
depend on several internal elements of the 'dart2js' compiler.

This CL updates these external dependents to work with the modified
library structure and class APIs of the compiler. A small adjustment
was applied to 'dart2js_incremental' as well.

No further dependents are believed to exist: Grepping in sdk for
relevant imports does not reveal any further imports of any of the
libraries in the compiler where the "interface" has changed, and
external clients are not supported (that is, imports in arbitrary
github repositories may or may not break if they use the compiler
internals, but we do not support this type of dependency so we won't
do anything to protect them against that type of breakage).

R=johnniwinther@google.com

Review URL: https://codereview.chromium.org/1864433004 .
2016-04-05 17:26:07 +02:00
Erik Ernst 355888457a Revert "Introduces ParserOptions."
This reverts commit d4c9a499d5.

Review URL: https://codereview.chromium.org/1859543002 .
2016-04-04 15:16:13 +02:00
Erik Ernst d4c9a499d5 Introduces ParserOptions.
In preparation for support for generic methods (with an associated
command line option), this CL introduces a `ParserOptions` class and
uses that to pass the existing option `enableConditionalDirectives` to
all parsers. With that, the addition of an `enableGenericMethodSyntax`
option will be concise and well localized.

It is necessary to keep a `ParserOptions` object in `Parsing`, because
that's the only convenient channel for providing the options to the new
`Parser` and `ClassElementParser` created from the top-level function
`parse` in 'partial_elements.dart', and a from
`PartialClassElement.parseNode`, respectively.

The `ParserOptions` class is located in 'parser.dart'; from the current
import structure the most natural choice might be to put it in
'element_listener.dart', but considering the nature of that file it
seems less natural: What does `ParserOptions` have to do with element
listeners? So I put it in 'parser.dart', even though this causes a few
additional import statements.

R=johnniwinther@google.com, sigmund@google.com

Review URL: https://codereview.chromium.org/1789553003 .
2016-04-04 14:45:20 +02:00
Sigmund Cherem bada3cac9d Split loader from the rest of the compiler. This adds several abstractions to
make the decoupling easier. Some of the new abstractions should be revisited,
but it's a step forward :).

R=het@google.com

Review URL: https://codereview.chromium.org/1819053002 .
2016-03-23 16:02:33 -07:00
Sigmund Cherem 4f3a7cb86e Move all flags to CompilerOptions (first step to stop passing the compiler to
just get the options in the future).

BUG=
R=johnniwinther@google.com

Review URL: https://codereview.chromium.org/1803303002 .
2016-03-17 16:42:02 -07:00
Johnni Winther 0a3de942ee Add --use-new-source-info option
BUG=
R=sigmund@google.com

Review URL: https://codereview.chromium.org/1750393002 .
2016-03-02 10:19:04 +01:00
Florian Loitsch a9b8efcd0d Don't expose private libraries with dart.library.X.
R=johnniwinther@google.com

Review URL: https://codereview.chromium.org/1674613002 .
2016-02-05 17:36:14 +01:00
Florian Loitsch e775fa0932 Add support for 'dart.library.X' environment variables in dart2js.
R=johnniwinther@google.com, sigurdm@google.com

Committed: https://github.com/dart-lang/sdk/commit/369899c8ffca28f28a1af3cc323d1111c1a4a48a
Reverted: https://github.com/dart-lang/sdk/commit/b80994d6ad63ac30b400590cf51815e862c0e8a1

Review URL: https://codereview.chromium.org/1404183002 .
2016-01-13 16:34:46 +01:00
Florian Loitsch b80994d6ad Revert "Add support for 'dart.library.X' environment variables in dart2js."
This reverts commit 369899c8ff.

Review URL: https://codereview.chromium.org/1573243004 .
2016-01-12 14:41:00 +01:00
Florian Loitsch 369899c8ff Add support for 'dart.library.X' environment variables in dart2js.
R=johnniwinther@google.com, sigurdm@google.com

Review URL: https://codereview.chromium.org/1404183002 .
2016-01-12 13:58:46 +01:00
Johnni Winther 306537be79 Add test of unittests.
BUG=
R=sigurdm@google.com

Review URL: https://codereview.chromium.org/1562023002.
2016-01-06 13:19:41 +01:00
Johnni Winther 212ba4afbe Support optional package name arguments to --show-package-warnings
In response to dartbug.com/18661 and dartbug.com/21651.

Dart2js doesn't know pubspec.yaml or the directory structure but pub does. Next step is to pass arguments from pub.

BUG=
R=sigmund@google.com

Review URL: https://codereview.chromium.org/1513263002.
2015-12-15 10:52:19 +01:00
Florian Loitsch af4983c6b2 dart2js: add support for configuration-specific imports.
R=johnniwinther@google.com, rnystrom@google.com

Committed: https://github.com/dart-lang/sdk/commit/64edfaf21af3153f32e1229dd97c9b3d40cbfb2b
Reverted: https://github.com/dart-lang/sdk/commit/f38b810d334900317ee6c919b45ebd0c673fdb02

Review URL: https://codereview.chromium.org/1388523002 .
2015-12-11 06:17:15 +01:00
Florian Loitsch f38b810d33 Revert "dart2js: add support for configuration-specific imports."
This reverts commit 64edfaf21a.

Review URL: https://codereview.chromium.org/1517013003 .
2015-12-11 00:49:38 +01:00
Florian Loitsch 64edfaf21a dart2js: add support for configuration-specific imports.
R=johnniwinther@google.com, rnystrom@google.com

Review URL: https://codereview.chromium.org/1388523002 .
2015-12-11 00:25:01 +01:00
Sigmund Cherem 3fa0cae192 Alternative fix for the js-interop crash.
R=sra@google.com

Review URL: https://codereview.chromium.org/1457383003 .
2015-11-30 16:46:14 -08:00
Johnni Winther 0133786ae0 Use DiagnosticMessage in MockCompiler.
BUG=
R=sigurdm@google.com

Review URL: https://codereview.chromium.org/1415463022.
2015-11-10 11:12:51 +01:00
Sigurd Meldgaard c0d5f73bd0 Introduce "platform configurations" to replace categories and libraries.dart.
A small writeup of the thoughts behind this concept can be found at:
https://docs.google.com/a/google.com/document/d/1WkqJVPphuThH8h2jDqBOb6h1iMkrkQIO7PF638-qlso/edit?usp=sharing

BUG=
R=floitsch@google.com, johnniwinther@google.com, whesse@google.com

Review URL: https://codereview.chromium.org/1408253006 .
2015-11-02 13:02:25 +01:00
Sigurd Meldgaard e3b926849f Rename apiimpl.Compiler to CompilerImpl.
BUG=
R=johnniwinther@google.com

Review URL: https://codereview.chromium.org/1409803006 .
2015-10-29 13:23:55 +01:00
Sigurd Meldgaard a763c71d92 Introduce the "Embedded" category.
It is not visible from the dart2js command line.

BUG=
R=brianwilkerson@google.com, johnniwinther@google.com

Committed: https://github.com/dart-lang/sdk/commit/0aef0efb6a38a65fa676fa9e8daa85a972521745
Reverted: https://codereview.chromium.org/1401513002

Review URL: https://codereview.chromium.org/1395863002 .
2015-10-12 12:15:48 +02:00
Johnni Winther 1414d9b27e Use common.dart to re-export commonly used entities.
BUG=
R=sigurdm@google.com

Review URL: https://codereview.chromium.org/1394063004.
2015-10-12 09:34:02 +02:00
Sigurd Meldgaard 01d6977030 Revert "Introduce the "Embedded" category."
This reverts commit 0aef0efb6a.

BUG=

Review URL: https://codereview.chromium.org/1401513002 .
2015-10-09 13:29:53 +02:00
Sigurd Meldgaard 0aef0efb6a Introduce the "Embedded" category.
It is not visible from the dart2js command line.

BUG=
R=brianwilkerson@google.com, johnniwinther@google.com

Review URL: https://codereview.chromium.org/1395863002 .
2015-10-09 13:08:26 +02:00
Johnni Winther e49a3e7d44 Limit hints on empty hide on package imports.
BUG=
R=sigurdm@google.com

Review URL: https://codereview.chromium.org/1382143005.
2015-10-06 15:13:13 +02:00
Johnni Winther 76b7203c19 Extract DiagnosticReporter implementation from Compiler.
BUG=
R=sigurdm@google.com

Review URL: https://codereview.chromium.org/1383483006.
2015-10-06 10:24:44 +02:00
Stephen Adams 98531917c6 dart2js: Remove ConcreteTypeInference
R=sigmund@google.com

Review URL: https://codereview.chromium.org//1376113002 .
2015-09-30 15:21:58 -07:00
Asger Feldthaus 75da9e4907 dart2js: Measure time of individual optimization passes.
Passing the -v flag to dart2js now prints the time spent in individual
optimization passes.

It should also be easier to throw in ad-hoc timing of specific
procedures for some quick-and-dirty timing measurements.

BUG=
R=johnniwinther@google.com

Review URL: https://codereview.chromium.org//1362953002 .
2015-09-25 12:49:52 +02:00
Johnni Winther 1590970ccc Report info messages together with their error, warning, or hint.
BUG=
R=sigurdm@google.com

Review URL: https://codereview.chromium.org//1363993004.
2015-09-24 15:08:29 +02:00