Change-Id: I582f956cd4b712203c2f6dd630b4e1384040446d
Tested: analysis clean (this is a lint only related change)
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/329400
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
Adds an "eventLog" property to the global "$__dart_deferred_initializers__" object. The event log is just a JS Array that gets initialized alongside $__dart_deferred_initializers__.
Each event entry is a String->String JS object. I unified the format of these event objects for easier parsing.
Each printed event is now valid JSON (passed through JSON.stringify) so we can more easily post-process the logs if necessary.
Fully replacing the existing "_eventLog" field makes the logging logic simpler. Having a single array allows us to not include a timestamp because the array captures the event ordering (actual timing doesn't matter). It also makes it easier to stringify the logs when there's only 1 data source/format.
Sample output:
```
{"hunkName":"out.js_1.part.js","event":"loadHunk"}
{"uri":"path_to/out.js_1.part.js","hunkName":"out.js_1.part.js","event":"downloadHunk"}
{"file":"out.js_1","event":"beginLoadPart"}
{"file":"out.js_1","event":"endPartLoad","hash":"aCscY7yv4EHodRPmCqYn5BqMelA="}
{"uri":"path_to/out.js_1.part.js","hunkName":"out.js_1.part.js","event":"downloadHunkSuccess"}
{"hunkName":"out.js_1.part.js","hash":"aCscY7yv4EHodRPmCqYn5BqMelA=","event":"initialize"}
```
Change-Id: Ifee73be0bf7dc53a0e7710ff033dd2b0fae9fb0e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/307240
Commit-Queue: Nate Biggs <natebiggs@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
Change the calling convention of the sync* body to fix bugs and avoid allocations.
- Body takes the controlling _SyncStarIterator as a parameter.
- `yield` assigns directly to the `_current` field and returns.
- `yield*` calls a method on the controlling iterator (rather than returning the iterable). This avoids an allocation to wrap the iterable, a type test to distinguish `yield` from `yield*`, and allows the `get:iterator` call to happen in the dynamic scope of try-catch surrounding the `yield*` to that it will catch any exceptions.
- Avoid using IIFE to bind constants just to call the body.
- Use a dummy body to avoid the need to testing termination of the body.
Tests now passing:
co19_2/Language/Statements/Yield_and_Yield_Each/Yield_Each/execution_sync_t05
language_2/sync_star/move_past_end_test
language_2/sync_star/sync_star_exception_current_test
language_2/sync_star/sync_star_exception_iterator_test
language_2/sync_star/sync_star_exception_nested_test
language_2/sync_star/sync_star_exception_test
Bug: #51992
Change-Id: I397b470e121b8d71242ac28b3130637b78a1d0dc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/294685
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
Update the pkg/pkg.dart script to also include information about the size of the pkg/ packages (so we know ~how much code is on older analysis options sets).
Change-Id: Ief1b9a868752a01aef5dd95a4ce1c74795315bc4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/290615
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
A `RecordsCodegen` class collects the instantiated classes for
representing records of various shapes in the codegen queue. Later,
this is used to emit functions that test a record type by checking the
shape (using `instanceof`) and then testing the field values.
Future work will consider how to make this work with deferred loading.
Change-Id: I497a80b0db3a10129f15838eaa72c3a2320632b8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/279759
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
Add annotations
@pragma('dart2js:load-priority:normal')
@pragma('dart2js:load-priority:high')
The test shows that these annotations are scoped.
This CL is just plumbing the annotation through as an argument to the runtime call to the code that implements `loadLibrary()`. Actual prioritization is not yet implemented.
Change-Id: Iff1404baf34192139dab95e2dbb01c2d4e8dae45
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/270283
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
- Files in the SDK are already opted into null safety.
- Files in the packages are already opted into null safety via
the pubspecs.
- in_sync_test.dart was opted out but required no changes to
migrate.
Change-Id: Ic9334824de1b22c879e962f488e1fa8021017710
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/246058
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Creates a new 'dart:_js_shared_embedded_names' library for the names
accessed from the shared 'dart:_rti' library. Migrate all of the shared
symbols and uses to the new location.
Change-Id: Iaa72c4522888ad630782b921b0b70d7a2626d1b9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/241507
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
These libraries will be shared between the dart2js and DDC runtimes.
Also renames the `shared` directory to `synced` to avoid confusion.
Synced directories are copied to be in sync with the compilers and
runtimes.
Change-Id: Ic36076938741d7102792f09413666de0033da3a4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/238300
Reviewed-by: Mayank Patke <fishythefish@google.com>
Reviewed-by: Ivan Inozemtsev <iinozemtsev@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
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>
* 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>
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>
- Pass tear-off parameters in an object rather than a large number
of variables.
- Reduce number of fields for BoundClosure. This speeds up tear-off
creation 7-20%
-
Change-Id: Idf5313d5709a098cd5c877871417304f4e4c5b56
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/203445
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>