Commit graph

16 commits

Author SHA1 Message Date
Mayank Patke c556766395 [dart2js] Expose JS_TRUE and JS_FALSE via dart2js_runtime_metrics.
dart2js already had an external function in foreign_helper called
JS_FALSE. This function is completely opaque until it is lowered to the
constant value `false` in SSA, so one can write `if (JS_FALSE())` in
order to ensure that the guarded code is treated as live and compiled,
but eventually tree-shaken and omitted from SSA and codegen.

This CL adds a JS_TRUE counterpart for completeness, and exposes both
JS_TRUE and JS_FALSE through package:dart2js_runtime_metrics.

Change-Id: I9b375fa37ada1b65fb9183902bb295e05fa6b8c5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/349704
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2024-02-09 18:38:55 +00:00
Mayank Patke 85037bf96d [dart2js, ddc] Clean up conditional imports in dart2js_runtime_metrics
This CL:
* adds empty dart:_dart2js_only and dart:_ddc_only libraries for use in
  conditional imports,
* updates pkg/dart2js_runtime_metrics to use the new libraries rather
  than dart:_dart2js_runtime_metrics and dart:js,
* and removes some unnecessary libraries, including VM-specific
  implementations in pkg/dart2js_runtime_metrics and the DDC
  implementation of dart:_dart2js_runtime_metrics.

Change-Id: I9500aa303fa5ad8aba0e1d413f69957c268f3f11
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/350681
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2024-02-09 18:38:55 +00:00
Nicholas Shahan 8a1e69063e [ddc] Update for extra null safety checks in RTI
- In development mode (DDC) the extra null safety errors will be thrown.
- Remove extra code paths that called unsound helpers.
- Fix expectations in weak_null_safety_errors_test.dart.

Change-Id: I107c602b0ae38b13038e501564cba9b8cfc58e70
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/329568
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2023-10-19 21:32:15 +00:00
Mayank Patke f9c3e48406 [dart2js] Add user-definable callback to report null safety diagnostics
Change-Id: Id57efb9fb6f329f8e0b81b773ec27598a2db862a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/328761
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2023-10-19 20:29:49 +00:00
Devon Carew aa17e57451 [pkg/async_helper] use package:lints/recommended.yaml
Also, commit a small tool to pkg/pkg.dart to classify the analysis options settings used by the various pkg/ packages.

Change-Id: I34087ed4d033cd2f679c378bcc9270ae65627ae2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/282392
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2023-02-15 02:45:33 +00:00
Sam Rawlins 35f0bb8187 Stop using strong-mode options in dart2js_runtime_metrics and scrape
Change-Id: I89347335d14ecf539fc7ea7fc44bd31680dbc458
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/275302
Reviewed-by: Jake Macdonald <jakemac@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2022-12-13 18:27:22 +00:00
Mark Zhou ad8d2ccb06 [dart2js] Updating runtime allocations to store a JSON-decoded map instead of a JSON string
This was requested by internal teams for easier querying/processing.

Change-Id: I59fea565f79bf92d4cf808cc0466b4e9cfa37fe8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/253707
Commit-Queue: Mark Zhou <markzipan@google.com>
Reviewed-by: Joshua Litt <joshualitt@google.com>
2022-08-06 00:02:37 +00:00
Devon Carew f7c46f145c [pkg] prefer 'any' deps for package dev dependencies
Tested: CI validation
Change-Id: If65cc156130a65ffe00c6f1660ac320e2921afae
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/246053
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2022-05-27 01:34:59 +00:00
Nate Bosch 6ebd2633cd Use any deps for all unpublished packages
It should not be necessary to ever run `pub get` for a package which is
not published. All packages used in the SDK are controlled by a single
package config, so it's not necessary to declare versions or paths for
any packages.

Remove all dependency overrides.

R=devoncarew@google.com

Change-Id: Icb328813b471f35ee4c99995f4e90aac4d8ed438
Tested: Covered by existing static analysis.
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/244767
Commit-Queue: Nate Bosch <nbosch@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
2022-05-17 01:22:25 +00:00
Mark Zhou f5f26c9c61 Revert "[dart2js] Exporting as package: to allow non-SDK usage"
This reverts commit 8aeeffb848.

Reason for revert: Bad fix. Doesn't resolve underlying bug

Original change's description:
> [dart2js] Exporting as package: to allow non-SDK usage
>
> Change-Id: I0235f524904a1a4c54c83161eb51ab0277473d1e
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/244180
> Reviewed-by: Joshua Litt <joshualitt@google.com>
> Commit-Queue: Mark Zhou <markzipan@google.com>

TBR=markzipan@google.com,joshualitt@google.com

Change-Id: I0e2f8ff70c86ff1e69608f715fa5545419e63314
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/244182
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Auto-Submit: Mark Zhou <markzipan@google.com>
2022-05-10 02:54:34 +00:00
Mark Zhou 8aeeffb848 [dart2js] Exporting as package: to allow non-SDK usage
Change-Id: I0235f524904a1a4c54c83161eb51ab0277473d1e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/244180
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Mark Zhou <markzipan@google.com>
2022-05-10 00:34:32 +00:00
Mark Zhou a0b35de326 [dart2js] Moving runtime allocations to pkg:dart2js_runtime_metrics
* Stores runtime information on `$runtimeMetrics` instead of `$__dart_deferred_initializers__`
* Keys each app's runtime allocations onto self.runtimeMetrics.$currentScript

Change-Id: I6612fd2a5ac792bfcb7580ffe91d5391b80d5965
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/242507
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Mark Zhou <markzipan@google.com>
2022-04-29 21:48:41 +00:00
Devon Carew 2a20d4be24 [pkg] ensure each publishable package has a repository pubspec field
Change-Id: I06c0d10c87c3f329098352a7abe9ef9fa0b1532e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/241504
Reviewed-by: Kevin Moore <kevmoo@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2022-04-19 22:13:51 +00:00
Alexander Thomas 30beab0f43 [infra] Add OWNERS to the Dart SDK
* Add team "groups" in tools/OWNERS_<group name>.
* Add top-level OWNERS as a fallback.
* Add OWNERS for all top-level directories.
* Add OWNERS to all packages.

For additional background information see go/dart-sdk-owners.

TEST=No op until code-owners is enabled.
Bug: b/200915407
Change-Id: I7fe6116cc599c749cd50ca16151d6d6a801d99d7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/229147
Reviewed-by: Jonas Termansen <sortie@google.com>
2022-02-14 14:06:34 +00:00
Stephen Adams 66a2caea6a [dart2js_runtime_metrics] Allow exporting internal library
Change-Id: I4447e1f9c806ae28bf56720015f1741199c17281
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210063
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2021-08-12 22:47:22 +00:00
Stephen Adams 23b50dfa7d [dart2js] Add dart:_dart2js_runtime_metrics library and package
The internal dart:_dart2js_runtime_metrics library is accessed via
package:dart2js_runtime_metrics.

There is currently one API: startupMetrics.

On non-dart2js configurations the API is stubbed for ease-of-use.

Change-Id: I80c56a83fd166ec19c3846fb6937cf0440ed2c6b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/208563
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2021-08-03 18:25:00 +00:00