| commit | 719c0a91dc401bc53ff49e8e085b086c5168a46a | [log] [tgz] |
|---|---|---|
| author | Tess Strickland <sstrickl@google.com> | Mon Jun 26 09:27:59 2023 +0000 |
| committer | Commit Queue <dart-scoped@luci-project-accounts.iam.gserviceaccount.com> | Mon Jun 26 09:27:59 2023 +0000 |
| tree | 8392f231411869560821bbcbacfd6b75d1752468 | |
| parent | 06e099884b46f23761b6ce351384aee6df204a97 [diff] |
[vm] Remove UntaggedField::type_test_cache_. This field is now only used when reloading to check assignability during `ProgramReloadContext::ReloadPhase4CommitFinish()` (via `PostCommit()` -> `InvalidateWorld()` -> `InvalidateFields`). However, the method `DeoptimizeDependentCode()` is called near the start of the actual reloading process in `Reload` prior to the commit/rollback phases. This calls `DeoptimizeTypeTestingStubs()`, which walks the heap and resets the contents of all `SubtypeTestCaches` (`STC`s). That means that the `STC` information isn't actually kept between different reloads, so all this does is cause a number of `STC` objects to be allocated during reload whose backing arrays are not used post-reload for anything and so are unnecessary garbage. That, and the creation of the `STC`s during `InvalidateFields` creates all-input `STC`s, as they don't just check assignability to a given field type but also for checking elements of `RecordTypes`. That means the per-field `STC`s contain way more information needed to check for valid assignments to the corresponding field type, even if the `STC` was used between reloads. This CL removes the unnecessary field and changes `InvalidateFields` so that the `STC`s used during reload are instead lazily allocated once per `FieldInvalidator` object and now both the `STC` and its backing array are now garbage post-field invalidation. TEST=reload ci Change-Id: I3ffa199551ba69f0afd4eba6303c6ff73d7473a3 Cq-Include-Trybots: luci.dart.try:vm-reload-linux-debug-x64-try,vm-reload-linux-release-x64-try,vm-reload-rollback-linux-debug-x64-try,vm-reload-rollback-linux-release-x64-try,vm-aot-linux-debug-x64-try,vm-aot-linux-product-x64-try,vm-aot-linux-release-x64-try,vm-linux-release-x64-try,vm-linux-debug-x64-try,vm-aot-dwarf-linux-product-x64-try Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/311220 Commit-Queue: Tess Strickland <sstrickl@google.com> Reviewed-by: Martin Kustermann <kustermann@google.com>
Dart is:
Optimized for UI: Develop with a programming language specialized around the needs of user interface creation.
Productive: Make changes iteratively: use hot reload to see the result instantly in your running app.
Fast on all platforms: Compile to ARM & x64 machine code for mobile, desktop, and backend. Or compile to JavaScript for the web.
Dart's flexible compiler technology lets you run Dart code in different ways, depending on your target platform and goals:
Dart Native: For programs targeting devices (mobile, desktop, server, and more), Dart Native includes both a Dart VM with JIT (just-in-time) compilation and an AOT (ahead-of-time) compiler for producing machine code.
Dart Web: For programs targeting the web, Dart Web includes both a development time compiler (dartdevc) and a production time compiler (dart2js).
Dart is free and open source.
See LICENSE and PATENT_GRANT.
Visit dart.dev to learn more about the language, tools, and to find codelabs.
Browse pub.dev for more packages and libraries contributed by the community and the Dart team.
Our API reference documentation is published at api.dart.dev, based on the stable release. (We also publish docs from our beta and dev channels, as well as from the primary development branch).
If you want to build Dart yourself, here is a guide to getting the source, preparing your machine to build the SDK, and building.
There are more documents on our wiki.
The easiest way to contribute to Dart is to file issues.
You can also contribute patches, as described in Contributing.