Skip to content

Commit 96bd779

Browse files
osa1Commit Queue
authored and
Commit Queue
committed
[dart2wasm] Small simplifications in string patch
Change-Id: I1febd54d485681875936f5305d94f72f94d4fab8 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/329461 Reviewed-by: Aske Simon Christensen <[email protected]> Commit-Queue: Ömer Ağacan <[email protected]>
1 parent 229dbc5 commit 96bd779

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

sdk/lib/_internal/wasm/lib/string.dart

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,6 @@ abstract final class StringBase implements String {
8282
// TODO(lrn): See if this limit can be tweaked.
8383
static const int _maxJoinReplaceOneByteStringLength = 500;
8484

85-
StringBase._();
86-
8785
int get hashCode {
8886
int hash = getHash(this);
8987
if (hash != 0) return hash;
@@ -259,10 +257,6 @@ abstract final class StringBase implements String {
259257

260258
String operator [](int index) => String.fromCharCode(codeUnitAt(index));
261259

262-
int codeUnitAt(int index); // Implemented in the subclasses.
263-
264-
int get length; // Implemented in the subclasses.
265-
266260
bool get isEmpty {
267261
return this.length == 0;
268262
}
@@ -1012,9 +1006,7 @@ final class OneByteString extends StringBase {
10121006
@pragma("wasm:entry-point")
10131007
WasmIntArray<WasmI8> _array;
10141008

1015-
OneByteString._withLength(int length)
1016-
: _array = WasmIntArray<WasmI8>(length),
1017-
super._();
1009+
OneByteString._withLength(int length) : _array = WasmIntArray<WasmI8>(length);
10181010

10191011
// Same hash as VM
10201012
@override
@@ -1349,8 +1341,7 @@ final class TwoByteString extends StringBase {
13491341
WasmIntArray<WasmI16> _array;
13501342

13511343
TwoByteString._withLength(int length)
1352-
: _array = WasmIntArray<WasmI16>(length),
1353-
super._();
1344+
: _array = WasmIntArray<WasmI16>(length);
13541345

13551346
// Same hash as VM
13561347
@override

0 commit comments

Comments
 (0)