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

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

Issue 858433005: dart2js: Don't reference mixins when they are only used for RTI. (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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | pkg/compiler/lib/src/js_emitter/old_emitter/emitter.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 class ClassEmitter extends CodeEmitterHelper { 7 class ClassEmitter extends CodeEmitterHelper {
8 8
9 ClassStubGenerator get _stubGenerator => 9 ClassStubGenerator get _stubGenerator =>
10 new ClassStubGenerator(compiler, namer, backend); 10 new ClassStubGenerator(compiler, namer, backend);
(...skipping 14 matching lines...) Expand all
25 25
26 emitter.needsClassSupport = true; 26 emitter.needsClassSupport = true;
27 String className = namer.getNameOfClass(classElement); 27 String className = namer.getNameOfClass(classElement);
28 28
29 ClassElement superclass = classElement.superclass; 29 ClassElement superclass = classElement.superclass;
30 String superName = ""; 30 String superName = "";
31 if (superclass != null) { 31 if (superclass != null) {
32 superName = namer.getNameOfClass(superclass); 32 superName = namer.getNameOfClass(superclass);
33 } 33 }
34 34
35 if (classElement.isMixinApplication) { 35 if (classElement.isMixinApplication && !onlyForRti) {
36 String mixinName = namer.getNameOfClass(computeMixinClass(classElement)); 36 String mixinName = namer.getNameOfClass(computeMixinClass(classElement));
37 superName = '$superName+$mixinName'; 37 superName = '$superName+$mixinName';
38 emitter.needsMixinSupport = true; 38 emitter.needsMixinSupport = true;
39 } 39 }
40 40
41 ClassBuilder builder = new ClassBuilder(classElement, namer); 41 ClassBuilder builder = new ClassBuilder(classElement, namer);
42 builder.superName = superName; 42 builder.superName = superName;
43 emitClassConstructor(classElement, builder, onlyForRti: onlyForRti); 43 emitClassConstructor(classElement, builder, onlyForRti: onlyForRti);
44 emitFields(classElement, builder, onlyForRti: onlyForRti); 44 emitFields(classElement, builder, onlyForRti: onlyForRti);
45 emitClassGettersSetters(classElement, builder, onlyForRti: onlyForRti); 45 emitClassGettersSetters(classElement, builder, onlyForRti: onlyForRti);
(...skipping 548 matching lines...) Expand 10 before | Expand all | Expand 10 after
594 js(r'this.$builtinTypeInfo && this.$builtinTypeInfo[#]', index); 594 js(r'this.$builtinTypeInfo && this.$builtinTypeInfo[#]', index);
595 } 595 }
596 jsAst.Expression convertRtiToRuntimeType = emitter 596 jsAst.Expression convertRtiToRuntimeType = emitter
597 .staticFunctionAccess(backend.findHelper('convertRtiToRuntimeType')); 597 .staticFunctionAccess(backend.findHelper('convertRtiToRuntimeType'));
598 compiler.dumpInfoTask.registerElementAst(element, 598 compiler.dumpInfoTask.registerElementAst(element,
599 builder.addProperty(name, 599 builder.addProperty(name,
600 js('function () { return #(#) }', 600 js('function () { return #(#) }',
601 [convertRtiToRuntimeType, computeTypeVariable]))); 601 [convertRtiToRuntimeType, computeTypeVariable])));
602 } 602 }
603 } 603 }
OLDNEW
« no previous file with comments | « no previous file | pkg/compiler/lib/src/js_emitter/old_emitter/emitter.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698