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

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

Issue 872403002: Don't create builders to determine if a native class is trivial or not. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 10 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
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);
11 11
12 /** 12 /**
13 * Documentation wanted -- johnniwinther 13 * Documentation wanted -- johnniwinther
14 */ 14 */
15 void emitClass(Class cls, 15 void emitClass(Class cls,
16 ClassBuilder enclosingBuilder, 16 ClassBuilder enclosingBuilder,
17 Map<String, jsAst.Expression> additionalProperties) { 17 Map<String, jsAst.Expression> additionalProperties) {
18 ClassElement classElement = cls.element; 18 ClassElement classElement = cls.element;
19 19
20 assert(invariant(classElement, classElement.isDeclaration)); 20 assert(invariant(classElement, classElement.isDeclaration));
21 assert(invariant(classElement, !cls.isNative || cls.onlyForRti));
22 21
23 emitter.needsClassSupport = true; 22 emitter.needsClassSupport = true;
24 23
25 ClassElement superclass = classElement.superclass; 24 ClassElement superclass = classElement.superclass;
26 String superName = ""; 25 String superName = "";
27 if (superclass != null) { 26 if (superclass != null) {
28 superName = namer.getNameOfClass(superclass); 27 superName = namer.getNameOfClass(superclass);
29 } 28 }
30 29
31 if (cls.isMixinApplication) { 30 if (cls.isMixinApplication) {
(...skipping 555 matching lines...) Expand 10 before | Expand all | Expand 10 after
587 js.number(index)); 586 js.number(index));
588 } 587 }
589 jsAst.Expression convertRtiToRuntimeType = emitter 588 jsAst.Expression convertRtiToRuntimeType = emitter
590 .staticFunctionAccess(backend.findHelper('convertRtiToRuntimeType')); 589 .staticFunctionAccess(backend.findHelper('convertRtiToRuntimeType'));
591 compiler.dumpInfoTask.registerElementAst(element, 590 compiler.dumpInfoTask.registerElementAst(element,
592 builder.addProperty(name, 591 builder.addProperty(name,
593 js('function () { return #(#) }', 592 js('function () { return #(#) }',
594 [convertRtiToRuntimeType, computeTypeVariable]))); 593 [convertRtiToRuntimeType, computeTypeVariable])));
595 } 594 }
596 } 595 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698