| Index: runtime/lib/immutable_map.dart
|
| diff --git a/runtime/lib/immutable_map.dart b/runtime/lib/immutable_map.dart
|
| index 2377c8c3d0909c964b6828498209839abc9f91b6..b8d0d3c62d7b9cb8ed74402db42413aba5f6c39e 100644
|
| --- a/runtime/lib/immutable_map.dart
|
| +++ b/runtime/lib/immutable_map.dart
|
| @@ -11,8 +11,9 @@ class ImmutableMap<K, V> implements Map<K, V> {
|
|
|
|
|
| V operator [](Object key) {
|
| - // TODO(hausner): Since the keys are sorted, we could do a binary
|
| - // search. But is it worth it?
|
| + // To preserve the key-value order of the map literal, the keys are
|
| + // not sorted. Need to do linear search or implement an additional
|
| + // lookup table.
|
| for (int i = 0; i < _kvPairs.length - 1; i += 2) {
|
| if (key == _kvPairs[i]) {
|
| return _kvPairs[i+1];
|
|
|