| 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.js_emitter; | 5 part of dart2js.js_emitter; |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * Generates the code for all used classes in the program. Static fields (even | 8 * Generates the code for all used classes in the program. Static fields (even |
| 9 * in classes) are ignored, since they can be treated as non-class elements. | 9 * in classes) are ignored, since they can be treated as non-class elements. |
| 10 * | 10 * |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 final List<ClassElement> deferredClasses = <ClassElement>[]; | 36 final List<ClassElement> deferredClasses = <ClassElement>[]; |
| 37 final List<ClassElement> nativeClasses = <ClassElement>[]; | 37 final List<ClassElement> nativeClasses = <ClassElement>[]; |
| 38 final Map<String, String> mangledFieldNames = <String, String>{}; | 38 final Map<String, String> mangledFieldNames = <String, String>{}; |
| 39 final Map<String, String> mangledGlobalFieldNames = <String, String>{}; | 39 final Map<String, String> mangledGlobalFieldNames = <String, String>{}; |
| 40 final Set<String> recordedMangledNames = new Set<String>(); | 40 final Set<String> recordedMangledNames = new Set<String>(); |
| 41 | 41 |
| 42 // TODO(ngeoffray): remove this field. | 42 // TODO(ngeoffray): remove this field. |
| 43 Set<ClassElement> instantiatedClasses; | 43 Set<ClassElement> instantiatedClasses; |
| 44 | 44 |
| 45 JavaScriptBackend get backend => compiler.backend; | 45 JavaScriptBackend get backend => compiler.backend; |
| 46 TypeVariableHandler get typeVariableHandler => backend.typeVariableHandler; |
| 46 | 47 |
| 47 String get _ => space; | 48 String get _ => space; |
| 48 String get space => compiler.enableMinification ? "" : " "; | 49 String get space => compiler.enableMinification ? "" : " "; |
| 49 String get n => compiler.enableMinification ? "" : "\n"; | 50 String get n => compiler.enableMinification ? "" : "\n"; |
| 50 String get N => compiler.enableMinification ? "\n" : ";\n"; | 51 String get N => compiler.enableMinification ? "\n" : ";\n"; |
| 51 | 52 |
| 52 /** | 53 /** |
| 53 * List of expressions and statements that will be included in the | 54 * List of expressions and statements that will be included in the |
| 54 * precompiled function. | 55 * precompiled function. |
| 55 * | 56 * |
| (...skipping 1500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1556 } | 1557 } |
| 1557 | 1558 |
| 1558 bool isDeferred(Element element) { | 1559 bool isDeferred(Element element) { |
| 1559 return compiler.deferredLoadTask.isDeferred(element); | 1560 return compiler.deferredLoadTask.isDeferred(element); |
| 1560 } | 1561 } |
| 1561 | 1562 |
| 1562 bool get areAnyElementsDeferred { | 1563 bool get areAnyElementsDeferred { |
| 1563 return compiler.deferredLoadTask.areAnyElementsDeferred; | 1564 return compiler.deferredLoadTask.areAnyElementsDeferred; |
| 1564 } | 1565 } |
| 1565 } | 1566 } |
| OLD | NEW |