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

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

Issue 2647893002: Use entities in js_emitter/model.dart (Closed)
Patch Set: Created 3 years, 11 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
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 library dart2js.js_emitter.full_emitter; 5 library dart2js.js_emitter.full_emitter;
6 6
7 import 'dart:collection' show HashMap; 7 import 'dart:collection' show HashMap;
8 import 'dart:convert'; 8 import 'dart:convert';
9 9
10 import 'package:js_runtime/shared/embedded_names.dart' as embeddedNames; 10 import 'package:js_runtime/shared/embedded_names.dart' as embeddedNames;
(...skipping 601 matching lines...) Expand 10 before | Expand all | Expand 10 after
612 classEmitter.emitClass(cls, enclosingBuilder, fragment); 612 classEmitter.emitClass(cls, enclosingBuilder, fragment);
613 } 613 }
614 }); 614 });
615 } 615 }
616 616
617 void assembleStaticFunctions( 617 void assembleStaticFunctions(
618 Iterable<Method> staticFunctions, Fragment fragment) { 618 Iterable<Method> staticFunctions, Fragment fragment) {
619 if (staticFunctions == null) return; 619 if (staticFunctions == null) return;
620 620
621 for (Method method in staticFunctions) { 621 for (Method method in staticFunctions) {
622 Element element = method.element; 622 MethodElement element = method.element;
623 // We need to filter out null-elements for the interceptors. 623 // We need to filter out null-elements for the interceptors.
624 // TODO(floitsch): use the precomputed interceptors here. 624 // TODO(floitsch): use the precomputed interceptors here.
625 if (element == null) continue; 625 if (element == null) continue;
626 ClassBuilder builder = new ClassBuilder.forStatics(element, namer); 626 ClassBuilder builder = new ClassBuilder.forStatics(element, namer);
627 containerBuilder.addMemberMethod(method, builder); 627 containerBuilder.addMemberMethod(method, builder);
628 getElementDescriptor(element, fragment) 628 getElementDescriptor(element, fragment)
629 .properties 629 .properties
630 .addAll(builder.properties); 630 .addAll(builder.properties);
631 } 631 }
632 } 632 }
(...skipping 1551 matching lines...) Expand 10 before | Expand all | Expand 10 after
2184 if (cachedElements.isEmpty) return; 2184 if (cachedElements.isEmpty) return;
2185 for (Element element in backend.codegenEnqueuer.newlyEnqueuedElements) { 2185 for (Element element in backend.codegenEnqueuer.newlyEnqueuedElements) {
2186 if (element.isInstanceMember) { 2186 if (element.isInstanceMember) {
2187 cachedClassBuilders.remove(element.enclosingClass); 2187 cachedClassBuilders.remove(element.enclosingClass);
2188 2188
2189 nativeEmitter.cachedBuilders.remove(element.enclosingClass); 2189 nativeEmitter.cachedBuilders.remove(element.enclosingClass);
2190 } 2190 }
2191 } 2191 }
2192 } 2192 }
2193 } 2193 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698