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 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
353 final Set<Element> elementsThatCannotThrow = new Set<Element>(); | 353 final Set<Element> elementsThatCannotThrow = new Set<Element>(); |
354 | 354 |
355 final Set<Element> functionsThatMightBePassedToApply = | 355 final Set<Element> functionsThatMightBePassedToApply = |
356 new Set<FunctionElement>(); | 356 new Set<FunctionElement>(); |
357 | 357 |
358 final Set<Element> alreadyPopulated; | 358 final Set<Element> alreadyPopulated; |
359 | 359 |
360 bool get isClosed => compiler.phase > Compiler.PHASE_RESOLVING; | 360 bool get isClosed => compiler.phase > Compiler.PHASE_RESOLVING; |
361 | 361 |
362 // Used by selectors. | 362 // Used by selectors. |
363 bool isAssertMethod(Element element) { | |
364 return compiler.backend.isAssertMethod(element); | |
365 } | |
366 | |
367 // Used by selectors. | |
368 bool isForeign(Element element) { | 363 bool isForeign(Element element) { |
369 return compiler.backend.isForeign(element); | 364 return compiler.backend.isForeign(element); |
370 } | 365 } |
371 | 366 |
372 Set<ClassElement> typesImplementedBySubclassesOf(ClassElement cls) { | 367 Set<ClassElement> typesImplementedBySubclassesOf(ClassElement cls) { |
373 return _typesImplementedBySubclasses[cls.declaration]; | 368 return _typesImplementedBySubclasses[cls.declaration]; |
374 } | 369 } |
375 | 370 |
376 World(Compiler compiler) | 371 World(Compiler compiler) |
377 : allFunctions = new FunctionSet(compiler), | 372 : allFunctions = new FunctionSet(compiler), |
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
627 // function expressions's element. | 622 // function expressions's element. |
628 // TODO(herhut): Generate classes for function expressions earlier. | 623 // TODO(herhut): Generate classes for function expressions earlier. |
629 if (element is SynthesizedCallMethodElementX) { | 624 if (element is SynthesizedCallMethodElementX) { |
630 return getMightBePassedToApply(element.expression); | 625 return getMightBePassedToApply(element.expression); |
631 } | 626 } |
632 return functionsThatMightBePassedToApply.contains(element); | 627 return functionsThatMightBePassedToApply.contains(element); |
633 } | 628 } |
634 | 629 |
635 bool get hasClosedWorldAssumption => !compiler.hasIncrementalSupport; | 630 bool get hasClosedWorldAssumption => !compiler.hasIncrementalSupport; |
636 } | 631 } |
OLD | NEW |