| 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 'js_emitter.dart' show computeMixinClass; | 7 import 'js_emitter.dart' show computeMixinClass; |
| 8 import 'model.dart'; | 8 import 'model.dart'; |
| 9 | 9 |
| 10 import '../common.dart'; | 10 import '../common.dart'; |
| (...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 274 bool visitStatics = true; | 274 bool visitStatics = true; |
| 275 List<Field> staticFieldsForReflection = _buildFields(library, visitStatics); | 275 List<Field> staticFieldsForReflection = _buildFields(library, visitStatics); |
| 276 | 276 |
| 277 return new Library(library, uri, statics, classes, | 277 return new Library(library, uri, statics, classes, |
| 278 staticFieldsForReflection); | 278 staticFieldsForReflection); |
| 279 } | 279 } |
| 280 | 280 |
| 281 /// HACK for Incremental Compilation. | 281 /// HACK for Incremental Compilation. |
| 282 /// | 282 /// |
| 283 /// Returns a class that contains the fields of a class. | 283 /// Returns a class that contains the fields of a class. |
| 284 Class buildClassWithFieldsForIncrementalCompilation(ClassElement element) { | 284 Class buildFieldsHackForIncrementalCompilation(ClassElement element) { |
| 285 assert(_compiler.hasIncrementalSupport); | 285 assert(_compiler.hasIncrementalSupport); |
| 286 | 286 |
| 287 List<Field> instanceFields = _buildFields(element, false); | 287 List<Field> instanceFields = _buildFields(element, false); |
| 288 String name = namer.getNameOfClass(element); | 288 String name = namer.getNameOfClass(element); |
| 289 | 289 |
| 290 return new Class( | 290 return new Class( |
| 291 element, name, null, [], instanceFields, [], [], [], null, | 291 element, name, null, [], instanceFields, [], [], [], null, |
| 292 isDirectlyInstantiated: true, | 292 isDirectlyInstantiated: true, |
| 293 onlyForRti: false, | 293 onlyForRti: false, |
| 294 isNative: element.isNative); | 294 isNative: element.isNative); |
| (...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 589 _registry.registerConstant(outputUnit, constantValue); | 589 _registry.registerConstant(outputUnit, constantValue); |
| 590 assert(!_constants.containsKey(constantValue)); | 590 assert(!_constants.containsKey(constantValue)); |
| 591 String name = namer.constantName(constantValue); | 591 String name = namer.constantName(constantValue); |
| 592 String constantObject = namer.globalObjectForConstant(constantValue); | 592 String constantObject = namer.globalObjectForConstant(constantValue); |
| 593 Holder holder = _registry.registerHolder(constantObject); | 593 Holder holder = _registry.registerHolder(constantObject); |
| 594 Constant constant = new Constant(name, holder, constantValue); | 594 Constant constant = new Constant(name, holder, constantValue); |
| 595 _constants[constantValue] = constant; | 595 _constants[constantValue] = constant; |
| 596 } | 596 } |
| 597 } | 597 } |
| 598 } | 598 } |
| OLD | NEW |