Improve return type of markUnmodifiableList to JSArray instead of List.

R=sgjesse@google.com

Review URL: https://codereview.chromium.org//1076013006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45372 260f80e4-7a28-3924-810f-c04153c831b5
This commit is contained in:
lrn@google.com 2015-04-23 10:20:53 +00:00
parent e8fa15c30a
commit b3ee3a85bf
3 changed files with 7 additions and 4 deletions

View file

@ -2,6 +2,8 @@
### Core library changes
* Add `unmodifiable` constructor to `List` class -
[r45334](https://code.google.com/p/dart/source/detail?r=45334),
* Update experimental Isolate API:
- Make priorty parameters of `Isolate.ping` and `Isolate.kill` methods
a named parameter.
@ -14,7 +16,7 @@
### Core library changes
* Fix behavior of `HtmlEscape` in `dart:convert`. No longer escape
* Fix behavior of `HtmlEscape` in `dart:convert`. It no longer escapes
no-break space (U+00A0) anywhere or forward slash ('/', U+002F) in element
context. Slash is still escaped in the "unknown" context.
[r45003](https://code.google.com/p/dart/source/detail?r=45003),

View file

@ -83,7 +83,8 @@ class JSArray<E> extends Interceptor implements List<E>, JSIndexable {
// to know if the property exists.
JS('void', r'#.fixed$length = Array', list);
JS('void', r'#.immutable$list = Array', list);
return JS('List', '#', list);
// TODO(23309): Make it detectable that the list has fixed length.
return JS('JSArray', '#', list);
}
checkMutable(reason) {

View file

@ -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.
@ -387,6 +387,6 @@ external List makeListFixedLength(List growableList);
* That means that it is a destructive conversion.
* The original list should not be used afterwards.
*
* The unmodifialbe list type is similar to the one used by const lists.
* The unmodifiable list type is similar to the one used by const lists.
*/
external List makeFixedListUnmodifiable(List fixedLengthList);