| 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 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 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 emitter.containerBuilder.addMemberField(field, builder); | 236 emitter.containerBuilder.addMemberField(field, builder); |
| 237 } | 237 } |
| 238 | 238 |
| 239 for (Method method in cls.methods) { | 239 for (Method method in cls.methods) { |
| 240 assert(invariant(classElement, method.element.isDeclaration)); | 240 assert(invariant(classElement, method.element.isDeclaration)); |
| 241 assert(invariant(classElement, method.element.isInstanceMember)); | 241 assert(invariant(classElement, method.element.isInstanceMember)); |
| 242 emitter.containerBuilder.addMemberMethod(method, builder); | 242 emitter.containerBuilder.addMemberMethod(method, builder); |
| 243 } | 243 } |
| 244 | 244 |
| 245 if (identical(classElement, compiler.objectClass) | 245 if (identical(classElement, compiler.objectClass) |
| 246 && backend.enabledNoSuchMethod) { | 246 && compiler.enabledNoSuchMethod) { |
| 247 // Emit the noSuchMethod handlers on the Object prototype now, | 247 // Emit the noSuchMethod handlers on the Object prototype now, |
| 248 // so that the code in the dynamicFunction helper can find | 248 // so that the code in the dynamicFunction helper can find |
| 249 // them. Note that this helper is invoked before analyzing the | 249 // them. Note that this helper is invoked before analyzing the |
| 250 // full JS script. | 250 // full JS script. |
| 251 emitter.nsmEmitter.emitNoSuchMethodHandlers(builder.addProperty); | 251 emitter.nsmEmitter.emitNoSuchMethodHandlers(builder.addProperty); |
| 252 } | 252 } |
| 253 } | 253 } |
| 254 | 254 |
| 255 /// Emits the members from the model. | 255 /// Emits the members from the model. |
| 256 void emitRuntimeTypeInformation(Class cls, ClassBuilder builder) { | 256 void emitRuntimeTypeInformation(Class cls, ClassBuilder builder) { |
| (...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 544 ? new Selector.getter(member.name, member.library) | 544 ? new Selector.getter(member.name, member.library) |
| 545 : new Selector.setter(member.name, member.library); | 545 : new Selector.setter(member.name, member.library); |
| 546 String reflectionName = emitter.getReflectionName(selector, name); | 546 String reflectionName = emitter.getReflectionName(selector, name); |
| 547 if (reflectionName != null) { | 547 if (reflectionName != null) { |
| 548 var reflectable = | 548 var reflectable = |
| 549 js(backend.isAccessibleByReflection(member) ? '1' : '0'); | 549 js(backend.isAccessibleByReflection(member) ? '1' : '0'); |
| 550 builder.addProperty('+$reflectionName', reflectable); | 550 builder.addProperty('+$reflectionName', reflectable); |
| 551 } | 551 } |
| 552 } | 552 } |
| 553 } | 553 } |
| OLD | NEW |