Commit Graph

1060 Commits

Author SHA1 Message Date
Sigmund Cherem b1b9378f6b [ddc]: fix worker_test to run in windows
Change-Id: I882654acf1cdf67cec64efa9c4fdb3ecaba83b50
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/230826
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2022-01-29 00:45:22 +00:00
Sigmund Cherem 93e87899f4 [ddc] delete unused/unsupported internal scripts to run ddc.
All internal development uses pkg/dev_compiler/tool/ddb instead

Change-Id: I1a3cd9cef48063be16b2aa0c3bcb950e4c2b248d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/229305
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2022-01-27 21:13:41 +00:00
Nicholas Shahan 8ac87895fe [ddc] Migrate AssetFileSystem to null safety
Change-Id: Icf79bb882a863e333cc30620a1b0a5154763cdd0
Issue: https://github.com/dart-lang/sdk/issues/46617
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/223280
Reviewed-by: Anna Gringauze <annagrin@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2022-01-10 21:58:03 +00:00
Nicholas Shahan 427c83345a [ddc] Enable null safety in module_symbols library
Also migrate the library test and the module_symbols_collector library.

Change-Id: Id00ac050e8f36ed7016b6d1d49b10fa4297aaeb6
Issue: https://github.com/dart-lang/sdk/issues/46617
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/216760
Reviewed-by: Anna Gringauze <annagrin@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2021-12-10 18:51:30 +00:00
Sam Rawlins 976cffc4c2 Use strict-casts in js and dev_complier
strict-casts is mostly a drop-in replacement for the deprecated
`implicit-casts: false` option. One big difference, seen in this CL, is that
strict-casts will report a non-Iterable (or non-Stream) in a for-each loop.

Change-Id: Ibc463ae9c870b6a795483c5dea0d2b856e7fd883
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221546
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2021-11-29 23:22:44 +00:00
Johnni Winther 87c953bd0c [cfe] Pass class hierarchy and core types through IncrementalCompilerResult
TEST=existing

Change-Id: I78a61147998a630d88997e0cebccb3e815592822
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221088
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2021-11-25 11:27:29 +00:00
Johnni Winther e92e60da78 [cfe] Change computeDelta to return a result object
This prepares for returning more that just the component from an
incremental compilation.

TEST=existing

Change-Id: I3ee269083290097f1a92d77d105b607a6a02f1f9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221086
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2021-11-25 10:15:07 +00:00
Nicholas Shahan e4c63ce59f [ddc] Use same options when emitting module and JS
In the test suite, the options passed to the two phases of the
compile drifted apart. Some were false when compiling the module
but true when printing that module as Javascript. This surfaced
when some unused portions were migrated to null safety.

Change-Id: I2d5c648bc53e5c9fe3f014446393d0f893bd5382
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/218181
Reviewed-by: Anna Gringauze <annagrin@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2021-11-10 23:12:56 +00:00
Kevin Moore cc7fcb5f70 dev_compiler: migrate to pkg:lints
Change-Id: I0111e74d312f6d3aeebb80f017a4f48fc6186109
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/218220
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
2021-10-27 23:15:56 +00:00
Nicholas Shahan e7faaaf85d [ddc] Surface compile time errors in tests
- Module symbols tests now surface compile time errors from the
  code under test.
- Fix errors in the code being tested.

Change-Id: Ica549c710f41ee22ac784fba99f9e12be664ac5f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/217024
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2021-10-19 22:18:33 +00:00
Nate Bosch f9c68a5679 Replace a bunch of references to .packages
Most of these arguments are flowing through to a `--packages` argument
which allows passing the `package_config.json` file. In the long term we
should remove the `.packages` file entirely.

TEST=None, the change should have no visible impact.

Change-Id: I60a8b175d5e217a85588bbcb91cc5095514066b4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/211503
Auto-Submit: Nate Bosch <nbosch@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2021-10-12 20:16:15 +00:00
Nicholas Shahan 198dc43075 [ddc] Migrate module_metadata to null safety
* Migrate the library and tests.
* Update comments per effective dart recommendations.

Change-Id: Ibc8da1fe68c977fb3c084208b96734354ad2705b
Issue: https://github.com/dart-lang/sdk/issues/46617
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/215122
Reviewed-by: Anna Gringauze <annagrin@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2021-10-05 22:57:42 +00:00
Nicholas Shahan ea4302d029 [ddc] Add constructor symbol information
- Adds tests for various types of constructors.
- Recognize when a constructor is const and mark the class symbol
  accordingly.

Change-Id: I9ae7fc2837a6821b196f06a267603fd18c3e5075
Issue: https://github.com/dart-lang/sdk/issues/40273
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/208362
Reviewed-by: Anna Gringauze <annagrin@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2021-10-01 22:57:09 +00:00
Nicholas Shahan bb4e445b6e [ddc] Add expression evaluation tests
* Tests constructor tear off values and calling torn off constructors.
* Covers default, named, redirecting, and factory constructors at break
  point locations in a method, global function, and inside the default
  constructor.
* Create new test suites for legacy code (Dart language version 2.11)
  in amd and ddc module systems.
* Sound and Unsound suites now run code without a Dart language comment.

Change-Id: I9cf16c258ce6ece7c436f9deb044ed821f980d1b
Fixes: https://github.com/dart-lang/sdk/issues/47214
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214866
Reviewed-by: Anna Gringauze <annagrin@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2021-09-29 19:33:32 +00:00
Nicholas Shahan 6c4593929f Reland "[ddc] Add web library environment variables"
This is a reland of fb36bba5f2 with
a fix to the ordering to ensure all the expectations run.

Original change's description:
> [ddc] Add web library environment variables
>
> Ensure frontend server builds for the `DevCompilerTarget` add the
> environment variables needed for `bool.fromEnvironment()` calls for
> conditional imports.
>
> Change-Id: Ifd372c1cf385fc843534d85af1ac9ae75a6285b8
> Fixes: https://github.com/dart-lang/sdk/issues/47207
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213802
> Commit-Queue: Nicholas Shahan <nshahan@google.com>
> Reviewed-by: Johnni Winther <johnniwinther@google.com>

Change-Id: Id88aeaf0ddc783936d413c06099df031bc7cb0a7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214224
Reviewed-by: Anna Gringauze <annagrin@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2021-09-22 23:47:40 +00:00
Nicholas Shahan d0e013b49a Revert "[ddc] Add web library environment variables"
This reverts commit fb36bba5f2.

Reason for revert: New test fails on windows configurations.

Original change's description:
> [ddc] Add web library environment variables
>
> Ensure frontend server builds for the `DevCompilerTarget` add the
> environment variables needed for `bool.fromEnvironment()` calls for
> conditional imports.
>
> Change-Id: Ifd372c1cf385fc843534d85af1ac9ae75a6285b8
> Fixes: https://github.com/dart-lang/sdk/issues/47207
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213802
> Commit-Queue: Nicholas Shahan <nshahan@google.com>
> Reviewed-by: Johnni Winther <johnniwinther@google.com>

TBR=johnniwinther@google.com,nshahan@google.com,annagrin@google.com

Change-Id: Iedfc4c1a5b24b515646d4f1b486bcb2f19bb7783
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214222
Reviewed-by: Anna Gringauze <annagrin@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2021-09-22 21:33:26 +00:00
Nicholas Shahan fb36bba5f2 [ddc] Add web library environment variables
Ensure frontend server builds for the `DevCompilerTarget` add the
environment variables needed for `bool.fromEnvironment()` calls for
conditional imports.

Change-Id: Ifd372c1cf385fc843534d85af1ac9ae75a6285b8
Fixes: https://github.com/dart-lang/sdk/issues/47207
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213802
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2021-09-22 20:39:44 +00:00
Sam Rawlins d6f0e39f30 Remove redundant import from dev_compiler
Bug: https://github.com/dart-lang/sdk/issues/44569
Change-Id: Iab83d15b0f6c5448b75881fcba8c8ea177feab71
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213852
Auto-Submit: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2021-09-20 16:37:41 +00:00
Anna Gringauze df4671a77a Split expression compiler worker tests
Expression compiler worker tests sometimes reach the timeout limit
on CI machines, split them into two batches.

Closes: https://github.com/dart-lang/sdk/issues/45484
Change-Id: I502de5d768f29be862e593379e3a906ec6c21eb0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213734
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Anna Gringauze <annagrin@google.com>
2021-09-17 20:28:41 +00:00
Jens Johansen 211ad9acb1 [CFE] Don't mark procedures as async when not using await
This CL removes async markers where await wasn't used.

In a few cases this also meant the ability to make the procedure not
return a future at all.

Also - at least on the VM with my benchmark run on my PC - returning
new Future.value(whatever) in a non-async procedure is faster than
returning whatever in an async procedure.

TEST=CI and existing tests.

Change-Id: I4ba888313c87de76bb0ca02c19eb1ab45f168a85
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213480
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2021-09-17 11:56:29 +00:00
Ahmed Ashour f1ded6af56 Remove import dart:core
Fixes #47092

TEST=existing

Change-Id: I3c5c0a1ec5e0426642a5dc70aa9a0391a143ed93
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212298
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2021-09-06 11:57:40 +00:00
Nicholas Shahan 5ea90ee907 [ddc] Enable construtor tearoff lowering
* Update tearoff runtime equality algorithm with newly specified
  requirements.
* Update kernel golden files for the dartdevc target to include
  the static method lowering for constructor tearoffs.
* Avoid adding source maps and debug symbols to the static methods
  created by the CFE lowering.
* Add additional expected non-nullable values detected in the
  nullable inference tests. These correspond to the values that
  appear in the static method return statements.

Measurements taken from large applications show the lowering causes
a code size increase of 2.5%-3.5%. That increase did not appear to
create any measurable difference in initial page load time but if
there turns out to be a regression we can revisit each of the various
lowerings to implement support in DDC at the site where the constructor
is torn off.

Fixes: https://github.com/dart-lang/sdk/issues/46486
Fixes: https://github.com/dart-lang/sdk/issues/46837
Change-Id: I01fa39d4f1d0e937919dd1466bb6a34c91a10e75
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/206960
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Mark Zhou <markzipan@google.com>
Reviewed-by: Anna Gringauze <annagrin@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2021-09-03 17:48:58 +00:00
Johnni Winther b3af778a38 [cfe] Add UnresolvedKind for fine grained unresolved reporting
- including tests for issues 46719 and 46887

Change-Id: I601fcfcb956e059f502cbece29fb2a6a00f68846
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210464
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2021-08-25 09:51:54 +00:00
Mark Zhou 86655608c0 [dartdevc] Refactoring expression eval tests.
* Splitting expression eval tests into separate tests per module system to avoid timeouts
* Adding some extra timeouts to various Chrome operations in the e2e suite
* Running in non-headless Chrome on Windows to avoid strange flakiness problems
* Minor test suite reformatting

For timeouts, see: https://dart-review.googlesource.com/c/sdk/+/208347/21..22

Fixes #45713

Change-Id: Id51d412da1ffc66b443c73cdb50daa777bdce929
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/207562
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Anna Gringauze <annagrin@google.com>
Commit-Queue: Mark Zhou <markzipan@google.com>
2021-08-04 16:46:28 +00:00
Anna Gringauze 388e365d2f Fix failures in expression compiler worker test
Closes: https://github.com/dart-lang/sdk/issues/46786
Change-Id: Ib2ec6130908fb6d4327a49d1b32c3789d52633ae
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/208720
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Anna Gringauze <annagrin@google.com>
2021-08-03 18:41:31 +00:00
Anna Gringauze d135395e21 Limit simultaneous connections on http client in AssetFileSystem
- Use one client to communicate to asset server in AssetFileSystem
- Set maxConnectionsLimit to 200 on the client to prevent broken sockets.
- Lower the retry count on the http client in AssetFileSystem to 4 to
  for faster turnaround, now that we have less breaking connections.
- Update tests not to hold onto all the connections while waiting for
  simultaneous reads to finish.

Related: https://github.com/dart-lang/webdev/issues/1345
Related: https://github.com/dart-lang/sdk/issues/46647
Change-Id: I36a453c3889353c66b8939d3d44868cf63badc17
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/208243
Reviewed-by: Nate Bosch <nbosch@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Anna Gringauze <annagrin@google.com>
2021-07-30 19:19:07 +00:00
Nicholas Shahan 7a2f1adebe [ddc] Add function symbol information
- Collects `FunctionSymbols` for top level functions, getters, setters,
  as well as class methods, getters and setters.
- Add test cases.

Change-Id: If26c59e920c3e6e914c7f06e3b725afdf048c4e1
Issue: https://github.com/dart-lang/sdk/issues/40273
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/207100
Reviewed-by: Anna Gringauze <annagrin@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2021-07-29 16:46:45 +00:00
Nicholas Shahan 9cf61baf57 [ddc] Update webkit_inspection_protocol dep
- New version has been migrated to null safety.
- Update tests that are currently broken. It looks like a CFE bug
  was fixed and now the private static fields are accessible.

Change-Id: I3d9bde85b65c0e219f756df2d9531539eb7f732b
Issue: https://github.com/dart-lang/sdk/issues/46617
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/207382
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2021-07-20 19:44:01 +00:00
Sam Rawlins e681abace9 Remove unnecessary imports
TEST=N/A

Change-Id: I7440c1165a7403aad023f002a97c90572cb66c59
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/205820
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2021-07-15 16:57:21 +00:00
Anna Gringauze bf991997f9 Make RetryTimeoutCient retry requests on 500
We use `package:shelf/shelf_io.dart` to serve the requests,
which in turn uses `package:shelf_proxy/shelf_proxy.dart` as
an inner request handler.

On exception (such as seen in the webdev CI failures) the shelf_io
returns 500 response, which is currently is not causing a retry in
RetryTimeoutClient.

This change adds retries on 500.

Add tests with server returning InternalServerError.

Closes: https://github.com/dart-lang/webdev/issues/1345
Change-Id: I73470d73fb5651edee4bf2033ae514930bfe28c2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/206581
Commit-Queue: Anna Gringauze <annagrin@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
2021-07-13 02:43:15 +00:00
Anna Gringauze c32bc3c99f Make AssetFileSystem fault-tolerant
Recent flakes in webdev CI show failures to load dill files
due to broken sockets (most likely caused by connection timeouts).
This change adds retries and timeouts to the asset server file
system to make it tolerant to breaking connections.

- Add RetryTimeoutClient wrapper for HttpClient that performs
  retries with delays and connection/response timeouts, based
  on the idea in
  https://github.com/dart-lang/http/blob/master/lib/retry.dart
- Make AssetFileSystem use the RetryTimeoutClient.
- Add tests for reading multiple files concurrently.
- Add tests for ExpressionCompilerWorker reading assets using
  standard, multiroot, and asset file systems.
- Simplify uri that AssetFileSystem uses to query the asset
  server, since we no longer need to load package uris.
  This will eliminate a step in uri translation in dwds.

- Validated that changes do not break google3 manually.

Change-Id: I2ff163b8d99cd0b7551f3f33a71e6b306540e3c9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204880
Commit-Queue: Anna Gringauze <annagrin@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2021-07-07 23:27:13 +00:00
Nicholas Shahan c4c7ef5e7d [ddc] Fix debug symbol id for private instance fields
There was an error in the test hiding the fact that we were not
collecting the names for private instance fields correctly.

Change-Id: I1af3d3c2cc9afb92844bc8ec657be1599f1d5b8a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/205761
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2021-07-02 15:52:19 +00:00
Mark Zhou a44b4f5b62 [dartdevc] Updating eval tests that check for internal Future state.
Fixes #46451

Change-Id: Iacf1b115d3c1b9372d0061c6dcbe370c36cea865
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204924
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Mark Zhou <markzipan@google.com>
2021-06-25 05:23:55 +00:00
Nicholas Shahan 8ff5176a77 [ddc] Avoid source maps on logical Not operator
Adding explicit source maps to the operator created a breakable location
when viewing source-mapped dart code in chrome devtools. There isn't a
breakable point in the javascript for a `!` operator so trying to enable
the breakpoint visible in the dart code would trigger some "other
breakpoint".

Recent changes in the V8 debugger have changed which "other breakpoint"
would be triggered.
https://chromium.googlesource.com/v8/v8/+/16b0767adc54de6e0154a0a8226e01efecfdbfbb

This causes our tests to fail and makes the user
interaction a little confusing. Removing the extra source map here seems
to be the most reasonable solution because it prevents a possible
breakpoint from appearing where there isn't a breakable location.

Now, the ! operator doesn't introduce any new source mapping it simply
continues the previous mapping.

Change-Id: I5903bfeaf1bcb2e2a3ce883433153575aa1fd05a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204742
Reviewed-by: Mark Zhou <markzipan@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2021-06-24 21:29:29 +00:00
Nicholas Shahan a076fc2ad0 [ddc] Add variable symbol information
- Collects `VariableSymbols` for global variables and class fields.
- Add test cases.

Change-Id: Id79d60d01f84948c4c7b0bf9e54fbdd232da63da
Issue: https://github.com/dart-lang/sdk/issues/40273
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204086
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2021-06-21 22:15:10 +00:00
Anna Gringauze 387333c5bb Keep connection open until http response is read in HttpAwareFileSystem
We are seeing CI flakes in webdev when using expression_compiler_worker
in tests involving expression evaluation, for example, see linux tests
for dwds in the following PR:

https://github.com/dart-lang/webdev/pull/1343

The logs show that HttpFileSystemEntity.exists fails due to a broken
pipe, which we suspect is due to http client closed too early.

This change is an attempt to fix the problem by
- logging exceptions thrown in expression compiler worker
- awaiting for the request to be read before closing http client in
  HttpFileSystemEntity.

TEST=pkg/dev_compiler/test/expression_compiler/asset_file_system_test.dart

See investigation of the CI issue in:
https://github.com/dart-lang/webdev/issues/1345


Closes: https://github.com/dart-lang/sdk/issues/46388

Change-Id: Iaf98f08e8ebb618bf8365bd497f01ae685f0d3f2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/203841
Commit-Queue: Anna Gringauze <annagrin@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2021-06-18 01:56:21 +00:00
Nicholas Shahan e36fbfd978 [ddc] Add basic symbol information for classes
Module symbol information now includes basic details the classes
compiled in the module.

Add tests and refactor to share some of the options for running the
incremental frontend compiler and ddc.

Change-Id: I6d3eb16bd6fb70c4c0af46de93a0f7bf96151c4f
Issue: https://github.com/dart-lang/sdk/issues/40273
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202865
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Anna Gringauze <annagrin@google.com>
2021-06-16 23:48:28 +00:00
Anna Gringauze 375dc2889b Reland "Emit empty symbols file under --emit-debug-symbols flag"
This reverts commit bca8a053e6.

Reason for revert: Issue found, fixed in this CL (by closing a file sink)..

Original change's description:
> Revert "Emit empty symbols file under --emit-debug-symbols flag"
>
> This reverts commit b666964948.
>
> Reason for revert: <Broke pkg-win-release bot, investigating>
>
> Original change's description:
> > Emit empty symbols file under --emit-debug-symbols flag
> >
> > Towards: https://github.com/dart-lang/sdk/issues/40273:
> > Change-Id: I9e735d7e77588ab6bc1c7e30176e2d96a0265a13
> > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202731
> > Reviewed-by: Nicholas Shahan <nshahan@google.com>
> > Commit-Queue: Anna Gringauze <annagrin@google.com>
>
> TBR=sigmund@google.com,nshahan@google.com,annagrin@google.com
>
> Change-Id: I4b26c26b6404519a1b46c1eca919455cb60ca5e8
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202869
> Reviewed-by: Anna Gringauze <annagrin@google.com>
> Reviewed-by: Nicholas Shahan <nshahan@google.com>
> Commit-Queue: Anna Gringauze <annagrin@google.com>


Change-Id: Iaba56e82a5c5500437b98c3f69066a2f53f6ee4e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/203000
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Anna Gringauze <annagrin@google.com>
Commit-Queue: Anna Gringauze <annagrin@google.com>
2021-06-09 20:57:02 +00:00
Anna Gringauze bca8a053e6 Revert "Emit empty symbols file under --emit-debug-symbols flag"
This reverts commit b666964948.

Reason for revert: <Broke pkg-win-release bot, investigating>

Original change's description:
> Emit empty symbols file under --emit-debug-symbols flag
>
> Towards: https://github.com/dart-lang/sdk/issues/40273:
> Change-Id: I9e735d7e77588ab6bc1c7e30176e2d96a0265a13
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202731
> Reviewed-by: Nicholas Shahan <nshahan@google.com>
> Commit-Queue: Anna Gringauze <annagrin@google.com>

TBR=sigmund@google.com,nshahan@google.com,annagrin@google.com

Change-Id: I4b26c26b6404519a1b46c1eca919455cb60ca5e8
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202869
Reviewed-by: Anna Gringauze <annagrin@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Anna Gringauze <annagrin@google.com>
2021-06-09 16:45:13 +00:00
Anna Gringauze b666964948 Emit empty symbols file under --emit-debug-symbols flag
Towards: https://github.com/dart-lang/sdk/issues/40273:
Change-Id: I9e735d7e77588ab6bc1c7e30176e2d96a0265a13
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202731
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Anna Gringauze <annagrin@google.com>
2021-06-08 16:44:37 +00:00
Anna Gringauze 9b56b4b858 Initial symbols format version and tests
Towards: https://github.com/dart-lang/sdk/issues/40273
Change-Id: Id784e1341ed2d41111a71aaafd849325335a9e21
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202303
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Anna Gringauze <annagrin@google.com>
2021-06-04 18:21:27 +00:00
pq 46909507a6 fix sort_directives violations
See: https://dart-review.googlesource.com/c/sdk/+/196026

TEST=Code cleanup exclusively (sorting imports); no new tests.

Change-Id: I0d419bbeb73f0763175dd29eadfd84e3d0290af5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196223
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2021-04-21 00:13:48 +00:00
pq a6e3008ded fix sort_directives violations
See: https://dart-review.googlesource.com/c/sdk/+/196026

TEST=Code cleanup exclusively (sorting imports); no new tests.


Change-Id: Ib07a82ff418138c542d6a83cfab9aabbb285f866
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196180
Auto-Submit: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2021-04-20 22:21:28 +00:00
Nicholas Shahan 825b59ae6d [ddc] Source map fixes for debugger calls
- Fixes calls that pass `when` or `message` arguments
- Updates location information on the expression statement versions to
  point to the beginning of the `debugger()` call instead of the `;` at
  the end of the line.

Change-Id: I56e6d3358a4a4f0f04b4087d062c513fa6729bd3

Issue: https://github.com/dart-lang/sdk/issues/45544
Change-Id: I31838b5877d139554e3aa39c9833fd83ae729a0e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195053
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2021-04-13 19:40:46 +00:00
Nicholas Shahan aaa66ed77e [ddc] Fix sourcemap on debugger statements
Add test file exercising the lack of distinct sourcemaps.

Change-Id: I35e099b2a91d5b6516adaa3cb034ab0b84262fed
Fixes: https://github.com/dart-lang/sdk/issues/45544
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194019
Reviewed-by: Mark Zhou <markzipan@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2021-04-07 18:04:27 +00:00
Mark Zhou 8b28475baa [dartdevc] Extending e2e eval tests to multiple module systems.
* Now tests both DDC + AMD module systems
* Porting more tests + purging them from the regular test
* Fixing a bug related to string-typed JS scope objects

Change-Id: I703d3760971ef8c14ef4157a71b364d8d3c22aaf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194080
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Mark Zhou <markzipan@google.com>
2021-04-06 22:22:43 +00:00
Mark Zhou febf16a3be [dartdevc] Adding expression compiler e2e test sanity checks.
Adding the dartdevc_test target to the pkg-linux-debug bot config since some of its tests require that the sound SDK be built. Also failing more gracefully if the expected dill is not found.

Change-Id: I5d2004a3a13d9f73dcb51afb3c68c0b7c18e614e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194108
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Mark Zhou <markzipan@google.com>
2021-04-06 18:25:12 +00:00
Mark Zhou 9361234cd2 [dartdevc] Splitting SDK eval e2e tests.
Adding 'dartdevc_test' target to pkg-X builders.
Splits eval tests into sound and unsound suites.
Adding more robust event polling (instead of just waiting 500 ms).
Turns on sound mode for the ported tests.
Also ports a couple more tests.

Change-Id: Ia8e9095e1e3330ea1732a4fa4f14425777de5127
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193446
Reviewed-by: Anna Gringauze <annagrin@google.com>
Commit-Queue: Mark Zhou <markzipan@google.com>
2021-04-05 16:57:36 +00:00
Mark Zhou 8590d3c615 [dartdevc] Porting more expression eval tests.
Also changing strings resolved from JS objects to be more like those seen in the Chrome console.

Change-Id: I52adf2add57822f296eb93b49028f75202e02c3c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193064
Commit-Queue: Mark Zhou <markzipan@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2021-03-26 00:04:04 +00:00
Nicholas Shahan 38e5e9bc19 [ddc] Update pedantic version to 1.11.0
Apply new lints, cleanup violations, and ignore in `lib/src/js_ast` to
avoid adding additional diffs with the version it was forked from.

Change-Id: I1def25865bf195120c594223ebdc0f59139e75b7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192241
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2021-03-24 17:35:32 +00:00