| 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]. |
| (...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 445 addParameterStubs( | 445 addParameterStubs( |
| 446 member, | 446 member, |
| 447 (Selector selector, jsAst.Fun function) { | 447 (Selector selector, jsAst.Fun function) { |
| 448 compiler.dumpInfoTask.registerElementAst(member, | 448 compiler.dumpInfoTask.registerElementAst(member, |
| 449 builder.addProperty(namer.invocationName(selector), | 449 builder.addProperty(namer.invocationName(selector), |
| 450 function)); | 450 function)); |
| 451 }); | 451 }); |
| 452 } | 452 } |
| 453 return; | 453 return; |
| 454 } | 454 } |
| 455 | 455 emitter.needsArrayInitializerSupport = true; |
| 456 | 456 |
| 457 // This element is needed for reflection or needs additional stubs or has a | 457 // This element is needed for reflection or needs additional stubs or has a |
| 458 // super alias. So we need to retain additional information. | 458 // super alias. So we need to retain additional information. |
| 459 | 459 |
| 460 // The information is stored in an array with this format: | 460 // The information is stored in an array with this format: |
| 461 // | 461 // |
| 462 // 1. The alias name for this function (optional). | 462 // 1. The alias name for this function (optional). |
| 463 // 2. The JS function for this member. | 463 // 2. The JS function for this member. |
| 464 // 3. First stub. | 464 // 3. First stub. |
| 465 // 4. Name of first stub. | 465 // 4. Name of first stub. |
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 668 assert(needsStubs != null); | 668 assert(needsStubs != null); |
| 669 assert(canTearOff != null); | 669 assert(canTearOff != null); |
| 670 assert(isClosure != null); | 670 assert(isClosure != null); |
| 671 assert(tearOffName != null || !canTearOff); | 671 assert(tearOffName != null || !canTearOff); |
| 672 assert(canBeReflected != null); | 672 assert(canBeReflected != null); |
| 673 assert(canBeApplied != null); | 673 assert(canBeApplied != null); |
| 674 assert(hasSuperAlias != null); | 674 assert(hasSuperAlias != null); |
| 675 assert(needStructuredInfo != null); | 675 assert(needStructuredInfo != null); |
| 676 } | 676 } |
| 677 } | 677 } |
| OLD | NEW |