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