This is a reland of commit a9fc9ffc4d
Additional changes:
- Set incremental mode on generic class table
- fixes expression evaluation failure discovered by dwds tests
(generic class table was not always defined in compiled expression)
- Allow expression evaluation while the app is running in e2e suite
- Add regression tests for the expression evaluation failure.
Original change's description:
> [ddc] Add module local caches for new types
>
> - Provides fast access for types that are used multiple times in the
> same module.
> - Enable the existing type table cache when running with new types.
> - Add a similar cache for instantiated generic classes. This cache
> is used in the current type system as well to help keep the
> difference between types and classes more clear.
>
> Issue: https://github.com/dart-lang/sdk/issues/48585
> Change-Id: I32103cf0c0bcf9b9771e789c0d04e63a4365a066
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/321320
> Commit-Queue: Nicholas Shahan <nshahan@google.com>
> Reviewed-by: Mark Zhou <markzipan@google.com>
Change-Id: I9c31d1d07d7f9bb15645ac9aa6e91d35e8906e85
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/323501
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Anna Gringauze <annagrin@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Also re-order the skip checks, to avoid walking up ancestors on
every method call that isn't named 'toString'.
Change-Id: I69e9b58b1ae26d44498381546d5881c7e66d4935
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/323681
Auto-Submit: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
I'm not certain all of these could be affected by new language features, but
it seems better to include them and do nothing than potentially miss something.
Change-Id: I4fc74e91511039b6679bc7b72dc3d90a1a45fc30
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/323661
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
This changes the TypeBuilder to be a sealed class and changes
implementation to use exhaustive switch, including fixes for all
missing cases found.
Change-Id: I24436801c93ee43858d35ed6b396489fd13125be
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/322960
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
The devtools cipd packages are now automatically built in the secure
release infrastructure and humans are no longer able to directly upload
the cipd packages. Cherry-picks to the release branches are handled by
specially triggering the secure builder.
Bug: b/297020298
Change-Id: I8d587cf787b85abea1762c7f302b261298adf83d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/323640
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Jonas Termansen <sortie@google.com>
When either the --trace-optimization or --trace-load-optimization
flags are used, only print those traces if the associated flow graph
would be printed (i.e., it matches the filter given by
--print-flow-graph-filter, or no filter is given).
TEST=ci
Change-Id: Ibfb72455de483fe471a5eb0261a5e803578f0bb2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/323600
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
Some customers use tools to preprocess this set of load IDs in order to optimize how code is loaded in their app. This flag allows us to emit this information as early as possible in the compiler without having to completely compile to JS.
Change-Id: I572d4f06ffd49a672767adc344819388a741e20c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/323340
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
RwLock, rather that SafepointRwLock, is okay to use for these two breakpoint_locations and single_stepping_set locks because they are short-lived, should not spawn over the safepoint.
TEST=ci
Change-Id: Iba83291978ba7980d0c6fd0a0a2cf2174c801359
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/323202
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
- Use the standardized JavaScript names `trimStart` and `trimEnd`.
- Remove IE11 polyfill.
Change-Id: I9a469b8bf076efd16ef06b88c7fa111784054bb7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/323300
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
This change helps us incrementally roll out changes to breaking tests internally.
Change-Id: I686b76ebf35816db8f875eccc935b957c81104fd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/323433
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Mark Zhou <markzipan@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
This avoids a crash from reading the this variable before it is
declared.
Change-Id: I604828c83e2179fa63f2037832e82db013fbfe4c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/323580
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Commit a52f2b9 which reworked awaiter stack unwinding and its
integration with debugger introduced the following regression:
it stopped treating `Future` listeners which had both `onValue`
and `onError` callbacks as catch all exception handlers. Only
listners with `onError` callback (those created with
`Future.onError`) were treated as a catch all handler.
This meant that debugger started to treat exceptions in the
code below as uncaught:
```
Future<void> foo() {
await 0;
throw '';
}
await foo().then(..., onError: (e, st) {
});
```
This change fixes this regression by checking if
`FutureListener.state & stateCatchError != 0` instead of
more narrow `FutureListener.state == stateCatchError` which
only detects listeners which only catch errors but do not
handle values. The new predicate matches
`FutureListener.handlesError`.
This relands 38e0046cad
with a fix to ensure that we correctly detect `onError`
callbacks which simply forward to a suspended async
function. We do this by marking FutureListener's that originate
from `await` using a bit in the state.
Fixes https://github.com/dart-lang/sdk/issues/53334
TEST=service/pause_on_unhandled_async_exceptions{_zones,}_test
Fixed: 53334
CoreLibraryReviewExempt: No fundamental changes to _FutureListener implementation, just additional bit to detect that this listener originates from await
Change-Id: I90385fc619cbb52925e075dd5c7b171a31ca4cab
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/323481
Commit-Queue: Slava Egorov <vegorov@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Static invocations of external factories are casted so that the
result, which is a @staticInterop type, can be treated as the erased
type instead. This CL fixes the issue where the type that it was
casted to was never replaced with the erased type.
Change-Id: Ic6eb529349ea2b5c42f91c2740d501d4f81bc38e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/323505
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
No functional changes, just switching from `withoutMarkers()` and `positionFromMarker()` to use `TestCode` while I was in these files.
There are now approx 130 calls to `withoutMarkers()` remaining.
Change-Id: I71e7fa918d2ef00e7ad64820392920a1f28a7222
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/323480
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
This reverts commit a9fc9ffc4d.
Reason for revert: Breaks some expression evaluation tests in DWDS
Original change's description:
> [ddc] Add module local caches for new types
>
> - Provides fast access for types that are used multiple times in the
> same module.
> - Enable the existing type table cache when running with new types.
> - Add a similar cache for instantiated generic classes. This cache
> is used in the current type system as well to help keep the
> difference between types and classes more clear.
>
> Issue: https://github.com/dart-lang/sdk/issues/48585
> Change-Id: I32103cf0c0bcf9b9771e789c0d04e63a4365a066
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/321320
> Commit-Queue: Nicholas Shahan <nshahan@google.com>
> Reviewed-by: Mark Zhou <markzipan@google.com>
Issue: https://github.com/dart-lang/sdk/issues/48585
Change-Id: Ied36cd006249cce32426b8d0b52d3443fdbce59a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/323500
Auto-Submit: Nicholas Shahan <nshahan@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>