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. |
383 bool isForeign(Element element) { | 388 bool isForeign(Element element) { |
384 return compiler.backend.isForeign(element); | 389 return compiler.backend.isForeign(element); |
385 } | 390 } |
386 | 391 |
387 Set<ClassElement> typesImplementedBySubclassesOf(ClassElement cls) { | 392 Set<ClassElement> typesImplementedBySubclassesOf(ClassElement cls) { |
388 return _typesImplementedBySubclasses[cls.declaration]; | 393 return _typesImplementedBySubclasses[cls.declaration]; |
389 } | 394 } |
390 | 395 |
391 World(Compiler compiler) | 396 World(Compiler compiler) |
392 : allFunctions = new FunctionSet(compiler), | 397 : allFunctions = new FunctionSet(compiler), |
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
642 // function expressions's element. | 647 // function expressions's element. |
643 // TODO(herhut): Generate classes for function expressions earlier. | 648 // TODO(herhut): Generate classes for function expressions earlier. |
644 if (element is SynthesizedCallMethodElementX) { | 649 if (element is SynthesizedCallMethodElementX) { |
645 return getMightBePassedToApply(element.expression); | 650 return getMightBePassedToApply(element.expression); |
646 } | 651 } |
647 return functionsThatMightBePassedToApply.contains(element); | 652 return functionsThatMightBePassedToApply.contains(element); |
648 } | 653 } |
649 | 654 |
650 bool get hasClosedWorldAssumption => !compiler.hasIncrementalSupport; | 655 bool get hasClosedWorldAssumption => !compiler.hasIncrementalSupport; |
651 } | 656 } |
OLD | NEW |