Commit Graph

38 Commits

Author SHA1 Message Date
Johnni Winther 28faf8c7ca Merge GraphBuilder into KernelSsaGraphBuilder
+ avoid use of `compiler` and `backend`
+ make members of KernelSsaGraphBuilder private when possible

Change-Id: Ia069a8c3b4167c1ae55554baadb857975aeff67f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101287
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2019-05-06 08:53:24 +00:00
Johnni Winther 6616ddeb88 Move dart2js unittests to subfolders
* All helpers in /helpers/
* Tests of user-facing behavior in /end_to_end/
* Tests of internal models and unittests of internal classes in /model/

Change-Id: Ic7a7e58aa01f92f8572514ae81230804f36af67e
Reviewed-on: https://dart-review.googlesource.com/72644
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2018-09-10 08:22:53 +00:00
Johnni Winther d456532124 Disallow non-js interop external members
Change-Id: Ic73a3e2b16bdf77a2cd94fdcfaffe7989a798909
Reviewed-on: https://dart-review.googlesource.com/70513
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2018-08-22 06:59:46 +00:00
Johnni Winther 3af2f793ac Remove --no-preview-dart-2 from dart2js
Change-Id: I17a18ebe905fa60ba2a1b41af2f444cfe58a38a2
Reviewed-on: https://dart-review.googlesource.com/70512
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2018-08-20 09:18:02 +00:00
Johnni Winther 4a01dc66bc Fix crash in inferrer_engine
Closes #33810

Change-Id: I25ec7ab62dbd6a54331ee0f777644da3ddad1135
Reviewed-on: https://dart-review.googlesource.com/65300
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2018-07-18 09:46:28 +00:00
Johnni Winther 04168fa922 Move more methods to ClassHierarchy.
Change-Id: I6f7f0266a77db1e64a40307a4878bfd9b1ca5f07
Reviewed-on: https://dart-review.googlesource.com/61932
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-07-06 22:02:57 +00:00
Johnni Winther bb69cc15cb Add ClassHierarchy to share code between J/KClosedWorld (second attempt)
+ improve the commonSubclasses implementation to support the
implementation of FlatTypeMask.intersection and RuntimeEquals.equals
computation. FlatTypeMask.intersection is now ~20% faster.

Change-Id: I0b452afd260ab3b0598ed4d67f07a55ea96d2756
Reviewed-on: https://dart-review.googlesource.com/63560
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-07-04 09:00:28 +00:00
Stephen Adams e0905b979a Revert "Add ClassHierarchy to share code between J/KClosedWorld"
This reverts commit a8e930caf3.

Compile time regression on some large apps.

TBR=johnniwinther@google.com

Change-Id: Ic1b736a5d50814ed8b8d24a9dc4a2d910e5f70df
Reviewed-on: https://dart-review.googlesource.com/62446
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2018-06-26 23:40:48 +00:00
Johnni Winther a8e930caf3 Add ClassHierarchy to share code between J/KClosedWorld
+ improve the commonSubclasses implementation to support the
implementation of FlatTypeMask.intersection and RuntimeEquals.equals
computation.

Change-Id: I51c4d229e9dc6d5de101aff33e56bb44bf93bc0d
Reviewed-on: https://dart-review.googlesource.com/61927
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2018-06-26 07:46:24 +00:00
Sigmund Cherem c96f23243b Enable Dart2 in dart2js by default
Change-Id: Id197fc734bcb45f0805e49e89c0d03419384bb0b
Reviewed-on: https://dart-review.googlesource.com/60448
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2018-06-19 19:20:36 +00:00
Johnni Winther 82755aa303 Rename ClosedWorld to JClosedWorld and merge it with ClosedWorldRefiner
Change-Id: I858695194fe4b0dffb7c85a93e2d6bcc04dd6229
Reviewed-on: https://dart-review.googlesource.com/58022
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-06-04 09:22:41 +00:00
Johnni Winther 831a6ba598 Remove useOldFrontend testing from various tests
Change-Id: Iff97dd60756ae18cb0a3203cffd87c8da9e53757
Reviewed-on: https://dart-review.googlesource.com/53944
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2018-05-08 08:31:43 +00:00
Johnni Winther 9bac9ee596 Remove useOldFrontend from compiler_helper
Change-Id: Ief047cc08b3df47be3381336ec37ed24c53e6302
Reviewed-on: https://dart-review.googlesource.com/53980
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-05-08 08:31:43 +00:00
Johnni Winther 54b8ebd992 Support js-interop classes that implement generic types in Dart 2
This adds a special RTI representation for a type argument of a
(supertype of a) js-interop class, which effectively is the Dart 1
`dynamic` type.

Closes #32969

Change-Id: Ifd92b3fc6779d96d354ad929bd7c07a349299ae6
Reviewed-on: https://dart-review.googlesource.com/53002
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-05-01 08:37:11 +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 9d0e00b97a Move unittests, part #7 of ?
Change-Id: I4940a7256ff39d0469201ca43e0cb7d1b919fca0
Reviewed-on: https://dart-review.googlesource.com/31344
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2017-12-29 10:26:43 +00:00
Johnni Winther e4ac3fb74f Port unittests to kernel, part #1 of ?
Change-Id: I8e292f4ee6281d5bf2d6a664a97eb2832439deeb
Reviewed-on: https://dart-review.googlesource.com/29803
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2017-12-15 19:39:09 +00:00
Johnni Winther 69106c6c8c Support simple static inlining from kernel.
Change-Id: Ie9a062b2d825c9fb0ed7bd5933eb7cf841509409
Reviewed-on: https://dart-review.googlesource.com/23660
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2017-11-27 10:19:41 +00:00
Johnni Winther 506c6031b3 Add test for cross-library JS-interop classes
Change-Id: Iff97263f866a4d2d79bd00d3d6be42ae9a2fce5a
Reviewed-on: https://dart-review.googlesource.com/9960
Reviewed-by: Emily Fortuna <efortuna@google.com>
2017-10-03 07:41:06 +00:00
Johnni Winther 4b94004d4b Add tests for jsinterop errors
Change-Id: Icfa6b5a34ed56e43abb3a55eb8d48bc80eeac59f
Reviewed-on: https://dart-review.googlesource.com/9240
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Emily Fortuna <efortuna@google.com>
2017-09-29 19:16:05 +00:00
Johnni Winther fd81ba4569 Support jsinterop/world_test from .dill
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2995643002 .
2017-08-10 10:13:23 +02:00
Johnni Winther 437b00c9e8 Support use of dill in TypeEnv tests
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2992383002 .
2017-08-10 09:58:18 +02:00
Johnni Winther 5fe6282ec0 Reformat untouched files.
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2990223002 .
2017-08-04 14:52:58 +02:00
Peter von der Ahé 2e6e44a69b Strong mode cleaning of many dart2js tests.
R=efortuna@google.com

Review-Url: https://codereview.chromium.org/2939063002 .
2017-06-16 09:31:29 +02:00
Johnni Winther 5afe65e891 Remove Compiler.commonElements
R=efortuna@google.com

Review-Url: https://codereview.chromium.org/2935663002 .
2017-06-14 10:18:42 +02:00
Johnni Winther 074baf1b9a Access NativeData only through ClosedWorld
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2863073003 .
2017-05-08 11:28:19 +02:00
Johnni Winther ab688ab590 Make elements/names.dart its own library
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2860753005 .
2017-05-08 11:00:32 +02:00
Johnni Winther 66ead732b1 Move JsInteropAnalysis.onQueueClosed to AnnotationProcessor.processJsInteropAnnotation
R=sigmund@google.com

Committed: https://github.com/dart-lang/sdk/commit/86671fdd56e1163c2e5e1baa77017f43205adb07

Reverted: https://github.com/dart-lang/sdk/commit/9a1460dc439dcac68e9c2de456e305ee82eea85d
Review-Url: https://codereview.chromium.org/2852603003 .
2017-05-03 09:33:23 +02:00
Emily Fortuna 7697137485 Merge CommonElements and BackendHelpers!
BUG=
R=johnniwinther@google.com

Review-Url: https://codereview.chromium.org/2814453005 .
2017-04-11 14:32:54 -07:00
Johnni Winther 12491d4ab8 Fix needsNoSuchMethod computation for abstractly instantiated classes
R=floitsch@google.com

Review-Url: https://codereview.chromium.org/2612253002 .
2017-01-05 16:42:38 +01:00
Johnni Winther 6281614c45 Merge CoreTypes and CoreClasses into CommonElements.
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2595493002 .
2016-12-21 10:10:23 +01:00
Johnni Winther bc1b27bc79 Further reduce use of Compiler.closedWorld.
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2577423002 .
2016-12-20 09:43:58 +01:00
Johnni Winther b0ecbef3cc Introduce isAbstractlyInstantiated to avoid exact masks of abstract classes.
Classes can be instantiated directly, abstractly or indirectly:

When [cls] is directly instantiated: This means that at runtime instances of exactly [cls] are assumed to exist.

When [cls] is abstractly instantiated: This means that at runtime instances of [cls] or unknown subclasses of [cls] are assumed to exist.

This is used to mark native and/or reflectable classes as instantiated. For native classes we do not know the exact class that instantiates [cls] so [cls] here represents the root of the subclasses. For reflectable classes we need event abstract classes to be 'live' even though they cannot themselves be instantiated.

When [cls] is indirectly instantiated: This means that a subclass of [cls] is directly or abstractly instantiated.

R=sigmund@google.com

Review URL: https://codereview.chromium.org/2443953002 .
2016-10-28 08:45:57 +02:00
Johnni Winther 8820b8046b Move closed world reasoning methods from ClassWorld to ClosedWorld.
Main changes in world.dart

R=het@google.com

Review URL: https://codereview.chromium.org/2363773005 .
2016-09-26 11:14:57 +02:00
Johnni Winther 614cde5b1c Split World usage into open, inference, and closed world.
This is a step towards separating the backend element model from the frontend model.

Main changes in world.dart.

R=het@google.com

Review URL: https://codereview.chromium.org/2314703002 .
2016-09-21 10:54:34 +02:00
Harry Terkelsen 3d31aa2ff7 dart2js: run dartfmt on tests
R=sigmund@google.com

Review URL: https://codereview.chromium.org/2345083003 .
2016-09-16 15:49:23 -07:00
Johnni Winther b358d062c2 Fix type masks for js-interop types.
Type-masks for js-interop types are replaced by `subtype/subclass of JavaScriptObject`.

Closes #24822

R=jacobr@google.com

Review URL: https://codereview.chromium.org/2307883002 .
2016-09-07 10:42:45 +02:00
Johnni Winther f2d1dba0db Add type test for jsinterop types.
BUG=
R=jacobr@google.com

Review URL: https://codereview.chromium.org/2124443002 .
2016-07-08 11:57:12 +02:00