This is a reland of commit 608934e330
Can be landed when Flutter with https://github.com/flutter/flutter/pull/123211
has been rolled into internal repository.
Original change's description:
> Reland "Add class modifiers to `dart:convert`."
>
> This is a reland of commit b2f4cf3e01
>
> Commented out deprecation for now.
>
> Original change's description:
> > Add class modifiers to `dart:convert`.
> >
> > The usual approach:
> > Pure interfaces marked `interface`.
> > Pure implementation classes marked `final`.
> > Base classes marked `base` or nothing, and `mixin class` if reasonable.
> > Combined X/XBase/XMixin where possible.
> >
> > CoreLibraryReviewExempt: Aske is away
> > Change-Id: I927f9bd488fb385ff9c17c8fc94920a1f5076347
> > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/289200
> > Reviewed-by: Stephen Adams <sra@google.com>
> > Reviewed-by: Slava Egorov <vegorov@google.com>
> > Reviewed-by: Nate Bosch <nbosch@google.com>
> > Commit-Queue: Lasse Nielsen <lrn@google.com>
>
> CoreLibraryReviewExempt: Approved in original.
> Change-Id: I1bc14f99b742567e2634dcfcbc52f332dbcc5364
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/290521
> Reviewed-by: Nate Bosch <nbosch@google.com>
> Commit-Queue: Lasse Nielsen <lrn@google.com>
CoreLibraryReviewExempt: Approved in original.
Change-Id: If157e1ef2339d7a06e99a1e402f2f8ac93550b83
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/290960
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
This is a reland of commit b2f4cf3e01
Commented out deprecation for now.
Original change's description:
> Add class modifiers to `dart:convert`.
>
> The usual approach:
> Pure interfaces marked `interface`.
> Pure implementation classes marked `final`.
> Base classes marked `base` or nothing, and `mixin class` if reasonable.
> Combined X/XBase/XMixin where possible.
>
> CoreLibraryReviewExempt: Aske is away
> Change-Id: I927f9bd488fb385ff9c17c8fc94920a1f5076347
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/289200
> Reviewed-by: Stephen Adams <sra@google.com>
> Reviewed-by: Slava Egorov <vegorov@google.com>
> Reviewed-by: Nate Bosch <nbosch@google.com>
> Commit-Queue: Lasse Nielsen <lrn@google.com>
CoreLibraryReviewExempt: Approved in original.
Change-Id: I1bc14f99b742567e2634dcfcbc52f332dbcc5364
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/290521
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
The usual approach:
Pure interfaces marked `interface`.
Pure implementation classes marked `final`.
Base classes marked `base` or nothing, and `mixin class` if reasonable.
Combined X/XBase/XMixin where possible.
CoreLibraryReviewExempt: Aske is away
Change-Id: I927f9bd488fb385ff9c17c8fc94920a1f5076347
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/289200
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
Avoid quadratic behavior when multiple chunks fail to
have a line break, and the carry-over string gets repeatedly extended.
In the original chunked conversion code, the chunk handling code retained the trailing, non-line-terminated text of the previous chunk, then eagerly concatenated it with the next chunk in order to continue looking for lines. That's moderately effective when lines are shorter than chunks, and neither are too large.
However, a very long line spread across many chunks would perform repeated string concatenation with quadratic time complexity.
This change gives `LineSplitter` the option of using a `StringBuffer` to collect multiple carry-over line parts.
The buffer is needed whenever a chunk does not contain a line break, and needs to be combined with a previous chunk's carry-over. This avoids ever directly concatenating any more than two strings.
The `StringBuffer` is not allocated until it's first needed, so if lines are generally shorter than chunks, the buffer won't be used. Once allocated, the buffer is retained in case a buffer will be needed again, but cleared when its contents are used.
The code optimizes for the simple case of each chunk having a line break.
Fixes#51167
Bug: https://github.com/dart-lang/sdk/issues/51167
Change-Id: I600a011e02aa9f1ad6f88e45764df5b2e8eccfa3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/280100
Reviewed-by: Leaf Petersen <leafp@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
A JSON value can be `null`, so the return type must be `Object?`, not `Object`.
Fixes#46205.
Bug: http://dartbug.com/462051
Change-Id: I9a5522e09765457dcf8cd2639abbe385d97a3186
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202623
Reviewed-by: Erik Ernst <eernst@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
This adjusts all UTF-8 tests to the new semantics in the breaking
change described here: https://github.com/dart-lang/sdk/issues/41100
This has three parts:
- Unpaired surrogates are encoded as replacement characters, and
encoded surrogates are considered malformed input when decoding.
- Decoding errors are generally reported on the position of the byte
that conclusively makes the input malformed.
- The number of replacement characters emitted by the decoder is
generally one per unfinished sequence or undecodable byte.
The code changes to implement the new semantics are placed in subsequent
commits.
Change-Id: I4cc8ce660e39287e734070764ab8e1f0ebb8b9e0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/143815
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
In strong mode it is no longer valid to grow the list of non-nullable
elements using x.length = y. The test is updated to add elements to the
list in order to grow it instead of using length setter.
The following tests began passing:
dartk-strong-linux-release-x64:lib/convert/chunked_conversion_utf88_test was fixed (RuntimeError -> Pass)
dartkp-strong-linux-release-x64:lib/convert/chunked_conversion_utf88_test was fixed (RuntimeError -> Pass)
Change-Id: I5e30e6f92ae30bf06ebada4a6c3686cc7986343e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142281
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Liam Appelbe <liama@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Speed-up ObjectSets.
Fix pointer verification before and after scavenging to set the correct mark expectation being on concurrent marking state.
Bug: https://github.com/dart-lang/sdk/issues/40780
Change-Id: Ic7ce6d5a829e41634083b0c274b9764da3f4b619
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/137240
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
This deletes:
tests/co19
tests/corelib
tests/html
tests/isolate
tests/language
tests/lib
It does not delete tests/standalone because apparently there are tests
in there that are not in standalone_2. (I assume they were added after
the test migration. I don't know why they were added there.)
I have tried to remove references to the old tests from various scripts
and tools but may have missed some. (As you can imagine, grepping for
"lib" does not have the best signal-to-noise ratio.)
"It was a pleasure to burn. It was a special pleasure to see things
eaten, to see things blackened and changed. With the brass nozzle in his
fists, with this great python spitting its venomous kerosene upon the
world, the blood pounded in his head, and his hands were the hands of
some amazing conductor playing all the symphonies of blazing and burning
to bring down the tatters and charcoal ruins of history."
- Ray Bradbury, Fahrenheit 451
Change-Id: If3db4a50e7a5ee25aff8058b1483e2ce8e68424e
Reviewed-on: https://dart-review.googlesource.com/c/75420
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: William Hesse <whesse@google.com>
Reviewed-by: Terry Lucas <terry@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Also updated the tests so that we don't forget in the future.
Change-Id: I0a998af306a0b6fa54b3c86cf164fdfe1f76340d
Reviewed-on: https://dart-review.googlesource.com/3624
Reviewed-by: William Hesse <whesse@google.com>
There are far too many files here to review everyone carefully.
Spot checking most of the diffs look good as test code is generally written
with less care than application code so lots of ugly formatting get through.
If people notice files where the automated formatting bothers them feel free
to comment indicating file names and I'll move spaces within comments to make
the formatting cleaner and use comments to force block formatting as I have
done for other case where formatting looked bad.
BUG=
R=efortuna@google.com
Review-Url: https://codereview.chromium.org/2771453003 .
Update all tests
Support //# multitests for better dartfmt compatibility and fewer multitest false positives
All files under tests were manually updated with
find . -iregex '.*\.dart$' -print0 | xargs -0 perl -pi -e 's/(\S\s+)\/\/\/ /$1\/\/# /'
For now both old and new styles are allowed to accommodate CO19 tests.
R=efortuna@google.com
BUG=
Review-Url: https://codereview.chromium.org/2765693002 .
Review-Url: https://codereview.chromium.org/2765893003 .
Support //# multitests for better dartfmt compatibility and fewer multitest false positives
All files under tests were manually updated with
find . -iregex '.*\.dart$' -print0 | xargs -0 perl -pi -e 's/(\S\s+)\/\/\/ /$1\/\/# /'
For now both old and new styles are allowed to accommodate CO19 tests.
R=efortuna@google.com
Review-Url: https://codereview.chromium.org/2765693002 .
This reverts commit dde47b2aad.
Revert "Update Dartium status for passing test"
This reverts commit d71c70d56d.
Tests failing on dart2js and async_star_pause_test is
passing on Dartium. Need to think about how to update the
status files.
Review-Url: https://codereview.chromium.org/2656503004 .
Removes comment syntax where possible for the following platform libraries:
* async
* collection
* convert
* core
* internal
* io
* math
The HTML related libraries are not changed. The templates used to build them
must be changed as well.
R=floitsch@google.com
Committed: 68818315b5
Committed: 3f74b8d82e
Review-Url: https://codereview.chromium.org/2529393002 .
Removes comment syntax where possible for the following platform libraries:
* async
* collection
* convert
* core
* internal
* io
* math
The HTML related libraries are not changed. The templates used to build them
must be changed as well.
R=floitsch@google.com
Review URL: https://codereview.chromium.org/2529393002 .
Committed: 68818315b5
Removes comment syntax where possible for the following platform libraries:
* async
* collection
* convert
* core
* internal
* io
* math
The HTML related libraries are not changed. The templates used to build them
must be changed as well.
R=floitsch@google.com
Review URL: https://codereview.chromium.org/2529393002 .