| OLD | NEW |
| 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 14 matching lines...) Expand all Loading... |
| 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 closedWorld.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 => closedWorld.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 |
| 43 assert(!(classElement is ClassElement && !classElement.isDeclaration), | 43 assert(!(classElement is ClassElement && !classElement.isDeclaration), |
| 44 failedAt(classElement)); | 44 failedAt(classElement)); |
| 45 | 45 |
| (...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 } |
| OLD | NEW |