Index: tool/input_sdk/lib/internal/list.dart |
diff --git a/tool/input_sdk/lib/internal/list.dart b/tool/input_sdk/lib/internal/list.dart |
index 3e87762c317d2dfd1f93a16e81e2868126809f24..36322034efa5cac3b53040fe9d81e483b45c3c00 100644 |
--- a/tool/input_sdk/lib/internal/list.dart |
+++ b/tool/input_sdk/lib/internal/list.dart |
@@ -361,7 +361,7 @@ abstract class NonGrowableListError { |
* That means that it is a destructive conversion. |
* The original list should not be used afterwards. |
* |
- * The returned list may be the same list as the orginal, |
+ * The returned list may be the same list as the original, |
* or it may be a different list (according to [identical]). |
* The original list may have changed type to be a fixed list, |
* or become empty or been otherwise modified. |
@@ -373,4 +373,21 @@ abstract class NonGrowableListError { |
* conversion, at the cost of leaving the original list in an unspecified |
* state. |
*/ |
-external List makeListFixedLength(List growableList); |
+external List/*<E>*/ makeListFixedLength/*<E>*/(List/*<E>*/ growableList); |
+ |
+/** |
+ * Converts a fixed-length list to an unmodifiable list. |
+ * |
+ * For internal use only. |
+ * Only works for core fixed-length lists as created by `new List(length)`, |
+ * or as returned by [makeListFixedLength]. |
+ * |
+ * The operation is efficient. It doesn't copy the elements, but converts |
+ * the existing list directly to a fixed length list. |
+ * That means that it is a destructive conversion. |
+ * The original list should not be used afterwards. |
+ * |
+ * The unmodifiable list type is similar to the one used by const lists. |
+ */ |
+external List/*<E>*/ makeFixedListUnmodifiable/*<E>*/( |
+ List/*<E>*/ fixedLengthList); |