| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 patch class ExpandoImplementation<T> { | 5 patch class Expando<T> { |
| 6 /* patch */ T operator[](Object object) { | 6 /* patch */ T operator[](Object object) { |
| 7 _checkType(object); | 7 _checkType(object); |
| 8 var weakProperty = _find(this); | 8 var weakProperty = _find(this); |
| 9 var list = weakProperty.value; | 9 var list = weakProperty.value; |
| 10 var doCompact = false; | 10 var doCompact = false; |
| 11 var result = null; | 11 var result = null; |
| 12 for (int i = 0; i < list.length; ++i) { | 12 for (int i = 0; i < list.length; ++i) { |
| 13 var key = list[i].key; | 13 var key = list[i].key; |
| 14 if (key === object) { | 14 if (key === object) { |
| 15 result = list[i].value; | 15 result = list[i].value; |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 } | 83 } |
| 84 var result = _data[i]; | 84 var result = _data[i]; |
| 85 if (doCompact) { | 85 if (doCompact) { |
| 86 _data = _data.filter((e) => (e !== null)); | 86 _data = _data.filter((e) => (e !== null)); |
| 87 } | 87 } |
| 88 return result; | 88 return result; |
| 89 } | 89 } |
| 90 | 90 |
| 91 static List _data; | 91 static List _data; |
| 92 } | 92 } |
| OLD | NEW |