Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(130)

Side by Side Diff: pkg/compiler/lib/src/js_emitter/old_emitter/emitter.dart

Issue 882713008: Move computation of method flags into model. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 722 matching lines...) Expand 10 before | Expand all | Expand 10 after
733 enclosingBuilder.properties.addAll(cachedBuilder.properties); 733 enclosingBuilder.properties.addAll(cachedBuilder.properties);
734 } else { 734 } else {
735 classEmitter.emitClass( 735 classEmitter.emitClass(
736 cls, enclosingBuilder, additionalProperties[cls]); 736 cls, enclosingBuilder, additionalProperties[cls]);
737 } 737 }
738 }); 738 });
739 } 739 }
740 740
741 void emitStaticFunctions(Iterable<Method> staticFunctions) { 741 void emitStaticFunctions(Iterable<Method> staticFunctions) {
742 if (staticFunctions == null) return; 742 if (staticFunctions == null) return;
743 // We need to filter out null-elements for the interceptors.
744 Iterable<Element> elements = staticFunctions
745 .where((Method method) => method.element != null)
746 .map((Method method) => method.element);
747 743
748 for (Element element in elements) { 744 for (Method method in staticFunctions) {
745 Element element = method.element;
746 // We need to filter out null-elements for the interceptors.
floitsch 2015/01/28 16:10:39 That works too :) Please add a: TODO(floitsch): u
herhut 2015/01/29 10:24:21 Done.
747 if (element == null) continue;
749 ClassBuilder builder = new ClassBuilder(element, namer); 748 ClassBuilder builder = new ClassBuilder(element, namer);
750 containerBuilder.addMember(element, builder); 749 containerBuilder.addMemberMethod(method, builder);
751 getElementDescriptor(element).properties.addAll(builder.properties); 750 getElementDescriptor(element).properties.addAll(builder.properties);
752 } 751 }
753 } 752 }
754 753
755 void emitStaticNonFinalFieldInitializations(CodeOutput output, 754 void emitStaticNonFinalFieldInitializations(CodeOutput output,
756 OutputUnit outputUnit) { 755 OutputUnit outputUnit) {
757 void emitInitialization(Element element, jsAst.Expression initialValue) { 756 void emitInitialization(Element element, jsAst.Expression initialValue) {
758 jsAst.Expression init = 757 jsAst.Expression init =
759 js('$isolateProperties.# = #', 758 js('$isolateProperties.# = #',
760 [namer.getNameOfGlobalField(element), initialValue]); 759 [namer.getNameOfGlobalField(element), initialValue]);
(...skipping 1338 matching lines...) Expand 10 before | Expand all | Expand 10 after
2099 for (Element element in compiler.enqueuer.codegen.newlyEnqueuedElements) { 2098 for (Element element in compiler.enqueuer.codegen.newlyEnqueuedElements) {
2100 if (element.isInstanceMember) { 2099 if (element.isInstanceMember) {
2101 cachedClassBuilders.remove(element.enclosingClass); 2100 cachedClassBuilders.remove(element.enclosingClass);
2102 2101
2103 nativeEmitter.cachedBuilders.remove(element.enclosingClass); 2102 nativeEmitter.cachedBuilders.remove(element.enclosingClass);
2104 2103
2105 } 2104 }
2106 } 2105 }
2107 } 2106 }
2108 } 2107 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698