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

Unified Diff: sdk/lib/_internal/compiler/implementation/js_emitter/class_emitter.dart

Issue 27318003: Avoid generating members for classes only for needed rti. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 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 | tests/language/regress_14105_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/compiler/implementation/js_emitter/class_emitter.dart
diff --git a/sdk/lib/_internal/compiler/implementation/js_emitter/class_emitter.dart b/sdk/lib/_internal/compiler/implementation/js_emitter/class_emitter.dart
index 92e83fa9f0e60eba3aab846c51cc65ee601173b0..047cae4a7ad874313389d1ed6d2e735fe4133f51 100644
--- a/sdk/lib/_internal/compiler/implementation/js_emitter/class_emitter.dart
+++ b/sdk/lib/_internal/compiler/implementation/js_emitter/class_emitter.dart
@@ -35,11 +35,15 @@ class ClassEmitter extends CodeEmitterHelper {
}
ClassBuilder builder = new ClassBuilder();
- emitClassConstructor(classElement, builder, runtimeName);
+ if (!onlyForRti) {
+ emitClassConstructor(classElement, builder, runtimeName);
+ }
emitFields(classElement, builder, superName, onlyForRti: onlyForRti);
- emitClassGettersSetters(classElement, builder);
- if (!classElement.isMixinApplication) {
- emitInstanceMembers(classElement, builder);
+ if (!onlyForRti) {
+ emitClassGettersSetters(classElement, builder);
+ if (!classElement.isMixinApplication) {
+ emitInstanceMembers(classElement, builder);
+ }
}
task.typeTestEmitter.emitIsTests(classElement, builder);
@@ -226,7 +230,6 @@ class ClassEmitter extends CodeEmitterHelper {
void emitClassGettersSetters(ClassElement classElement,
ClassBuilder builder) {
-
visitFields(classElement, false,
(VariableElement member,
String name,
« no previous file with comments | « no previous file | tests/language/regress_14105_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698