Commit Graph

45 Commits

Author SHA1 Message Date
Stephen Adams bbfd4025c3 Fix copyright date in new test
TBR=johnniwinther@google.com

Change-Id: I36f3366ecd64dff247a1f94f5caa2714fefb3a09
Reviewed-on: https://dart-review.googlesource.com/76704
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2018-09-26 16:55:54 +00:00
Stephen Adams 20fa7815f0 Add @pragma('dart2js:noInline') and @pragma('dart2js:tryInline')
This is a redo of "[dart2js] Simplify noInline / tryInline annotations"
but keeping compatibility between different versions of dart2js and package:meta

Change-Id: I30e48f374aeef13d99f41af81eb0b8f339ab8bb8
Reviewed-on: https://dart-review.googlesource.com/76581
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2018-09-26 01:19:50 +00:00
Stephen Adams 3e9f4e6792 dart2js: generate simple '==' in more cases
Change-Id: I9f8d674f8346b6c3ecf5232c369b3953053d261f
Reviewed-on: https://dart-review.googlesource.com/74964
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2018-09-14 17:11:23 +00:00
Johnni Winther 5ab5c00ea4 Compute annotations in the K-World
This ensures that entities only used in metadata is part of the K-world
and doesn't have to be created late in (only) the J-world.

Change-Id: If9a264c51fba99093a196538fb655b1d5fafd47a
Reviewed-on: https://dart-review.googlesource.com/73880
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2018-09-11 11:10:37 +00:00
Johnni Winther e311e12bc4 Move all data for collection for testing behind one flag
- to ensure that we don't retain unneeded data in production

Change-Id: I2f702e040ed99cb8540a5b60efcf88a2c6b33af0
Reviewed-on: https://dart-review.googlesource.com/72720
Reviewed-by: Stephen Adams <sra@google.com>
2018-09-10 14:44:02 +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 c715e8125d Refactor global inference data to prepare for serialization
Change-Id: If88b948ca80b1a7915d87a49ba4e1d05de669282
Reviewed-on: https://dart-review.googlesource.com/72401
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2018-09-06 07:11:44 +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
Stephen Adams 8195fd8c64 Repair dart2js/string_interpolation_test
Change-Id: I52b61fa85df75f88bb033970ebb2feee2989fdad
Reviewed-on: https://dart-review.googlesource.com/69010
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2018-08-08 22:53:50 +00:00
Peter von der Ahé 389b8997b3 Update dart2js extra test wrt. void rules
Change-Id: Ic83252a27fc90dd2d19b799d09c0bc4b111a1caf
Reviewed-on: https://dart-review.googlesource.com/65501
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2018-07-18 09:48:19 +00:00
Johnni Winther da9705b356 Split compileLoadedLibraries
- into computeClosedWorld, performGlobalTypeInference and generateJavaScriptCode
+ pass closed world and inference results directly
+ this prepares for (de)serialization after global inference

Change-Id: I1180de35eea78a107c9e95fc6e904084b63ba0f2
Reviewed-on: https://dart-review.googlesource.com/63943
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-07-06 22:02:57 +00:00
Johnni Winther 7c6211b1d8 Make unittests work with Dart 2
Change-Id: Ic2c105747dfba067464fc15e158f58417c8636a8
Reviewed-on: https://dart-review.googlesource.com/61922
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2018-06-22 20:25:05 +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
Stephen Adams 38467cca03 Track always-initialized-to-null fields
Change-Id: Idb4d3a0395ce73eaaa4fc15a8df3bceaa4821b4f
Reviewed-on: https://dart-review.googlesource.com/57525
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2018-06-04 21:05:01 +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 b58cc36ddc Extract KClosedWorld from ClosedWorld.
Change-Id: I2db59cea5081fde2f0b35c6518d6b618df617ac1
Reviewed-on: https://dart-review.googlesource.com/57827
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-06-04 09:22:41 +00:00
Johnni Winther b75da964ef Move all type mask code to inferrer/typemasks and use it via an AbstractValueStrategy
Change-Id: Ib6f0089b0fee05488fea9295cbb5df944bb29d49
Reviewed-on: https://dart-review.googlesource.com/56980
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-05-31 16:15:32 +00:00
Emily Fortuna 49d5ca3bb4 Switch to BigInt for ConstantValue.
Change-Id: I17eec094d794b1c4791d491ea523d284f9eae4ed
Reviewed-on: https://dart-review.googlesource.com/55500
Commit-Queue: Emily Fortuna <efortuna@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2018-05-22 01:04:41 +00:00
Johnni Winther 78f348b3d5 Don't export types/masks.dart from types/types.dart
To make uses of TypeMask explicit in the imports.

Change-Id: I7c0c2377b65720394dcda217e5e68a4e3f9a4e9c
Reviewed-on: https://dart-review.googlesource.com/55421
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-05-17 08:05:42 +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
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 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 8e885f4393 Remove CompileMode
Change-Id: I7622231c3c81152236d671324fa58816c540d5b4
Reviewed-on: https://dart-review.googlesource.com/53941
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-05-08 08:31:43 +00:00
Johnni Winther 235b81d045 Remove MockCompiler
Change-Id: I476cb39f8fed068d7c47a15486419783f599a285
Reviewed-on: https://dart-review.googlesource.com/53806
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-05-07 10:07:40 +00:00
Johnni Winther 7afa0812ee Implement strong mode open world strategy.
Implements a new strategy for closed world computation that takes
the static type of the receiver into account when processing dynamic
calls.

For this to work, the J-model needs to only contain live members,
meaning queries can no longer assume that a J-model member exists for
instance for JSString.split because it might not be live.

This is the initial implementation which only uses
ir.MethodInvocation.invocationTarget. Later we will use the static
type of the expression on ir.MethodInvocation, ir.PropertyGet, and
ir.PropertySet.



Change-Id: I2dcc5a9148f27127d4e89c414a7d24f90f9cf2a4
Reviewed-on: https://dart-review.googlesource.com/48480
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-04-23 07:58:12 +00:00
Stephen Adams 32df3387f2 Fix the output type of HNegate.
TBR=sigmund@google.com

Change-Id: If5875aac80f111bb95852ad4d9f568dadf4f9d65
Reviewed-on: https://dart-review.googlesource.com/51980
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2018-04-19 20:18:38 +00:00
Johnni Winther c5f69dff2d Include call on Closure in inference
Closes #32835

Change-Id: Ief2096544e01f74e6cc52abd6131a24a10ffe75f
Reviewed-on: https://dart-review.googlesource.com/50680
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-04-13 08:46:26 +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 99feac38cc Move unittests
Change-Id: I23972b65cd839b9e535e4c483312c0e66b43d374
Reviewed-on: https://dart-review.googlesource.com/34820
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-01-17 10:29:16 +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
Johnni Winther 940f82bb8b Port unittests, #14 of ?
Change-Id: I6a16cf3cbaeafa2f4c58d617b1d6df9aefcc4afd
Reviewed-on: https://dart-review.googlesource.com/31781
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-01-03 08:37:09 +00:00
Johnni Winther 68e39ed6dc Split value_range_test and mark load_elimination_test as slow
Change-Id: I0becd6ddc9edd758f119436ec5ed6cdbde3c6359
Reviewed-on: https://dart-review.googlesource.com/31785
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2017-12-29 21:30:39 +00:00
Johnni Winther e6d4ee1cc4 Move unittests, part #13 of 13
Change-Id: I0001b681892a5f025339ef4822191a1c72b8ec83
Reviewed-on: https://dart-review.googlesource.com/31487
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2017-12-29 13:31:52 +00:00
Johnni Winther 50c0c38a60 Move unittests, #12 of ?
Change-Id: I218d69ecdefc7580ab192eb1aa36a0f000427c92
Reviewed-on: https://dart-review.googlesource.com/31485
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2017-12-29 13:02:07 +00:00
Johnni Winther e2b377c73f Move unittests, part #11 of ?
Change-Id: Id45adc172695b71716d5ef7019d688641ca828c4
Reviewed-on: https://dart-review.googlesource.com/31483
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2017-12-29 12:35:22 +00:00
Johnni Winther 399f0326c9 Move unittests, part #10 of ?
Change-Id: Ia346ac44c75b349b61c35e2e9816a7f3d92f04b4
Reviewed-on: https://dart-review.googlesource.com/31481
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2017-12-29 12:15:06 +00:00
Johnni Winther 410c3c4a69 Move unittests, part #9 of ?
Change-Id: Ief32bb619da08133a4247b2e4f80cad592f18d77
Reviewed-on: https://dart-review.googlesource.com/31423
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2017-12-29 11:40:45 +00:00
Johnni Winther cfcd796541 Move unittests, part #8 of ?
Change-Id: Ie89a0c733b80c4cfdd4d200b64f6fa2fcb6aedbc
Reviewed-on: https://dart-review.googlesource.com/31421
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2017-12-29 10:53:57 +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 452205c73d Move unittests, part #6 of ?
Change-Id: I328f5d1fdcd9489005236d8db39fe213cc08b1ce
Reviewed-on: https://dart-review.googlesource.com/31142
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2017-12-22 13:08:51 +00:00
Johnni Winther c563d7845b Move unittests, part #5 of ?
Change-Id: I38c6a3f9c6c2620cc893ddef23bdc1e3a8bcb411
Reviewed-on: https://dart-review.googlesource.com/31061
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2017-12-22 12:23:38 +00:00
Johnni Winther 6d40c7629e Move unittests, part #4 of ?
- add 'deferred' folder for deferred load tests

Change-Id: I60b07b09df80bf6c8d3df6dcec9bce12bdcbafb8
Reviewed-on: https://dart-review.googlesource.com/30862
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2017-12-21 10:24:49 +00:00
Johnni Winther 1fc66812bf Move unittests, part #3 of ?
- add 'async_await' folder for testing async/await transformation
- add 'codegen' folder for testing of generated code
- add 'end_to_end' folder for testing of command-line interaction

Change-Id: Ic262db98d6156175bf53fcc53443cc2b273dd404
Reviewed-on: https://dart-review.googlesource.com/30780
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2017-12-21 10:00:14 +00:00