Commit graph

91822 commits

Author SHA1 Message Date
William Hesse ea5840c2c5 [benchmarks] Update legacy benchmarks to use the List.filled constructor
The legacy Dart 2.9 benchmarks that used the default List(int size)
constructor are changed to use the equivalent List.filled(size, null)
constructor, because the default List constructor is removed.

Bug: b/280275041
Change-Id: I2813537ae22e19d473abde70d677368940585423
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/304700
Reviewed-by: Jonas Termansen <sortie@google.com>
Commit-Queue: William Hesse <whesse@google.com>
2023-05-22 14:14:42 +00:00
Erik Ernst 783abcd4e8 Add suport for inline classes in Dart.g
Change-Id: I63b829e107458268d91b39e7f0abb673dc20d0f7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/304004
Commit-Queue: William Hesse <whesse@google.com>
Auto-Submit: Erik Ernst <eernst@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2023-05-22 14:09:48 +00:00
Daco Harkes a97917bebd [pkg] native_assets_builder fix
Add the `IOSSdk` so it can be passed in from flutter_tools.

Change-Id: If0d4e6c90b4cf94b555b3f3097f66e4d64a50130
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/303741
Commit-Queue: Hossein Yousefi <yousefi@google.com>
Auto-Submit: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Hossein Yousefi <yousefi@google.com>
2023-05-22 12:45:16 +00:00
Martin Kustermann 04195fcf14 [vm] A thread owning a safepoint operation should keep its mutator slot
Threads that own safepoint operations (e.g. a thread owning
[ReloadSafepointOperation]) are free to exit & re-enter. Owning a
safepoint operation only means that other threads are at well defined
places.

We limit the number of active mutators that can be running at the same
time - mainly due to the way our GC works today. This is maintained by
threads blocking on entering when there's too many mutators already.

If a thread owns a safepoint operation and exits, it should not give up
it's mutator slot to ensure it will be able to re-enter.

A concrete case when this can happen: We have many isolates and we run
in `--hot-reload-test-mode`. One isolate will own a reload safepoint
operation & perform reload. As part of reload it will exit the isolate
and send a request to the `kernel-service` and wait for it's reply. Once
it gets a replay it will re-enter the isolate. Now this re-entering
could be blocking if another thread took the mutator slot (which can
happen, as we get mutator slot before we try to check-in to safepoint
when entering).

In the future we may unify the safepoint mechanism with the mutator
count mechanism.

Closes https://github.com/dart-lang/sdk/issues/52441
TEST=Fixes flaky timeouts of ffi/invoke_callback_after_suspension_test

Change-Id: Icc5dbf59b4270653c9e6e316531f5b3e086db2fa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/304682
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2023-05-22 12:41:38 +00:00
Martin Kustermann 42040116e0 [wasm] Add Omer to tools/OWNERS_WASM
Change-Id: I6e86af984ff3c65eeb35a51b121235a880e65f61
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/304641
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
2023-05-22 11:12:02 +00:00
Ömer Sinan Ağacan c74387a3a2 [dart2wasm] New async implementation
This CL re-implements the async function compilation without using JSPI
or any other platform features.

This implementation is faster than the JSPI-based one in all benchmarks,
in some cases up to 200x (benchmark results at the end). So we remove
the JSPI-based implementation as there's no point in maintaining a much
slower implementation and supporting two implementations at the same
time (which is tricky because these implementations need different
libraries, all scripts need to support two modes etc.) that also
requires experimental platform features.

# Main changes

- A new pass `AwaitTransformer` transforms `await` expressions to
  top-level statements in form `var <fresh variable> = await <simple
  expr>`, where `<simple expr>` is an expression without `await`.

  After this pass all `await` expressions have the simple continuation
  of "assign the value of the awaited future to this variable and
  continue with the next statement". This simplifies `await`
  compilation.

- A new code generator `AsyncCodeGenerator` (inherits from
  `CodeGenerator`) compiles `async` functions. The `_YieldFinder` class
  is copied from `sync*` code generator but modified to handle `async`
  expressions.

- Mentions to the V8 flag `--experimental-wasm-stack-switching` is
  removed from all scripts and documents.

# Future work

- Control flow handling in `AsyncCodeGenerator` needs to be implemented
  in a similar way in `SyncStarCodeGenerator`. Doing this without
  duplicating a lot of code will require some refactoring.

# New passing tests

- co19/Language/Statements/Yield_and_Yield_Each/Yield/execution_async_A05_t01
- co19/Language/Statements/For/Asynchronous_For_in/execution_A02_t02
- language/regress/regress23996_test
- language/sync_star/dcall_type_test

# Benchmarks

Current implementation:

```
AsyncLiveVars.LiveObj1(RunTime): 1586000.0 us.
AsyncLiveVars.LiveObj2(RunTime): 2114000.0 us.
AsyncLiveVars.LiveObj4(RunTime): 1972500.0 us.
AsyncLiveVars.LiveObj8(RunTime): 2212000.0 us.
AsyncLiveVars.LiveObj16(RunTime): 2238000.0 us.
AsyncLiveVars.LiveInt1(RunTime): 2362000.0 us.
AsyncLiveVars.LiveInt4(RunTime): 2470000.0 us.
AsyncLiveVars.LiveObj2Int2(RunTime): 2575000.0 us.
AsyncLiveVars.LiveObj4Int4(RunTime): 2820000.0 us.
Calls.AwaitAsyncCall(RunTimeRaw): 35676.15658362989 ns.
Calls.AwaitAsyncCallClosureTargetPolymorphic(RunTimeRaw): 38934.108527131786 ns.
Calls.AwaitAsyncCallInstanceTargetPolymorphic(RunTimeRaw): 42617.02127659575 ns.
Calls.AwaitFutureCall(RunTimeRaw): 2832.058906825262 ns.
Calls.AwaitFutureCallClosureTargetPolymorphic(RunTimeRaw): 3665.8125915080527 ns.
Calls.AwaitFutureCallInstanceTargetPolymorphic(RunTimeRaw): 4420.449537241076 ns.
Calls.AwaitFutureOrCall(RunTimeRaw): 3692.7621861152143 ns.
Calls.AwaitFutureOrCallClosureTargetPolymorphic(RunTimeRaw): 4625.346901017576 ns.
Calls.AwaitFutureOrCallInstanceTargetPolymorphic(RunTimeRaw): 4514.6726862302485 ns.
Calls.AwaitFutureOrCallInstanceTargetPolymorphicManyAwaits(RunTimeRaw): 345172.4137931034 ns.
Calls.AwaitForAsyncStarStreamPolymorphic(RunTimeRaw): 697000.0 ns.
Calls.AwaitForAsyncStarStreamPolymorphicManyYields(RunTimeRaw): 704666.6666666666 ns.
Calls.AwaitForManualStreamPolymorphic(RunTimeRaw): 11010.989010989011 ns.
Calls.SyncCall(RunTimeRaw): 0.40275240996973316 ns.
Calls.SyncCallClosureTarget(RunTimeRaw): 0.3989591156672242 ns.
Calls.SyncCallInstanceTargetPolymorphic(RunTimeRaw): 3.2632549336335526 ns.
Calls.IterableSyncStarIterablePolymorphic(RunTimeRaw): 353.3980582524272 ns.
Calls.IterableManualIterablePolymorphic(RunTimeRaw): 332.1161825726141 ns.
Calls.IterableManualIterablePolymorphicManyYields(RunTimeRaw): 354.28067078552516 ns.
```

New implementation:

```
AsyncLiveVars.LiveObj1(RunTime): 11327.683615819209 us.
AsyncLiveVars.LiveObj2(RunTime): 10923.91304347826 us.
AsyncLiveVars.LiveObj4(RunTime): 10956.284153005465 us.
AsyncLiveVars.LiveObj8(RunTime): 11286.516853932584 us.
AsyncLiveVars.LiveObj16(RunTime): 11445.714285714286 us.
AsyncLiveVars.LiveInt1(RunTime): 11016.483516483517 us.
AsyncLiveVars.LiveInt4(RunTime): 11327.683615819209 us.
AsyncLiveVars.LiveObj2Int2(RunTime): 10918.478260869566 us.
AsyncLiveVars.LiveObj4Int4(RunTime): 10737.967914438503 us.
Calls.AwaitAsyncCall(RunTimeRaw): 1082.2510822510822 ns.
Calls.AwaitAsyncCallClosureTargetPolymorphic(RunTimeRaw): 1056.4124234100993 ns.
Calls.AwaitAsyncCallInstanceTargetPolymorphic(RunTimeRaw): 1134.1726210729273 ns.
Calls.AwaitFutureCall(RunTimeRaw): 865.6509695290858 ns.
Calls.AwaitFutureCallClosureTargetPolymorphic(RunTimeRaw): 841.3967185527977 ns.
Calls.AwaitFutureCallInstanceTargetPolymorphic(RunTimeRaw): 839.066957543212 ns.
Calls.AwaitFutureOrCall(RunTimeRaw): 397.9941096871766 ns.
Calls.AwaitFutureOrCallClosureTargetPolymorphic(RunTimeRaw): 406.17384240454913 ns.
Calls.AwaitFutureOrCallInstanceTargetPolymorphic(RunTimeRaw): 393.7472929873607 ns.
Calls.AwaitFutureOrCallInstanceTargetPolymorphicManyAwaits(RunTimeRaw): 1095.0503723171266 ns.
Calls.AwaitForAsyncStarStreamPolymorphic(RunTimeRaw): 6643.426294820717 ns.
Calls.AwaitForAsyncStarStreamPolymorphicManyYields(RunTimeRaw): 7178.750897343863 ns.
Calls.AwaitForManualStreamPolymorphic(RunTimeRaw): 1456.23998835008 ns.
Calls.SyncCall(RunTimeRaw): 0.3919935321067202 ns.
Calls.SyncCallClosureTarget(RunTimeRaw): 0.3906669661780074 ns.
Calls.SyncCallInstanceTargetPolymorphic(RunTimeRaw): 3.1676143112814583 ns.
Calls.IterableSyncStarIterablePolymorphic(RunTimeRaw): 104.4932079414838 ns.
Calls.IterableManualIterablePolymorphic(RunTimeRaw): 104.57516339869281 ns.
Calls.IterableManualIterablePolymorphicManyYields(RunTimeRaw): 116.92487576731949 ns.
```

TEST=ci
CoreLibraryReviewExempt: Added entry-point pragmas.
Change-Id: I02fbd08141f51c00fb37b6fa0304dc25d6afdb71
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/301020
Commit-Queue: Ömer Ağacan <omersa@google.com>
Reviewed-by: William Hesse <whesse@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Joshua Litt <joshualitt@google.com>
2023-05-22 08:32:12 +00:00
Brian Wilkerson 7419e25966 Convert local library completion tests
Change-Id: I565572911964a683d203d8a40ccfd8e96845ca0b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/304288
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-05-20 15:27:53 +00:00
Nicholas Shahan 041a8ef3ee [ddc] Remove use of .__proto__ from classes.dart
Issue: https://github.com/dart-lang/sdk/issues/52372

Change-Id: I3f8bf641511bc202a100a9b07de8cb5428fe3c93
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/304367
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2023-05-20 00:38:43 +00:00
Ryan Macnak 8fb704e13b Roll boringssl to 74646566e93de7551bfdfc5f49de7462f13d1d05.
Change-Id: I3ae2ee7310b8ad70ebf56519e2c206b24a0b2faf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/304210
Reviewed-by: Brian Quinlan <bquinlan@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2023-05-19 22:46:56 +00:00
pq 19b28a76dc fix error status typos
Change-Id: I8b73d1a37630ca310ba4fb67f836cf670c8d059c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/304562
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-05-19 21:40:43 +00:00
Nicholas Shahan fdc2a2bd8a [ddc] Remove use of .__proto__ from js_patch.dart
Issue: https://github.com/dart-lang/sdk/issues/52372

Change-Id: Idc3020ddf18e05392154bf8f48b56524ce0a881c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/304366
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2023-05-19 21:12:01 +00:00
Konstantin Shcheglov efe0ca193f Prepare to publish analyzer 5.13.0 and _fe_analyzer_shared 61.0.0
Change-Id: Ic1402c8a003573a0861c9a907c0a14e9b95f4859
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/304561
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-05-19 21:11:29 +00:00
Nicholas Shahan 1abf78b361 [ddc] Remove use of .__proto__ from polyfill
Issue: https://github.com/dart-lang/sdk/issues/52372

Change-Id: Ib4f7329c913abfde398dc44ecec07ce318b7d44a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/304365
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2023-05-19 20:40:01 +00:00
Keerti Parthasarathy cce552594e Add support for fix on replacing an element and the corresponding target.
BUG=50698

Change-Id: Ib6dc5557a5b6db83316d61e3243c7541a3652965
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/304104
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
2023-05-19 20:38:59 +00:00
Konstantin Shcheglov 7501d10e51 Check if the element is already computed in getLibraryByUri().
This makes symbol search 2 times faster.

Before:
(name: request, count: 1, elapsed: 0:00:00.138251, elapsedSelf: 0:00:00.000463)
  (name: findDeclarations, count: 1, elapsed: 0:00:00.137743, elapsedSelf: 0:00:00.002565)
    (name: discoverAvailableFiles, count: 1, elapsed: 0:00:00.000114, elapsedSelf: 0:00:00.000114)
    (name: ownKnown, count: 1, elapsed: 0:00:00.005737, elapsedSelf: 0:00:00.005737)
    (name: findDeclarations, count: 1, elapsed: 0:00:00.129327, elapsedSelf: 0:00:00.007679)
      (name: getLibraryByUri, count: 7091, elapsed: 0:00:00.082191, elapsedSelf: 0:00:00.082191)
      (name: finder, count: 7091, elapsed: 0:00:00.039457, elapsedSelf: 0:00:00.039457)
  (name: convert, count: 1, elapsed: 0:00:00.000045, elapsedSelf: 0:00:00.000045)(declarations: 5)


After:
(name: request, count: 1, elapsed: 0:00:00.070215, elapsedSelf: 0:00:00.000583)
  (name: findDeclarations, count: 1, elapsed: 0:00:00.069580, elapsedSelf: 0:00:00.002453)
    (name: discoverAvailableFiles, count: 1, elapsed: 0:00:00.000126, elapsedSelf: 0:00:00.000126)
    (name: ownKnown, count: 1, elapsed: 0:00:00.004227, elapsedSelf: 0:00:00.004227)
    (name: findDeclarations, count: 1, elapsed: 0:00:00.062774, elapsedSelf: 0:00:00.011947)
      (name: getLibraryByUri, count: 7091, elapsed: 0:00:00.009449, elapsedSelf: 0:00:00.009449)
      (name: finder, count: 7091, elapsed: 0:00:00.041378, elapsedSelf: 0:00:00.041378)
  (name: convert, count: 1, elapsed: 0:00:00.000052, elapsedSelf: 0:00:00.000052)(declarations: 5)

Bug: https://github.com/Dart-Code/Dart-Code/issues/4106
Change-Id: Iade1c80870a0bbd6b909a5306be57499bed27b27
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/304540
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-05-19 19:55:28 +00:00
Alexander Markov 1a161c69a5 [test] Update language/vm/type_cast_vm_test for AOT
This test verifies stack traces of certain type errors.
In AOT mode, stack traces only contain line numbers but not columns.
So, the test is updated to accomodate for AOT stack traces.

Also, the test is skipped in 'dwarf' and 'obfuscated' modes as
they don't provide symbolic stack traces.

Change-Id: I5a590b13c9ecaffbd4a495441fc66f807d942a12
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/304208
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Auto-Submit: Alexander Markov <alexmarkov@google.com>
2023-05-19 19:48:38 +00:00
Brian Wilkerson d53b494bd7 Convert type member completion tests
Change-Id: Ic6f8a249f9082818c710e3660650f9fccce483a7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/304205
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2023-05-19 18:48:09 +00:00
Konstantin Shcheglov 7621e73434 Bump dart_style
Change-Id: I1ed785db257c3e686fd4dc289870b348d98382c2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/304461
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-05-19 18:33:28 +00:00
Paul Berry 70e7adff19 Field promotion: distinguish between this. and super. accesses.
When promoting fields, in order to avoid unsoundness, we need to
distinguish between field accesses performed through `super` and field
accesses performed through `this`. Otherwise, a user could do
something like this:

    class B {
      final int? _i;
      B(this.i);
    }
    class C extends B {
      final int? _i;
      C(this._i, int? superI) : super(superI);
      int f() {
        if (super._i != null) {
          return this._i; // UNSOUND: `this._i` could be `null`
        }
      }
    }

To avoid this problem, flow analysis now uses separate promotion keys
for `super` and `this`, so that promoting a variable through `this`
leaves it unpromoted when accessed via `super`, and vice versa.

Note that in principle the implementations could inspect the enclosing
class, and only distinguish `this.` and `super.` accesses in the case
where it contains a declaration matching the field name. But doing so
would carry a performance and implementation complexity cost, and
would confer very little real-world benefit (since in practice users
don't mix `this.` and `super.` accesses and expect them to refer to
the same field).

Fixes #50138.

Bug: https://github.com/dart-lang/sdk/issues/50138
Change-Id: Ia0fd79b5ed7649d23a28efcbffb59b4c9ad63f70
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/304364
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2023-05-19 18:29:49 +00:00
Paul Berry 9bfae1a720 Initial language tests for patterns flow analysis.
These tests are based on the unit tests I wrote during development of
the flow analysis support for patterns; as such, they are not
especially uniform in their coverage, but they should be a good
start. I intend to expand coverage in future CLs.

Bug: https://github.com/dart-lang/sdk/issues/50419
Change-Id: I23bd96621a0269c1e642a7fa3b65c851357505c3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/304320
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2023-05-19 18:20:28 +00:00
Nate Biggs 13cdab8608 [dart2js] Fix typo in test comment.
Change-Id: Ibb1839e6170196138808f9e5aefebdbdd1e0a845
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/304480
Commit-Queue: Nate Biggs <natebiggs@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2023-05-19 17:08:40 +00:00
Kallen Tu 345d0f3a47 [analyzer] Issue 37238: Multiple errors for type mismatch assignments.
Avoid reporting an error if the static types are mismatched because
CompileTimeErrorCode.INVALID_ASSIGNMENT would have already been
reported by the ErrorVerifier.

Closes #37238

Bug: https://github.com/dart-lang/sdk/issues/37238
Change-Id: I2248d054ed6bf6a546e998afb9b731a36e197780
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/304362
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
2023-05-19 16:27:58 +00:00
Devon Carew 027660f5b9 [deps] rev async, csslib, fixnum, glob, html, http, http_multi_server, http_parser, leak_tracker, logging, markdown, matcher, mockito, shelf, source_map_stack_trace, tools
Revisions updated by `dart tools/rev_sdk_deps.dart`.

async (d744058..96c29d0):
  96c29d0  2023-05-17  Goddchen  docs: fix typo in CancelableOperation.fromFuture(...) docs (#243)

csslib (923edf0..b2b9b55):
  b2b9b55  2023-05-18  Devon Carew  address a regression in the compact output format (#183)
  1ff82fd  2023-05-15  Devon Carew  blast_repo fixes (#181)
  35bef7f  2023-05-11  Nate Bosch  Simplify TopLevelIncludes visitor (#180)
  c4e904c  2023-05-10  Devon Carew  rev for publishing (#179)
  c9e47d0  2023-05-10  Kevin Moore  Require Dart 2.19, latest lints, skin hanging test (#175)
  3976e6f  2023-05-10  Devon Carew  address an issue parsing font names (#168)
  a337a9a  2023-05-10  Devon Carew  fixed CssPrinter pretty print indent levels (#169)

fixnum (006a130..d9b9a2a):
  d9b9a2a  2023-05-17  Devon Carew  blast_repo fixes (#112)

glob (46403be..30f6aba):
  30f6aba  2023-05-17  Devon Carew  blast_repo fixes (#77)

html (593d6f6..92eacab):
  92eacab  2023-05-17  Devon Carew  blast_repo fixes (#216)

http (fb3b4be..d845560):
  d845560  2023-05-17  Devon Carew  blast_repo fixes (#933)

http_multi_server (d1fffed..a209cd5):
  a209cd5  2023-05-17  Devon Carew  blast_repo fixes (#55)

http_parser (5a33f5f..1ef3e56):
  1ef3e56  2023-05-17  Devon Carew  blast_repo fixes (#73)

leak_tracker (8ae200a..571c24a):
  571c24a  2023-05-18  Polina Cherkasova  Delete generate_diagrams.yaml (#67)
  f2029b6  2023-05-18  Devon Carew  blast_repo fixes (#66)
  474fd4f  2023-05-18  Polina Cherkasova  Separate testing. (#65)
  92a0b48  2023-05-17  Polina Cherkasova  Fixes to support G3. (#64)

logging (b75cba7..fa2486d):
  fa2486d  2023-05-18  Desislava Stefanova  Logger `onLevelChanged` notification (#138)

markdown (6db8fc1..b951454):
  b951454  2023-05-18  Devon Carew  blast_repo fixes (#542)
  a714d95  2023-05-17  Zhiguang Chen  Fix delimiter row matching pattern for tables (#540)

matcher (4dfd9ad..7e10117):
  7e10117  2023-05-18  Devon Carew  blast_repo fixes (#224)

mockito (3fadd2d..28f174f):
  28f174f  2023-05-17  Ilya Yanok  Only check formatting with the stable SDK

shelf (79e3cee..8793687):
  8793687  2023-05-18  dependabot[bot]  Bump actions/labeler from 4.0.2 to 4.0.3 (#353)
  2f1aefb  2023-05-18  Devon Carew  blast_repo fixes (#351)
  e1ca05d  2023-05-18  Devon Carew  Update no-response.yml (#349)

source_map_stack_trace (09715f9..b83af01):
  b83af01  2023-05-18  Devon Carew  blast_repo fixes (#39)

tools (62c9604..49da4ca):
  49da4ca  2023-05-12  Polina Cherkasova  Add memory events. (#92)

Change-Id: I5cd1277e6df1d72f69569090d9a2381a2b81d5d0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/304460
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Auto-Submit: Devon Carew <devoncarew@google.com>
2023-05-19 16:14:34 +00:00
DEPS Autoroller 6b35aa94b9 Roll Clang from 5344d8e10bb7 to 6d667d4b261e
If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/clang-dart-sdk
Please CC dart-engprod@google.com,dart-vm-gardener@grotations.appspotmail.com,dart-vm-team@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Clang: https://bugs.fuchsia.dev/p/fuchsia/issues/list?q=component%3AToolchain
To file a bug in Dart SDK: https://github.com/dart-lang/sdk/issues

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Cq-Include-Trybots: luci.dart.try:dart-sdk-linux-try;luci.dart.try:dart-sdk-mac-try;luci.dart.try:dart-sdk-mac-arm64-try;luci.dart.try:dart-sdk-win-try
Change-Id: Id139b808aa0ffde7eea75fa0b57d4ce6dd59fc5a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/304440
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2023-05-19 15:41:49 +00:00
Danny Tuppeny 9a455c809b [analysis_server] Add a utility to merge SourceFileEdits from multiple passes of edits
This is work towards https://github.com/dart-lang/sdk/issues/47968. The fix processor may need to be called multiple times to fix all issues because some fixes may produce code that can be fixed by another (for example one inserting "final" and then another replacing it with "const").

In order to be able to provide multiple passes of edits to LSP, we need to merge them together because LSP's edits are not applied sequentially but must all represent valid locations in the original source file.

This class is currently unused (besides tests).

Change-Id: Ia006ff8044505c6d109f6480f7bcce4da4669cdb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/304180
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-05-19 15:30:46 +00:00
Konstantin Shcheglov c9557fe568 Reduce instrumentation for WorkspaceSymbolHandler.
I played with it some more, and found that the overhead of measuring
too fine grainly, when we have tens and hundreds thousands of relatively
inexpensive operations, is too high.

Change-Id: I4038e3972efff860d568c02008120092f99b8298
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/304368
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-05-19 14:38:38 +00:00
Konstantin Shcheglov e1f153f7a2 Add tests for AwaitExpression and unresolved identifiers.
I saw that the linter roll reported a strange InvalidType related
error. So, I wanted to check if this is something I can reproduce.
I cannot, but the tests might be useful anyway.

Change-Id: I21138685c4fee028f0620d3fcfa3a221a304c951
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/304325
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-05-19 01:12:08 +00:00
Nate Bosch 17c626f8b3 Remove some getters for final fields
These were original getters without any fields. After adding fields
to cache the values instead of rereading them on each access the
forwarding public getters became redundant but were not removed.

Make the fields public, remove the getters, and move the docs from the
getters to the fields.

Change-Id: Ie078f5b85cf85f8f86642ac6fe8d36f4107602ee
CoreLibraryReviewExempt: Only impacts VM platform.
Tested:No behavior changes expected. Confirmed updated fields can be read on VM.
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/304324
Reviewed-by: Siva Annamalai <asiva@google.com>
Auto-Submit: Nate Bosch <nbosch@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
2023-05-19 00:52:57 +00:00
Liam Appelbe 7c9d224086 [vm] Fix memory leak in DuplicateRXVirtualMemory
This fixes the asan failure, but not the ubsan failure.

Bug: https://github.com/dart-lang/sdk/issues/52440
Change-Id: I29d9b153fd14349477a68bd341b035e8783fd29d
TEST=DuplicateRXVirtualMemory
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/304400
Reviewed-by: Derek Xu <derekx@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
Auto-Submit: Liam Appelbe <liama@google.com>
2023-05-18 21:56:55 +00:00
Brian Quinlan ee0b9ea0f8 Deprecate the Platform constructor
Bug:https://github.com/dart-lang/sdk/issues/52138
Change-Id: I9137ffe7caa1a1e9441d48b030342a528d99e8f6
CoreLibraryReviewExempt: deprecation, aske on holiday
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/303086
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
Commit-Queue: Brian Quinlan <bquinlan@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2023-05-18 21:08:24 +00:00
Nicholas Shahan 51c4aee90e [ddc] Avoid .__proto__ in super constructor call
Reland https://dart-review.googlesource.com/c/sdk/+/303089

Fixes: https://github.com/dart-lang/sdk/issues/52431
Change-Id: Ice7dcf2655dc9638b02f0248835d1de779174572
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/304264
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2023-05-18 20:33:20 +00:00
Nicholas Shahan 662f2ab2fa [ddc] Add more invalid variable names
Adding 'true', 'false', and 'null' to the invalid identifier names.
Any symbol trying to use these words as names will be adjusted to
avoid conflicts or shadowing.

Fixes: https://github.com/dart-lang/sdk/issues/39595
Change-Id: I5c6a830ddf825bfc9c547c853212f8b0ea05b77a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/304263
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2023-05-18 20:33:20 +00:00
Nicholas Shahan 5091631de1 [tests] Add regression tests for identifiers
Issue: https://github.com/dart-lang/sdk/issues/52431
Issue: https://github.com/dart-lang/sdk/issues/39595
Change-Id: Iae9c02ad632264d1eb14fb0958f714b4faee55b4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/304262
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2023-05-18 20:33:20 +00:00
Nate Biggs 327a680c34 [dart2js] Fix type inference for record accessses on invalid indices.
Bug: 52438
Change-Id: Ic180e181142f6a33e9915f13890d9a3825a5ec0c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/304380
Commit-Queue: Nate Biggs <natebiggs@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2023-05-18 20:25:27 +00:00
Derek Xu 3af9eb58af Revert "Reland "Use dap package in dds, dds_service_extensions""
This reverts commit a48d2cf02c.

Reason for revert: breaks g3 (https://ci.chromium.org/ui/p/dart/builders/ci.sandbox/google/39297/overview)

Original change's description:
> Reland "Use dap package in dds, dds_service_extensions"
>
> This is a reland of commit 59bb1fce82
>
> Original change's description:
> > Use dap package in dds, dds_service_extensions
> >
> > Change-Id: I678c810e02a5989ee1b4edebaf9d741e2fc7d026
> > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/302849
> > Reviewed-by: Ben Konyi <bkonyi@google.com>
> > Commit-Queue: Helin Shiah <helinx@google.com>
>
> Change-Id: Ib5b9cad1d0c19dac79c73e65c5de8721d1768285
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/304105
> Reviewed-by: Ben Konyi <bkonyi@google.com>
> Commit-Queue: Helin Shiah <helinx@google.com>

Change-Id: I5eee0e7ed9c721d576e1fa59c666c03e4ddb63af
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/304363
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Derek Xu <derekx@google.com>
2023-05-18 20:25:17 +00:00
Brian Quinlan a75e857df5 Add a Platform.lineTerminator static method
Bug: https://github.com/dart-lang/sdk/issues/52379
Change-Id: Ic3a7f06252f8a69dcfdb29c00f16557c34529652
CoreLibraryReviewExempt: Aske is on holiday
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/297260
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Brian Quinlan <bquinlan@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2023-05-18 19:57:58 +00:00
Helin Shiah a48d2cf02c Reland "Use dap package in dds, dds_service_extensions"
This is a reland of commit 59bb1fce82

Original change's description:
> Use dap package in dds, dds_service_extensions
>
> Change-Id: I678c810e02a5989ee1b4edebaf9d741e2fc7d026
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/302849
> Reviewed-by: Ben Konyi <bkonyi@google.com>
> Commit-Queue: Helin Shiah <helinx@google.com>

Change-Id: Ib5b9cad1d0c19dac79c73e65c5de8721d1768285
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/304105
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Helin Shiah <helinx@google.com>
2023-05-18 19:25:28 +00:00
Sigmund Cherem cc8b3f792e [analyzer] minor updates to the quick_fix.md documentation
The changes are:
* Use the current tear-off syntax for constuctors in the example
* Add references to the code where certain maps are defined.

Change-Id: I5710090c1ecb2939d74a3822b8c7b35090be378c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/304323
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-05-18 18:53:39 +00:00
Srujan Gaddam eb8e3d549a [dart:js_interop] Add new diagnostic reporter so we can avoid transforms
Adds a delegating reporter so we can keep track of whether there are
interop errors. If there are, we do not do the transforms on the JS
backends.

Change-Id: Ib0f36b748443cb7fe8f8bb427692d653557d59fa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/304261
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2023-05-18 18:53:03 +00:00
Alexander Markov 0bff5652ba Reland "[vm/compiler] Remove unnecessary type check from optimized switches"
This is a reland of commit 43ce5487c1

In addition to removing type check, switch range checks are adjusted
in order to avoid call to 'int.operator<=', which can be removed by
tree shaker in AOT/product mode, causing NoSuchMethodError at runtime.

Original change's description:
> [vm/compiler] Remove unnecessary type check from optimized switches
>
> Switch optimization now relies on static type of the tested value,
> so it is safe to omit the type check (with sound null safety) or
> reduce it to a null check (without sound null safety).
>
> TEST=co19/LanguageFeatures/Patterns/Exhaustiveness/exhaustiveness_enum_A01_t01
> Fixes https://github.com/dart-lang/sdk/issues/52422
>
> Change-Id: Ic93f4f212bee9ed3bfe5035f3c8d7535274c2f63
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/304102
> Commit-Queue: Alexander Markov <alexmarkov@google.com>
> Reviewed-by: Alexander Aprelev <aam@google.com>

TEST=co19/LanguageFeatures/Patterns/Exhaustiveness/exhaustiveness_enum_A01_t01
TEST=language/async/switch_test

Change-Id: I70bf480bf376f946d66caa504120c8f85093ea8d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/304322
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2023-05-18 18:33:37 +00:00
Danny Tuppeny 34a21f5691 [analysis_server] Switch to using FuzzyMatcher instead of RegExp for LSP workspace symbols
See https://github.com/Dart-Code/Dart-Code/issues/4106#issuecomment-1552948926.

In my tests on the Flutter repo, this reduces the matching from around 200ms to around 40ms.

Before:
(name: request, count: 1, elapsed: 0:00:00.708230, elapsedSelf: 0:00:00.000487)
  (name: findDeclarations, count: 1, elapsed: 0:00:00.707656, elapsedSelf: 0:00:00.002735)
    (name: discoverAvailableFiles, count: 1, elapsed: 0:00:00.000187, elapsedSelf: 0:00:00.000187)
    (name: ownKnown, count: 1, elapsed: 0:00:00.023311, elapsedSelf: 0:00:00.023311)
    (name: findDeclarations, count: 1, elapsed: 0:00:00.681423, elapsedSelf: 0:00:00.016362)
      (name: getLibraryByUri, count: 7276, elapsed: 0:00:00.295596, elapsedSelf: 0:00:00.295596)
      (name: finder, count: 7272, elapsed: 0:00:00.369465, elapsedSelf: 0:00:00.055566)
        (name: addDeclaration, count: 317711, elapsed: 0:00:00.313899, elapsedSelf: 0:00:00.080608)
          (name: doNothing, count: 317711, elapsed: 0:00:00.020405, elapsedSelf: 0:00:00.020405)
          (name: regExp, count: 317711, elapsed: 0:00:00.212886, elapsedSelf: 0:00:00.212886)
  (name: convert, count: 1, elapsed: 0:00:00.000087, elapsedSelf: 0:00:00.000087)(declarations: 1)


After:
(name: request, count: 1, elapsed: 0:00:00.522033, elapsedSelf: 0:00:00.003331)
  (name: findDeclarations, count: 1, elapsed: 0:00:00.518648, elapsedSelf: 0:00:00.002939)
    (name: discoverAvailableFiles, count: 1, elapsed: 0:00:00.000213, elapsedSelf: 0:00:00.000213)
    (name: ownKnown, count: 1, elapsed: 0:00:00.021037, elapsedSelf: 0:00:00.021037)
    (name: findDeclarations, count: 1, elapsed: 0:00:00.494459, elapsedSelf: 0:00:00.016197)
      (name: getLibraryByUri, count: 7276, elapsed: 0:00:00.292021, elapsedSelf: 0:00:00.292021)
      (name: finder, count: 7272, elapsed: 0:00:00.186241, elapsedSelf: 0:00:00.050400)
        (name: addDeclaration, count: 317711, elapsed: 0:00:00.135841, elapsedSelf: 0:00:00.072235)
          (name: doNothing, count: 317711, elapsed: 0:00:00.019244, elapsedSelf: 0:00:00.019244)
          (name: isMatch, count: 317711, elapsed: 0:00:00.044362, elapsedSelf: 0:00:00.044362)
  (name: convert, count: 1, elapsed: 0:00:00.000054, elapsedSelf: 0:00:00.000054)(declarations: 1)
Change-Id: Ib8775536fb7b16b9d29c2839167ce41de9ecc874
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/304341
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-05-18 18:31:28 +00:00
Ryan Macnak 2bce12b977 [vm, gc] Coarsen the freelist lock used by the concurrent sweeper.
The scope of the lock is coarsened from per-element to per-page. This effectively causes the concurrent sweeper to pause during a scavenge in the case the sweeper encounters empty pages, preventing the sweeper from performing munmap during the scavenge.

TEST=ci
Change-Id: I7b2b077c748234e6d3dc48e2229c546d854ca93a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/303087
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2023-05-18 17:03:02 +00:00
Konstantin Shcheglov c207dafe77 Instrument WorkspaceSymbolHandler.
Change-Id: Ia822b253124b53e5ee283f7b3cce15db050eedb5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/304280
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-05-18 15:43:17 +00:00
Konstantin Shcheglov 2223d8b324 Issue 52388. Report 'await super', without selector.
Bug: https://github.com/dart-lang/sdk/issues/52388
Change-Id: I19fe6d3e638e75ff36739949b9ea9e24cb043b73
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/304220
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-05-18 15:39:26 +00:00
Alexander Markov 35307d406a Revert "[vm/compiler] Remove unnecessary type check from optimized switches"
This reverts commit 43ce5487c1.

Reason for revert: test failures on vm-aot-*-product-* bots.

Original change's description:
> [vm/compiler] Remove unnecessary type check from optimized switches
>
> Switch optimization now relies on static type of the tested value,
> so it is safe to omit the type check (with sound null safety) or
> reduce it to a null check (without sound null safety).
>
> TEST=co19/LanguageFeatures/Patterns/Exhaustiveness/exhaustiveness_enum_A01_t01
> Fixes https://github.com/dart-lang/sdk/issues/52422
>
> Change-Id: Ic93f4f212bee9ed3bfe5035f3c8d7535274c2f63
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/304102
> Commit-Queue: Alexander Markov <alexmarkov@google.com>
> Reviewed-by: Alexander Aprelev <aam@google.com>

Change-Id: Ifa6ee75be49f7264fa4dfc08183d5ccb731c60d1
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/304321
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Alexander Markov <alexmarkov@google.com>
2023-05-18 15:12:18 +00:00
Konstantin Shcheglov 64fcb8de1b Prepare for removing deprecated methods from NamedType.
The actual removal will happen in (to be rebased on top of this):
https://dart-review.googlesource.com/c/sdk/+/303280

Fixing direct uses of the deprecated `Identifier get name` is apparently
only about a half of the work. I should have followed my own advice to
the clients and prepared better.

These changes are necessary because we will stop creating and
visiting `Identifier`, and so `NamedType` should be handled directly.

Change-Id: Ie07b75b15eab277ed6c9b29a838561a7eb71f588
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/303425
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-05-18 01:54:21 +00:00
Parker Lougheed deddb64ff7 [pkg/analyzer] Fix meta annotation links in diagnostic messages
Bug: https://github.com/dart-lang/site-www/issues/4901
Change-Id: I238d9508984846c4bbe2bb1b23eb2b12fd262ed8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/304260
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-05-18 00:55:53 +00:00
Eric Seidel dfca8d333e Add an explicit Visual Studio Code workspace
This allows users of Visual Studio Code to open the sdk/ directory.

Without this, attempting to open the root of the repository results
in over 200k analyzer errors eventually hanging/crashing VSCode.

This matches what Fuschia and other large projects do to be able
to open large monorepo checkouts in VSCode. e.g.
https://fuchsia.googlesource.com/fuchsia/+/main/fuchsia.code-workspace

Bug: https://github.com/dart-lang/sdk/issues/52380
Change-Id: I1a69627bb6ca25e8f7f036a50534eaf0804e893e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/303841
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
Auto-Submit: Eric Seidel <eric@shorebird.dev>
2023-05-17 23:08:19 +00:00
Liam Appelbe 4f98a2dc9f [vm] Add VirtualMemory::DuplicateRX function.
Change-Id: I1f56687bf140faae113b2a4d2f34192cb87b68f7
TEST=DuplicateRXVirtualMemory
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/303960
Auto-Submit: Liam Appelbe <liama@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2023-05-17 22:46:37 +00:00
Liam Appelbe e730b171ea [vm] Fix asan errors in Disassembler_InvalidInput
The bug is that the disassembler doesn't do any bounds checking, other
than the outer while loop in Disassembler::Disassemble. For multi byte
instructions it relies on having well-formed input to avoid OOB errors.

This test is testing something that doesn't happen in real disassembly,
because usually the invalid machine code is embedded in valid machine
code, so there would be plenty of buffer between the invalid section
and the end of the input. The ideal fix would be to rewrite the
disassembler to do bounds checks, but short of that we can just add
some buffer to the end of bad_input.

Bug: https://github.com/dart-lang/sdk/issues/52421
Change-Id: If68d5485a130523ddf2a4d37f1c8e2ddf1cf485a
Fixes: https://github.com/dart-lang/sdk/issues/52421
TEST=Disassembler_InvalidInput
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/304240
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Auto-Submit: Liam Appelbe <liama@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2023-05-17 22:36:03 +00:00