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

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

Issue 1348063002: Make the universe parts into small libraries. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 3 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
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.full_emitter; 5 part of dart2js.js_emitter.full_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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 emitInstanceMembers(cls, builder); 42 emitInstanceMembers(cls, builder);
43 emitStubs(cls.callStubs, builder); 43 emitStubs(cls.callStubs, builder);
44 emitStubs(cls.typeVariableReaderStubs, builder); 44 emitStubs(cls.typeVariableReaderStubs, builder);
45 emitRuntimeTypeInformation(cls, builder); 45 emitRuntimeTypeInformation(cls, builder);
46 emitNativeInfo(cls, builder); 46 emitNativeInfo(cls, builder);
47 47
48 if (classElement == backend.closureClass) { 48 if (classElement == backend.closureClass) {
49 // We add a special getter here to allow for tearing off a closure from 49 // We add a special getter here to allow for tearing off a closure from
50 // itself. 50 // itself.
51 jsAst.Fun function = js('function() { return this; }'); 51 jsAst.Fun function = js('function() { return this; }');
52 jsAst.Name name = namer.getterForMember(Selector.CALL_NAME); 52 jsAst.Name name = namer.getterForMember(Names.call);
53 builder.addProperty(name, function); 53 builder.addProperty(name, function);
54 } 54 }
55 55
56 emitClassBuilderWithReflectionData(cls, builder, enclosingBuilder, 56 emitClassBuilderWithReflectionData(cls, builder, enclosingBuilder,
57 fragment); 57 fragment);
58 } 58 }
59 /** 59 /**
60 * Emits the precompiled constructor when in CSP mode. 60 * Emits the precompiled constructor when in CSP mode.
61 */ 61 */
62 void emitConstructorsForCSP(Class cls) { 62 void emitConstructorsForCSP(Class cls) {
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 : new Selector.setter( 427 : new Selector.setter(
428 new Name(member.name, member.library, isSetter: true)); 428 new Name(member.name, member.library, isSetter: true));
429 String reflectionName = emitter.getReflectionName(selector, name); 429 String reflectionName = emitter.getReflectionName(selector, name);
430 if (reflectionName != null) { 430 if (reflectionName != null) {
431 var reflectable = 431 var reflectable =
432 js(backend.isAccessibleByReflection(member) ? '1' : '0'); 432 js(backend.isAccessibleByReflection(member) ? '1' : '0');
433 builder.addPropertyByName('+$reflectionName', reflectable); 433 builder.addPropertyByName('+$reflectionName', reflectable);
434 } 434 }
435 } 435 }
436 } 436 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/js_backend/lookup_map_analysis.dart ('k') | pkg/compiler/lib/src/js_emitter/js_emitter.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698