| 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(Iterable<Method> staticFunctions) { | 757 void emitStaticFunctions(Iterable<Method> staticFunctions) { |
| 758 if (staticFunctions == null) return; |
| 758 // We need to filter out null-elements for the interceptors. | 759 // We need to filter out null-elements for the interceptors. |
| 759 Iterable<Element> elements = staticFunctions | 760 Iterable<Element> elements = staticFunctions |
| 760 .where((Method method) => method.element != null) | 761 .where((Method method) => method.element != null) |
| 761 .map((Method method) => method.element); | 762 .map((Method method) => method.element); |
| 762 | 763 |
| 763 for (Element element in elements) { | 764 for (Element element in elements) { |
| 764 ClassBuilder builder = new ClassBuilder(element, namer); | 765 ClassBuilder builder = new ClassBuilder(element, namer); |
| 765 containerBuilder.addMember(element, builder); | 766 containerBuilder.addMember(element, builder); |
| 766 getElementDescriptor(element).properties.addAll(builder.properties); | 767 getElementDescriptor(element).properties.addAll(builder.properties); |
| 767 } | 768 } |
| (...skipping 1336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2104 for (Element element in compiler.enqueuer.codegen.newlyEnqueuedElements) { | 2105 for (Element element in compiler.enqueuer.codegen.newlyEnqueuedElements) { |
| 2105 if (element.isInstanceMember) { | 2106 if (element.isInstanceMember) { |
| 2106 cachedClassBuilders.remove(element.enclosingClass); | 2107 cachedClassBuilders.remove(element.enclosingClass); |
| 2107 | 2108 |
| 2108 nativeEmitter.cachedBuilders.remove(element.enclosingClass); | 2109 nativeEmitter.cachedBuilders.remove(element.enclosingClass); |
| 2109 | 2110 |
| 2110 } | 2111 } |
| 2111 } | 2112 } |
| 2112 } | 2113 } |
| 2113 } | 2114 } |
| OLD | NEW |