| 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 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 278 final FunctionElement member = method.element; | 278 final FunctionElement member = method.element; |
| 279 String name = method.name; | 279 String name = method.name; |
| 280 final FunctionSignature parameters = member.functionSignature; | 280 final FunctionSignature parameters = member.functionSignature; |
| 281 jsAst.Expression code = method.code; | 281 jsAst.Expression code = method.code; |
| 282 final bool needsStubs = method.needsStubs; | 282 final bool needsStubs = method.needsStubs; |
| 283 final bool canTearOff = method.needsTearOff; | 283 final bool canTearOff = method.needsTearOff; |
| 284 final String tearOffName = method.tearOffName; | 284 final String tearOffName = method.tearOffName; |
| 285 final bool canBeReflected = method.canBeReflected; | 285 final bool canBeReflected = method.canBeReflected; |
| 286 final bool canBeApplied = method.canBeApplied; | 286 final bool canBeApplied = method.canBeApplied; |
| 287 final bool isClosure = method is InstanceMethod && method.isClosure; | 287 final bool isClosure = method is InstanceMethod && method.isClosure; |
| 288 final bool hasSuperAlias = method is InstanceMethod && method.hasSuperAlias; | 288 final bool hasSuperAlias = method is InstanceMethod && |
| 289 method.superAlias != null; |
| 289 | 290 |
| 290 final bool needStructuredInfo = | 291 final bool needStructuredInfo = |
| 291 canTearOff || canBeReflected || canBeApplied || hasSuperAlias; | 292 canTearOff || canBeReflected || canBeApplied || hasSuperAlias; |
| 292 | 293 |
| 293 emitter.interceptorEmitter.recordMangledNameOfMemberMethod(member, name); | 294 emitter.interceptorEmitter.recordMangledNameOfMemberMethod(member, name); |
| 294 | 295 |
| 295 if (!needStructuredInfo) { | 296 if (!needStructuredInfo) { |
| 296 compiler.dumpInfoTask.registerElementAst(member, | 297 compiler.dumpInfoTask.registerElementAst(member, |
| 297 builder.addProperty(name, code)); | 298 builder.addProperty(name, code)); |
| 298 for (AdapterStubMethod adapter in method.adapterStubs) { | 299 for (AdapterStubMethod adapter in method.adapterStubs) { |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 461 jsAst.ArrayInitializer arrayInit = | 462 jsAst.ArrayInitializer arrayInit = |
| 462 new jsAst.ArrayInitializer(expressions.toList()); | 463 new jsAst.ArrayInitializer(expressions.toList()); |
| 463 compiler.dumpInfoTask.registerElementAst(member, | 464 compiler.dumpInfoTask.registerElementAst(member, |
| 464 builder.addProperty(name, arrayInit)); | 465 builder.addProperty(name, arrayInit)); |
| 465 } | 466 } |
| 466 | 467 |
| 467 void addMemberField(Field field, ClassBuilder builder) { | 468 void addMemberField(Field field, ClassBuilder builder) { |
| 468 // For now, do nothing. | 469 // For now, do nothing. |
| 469 } | 470 } |
| 470 } | 471 } |
| OLD | NEW |