[dart2wasm] Small simplifications in string patch
Change-Id: I1febd54d485681875936f5305d94f72f94d4fab8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/329461
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Ömer Ağacan <omersa@google.com>
diff --git a/sdk/lib/_internal/wasm/lib/string.dart b/sdk/lib/_internal/wasm/lib/string.dart
index 3d355b7..17cf8f6 100644
--- a/sdk/lib/_internal/wasm/lib/string.dart
+++ b/sdk/lib/_internal/wasm/lib/string.dart
@@ -82,8 +82,6 @@
// TODO(lrn): See if this limit can be tweaked.
static const int _maxJoinReplaceOneByteStringLength = 500;
- StringBase._();
-
int get hashCode {
int hash = getHash(this);
if (hash != 0) return hash;
@@ -259,10 +257,6 @@
String operator [](int index) => String.fromCharCode(codeUnitAt(index));
- int codeUnitAt(int index); // Implemented in the subclasses.
-
- int get length; // Implemented in the subclasses.
-
bool get isEmpty {
return this.length == 0;
}
@@ -1012,9 +1006,7 @@
@pragma("wasm:entry-point")
WasmIntArray<WasmI8> _array;
- OneByteString._withLength(int length)
- : _array = WasmIntArray<WasmI8>(length),
- super._();
+ OneByteString._withLength(int length) : _array = WasmIntArray<WasmI8>(length);
// Same hash as VM
@override
@@ -1349,8 +1341,7 @@
WasmIntArray<WasmI16> _array;
TwoByteString._withLength(int length)
- : _array = WasmIntArray<WasmI16>(length),
- super._();
+ : _array = WasmIntArray<WasmI16>(length);
// Same hash as VM
@override