| 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 /// This class should morph into something that makes it easy to build | 7 /// This class should morph into something that makes it easy to build |
| 8 /// JavaScript representations of libraries, class-sides, and instance-sides. | 8 /// JavaScript representations of libraries, class-sides, and instance-sides. |
| 9 /// Initially, it is just a placeholder for code that is moved from | 9 /// Initially, it is just a placeholder for code that is moved from |
| 10 /// [CodeEmitterTask]. | 10 /// [CodeEmitterTask]. |
| 11 class ContainerBuilder extends CodeEmitterHelper { | 11 class ContainerBuilder extends CodeEmitterHelper { |
| 12 final Map<Element, Element> staticGetters = new Map<Element, Element>(); | |
| 13 | |
| 14 bool needsSuperGetter(FunctionElement element) => | 12 bool needsSuperGetter(FunctionElement element) => |
| 15 compiler.codegenWorld.methodsNeedingSuperGetter.contains(element); | 13 compiler.codegenWorld.methodsNeedingSuperGetter.contains(element); |
| 16 | 14 |
| 17 /** | 15 /** |
| 18 * Generate stubs to handle invocation of methods with optional | 16 * Generate stubs to handle invocation of methods with optional |
| 19 * arguments. | 17 * arguments. |
| 20 * | 18 * |
| 21 * A method like [: foo([x]) :] may be invoked by the following | 19 * A method like [: foo([x]) :] may be invoked by the following |
| 22 * calls: [: foo(), foo(1), foo(x: 1) :]. See the sources of this | 20 * calls: [: foo(), foo(1), foo(x: 1) :]. See the sources of this |
| 23 * function for detailed examples. | 21 * function for detailed examples. |
| (...skipping 644 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 668 assert(needsStubs != null); | 666 assert(needsStubs != null); |
| 669 assert(canTearOff != null); | 667 assert(canTearOff != null); |
| 670 assert(isClosure != null); | 668 assert(isClosure != null); |
| 671 assert(tearOffName != null || !canTearOff); | 669 assert(tearOffName != null || !canTearOff); |
| 672 assert(canBeReflected != null); | 670 assert(canBeReflected != null); |
| 673 assert(canBeApplied != null); | 671 assert(canBeApplied != null); |
| 674 assert(hasSuperAlias != null); | 672 assert(hasSuperAlias != null); |
| 675 assert(needStructuredInfo != null); | 673 assert(needStructuredInfo != null); |
| 676 } | 674 } |
| 677 } | 675 } |
| OLD | NEW |