@@ -945,10 +945,7 @@ abstract class _StringBase implements String {
945945
946946@pragma ("vm:entry-point" )
947947class _OneByteString extends _StringBase {
948- factory _OneByteString ._uninstantiable () {
949- throw new UnsupportedError (
950- "_OneByteString can only be allocated by the VM" );
951- }
948+ factory _OneByteString ._uninstantiable () { throw "Unreachable" ; }
952949
953950 @pragma ("vm:exact-result-type" , "dart:core#_Smi" )
954951 int get hashCode native "String_getHashCode" ;
@@ -1254,10 +1251,7 @@ class _OneByteString extends _StringBase {
12541251
12551252@pragma ("vm:entry-point" )
12561253class _TwoByteString extends _StringBase {
1257- factory _TwoByteString ._uninstantiable () {
1258- throw new UnsupportedError (
1259- "_TwoByteString can only be allocated by the VM" );
1260- }
1254+ factory _TwoByteString ._uninstantiable () { throw "Unreachable" ; }
12611255
12621256 static String _allocateFromTwoByteList (List <int > list, int start, int end)
12631257 native "TwoByteString_allocateFromTwoByteList" ;
@@ -1277,10 +1271,7 @@ class _TwoByteString extends _StringBase {
12771271
12781272@pragma ("vm:entry-point" )
12791273class _ExternalOneByteString extends _StringBase {
1280- factory _ExternalOneByteString ._uninstantiable () {
1281- throw new UnsupportedError (
1282- "_ExternalOneByteString can only be allocated by the VM" );
1283- }
1274+ factory _ExternalOneByteString ._uninstantiable () { throw "Unreachable" ; }
12841275
12851276 bool _isWhitespace (int codeUnit) {
12861277 return _StringBase ._isOneByteWhitespace (codeUnit);
@@ -1296,10 +1287,7 @@ class _ExternalOneByteString extends _StringBase {
12961287
12971288@pragma ("vm:entry-point" )
12981289class _ExternalTwoByteString extends _StringBase {
1299- factory _ExternalTwoByteString ._uninstantiable () {
1300- throw new UnsupportedError (
1301- "_ExternalTwoByteString can only be allocated by the VM" );
1302- }
1290+ factory _ExternalTwoByteString ._uninstantiable () { throw "Unreachable" ; }
13031291
13041292 bool _isWhitespace (int codeUnit) {
13051293 return _StringBase ._isTwoByteWhitespace (codeUnit);
0 commit comments