Commit Graph

173 Commits

Author SHA1 Message Date
Johnni Winther 7580e77ef2 Support modular code generation
Change-Id: Id5511296eb0b6acf812bc464d71efa4019f211d7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103523
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2019-05-24 07:38:13 +00:00
Johnni Winther 6757d0c6d9 Use ModularNamer/ModularEmitter to generate code separate from codegen enqueuing
Change-Id: I35dc4c0370622c63f2100e22517149cb0629423e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/102367
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2019-05-20 08:57:39 +00:00
Johnni Winther 7dd4259d87 Handle ir constants in inferrer
Change-Id: Ie7b6ff9e62b3b8c78f6c04359cb72f77b249440c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97240
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2019-03-21 11:25:40 +00:00
Johnni Winther c4c0db440c Handle ir constants in noSuchMethod handling and deferred load
Change-Id: Ic57e44bd3f03d88119962c235fb6f136785d9ac1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97118
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2019-03-20 10:18:13 +00:00
Johnni Winther ea6e83004b Use @pragma instead of package:meta/dart2js in tests
Change-Id: I16c0ed6f391a417d8faa55e68cde902d91e3db32
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95220
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2019-03-06 08:32:05 +00:00
Johnni Winther b61a085c60 Use custom thisType to signal static type precision.
This also removes the dependency on the state (!) in ir.TypeEnvironment.

Change-Id: I0180d111ecf45b685c4abce12c6a9bd52c1f308e
Reviewed-on: https://dart-review.googlesource.com/c/88968
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2019-01-11 12:17:14 +00:00
Johnni Winther 3cb3fd2b20 Move types/* to inferrer/*
Change-Id: Iff27cf92c6e0fec2c304dfbc0d2e4cb8901403cc
Reviewed-on: https://dart-review.googlesource.com/c/86567
Auto-Submit: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-12-07 18:06:35 +00:00
Johnni Winther bb4e2388b8 Use BasicInfo.resetIds
Change-Id: I69770f2d4f2e24b25cbeff644747ef605e14d4b9
Reviewed-on: https://dart-review.googlesource.com/c/85167
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2018-11-23 08:51:52 +00:00
Sigmund Cherem 02f6395606 Cleanup library-loader: rename as kernel producer, remove some dependencies
Once we remove the frontend strategy object, we might want to remove some additional dependencies on KernelResult

Change-Id: I27ef1fbb12e671748b59a87d2dd249100501e02a
Reviewed-on: https://dart-review.googlesource.com/c/85060
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2018-11-21 17:59:18 +00:00
Johnni Winther 0fded45406 Handle serialization with --dump-info
Change-Id: I626eb8c7dca0b4e92f2aca79429f6e7336215840
Reviewed-on: https://dart-review.googlesource.com/c/84846
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2018-11-21 09:40:02 +00:00
Sigmund Cherem b484aada21 Remove library-root option - replace it with a libraries-spec option instead
Change-Id: Ie1df52cdaa7ab4381a4c1b94c61a1210f0f31b5f
Reviewed-on: https://dart-review.googlesource.com/c/83641
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2018-11-09 22:40:28 +00:00
Johnni Winther 556dd9a345 Add support for serialization on command-line
Change-Id: I4fa85c3e06e1f142265cecff83ff1b8db74bfe65
Reviewed-on: https://dart-review.googlesource.com/c/82445
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-11-02 14:12:18 +00:00
Johnni Winther 2bb05234a8 Support command-line dynamic invocation analysis though analyze_helper
Change-Id: I75da7e8d47d6096c29d0980e3ff12d932e60427c
Reviewed-on: https://dart-review.googlesource.com/c/81761
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2018-11-01 09:44:17 +00:00
Johnni Winther 22de8d50af Test (de)serialized equality of compiler output
Change-Id: I0f7218cfebb88355b51f8f4f1e298cc6a6e2be2b
Reviewed-on: https://dart-review.googlesource.com/c/81681
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-10-31 09:48:28 +00:00
Johnni Winther a09ec46da6 Test in-memory serialization/deserialization in test-mode
+ fixes for switch and continue

Change-Id: I1f4fb9327b9db08eb69f750a66073affe2659f7d
Reviewed-on: https://dart-review.googlesource.com/c/81603
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-10-30 11:18:24 +00:00
Johnni Winther 41c50d9ac9 Support serialization of deferred imports
+ add tests for various fixes
+ add canonicalization support in serialization

Change-Id: Ib6a8bfd6073dbd93c1ba4fd9d2feff77ac43b178
Reviewed-on: https://dart-review.googlesource.com/c/81402
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Auto-Submit: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-10-26 09:36:18 +00:00
Sigmund Cherem 823dfda5a5 Delete serialization, except for equivalence and helpers used in other tests.
Move such helpers under the test folders.

Change-Id: Ic8718374741b1e3e46e63ae552fa57e49fc97bb2
Reviewed-on: https://dart-review.googlesource.com/51203
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2018-04-13 21:31:51 +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
Lasse R.H. Nielsen fed7120b07 Make UnmodifiableMapView not lose unmodifiability on cast/retype.
Change-Id: I44c084353b35e16cd2fd5481d86a7be6c0b62ef3
Reviewed-on: https://dart-review.googlesource.com/41160
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2018-02-14 12:49:23 +00:00
Sigmund Cherem 0c04eb53c7 Disable int64 when running dart2js
The goal is to renable it as soon as we migrate our constant-evaluator and
constant folding to use Bigint.

Change-Id: I3bba1bbe07517e9cb496896b3417f58173878d62
Reviewed-on: https://dart-review.googlesource.com/34302
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
2018-01-16 19:52:22 +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
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 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
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 fd247b1539 Add ErroneousConstructorConstant
+ use source locations for fasta messages

Change-Id: I1abba76f4f5653f8d7278cb2b368ae25ce33160b
Reviewed-on: https://dart-review.googlesource.com/8840
Reviewed-by: Stephen Adams <sra@google.com>
2017-09-28 08:06:42 +00:00
Johnni Winther 2acf735159 Remove Local.memberContext and Local.executableContext
Change-Id: Icd1ff9ac06fb218731c618c5fc87e4d69bb47e77
Reviewed-on: https://dart-review.googlesource.com/5240
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2017-09-14 08:14:15 +00:00
Emily Fortuna 553e4a0967 Don't make field entities for variables in boxes.
Bug:
Change-Id: Ie31e88438da93a1d54c8c688a5ccd212bb81bb28
Reviewed-on: https://dart-review.googlesource.com/4241
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Emily Fortuna <efortuna@google.com>
2017-09-11 23:32:51 +00:00
Sigmund Cherem cf19b1e5aa Update defer loading algorithm:
On a large app this cuts the algorithm time in half.

BUG=
R=sra@google.com

Review-Url: https://codereview.chromium.org/2997233002 .
2017-08-28 16:44:22 -07:00
Johnni Winther 3c8096e040 Split getClosureRepresentationInfo into MemberEntity and (ir/ast) nodes
R=efortuna@google.com

Review-Url: https://codereview.chromium.org/3002953002 .
2017-08-19 10:36:49 +02:00
Johnni Winther c8ae9ba422 Handle js interop members in impact computation.
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2998543002 .
2017-08-09 10:40:28 +02:00
Emily Fortuna 45c57c8859 Renamed some scoping classes to make their usage clearer.
BUG=
R=sra@google.com

Review-Url: https://codereview.chromium.org/2975323002 .
2017-07-14 17:03:35 -07:00
Johnni Winther 1c8cb51132 Assert that we don't mix K and J elements
- we did for BackendImpact, RuntimeTypesNeed, native classes.

R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2975433002 .
2017-07-07 10:58:59 +02:00
Emily Fortuna 6960d77fbc Hopefully the last bit of restructuring between closture classes and loop boxing, etc.
BUG=
R=johnniwinther@google.com, sigmund@google.com

Review-Url: https://codereview.chromium.org/2961563003 .
2017-06-26 15:49:27 -07:00
Johnni Winther e41d0a63c2 Compute KernelClosureRepresentationInfo.variableIsUsedInTryOrSync
This handles one of the current inequivalences on hello world from dill.

R=efortuna@google.com

Review-Url: https://codereview.chromium.org/2938203003 .
2017-06-20 12:45:51 +02:00
Peter von der Ahé 69d6e8e55a All strong mode cleaning of dart2js.
Fixes https://github.com/dart-lang/sdk/issues/29886

Supersedes CLs 2939193003, 2950433002, and 2947583002.

R=johnniwinther@google.com

Review-Url: https://codereview.chromium.org/2944843002 .
2017-06-19 14:06:38 +02:00
Johnni Winther 795e078f21 Remove Compiler.mainApp and Compiler.mainFunction
This prepares for switching between K and J elements between resolution and codegen.

R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2936233003 .
2017-06-16 13:00:21 +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
Emily Fortuna e6d7c0500c Rename ClosureClassMaps to CLosureDataLookup
(doing small tasks while I wait to talk to Siggi).

BUG=
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2938853004 .
2017-06-14 16:55:57 -07:00
Emily Fortuna a27ebd0c94 Add ClosureRepresentationInfo, the new public face of ClosureClassMap
(removal of methods exposing ClosureClassMap coming in follow up CL).

BUG=
R=johnniwinther@google.com

Review-Url: https://codereview.chromium.org/2933363003 .
2017-06-14 11:15:08 -07:00
Emily Fortuna c6195b03f6 Revert "Revert "Entity-ify some portions of LocalsHandler and Closure.""
This reverts commit cdb41f9258.

Peter pointed out this caused a few analyzer errors. My "best tests" clearly fell short.

BUG=
R=ahe@google.com

Review-Url: https://codereview.chromium.org/2926663002 .
2017-06-06 13:34:24 -07:00
Emily Fortuna cdb41f9258 Revert "Entity-ify some portions of LocalsHandler and Closure."
This reverts commit 03572798ff.

It was causing some type warnings.

BUG=

Review-Url: https://codereview.chromium.org/2931463002 .
2017-06-06 12:10:12 -07:00
Emily Fortuna 03572798ff Entity-ify some portions of LocalsHandler and Closure.
BUG=
R=johnniwinther@google.com, sigmund@google.com

Review-Url: https://codereview.chromium.org/2924693003 .
2017-06-06 10:53:13 -07:00
Emily Fortuna faaba67a91 Revert "Revert "Make ClosureTask only accept Element-level APIs instead of resolvedAst.""
This reverts commit 7bd51eb191.

BUG=
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2920253004 .
2017-06-05 15:36:26 -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
Johnni Winther 1a5a3d71d5 Access BackendUsage through ClosedWorld
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2875313002 .
2017-05-15 10:13:06 +02:00
Johnni Winther 2c2c32c57d Reorganize equivalence test helpers
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2879593004 .
2017-05-15 09:47:05 +02:00
Johnni Winther 822bbbb71a Add more equivalence tests for ElementEnvironment
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2874973003 .
2017-05-12 10:15:58 +02:00
Johnni Winther cdfe67f95d Add equivalence check of NativeData and InterceptorData
Extracted NativeMemberResolver from NativeDataResolver and added
KernelNativeMemberResolver to resolve native member data before
world impact computation.

R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2873113004 .
2017-05-11 14:11:04 +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