mirror of
https://github.com/dart-lang/sdk
synced 2024-10-14 17:59:39 +00:00
c556766395
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> |
||
---|---|---|
.. | ||
lib | ||
test | ||
analysis_options.yaml | ||
CHANGELOG.md | ||
LICENSE | ||
OWNERS | ||
pubspec.yaml | ||
README.md |
☠☠ Warning: This package is experimental and may be removed in a future version of Dart. ☠☠
dart2js
can generate extra code to measure certain activities.
This library provides access to the measurements at runtime.
An application might make timings and other measurements and report them back to
a server in order to collect information on how the application is working in
production. The APIs in this library provide access to measurements that require
help from dart2js. For example, startupMetrics
accesses measurements of
activities that happen as the program is loaded, before main()
.
The APIs are stubbed so that dummy values are returned on the VM and dartdevc.