Chromium Code Reviews| Index: sdk/lib/_internal/compiler/implementation/universe/function_set.dart |
| diff --git a/sdk/lib/_internal/compiler/implementation/universe/function_set.dart b/sdk/lib/_internal/compiler/implementation/universe/function_set.dart |
| index 6afdf09f09e0a316424be476782ec216a95fc982..b6c6a53e197ebbfe42d39d25fed739b4cd99132f 100644 |
| --- a/sdk/lib/_internal/compiler/implementation/universe/function_set.dart |
| +++ b/sdk/lib/_internal/compiler/implementation/universe/function_set.dart |
| @@ -89,7 +89,7 @@ class FunctionSetNode { |
| isList = false; |
| } |
| elements.add(element); |
| - cache.clear(); |
| + if (!cache.isEmpty) cache.clear(); |
|
ngeoffray
2013/02/14 10:14:33
Why adding this?
|
| } |
| } |
| @@ -103,14 +103,14 @@ class FunctionSetNode { |
| if (index != list.length) { |
| list[index] = last; |
| } |
| - cache.clear(); |
| + if (!cache.isEmpty) cache.clear(); |
| } else { |
| Set set = elements; |
| if (set.remove(element)) { |
| // To avoid wobbling between the two representations, we do |
| // not transition back to the list representation even if we |
| // end up with few enough elements at this point. |
| - cache.clear(); |
| + if (!cache.isEmpty) cache.clear(); |
| } |
| } |
| } |