| 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 dart2js.world; | 5 library dart2js.world; |
| 6 | 6 |
| 7 import 'closure.dart' show | 7 import 'closure.dart' show |
| 8 SynthesizedCallMethodElementX; | 8 SynthesizedCallMethodElementX; |
| 9 import 'common/backend_api.dart' show | 9 import 'common/backend_api.dart' show |
| 10 Backend; | 10 Backend; |
| (...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 373 final Set<Element> elementsThatCannotThrow = new Set<Element>(); | 373 final Set<Element> elementsThatCannotThrow = new Set<Element>(); |
| 374 | 374 |
| 375 final Set<Element> functionsThatMightBePassedToApply = | 375 final Set<Element> functionsThatMightBePassedToApply = |
| 376 new Set<FunctionElement>(); | 376 new Set<FunctionElement>(); |
| 377 | 377 |
| 378 final Set<Element> alreadyPopulated; | 378 final Set<Element> alreadyPopulated; |
| 379 | 379 |
| 380 bool get isClosed => compiler.phase > Compiler.PHASE_RESOLVING; | 380 bool get isClosed => compiler.phase > Compiler.PHASE_RESOLVING; |
| 381 | 381 |
| 382 // Used by selectors. | 382 // Used by selectors. |
| 383 bool isAssertMethod(Element element) { | |
| 384 return compiler.backend.isAssertMethod(element); | |
| 385 } | |
| 386 | |
| 387 // Used by selectors. | |
| 388 bool isForeign(Element element) { | 383 bool isForeign(Element element) { |
| 389 return compiler.backend.isForeign(element); | 384 return compiler.backend.isForeign(element); |
| 390 } | 385 } |
| 391 | 386 |
| 392 Set<ClassElement> typesImplementedBySubclassesOf(ClassElement cls) { | 387 Set<ClassElement> typesImplementedBySubclassesOf(ClassElement cls) { |
| 393 return _typesImplementedBySubclasses[cls.declaration]; | 388 return _typesImplementedBySubclasses[cls.declaration]; |
| 394 } | 389 } |
| 395 | 390 |
| 396 World(Compiler compiler) | 391 World(Compiler compiler) |
| 397 : allFunctions = new FunctionSet(compiler), | 392 : allFunctions = new FunctionSet(compiler), |
| (...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 647 // function expressions's element. | 642 // function expressions's element. |
| 648 // TODO(herhut): Generate classes for function expressions earlier. | 643 // TODO(herhut): Generate classes for function expressions earlier. |
| 649 if (element is SynthesizedCallMethodElementX) { | 644 if (element is SynthesizedCallMethodElementX) { |
| 650 return getMightBePassedToApply(element.expression); | 645 return getMightBePassedToApply(element.expression); |
| 651 } | 646 } |
| 652 return functionsThatMightBePassedToApply.contains(element); | 647 return functionsThatMightBePassedToApply.contains(element); |
| 653 } | 648 } |
| 654 | 649 |
| 655 bool get hasClosedWorldAssumption => !compiler.hasIncrementalSupport; | 650 bool get hasClosedWorldAssumption => !compiler.hasIncrementalSupport; |
| 656 } | 651 } |
| OLD | NEW |