| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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.js_emitter.program_builder; | 5 library dart2js.js_emitter.program_builder; |
| 6 | 6 |
| 7 import '../../closure.dart' show ClosureTask, ClosureFieldElement; | 7 import '../../closure.dart' show ClosureTask, ClosureFieldElement; |
| 8 import '../../common.dart'; | 8 import '../../common.dart'; |
| 9 import '../../common/names.dart' show Names, Selectors; | 9 import '../../common/names.dart' show Names, Selectors; |
| 10 import '../../constants/values.dart' | 10 import '../../constants/values.dart' |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 // We thus build the classes before building their containers. | 202 // We thus build the classes before building their containers. |
| 203 collector.outputClassLists | 203 collector.outputClassLists |
| 204 .forEach((OutputUnit _, List<ClassElement> classes) { | 204 .forEach((OutputUnit _, List<ClassElement> classes) { |
| 205 classes.forEach(_buildClass); | 205 classes.forEach(_buildClass); |
| 206 }); | 206 }); |
| 207 | 207 |
| 208 // Resolve the superclass references after we've processed all the classes. | 208 // Resolve the superclass references after we've processed all the classes. |
| 209 _classes.forEach((ClassElement element, Class c) { | 209 _classes.forEach((ClassElement element, Class c) { |
| 210 if (element.superclass != null) { | 210 if (element.superclass != null) { |
| 211 c.setSuperclass(_classes[element.superclass]); | 211 c.setSuperclass(_classes[element.superclass]); |
| 212 assert(c.superclass != null); | 212 assert(invariant(element, c.superclass != null, |
| 213 message: "No Class for has been created for superclass " |
| 214 "${element.superclass} of $c.")); |
| 213 } | 215 } |
| 214 if (c is MixinApplication) { | 216 if (c is MixinApplication) { |
| 215 c.setMixinClass(_classes[computeMixinClass(element)]); | 217 c.setMixinClass(_classes[computeMixinClass(element)]); |
| 216 assert(c.mixinClass != null); | 218 assert(c.mixinClass != null); |
| 217 } | 219 } |
| 218 }); | 220 }); |
| 219 | 221 |
| 220 List<Class> nativeClasses = collector.nativeClassesAndSubclasses | 222 List<Class> nativeClasses = collector.nativeClassesAndSubclasses |
| 221 .map((ClassElement classElement) => _classes[classElement]) | 223 .map((ClassElement classElement) => _classes[classElement]) |
| 222 .toList(); | 224 .toList(); |
| (...skipping 871 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1094 Constant constant = new Constant(name, holder, constantValue); | 1096 Constant constant = new Constant(name, holder, constantValue); |
| 1095 _constants[constantValue] = constant; | 1097 _constants[constantValue] = constant; |
| 1096 } | 1098 } |
| 1097 } | 1099 } |
| 1098 | 1100 |
| 1099 Holder _registerStaticStateHolder() { | 1101 Holder _registerStaticStateHolder() { |
| 1100 return _registry.registerHolder(_namer.staticStateHolder, | 1102 return _registry.registerHolder(_namer.staticStateHolder, |
| 1101 isStaticStateHolder: true); | 1103 isStaticStateHolder: true); |
| 1102 } | 1104 } |
| 1103 } | 1105 } |
| OLD | NEW |