| 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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 } | 124 } |
| 125 | 125 |
| 126 class World implements ClassWorld { | 126 class World implements ClassWorld { |
| 127 ClassElement get objectClass => compiler.objectClass; | 127 ClassElement get objectClass => compiler.objectClass; |
| 128 ClassElement get functionClass => compiler.functionClass; | 128 ClassElement get functionClass => compiler.functionClass; |
| 129 ClassElement get boolClass => compiler.boolClass; | 129 ClassElement get boolClass => compiler.boolClass; |
| 130 ClassElement get numClass => compiler.numClass; | 130 ClassElement get numClass => compiler.numClass; |
| 131 ClassElement get intClass => compiler.intClass; | 131 ClassElement get intClass => compiler.intClass; |
| 132 ClassElement get doubleClass => compiler.doubleClass; | 132 ClassElement get doubleClass => compiler.doubleClass; |
| 133 ClassElement get stringClass => compiler.stringClass; | 133 ClassElement get stringClass => compiler.stringClass; |
| 134 ClassElement get nullClass => compiler.nullClass; |
| 134 | 135 |
| 135 /// Cache of [ti.FlatTypeMask]s grouped by the 8 possible values of the | 136 /// Cache of [ti.FlatTypeMask]s grouped by the 8 possible values of the |
| 136 /// [ti.FlatTypeMask.flags] property. | 137 /// [ti.FlatTypeMask.flags] property. |
| 137 List<Map<ClassElement, ti.TypeMask>> canonicalizedTypeMasks = | 138 List<Map<ClassElement, ti.TypeMask>> canonicalizedTypeMasks = |
| 138 new List<Map<ClassElement, ti.TypeMask>>.filled(8, null); | 139 new List<Map<ClassElement, ti.TypeMask>>.filled(8, null); |
| 139 | 140 |
| 140 bool checkInvariants(ClassElement cls, {bool mustBeInstantiated: true}) { | 141 bool checkInvariants(ClassElement cls, {bool mustBeInstantiated: true}) { |
| 141 return | 142 return |
| 142 invariant(cls, cls.isDeclaration, | 143 invariant(cls, cls.isDeclaration, |
| 143 message: '$cls must be the declaration.') && | 144 message: '$cls must be the declaration.') && |
| (...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 626 // function expressions's element. | 627 // function expressions's element. |
| 627 // TODO(herhut): Generate classes for function expressions earlier. | 628 // TODO(herhut): Generate classes for function expressions earlier. |
| 628 if (element is SynthesizedCallMethodElementX) { | 629 if (element is SynthesizedCallMethodElementX) { |
| 629 return getMightBePassedToApply(element.expression); | 630 return getMightBePassedToApply(element.expression); |
| 630 } | 631 } |
| 631 return functionsThatMightBePassedToApply.contains(element); | 632 return functionsThatMightBePassedToApply.contains(element); |
| 632 } | 633 } |
| 633 | 634 |
| 634 bool get hasClosedWorldAssumption => !compiler.hasIncrementalSupport; | 635 bool get hasClosedWorldAssumption => !compiler.hasIncrementalSupport; |
| 635 } | 636 } |
| OLD | NEW |