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