Version 3.2.0-92.0.dev
Merge 4d4a922638cda394c59605936a56874f75819b9e into dev
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 43cc717..338466f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -22,6 +22,14 @@
- Added `broadcast` parameter to `Stream.empty` constructor.
+#### `dart:convert`
+
+- **Breaking change** [#52801][]:
+ - Changed return types of `utf8.encode()` and `Utf8Codec.encode()` from
+ `List<int>` to `Uint8List`.
+
+[#52801]: https://github.com/dart-lang/sdk/issues/52801
+
#### `dart:developer`
- Deprecated the `Service.getIsolateID` method.
@@ -85,14 +93,6 @@
[#52334]: https://github.com/dart-lang/sdk/issues/52334
-#### `dart:convert`
-
-- **Breaking change** [#52801][]:
- - Changed return types of `utf8.encode()` and `Utf8Codec.encode()` from
- `List<int>` to `Uint8List`.
-
-[#52801]: https://github.com/dart-lang/sdk/issues/52801
-
#### `dart:core`
- `Uri.base` on native platforms now respects `IOOverrides` overriding
diff --git a/benchmarks/IsolateJson/dart/IsolateJson.dart b/benchmarks/IsolateJson/dart/IsolateJson.dart
index 9717f34..bc13e05 100644
--- a/benchmarks/IsolateJson/dart/IsolateJson.dart
+++ b/benchmarks/IsolateJson/dart/IsolateJson.dart
@@ -42,7 +42,7 @@
for (int i = 0; i < size; i++) {
map['$i'] = list;
}
- return utf8.encode(json.encode(map)) as Uint8List;
+ return utf8.encode(json.encode(map));
}
class JsonDecodeRequest {
@@ -113,7 +113,7 @@
Future<void> main() async {
final jsonString =
File('benchmarks/IsolateJson/dart/sample.json').readAsStringSync();
- final json250KB = utf8.encode(jsonString) as Uint8List; // 294356 bytes
+ final json250KB = utf8.encode(jsonString); // 294356 bytes
final decoded = json.decode(utf8.decode(json250KB));
final decoded1MB = <dynamic, dynamic>{
'1': decoded['1'],
@@ -121,14 +121,11 @@
'3': decoded['1'],
'4': decoded['1'],
};
- final json1MB =
- utf8.encode(json.encode(decoded1MB)) as Uint8List; // 1177397 bytes
+ final json1MB = utf8.encode(json.encode(decoded1MB)); // 1177397 bytes
decoded['1'] = (decoded['1'] as List).sublist(0, 200);
- final json100KB =
- utf8.encode(json.encode(decoded)) as Uint8List; // 104685 bytes
+ final json100KB = utf8.encode(json.encode(decoded)); // 104685 bytes
decoded['1'] = (decoded['1'] as List).sublist(0, 100);
- final json50KB =
- utf8.encode(json.encode(decoded)) as Uint8List; // 51760 bytes
+ final json50KB = utf8.encode(json.encode(decoded)); // 51760 bytes
final configs = <BenchmarkConfig>[
BenchmarkConfig('50KB', json50KB),
diff --git a/benchmarks/Utf8Decode/dart/Utf8Decode.dart b/benchmarks/Utf8Decode/dart/Utf8Decode.dart
index 504debe..e37eadf 100644
--- a/benchmarks/Utf8Decode/dart/Utf8Decode.dart
+++ b/benchmarks/Utf8Decode/dart/Utf8Decode.dart
@@ -39,7 +39,7 @@
@override
void setup() {
- final Uint8List data = utf8.encode(text) as Uint8List;
+ final Uint8List data = utf8.encode(text);
if (data.length != 10000) {
throw 'Expected input data of exactly 10000 bytes.';
}
diff --git a/benchmarks/Utf8Decode/dart2/Utf8Decode.dart b/benchmarks/Utf8Decode/dart2/Utf8Decode.dart
index 03c87ed..98dd260 100644
--- a/benchmarks/Utf8Decode/dart2/Utf8Decode.dart
+++ b/benchmarks/Utf8Decode/dart2/Utf8Decode.dart
@@ -41,7 +41,7 @@
@override
void setup() {
- final Uint8List data = utf8.encode(text) as Uint8List;
+ final Uint8List data = utf8.encode(text);
if (data.length != 10000) {
throw 'Expected input data of exactly 10000 bytes.';
}
diff --git a/tools/VERSION b/tools/VERSION
index fac4cdd..62d0af4 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -27,5 +27,5 @@
MAJOR 3
MINOR 2
PATCH 0
-PRERELEASE 91
+PRERELEASE 92
PRERELEASE_PATCH 0