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 '../../elements/resolution_types.dart' show ResolutionDartType; | 9 import '../../elements/resolution_types.dart' show ResolutionDartType; |
10 import '../../deferred_load.dart' show OutputUnit; | 10 import '../../deferred_load.dart' show OutputUnit; |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 jsAst.Name mixinName = mixinApplication.mixinClass.name; | 50 jsAst.Name mixinName = mixinApplication.mixinClass.name; |
51 superName = new CompoundName([superName, Namer.literalPlus, mixinName]); | 51 superName = new CompoundName([superName, Namer.literalPlus, mixinName]); |
52 emitter.needsMixinSupport = true; | 52 emitter.needsMixinSupport = true; |
53 } | 53 } |
54 | 54 |
55 ClassBuilder builder = new ClassBuilder.forClass(classElement, namer); | 55 ClassBuilder builder = new ClassBuilder.forClass(classElement, namer); |
56 builder.superName = superName; | 56 builder.superName = superName; |
57 emitConstructorsForCSP(cls); | 57 emitConstructorsForCSP(cls); |
58 emitFields(cls, builder); | 58 emitFields(cls, builder); |
59 if (cls.hasRtiField) { | 59 if (cls.hasRtiField) { |
60 builder.addField(namer.rtiFieldName); | 60 builder.addField(namer.rtiFieldJsName); |
61 } | 61 } |
62 emitCheckedClassSetters(cls, builder); | 62 emitCheckedClassSetters(cls, builder); |
63 emitClassGettersSettersForCSP(cls, builder); | 63 emitClassGettersSettersForCSP(cls, builder); |
64 emitInstanceMembers(cls, builder); | 64 emitInstanceMembers(cls, builder); |
65 emitStubs(cls.callStubs, builder); | 65 emitStubs(cls.callStubs, builder); |
66 emitStubs(cls.typeVariableReaderStubs, builder); | 66 emitStubs(cls.typeVariableReaderStubs, builder); |
67 emitRuntimeTypeInformation(cls, builder); | 67 emitRuntimeTypeInformation(cls, builder); |
68 emitNativeInfo(cls, builder); | 68 emitNativeInfo(cls, builder); |
69 | 69 |
70 if (classElement == backend.helpers.closureClass) { | 70 if (classElement == backend.helpers.closureClass) { |
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
439 : new Selector.setter( | 439 : new Selector.setter( |
440 new Name(member.name, member.library, isSetter: true)); | 440 new Name(member.name, member.library, isSetter: true)); |
441 String reflectionName = emitter.getReflectionName(selector, name); | 441 String reflectionName = emitter.getReflectionName(selector, name); |
442 if (reflectionName != null) { | 442 if (reflectionName != null) { |
443 var reflectable = | 443 var reflectable = |
444 js(backend.mirrorsData.isAccessibleByReflection(member) ? '1' : '0'); | 444 js(backend.mirrorsData.isAccessibleByReflection(member) ? '1' : '0'); |
445 builder.addPropertyByName('+$reflectionName', reflectable); | 445 builder.addPropertyByName('+$reflectionName', reflectable); |
446 } | 446 } |
447 } | 447 } |
448 } | 448 } |
OLD | NEW |