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

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

Issue 920763002: Install 'get call' on Closure class. (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
« no previous file with comments | « no previous file | pkg/compiler/lib/src/js_emitter/program_builder.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 25 matching lines...) Expand all
36 builder.superName = superName; 36 builder.superName = superName;
37 emitConstructorsForCSP(cls); 37 emitConstructorsForCSP(cls);
38 emitFields(cls, builder); 38 emitFields(cls, builder);
39 emitCheckedClassSetters(cls, builder); 39 emitCheckedClassSetters(cls, builder);
40 emitClassGettersSettersForCSP(cls, builder); 40 emitClassGettersSettersForCSP(cls, builder);
41 emitInstanceMembers(cls, builder); 41 emitInstanceMembers(cls, builder);
42 emitCallStubs(cls, builder); 42 emitCallStubs(cls, builder);
43 emitRuntimeTypeInformation(cls, builder); 43 emitRuntimeTypeInformation(cls, builder);
44 emitNativeInfo(cls, builder); 44 emitNativeInfo(cls, builder);
45 45
46 if (classElement == backend.closureClass) {
47 // We add a special getter here to allow for tearing off a closure from
48 // itself.
49 String name = namer.getMappedInstanceName(Compiler.CALL_OPERATOR_NAME);
50 jsAst.Fun function = js('function() { return this; }');
51 builder.addProperty(namer.getterNameFromAccessorName(name), function);
52 }
53
54 emitTypeVariableReaders(classElement, builder); 46 emitTypeVariableReaders(classElement, builder);
55 47
56 emitClassBuilderWithReflectionData(cls, builder, enclosingBuilder); 48 emitClassBuilderWithReflectionData(cls, builder, enclosingBuilder);
57 } 49 }
58 /** 50 /**
59 * Emits the precompiled constructor when in CSP mode. 51 * Emits the precompiled constructor when in CSP mode.
60 */ 52 */
61 void emitConstructorsForCSP(Class cls) { 53 void emitConstructorsForCSP(Class cls) {
62 List<String> fieldNames = <String>[]; 54 List<String> fieldNames = <String>[];
63 55
(...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after
588 js.number(index)); 580 js.number(index));
589 } 581 }
590 jsAst.Expression convertRtiToRuntimeType = emitter 582 jsAst.Expression convertRtiToRuntimeType = emitter
591 .staticFunctionAccess(backend.findHelper('convertRtiToRuntimeType')); 583 .staticFunctionAccess(backend.findHelper('convertRtiToRuntimeType'));
592 compiler.dumpInfoTask.registerElementAst(element, 584 compiler.dumpInfoTask.registerElementAst(element,
593 builder.addProperty(name, 585 builder.addProperty(name,
594 js('function () { return #(#) }', 586 js('function () { return #(#) }',
595 [convertRtiToRuntimeType, computeTypeVariable]))); 587 [convertRtiToRuntimeType, computeTypeVariable])));
596 } 588 }
597 } 589 }
OLDNEW
« no previous file with comments | « no previous file | pkg/compiler/lib/src/js_emitter/program_builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698