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

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

Issue 2935663002: Remove Compiler.commonElements (Closed)
Patch Set: Remove Compiler._commonElements Created 3 years, 6 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 library dart2js.js_emitter.full_emitter.class_emitter; 5 library dart2js.js_emitter.full_emitter.class_emitter;
6 6
7 import '../../common.dart'; 7 import '../../common.dart';
8 import '../../common/names.dart' show Names; 8 import '../../common/names.dart' show Names;
9 import '../../common_elements.dart'; 9 import '../../common_elements.dart';
10 import '../../elements/resolution_types.dart' show ResolutionDartType; 10 import '../../elements/resolution_types.dart' show ResolutionDartType;
(...skipping 11 matching lines...) Expand all
22 import '../js_emitter.dart' hide Emitter, EmitterFactory; 22 import '../js_emitter.dart' hide Emitter, EmitterFactory;
23 import '../model.dart'; 23 import '../model.dart';
24 import 'emitter.dart'; 24 import 'emitter.dart';
25 25
26 class ClassEmitter extends CodeEmitterHelper { 26 class ClassEmitter extends CodeEmitterHelper {
27 final ClosedWorld closedWorld; 27 final ClosedWorld closedWorld;
28 28
29 ClassEmitter(this.closedWorld); 29 ClassEmitter(this.closedWorld);
30 30
31 ClassStubGenerator get _stubGenerator => new ClassStubGenerator(task.emitter, 31 ClassStubGenerator get _stubGenerator => new ClassStubGenerator(task.emitter,
32 compiler.commonElements, namer, codegenWorldBuilder, closedWorld, 32 closedWorld.commonElements, namer, codegenWorldBuilder, closedWorld,
33 enableMinification: compiler.options.enableMinification); 33 enableMinification: compiler.options.enableMinification);
34 34
35 ElementEnvironment get _elementEnvironment => compiler.elementEnvironment; 35 ElementEnvironment get _elementEnvironment => compiler.elementEnvironment;
36 36
37 /** 37 /**
38 * Documentation wanted -- johnniwinther 38 * Documentation wanted -- johnniwinther
39 */ 39 */
40 void emitClass(Class cls, ClassBuilder enclosingBuilder, Fragment fragment) { 40 void emitClass(Class cls, ClassBuilder enclosingBuilder, Fragment fragment) {
41 ClassEntity classElement = cls.element; 41 ClassEntity classElement = cls.element;
42 42
(...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after
453 String reflectionName = emitter.getReflectionName(selector, name); 453 String reflectionName = emitter.getReflectionName(selector, name);
454 if (reflectionName != null) { 454 if (reflectionName != null) {
455 var reflectable = js( 455 var reflectable = js(
456 backend.mirrorsData.isMemberAccessibleByReflection(member) 456 backend.mirrorsData.isMemberAccessibleByReflection(member)
457 ? '1' 457 ? '1'
458 : '0'); 458 : '0');
459 builder.addPropertyByName('+$reflectionName', reflectable); 459 builder.addPropertyByName('+$reflectionName', reflectable);
460 } 460 }
461 } 461 }
462 } 462 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/js_emitter/code_emitter_task.dart ('k') | pkg/compiler/lib/src/js_emitter/full_emitter/emitter.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698