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

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

Issue 863353002: dart2js: Don't add properties to native classes that are not needed. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/js_emitter/native_emitter.dart
diff --git a/pkg/compiler/lib/src/js_emitter/native_emitter.dart b/pkg/compiler/lib/src/js_emitter/native_emitter.dart
index 6423959d2c125f3bbee637edfa9c55d071d5fb7e..843fd8750e14524cceab1f72a82b54d95b1b73f6 100644
--- a/pkg/compiler/lib/src/js_emitter/native_emitter.dart
+++ b/pkg/compiler/lib/src/js_emitter/native_emitter.dart
@@ -125,6 +125,7 @@ class NativeEmitter {
ClassBuilder builder = builders[cls];
bool needed = false;
if (builder == null) {
+ assert(!cls.isNative);
// Mixin applications (native+mixin) are non-native, so [classElement]
// has already been emitted as a regular class. Mark [classElement] as
// 'needed' to ensure the native superclass is needed.
@@ -230,7 +231,9 @@ class NativeEmitter {
}
generateClassInfo(jsInterceptorClass);
for (Class cls in classes) {
- generateClassInfo(cls);
+ if (!cls.isNative || neededClasses.contains(cls)) {
+ generateClassInfo(cls);
+ }
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698