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

Unified Diff: pkg/compiler/lib/src/js_backend/native_emitter.dart

Issue 813563006: dart2js: use bool to track if an app has native classes. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Update incremental compiler.wq Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | pkg/dart2js_incremental/lib/caching_compiler.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/js_backend/native_emitter.dart
diff --git a/pkg/compiler/lib/src/js_backend/native_emitter.dart b/pkg/compiler/lib/src/js_backend/native_emitter.dart
index 60f11553430e71639cbfa93dd9780a1d1020a973..c1f2239b1240a296e1bbe34b433764f149375360 100644
--- a/pkg/compiler/lib/src/js_backend/native_emitter.dart
+++ b/pkg/compiler/lib/src/js_backend/native_emitter.dart
@@ -10,8 +10,8 @@ class NativeEmitter {
final CodeEmitterTask emitterTask;
- // Native classes found in the application.
- Set<ClassElement> nativeClasses = new Set<ClassElement>();
+ // Whether the application contains native classes.
+ bool hasNativeClasses = false;
// Caches the native subtypes of a native class.
Map<ClassElement, List<ClassElement>> subtypes;
@@ -278,7 +278,7 @@ class NativeEmitter {
// TODO(sra): Issue #13731- this is commented out as part of custom element
// constructor work.
//assert(!classElement.hasBackendMembers);
- nativeClasses.add(classElement);
+ hasNativeClasses = true;
ClassElement superclass = classElement.superclass;
assert(superclass != null);
@@ -447,7 +447,7 @@ class NativeEmitter {
return prop;
}
- if (!nativeClasses.isEmpty) {
+ if (hasNativeClasses) {
// If the native emitter has been asked to take care of the
// noSuchMethod handlers, we do that now.
if (handleNoSuchMethod) {
« no previous file with comments | « no previous file | pkg/dart2js_incremental/lib/caching_compiler.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698