| 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 library universe; | 5 library universe; |
| 6 | 6 |
| 7 import 'dart:collection'; | 7 import 'dart:collection'; |
| 8 | 8 |
| 9 import '../common.dart'; | 9 import '../common.dart'; |
| 10 import '../compiler.dart' show | 10 import '../compiler.dart' show |
| (...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 292 } | 292 } |
| 293 } | 293 } |
| 294 return false; | 294 return false; |
| 295 } | 295 } |
| 296 | 296 |
| 297 bool hasInvocation(Element member, World world) { | 297 bool hasInvocation(Element member, World world) { |
| 298 return _hasMatchingSelector(_invokedNames[member.name], member, world); | 298 return _hasMatchingSelector(_invokedNames[member.name], member, world); |
| 299 } | 299 } |
| 300 | 300 |
| 301 bool hasInvokedGetter(Element member, World world) { | 301 bool hasInvokedGetter(Element member, World world) { |
| 302 return _hasMatchingSelector(_invokedGetters[member.name], member, world); | 302 return _hasMatchingSelector(_invokedGetters[member.name], member, world) || |
| 303 member.isFunction && methodsNeedingSuperGetter.contains(member); |
| 303 } | 304 } |
| 304 | 305 |
| 305 bool hasInvokedSetter(Element member, World world) { | 306 bool hasInvokedSetter(Element member, World world) { |
| 306 return _hasMatchingSelector(_invokedSetters[member.name], member, world); | 307 return _hasMatchingSelector(_invokedSetters[member.name], member, world); |
| 307 } | 308 } |
| 308 | 309 |
| 309 bool registerDynamicUse(DynamicUse dynamicUse) { | 310 bool registerDynamicUse(DynamicUse dynamicUse) { |
| 310 switch (dynamicUse.kind) { | 311 switch (dynamicUse.kind) { |
| 311 case DynamicUseKind.INVOKE: | 312 case DynamicUseKind.INVOKE: |
| 312 return _registerNewSelector(dynamicUse, _invokedNames); | 313 return _registerNewSelector(dynamicUse, _invokedNames); |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 417 // TODO(ahe): Replace this method with something that is O(1), for example, | 418 // TODO(ahe): Replace this method with something that is O(1), for example, |
| 418 // by using a map. | 419 // by using a map. |
| 419 List<LocalFunctionElement> slowDirectlyNestedClosures(Element element) { | 420 List<LocalFunctionElement> slowDirectlyNestedClosures(Element element) { |
| 420 // Return new list to guard against concurrent modifications. | 421 // Return new list to guard against concurrent modifications. |
| 421 return new List<LocalFunctionElement>.from( | 422 return new List<LocalFunctionElement>.from( |
| 422 allClosures.where((LocalFunctionElement closure) { | 423 allClosures.where((LocalFunctionElement closure) { |
| 423 return closure.executableContext == element; | 424 return closure.executableContext == element; |
| 424 })); | 425 })); |
| 425 } | 426 } |
| 426 } | 427 } |
| OLD | NEW |