| 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.full_emitter; | 5 part of dart2js.js_emitter.full_emitter; |
| 6 | 6 |
| 7 class ClassEmitter extends CodeEmitterHelper { | 7 class ClassEmitter extends CodeEmitterHelper { |
| 8 final ClosedWorld closedWorld; |
| 9 |
| 10 ClassEmitter(this.closedWorld); |
| 11 |
| 8 ClassStubGenerator get _stubGenerator => | 12 ClassStubGenerator get _stubGenerator => |
| 9 new ClassStubGenerator(compiler, namer, backend); | 13 new ClassStubGenerator(namer, backend, codegenWorld, closedWorld, |
| 14 enableMinification: compiler.options.enableMinification); |
| 10 | 15 |
| 11 /** | 16 /** |
| 12 * Documentation wanted -- johnniwinther | 17 * Documentation wanted -- johnniwinther |
| 13 */ | 18 */ |
| 14 void emitClass(Class cls, ClassBuilder enclosingBuilder, Fragment fragment) { | 19 void emitClass(Class cls, ClassBuilder enclosingBuilder, Fragment fragment) { |
| 15 ClassElement classElement = cls.element; | 20 ClassElement classElement = cls.element; |
| 16 | 21 |
| 17 assert(invariant(classElement, classElement.isDeclaration)); | 22 assert(invariant(classElement, classElement.isDeclaration)); |
| 18 | 23 |
| 19 emitter.needsClassSupport = true; | 24 emitter.needsClassSupport = true; |
| (...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 417 : new Selector.setter( | 422 : new Selector.setter( |
| 418 new Name(member.name, member.library, isSetter: true)); | 423 new Name(member.name, member.library, isSetter: true)); |
| 419 String reflectionName = emitter.getReflectionName(selector, name); | 424 String reflectionName = emitter.getReflectionName(selector, name); |
| 420 if (reflectionName != null) { | 425 if (reflectionName != null) { |
| 421 var reflectable = | 426 var reflectable = |
| 422 js(backend.isAccessibleByReflection(member) ? '1' : '0'); | 427 js(backend.isAccessibleByReflection(member) ? '1' : '0'); |
| 423 builder.addPropertyByName('+$reflectionName', reflectable); | 428 builder.addPropertyByName('+$reflectionName', reflectable); |
| 424 } | 429 } |
| 425 } | 430 } |
| 426 } | 431 } |
| OLD | NEW |