| 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 part of dart2js; | 5 part of dart2js; |
| 6 | 6 |
| 7 abstract class ClassWorld { | 7 abstract class ClassWorld { |
| 8 // TODO(johnniwinther): Refine this into a `BackendClasses` interface. | 8 // TODO(johnniwinther): Refine this into a `BackendClasses` interface. |
| 9 Backend get backend; | 9 Backend get backend; |
| 10 | 10 |
| (...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 334 | 334 |
| 335 bool get isClosed => compiler.phase > Compiler.PHASE_RESOLVING; | 335 bool get isClosed => compiler.phase > Compiler.PHASE_RESOLVING; |
| 336 | 336 |
| 337 // Used by selectors. | 337 // Used by selectors. |
| 338 bool isAssertMethod(Element element) { | 338 bool isAssertMethod(Element element) { |
| 339 return compiler.backend.isAssertMethod(element); | 339 return compiler.backend.isAssertMethod(element); |
| 340 } | 340 } |
| 341 | 341 |
| 342 // Used by selectors. | 342 // Used by selectors. |
| 343 bool isForeign(Element element) { | 343 bool isForeign(Element element) { |
| 344 return element.isForeign(compiler.backend); | 344 return compiler.backend.isForeign(element); |
| 345 } | 345 } |
| 346 | 346 |
| 347 Set<ClassElement> typesImplementedBySubclassesOf(ClassElement cls) { | 347 Set<ClassElement> typesImplementedBySubclassesOf(ClassElement cls) { |
| 348 return _typesImplementedBySubclasses[cls.declaration]; | 348 return _typesImplementedBySubclasses[cls.declaration]; |
| 349 } | 349 } |
| 350 | 350 |
| 351 World(Compiler compiler) | 351 World(Compiler compiler) |
| 352 : allFunctions = new FunctionSet(compiler), | 352 : allFunctions = new FunctionSet(compiler), |
| 353 this.compiler = compiler, | 353 this.compiler = compiler, |
| 354 alreadyPopulated = compiler.cacheStrategy.newSet(); | 354 alreadyPopulated = compiler.cacheStrategy.newSet(); |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 524 // function expressions's element. | 524 // function expressions's element. |
| 525 // TODO(herhut): Generate classes for function expressions earlier. | 525 // TODO(herhut): Generate classes for function expressions earlier. |
| 526 if (element is closureMapping.SynthesizedCallMethodElementX) { | 526 if (element is closureMapping.SynthesizedCallMethodElementX) { |
| 527 return getMightBePassedToApply(element.expression); | 527 return getMightBePassedToApply(element.expression); |
| 528 } | 528 } |
| 529 return functionsThatMightBePassedToApply.contains(element); | 529 return functionsThatMightBePassedToApply.contains(element); |
| 530 } | 530 } |
| 531 | 531 |
| 532 bool get hasClosedWorldAssumption => !compiler.hasIncrementalSupport; | 532 bool get hasClosedWorldAssumption => !compiler.hasIncrementalSupport; |
| 533 } | 533 } |
| OLD | NEW |