Commit Graph

117 Commits

Author SHA1 Message Date
Joshua Litt 20475fe5da [dart2js] Add script to start generating better tests for deferred_loading.
Change-Id: Iffe5b7010ad0ada09a9c99246bef6386f255586c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/188841
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2021-03-08 22:54:03 +00:00
Lasse R.H. Nielsen d352bc28b8 Remove (most) uses of the "non-nullable" experiment flag.
Since the flag is now enabled by default, there should be no mention of it.
There are still some uses in front_end/testcases that are not just removable
(it also uses `no-non-nullable`). There migth be more uses that are not
as easily found as grepping for `--enable-experiment

Removes two VM tests where fixing them meant they were just duplicating
the corresponding non *_2/ tests.
Fixes #44941

TEST= Large number of tests chaged.=(no-)?non-nullable`.

Change-Id: Ief755981ccde9a5482fcdf408c2929c74433a710
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/183688
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2021-02-12 17:16:54 +00:00
Joshua Litt 86e598808f [dart2js] Support reading closed world during codegen.
Change-Id: I6dd82cb7744b7053eac2afc2ef5206d176c2da26
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175320
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2020-12-08 17:49:54 +00:00
Joshua Litt cfccd80ef7 [dart2js] Break out closed world computation from global inference step.
Change-Id: Id743ad11344e94ebc56f732d5580c33ae8e45e46
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169123
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-11-09 21:35:14 +00:00
Joshua Litt f4b19b8c2a [dart2js] Support package json files in modular_test_suite.
Change-Id: I6a17b9604d2a3e01d822a4872a2560f0aff0a63c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152361
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-06-26 15:08:52 +00:00
Leaf Petersen d44457f79d [Core Libraries] Eliminate the fork in the core libraries.
Move the nnbd core libraries from sdk_nnbd to sdk, and updates
references in build files and elsewhere accordingly.

Change-Id: I09760fe1e006657aacdfe80f3b22fdf6f7e30a9f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151121
Commit-Queue: Leaf Petersen <leafp@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2020-06-16 23:37:36 +00:00
Stephen Adams 60ec2b31e6 [dart2js] More sharding of rti_need and rti_emission tests
Both are now sharded 4-ways, which should reduce the individual shards
to about 2 minutes.

Change-Id: I5e8a718a0b5c58b0850015bee76f10df26aee84d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151141
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2020-06-15 16:32:25 +00:00
Joshua Litt 107862e2bf [dart2js] Fix bug in modular_test_suite.
Change-Id: I37954e14e8b53e70e0cfc4c3bcfb216e9f4d482f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148000
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-05-28 21:30:36 +00:00
Joshua Litt 20faaa5d94 [dart2js] Move dart2js unit tests to pkg/compiler/test.
Change-Id: Ib18f554c1076f27a3f7c0df5a36410da41a1f467
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148784
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-05-28 18:51:11 +00:00
Joshua Litt 9eea15e50e [dart2js] Delete generate_kernel.
Change-Id: I2261944a1ef9292d64c6d3b927eb8b55f4b274ba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148231
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2020-05-19 00:11:09 +00:00
Johnni Winther 25060e63c6 [cfe] Add tool for updating all id-tests and expectation tests
Change-Id: I191ebe0d59d44055a6818505db0112d3a452bdbb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141242
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2020-03-27 14:52:20 +00:00
Jens Johansen 6b4c4faf28 [CFE] Combine 'inputSummaries' and 'linkedDependencies'
The two fields are already treated the same, so having two is just
confusing.

Change-Id: I649db2a77bced62429dfd94ab300673cf886e367
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138291
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2020-03-05 12:38:34 +00:00
Jens Johansen 81d4ac07d4 [CFE] Use package config v2
Change-Id: I32da9e8b2c1040db1521af4345f8e952c22bd30d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130864
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-02-12 10:07:25 +00:00
Johnni Winther 99e2a348b3 [dart2js,cfe] Move filenames.dart to _fe_analyzer_shared
... and use it fix perf_test on Windows

`currentDirectory` is replaced by `Uri.base` (the former sounded more magical than it was!)

Change-Id: I5fb8dc5dba004ebad221d4b39d213d51964c5ea2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131622
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-01-15 10:12:23 +00:00
Johnni Winther 2c6f779a76 [cfe] Remove legacyMode
Change-Id: I9384631af94feaf1a345958ff23e6d35c2ba4049
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116202
Reviewed-by: Jens Johansen <jensj@google.com>
2019-09-13 07:38:25 +00:00
Johnni Winther 19654f30d0 [cfe+vm+ddc] Return ClassHierarchy and CoreTypes together with Component
Users of the CFE often need the ClassHierarchy and may CoreTypes after
invoking the CFE. This CL extends the result of `kernelForProgram` and
`kernelForComponent` to a `CompilerResult` that includes these objects.

Change-Id: I08491198fe876b6514e49993ad794388d6662c9c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/112259
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2019-08-09 13:02:12 +00:00
Johnni Winther 972d4e9a75 [cfe] Move relativize code from dart2js to cfe
Change-Id: I2e07dcf91adf65965583189972b0c27cc0aee526
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111427
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2019-08-01 21:07:50 +00:00
Sigmund Cherem efaec6449d Add --use-sdk support for dart2js and ddk modular tests
This allows the test runners to use snapshots instead of using the compilers
directly from source.

Change-Id: I70664a740bed8de647adb658bd521cd574aa685e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/104385
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-06-07 21:54:56 +00:00
Sigmund Cherem f6d67a549b Turn ddc and dart2js modular tests into suites and share their test cases
For this to work properly, we first need the test infrastructure to have support
for the `--output-directory` flag (see base CL)

Change-Id: I75f788d19ad3b4e9523830250c4a1c9de8418cda
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/104400
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-06-07 21:54:56 +00:00
Johnni Winther 9f9f10ad97 Use cached serialization of source-information
This reduces the size of the serialized codegen data by 20-25%

Change-Id: I85424576d68b72a56c3c924fe704a086000bc926
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103534
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2019-05-24 07:38:13 +00:00
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
Sigmund Cherem a8c94d0b52 Remove tools we no longer need to manage status files
Change-Id: Ia106c48cdbecaa8eec722ee11cbc9b6813989477
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96860
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2019-03-14 19:16:24 +00:00
Nate Bosch 69a4f20347 Add override annotations consistently
This makes it easier to follow class hierarchies and understand where a
class is changing the interface. I hit this when I found a class that
had the annotation on some methods it was overriding, but not all, which
made it confusing.

Prepares for adding the lint rule and enforcing it.

40% of overridden methods were annotated - add annotations to the remaining 60%.

Change-Id: I02472f4b6c5026a820cf9ff1a7ada663a60f1868
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96666
Commit-Queue: Nate Bosch <nbosch@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2019-03-13 22:36:11 +00:00
Stephen Adams 99a9ae66c3 [dart2js] run dartfmt --fix-doc-comments on stragglers
Files outside of pkg/compiler/lib/src

TBR=sigmund@google.com

Change-Id: Ic322c7bcca2e0203bdc48f06abdc69842724ae29
Reviewed-on: https://dart-review.googlesource.com/c/89165
Auto-Submit: Stephen Adams <sra@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2019-01-11 22:19:06 +00:00
Sigmund Cherem 811cea75db Remove lingering references to async-async
Change-Id: Id8613a567c8397e745217480535d9415fbb6e025
Reviewed-on: https://dart-review.googlesource.com/c/87164
Auto-Submit: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2018-12-13 08:38:10 +00:00
Kevin Millikin a8493e1b50 Flip the default value of the Kernel syncAsync flag
In Kernel's TargetFlags, this flag still defaulted to false.  Flip the
default to true and update all client code in the SDK.  The
expectation is that many of the places that now pass false explicitly
really just want the default, but that will be verified separately and
then the flag will be removed.

Change-Id: I2a38eb53f280f21f59bb1d2e88c42516f827fd39
Reviewed-on: https://dart-review.googlesource.com/c/85448
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Kevin Millikin <kmillikin@google.com>
2018-12-12 14:23:54 +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
Bob Nystrom f6ca2c1d8f Remove the Dart 1 tests.
This deletes:

tests/co19
tests/corelib
tests/html
tests/isolate
tests/language
tests/lib

It does not delete tests/standalone because apparently there are tests
in there that are not in standalone_2. (I assume they were added after
the test migration. I don't know why they were added there.)

I have tried to remove references to the old tests from various scripts
and tools but may have missed some. (As you can imagine, grepping for
"lib" does not have the best signal-to-noise ratio.)

"It was a pleasure to burn. It was a special pleasure to see things
eaten, to see things blackened and changed. With the brass nozzle in his
fists, with this great python spitting its venomous kerosene upon the
world, the blood pounded in his head, and his hands were the hands of
some amazing conductor playing all the symphonies of blazing and burning
to bring down the tatters and charcoal ruins of history."

- Ray Bradbury, Fahrenheit 451

Change-Id: If3db4a50e7a5ee25aff8058b1483e2ce8e68424e
Reviewed-on: https://dart-review.googlesource.com/c/75420
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: William Hesse <whesse@google.com>
Reviewed-by: Terry Lucas <terry@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-10-11 23:45:18 +00:00
Peter von der Ahé 8c872e0e3a Remove TargetFlags.strongMode
Change-Id: Ibf8661e5444d16666c54f1d81c626893b000521a
Reviewed-on: https://dart-review.googlesource.com/c/78986
Commit-Queue: Jens Johansen <jensj@google.com>
Auto-Submit: Peter von der Ahé <ahe@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2018-10-10 12:11:41 +00:00
Peter von der Ahé 248954117a Consolidate dart2js front-end dependencies
Also, convert dart2js to use onDiagnostic.

Change-Id: Ifdf89349eaf2ebe8cfcd1994712b3d1be2dd4197
Reviewed-on: https://dart-review.googlesource.com/77400
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2018-10-02 12:34:28 +00:00
Stephen Adams 75f485d6d9 [dart2js] Fix for issue 33500
Fix check for whether to lower JSArray.add to Array.push.

Change-Id: I22149bf7d31442b8a4bba6b6431239f5f031e55b
Reviewed-on: https://dart-review.googlesource.com/61104
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-06-20 05:07:32 +00:00
Lasse R.H. Nielsen 973a1a0219 Remove uses of upper-case constants in remaining SDK code.
This includes Fasta, tools and observatory, so the checked-in SDK must
have the lower-case constants.

Change-Id: I8380ad041ad058f7d02ae19caccfecd434d13d75
Reviewed-on: https://dart-review.googlesource.com/50201
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2018-04-16 16:11:57 +00:00
Sigmund Cherem 07d2c9f287 Add server category for dart2js
Change-Id: I077da86aff4420aba1323e98d6cde08ac871f6f1
Reviewed-on: https://dart-review.googlesource.com/47721
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2018-03-23 00:40:55 +00:00
Peter von der Ahé 4f2bdff90b Rename Program to Component
Change-Id: I1a3cc03fba9783807fa637a9d42fdbad68ee7686
Reviewed-on: https://dart-review.googlesource.com/31040
Commit-Queue: Peter von der Ahé <ahe@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2018-03-15 12:22:23 +00:00
Peter von der Ahé 8a9956d4a7 [dart2js] Handle Windows file names correctly.
Closes https://github.com/dart-lang/sdk/issues/31899

Change-Id: I0577e9cd5bab7083df53ccbee7ffb2258f08a442
Reviewed-on: https://dart-review.googlesource.com/46080
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Peter von der Ahé <ahe@google.com>
2018-03-13 09:15:48 +00:00
Sigmund Cherem 1ce131b317 fix section for update_from_log
TBR=sra@google.com

Change-Id: I60465498268cb7e8ffd5d824df70f794aa911613
Reviewed-on: https://dart-review.googlesource.com/44662
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2018-03-02 01:33:18 +00:00
Sigmund Cherem 9ed595b4b3 Use $fasta instead of $dart2js_with_kernel in our status files.
Note: $fasta is true when passing --dart2js-with-kernel. This change will make it
easier to flip the default: the plan is that $fasta will be true by default
later on, and passing --dart2js-old-frontend will make it false.

TBR=sra@google.com

Change-Id: Ib917d55b2d14db954c56513af057dd9a37b9c825
Reviewed-on: https://dart-review.googlesource.com/44601
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2018-03-01 21:02:18 +00:00
Johnni Winther c0e7f53041 Convert update_all.sh to a real language
Change-Id: I2b503694dab5b4d3f49f55bd83b9fb405b0f119b
Reviewed-on: https://dart-review.googlesource.com/34460
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-01-12 22:04:00 +00:00
Sigmund Cherem 7139df0e38 Add strong sections to language_2 and corelib_2, and change to run dart2js in
strong mode for those two suites

Bug:
Change-Id: I5e7b07c9497afd9f9f65fd0de609d5587d3bd9f1
Reviewed-on: https://dart-review.googlesource.com/33120
Reviewed-by: Emily Fortuna <efortuna@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2018-01-08 21:08:05 +00:00
Emily Fortuna 8ba52663d6 Update status script with the new canonical way of specifying test statuses.
Bug:
Change-Id: Id8ccd310a7f81a021788059ebea8590c3d20c203
Reviewed-on: https://dart-review.googlesource.com/27402
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2017-12-07 20:37:07 +00:00
Paul Berry b53e4e4302 Fix update_from_log.dart when the next section is preceded by a commented-out line.
Change-Id: I9b88279e73de783323bba6617ad00dbc24e81d45
Reviewed-on: https://dart-review.googlesource.com/26042
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2017-12-04 20:59:34 +00:00
Jens Johansen 22d0696d91 [CFE] Move front-end API under src/
This CL deprecates the front-end API and moves it into src/api_prototype.

For now all usages have been updated to point to the new location,
but they should be updated to use custom-client invocations instead (e.g.
one specific way for DDC, another for dart2js etc.)

Bug:
Change-Id: I9b4f41f6ebf55d42510fd35240d942d1dc7292d6
Reviewed-on: https://dart-review.googlesource.com/24822
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2017-12-01 08:42:16 +00:00
Sigmund Cherem 89aa45f7c7 Fixes in status-update script:
* Off by one error
 * Re-sort records: this explains why sometimes we inserted records in the wrong
   place.

TBR

Change-Id: Ie6bb404cc120cc4caced973a1e2f34dc5f55b835
Reviewed-on: https://dart-review.googlesource.com/21788
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Emily Fortuna <efortuna@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2017-11-18 01:43:46 +00:00
Emily Fortuna d74e73d320 Fix the CQ -- gardening.
Bug:
Change-Id: If667c3f74e1314ec195a9a6edf64b6964fd334d2
Reviewed-on: https://dart-review.googlesource.com/21785
Reviewed-by: Emily Fortuna <efortuna@google.com>
2017-11-17 23:01:54 +00:00
Sigmund Cherem ba88fa0ad8 Add support to attach a message to the status file
Change-Id: Ia8b31040696fa597ce607f620b9d7a62713a2cb4
Reviewed-on: https://dart-review.googlesource.com/21780
Reviewed-by: Paul Berry <paulberry@google.com>
2017-11-17 20:36:03 +00:00
Sigmund Cherem 5b957000a8 Add script to update status files for dartk/dartkp in strong mode automatically.
This generalizes the dart2js script and adds a wrapper shell script to invoke
it.

Change-Id: I36e83f92204adc9f655619693b5841366edacaa7
Reviewed-on: https://dart-review.googlesource.com/21704
Reviewed-by: Paul Berry <paulberry@google.com>
2017-11-17 19:37:13 +00:00
Emily Fortuna c7dadec876 Capture this and type variables in closures in checked mode when needed.
Bug:
Change-Id: I9e3bbc658590bcb6ec04cff4323cc2a97c20fc6b
Reviewed-on: https://dart-review.googlesource.com/21321
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Emily Fortuna <efortuna@google.com>
2017-11-16 21:22:41 +00:00
Emily Fortuna bf94e73568 Fix up type inference to run in checked mode and enable checked mode tests running with kernel script.
Bug:
Change-Id: If720b6868fbdf010f4aac614ceea1ddea533c277
Reviewed-on: https://dart-review.googlesource.com/21222
Commit-Queue: Emily Fortuna <efortuna@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2017-11-15 22:34:51 +00:00
Emily Fortuna 035c85580b Make fast-startup work with kernel!
Bug:
Change-Id: I88bf7fd7609bc816cc6d50daaa7e3a0ec5dc1934
Reviewed-on: https://dart-review.googlesource.com/19403
Commit-Queue: Emily Fortuna <efortuna@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2017-11-09 01:37:25 +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