| 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 part of dart2js.js_emitter; | 5 part of dart2js.js_emitter; |
| 6 | 6 |
| 7 | 7 |
| 8 class OldEmitter implements Emitter { | 8 class OldEmitter implements Emitter { |
| 9 final Compiler compiler; | 9 final Compiler compiler; |
| 10 final CodeEmitterTask task; | 10 final CodeEmitterTask task; |
| (...skipping 737 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 748 invariant(classElement, builder.fieldMetadata == null); | 748 invariant(classElement, builder.fieldMetadata == null); |
| 749 properties.properties.addAll(builder.properties); | 749 properties.properties.addAll(builder.properties); |
| 750 } else { | 750 } else { |
| 751 classEmitter.generateClass( | 751 classEmitter.generateClass( |
| 752 classElement, properties, additionalProperties[classElement]); | 752 classElement, properties, additionalProperties[classElement]); |
| 753 } | 753 } |
| 754 }); | 754 }); |
| 755 } | 755 } |
| 756 | 756 |
| 757 void emitStaticFunctions(List<Element> staticFunctions) { | 757 void emitStaticFunctions(List<Element> staticFunctions) { |
| 758 if (staticFunctions == null) return; |
| 758 for (Element element in staticFunctions) { | 759 for (Element element in staticFunctions) { |
| 759 ClassBuilder builder = new ClassBuilder(element, namer); | 760 ClassBuilder builder = new ClassBuilder(element, namer); |
| 760 containerBuilder.addMember(element, builder); | 761 containerBuilder.addMember(element, builder); |
| 761 getElementDescriptor(element).properties.addAll(builder.properties); | 762 getElementDescriptor(element).properties.addAll(builder.properties); |
| 762 } | 763 } |
| 763 } | 764 } |
| 764 | 765 |
| 765 void emitStaticNonFinalFieldInitializations(CodeOutput output, | 766 void emitStaticNonFinalFieldInitializations(CodeOutput output, |
| 766 OutputUnit outputUnit) { | 767 OutputUnit outputUnit) { |
| 767 void emitInitialization(Element element, jsAst.Expression initialValue) { | 768 void emitInitialization(Element element, jsAst.Expression initialValue) { |
| (...skipping 1325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2093 for (Element element in compiler.enqueuer.codegen.newlyEnqueuedElements) { | 2094 for (Element element in compiler.enqueuer.codegen.newlyEnqueuedElements) { |
| 2094 if (element.isInstanceMember) { | 2095 if (element.isInstanceMember) { |
| 2095 cachedClassBuilders.remove(element.enclosingClass); | 2096 cachedClassBuilders.remove(element.enclosingClass); |
| 2096 | 2097 |
| 2097 nativeEmitter.cachedBuilders.remove(element.enclosingClass); | 2098 nativeEmitter.cachedBuilders.remove(element.enclosingClass); |
| 2098 | 2099 |
| 2099 } | 2100 } |
| 2100 } | 2101 } |
| 2101 } | 2102 } |
| 2102 } | 2103 } |
| OLD | NEW |