| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 library dart2js.js_emitter.program_builder; | 5 library dart2js.js_emitter.program_builder; |
| 6 | 6 |
| 7 import '../js_emitter.dart' show | 7 import '../js_emitter.dart' show |
| 8 ClassStubGenerator, | 8 ClassStubGenerator, |
| 9 CodeEmitterTask, | 9 CodeEmitterTask, |
| 10 computeMixinClass, | 10 computeMixinClass, |
| (...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 416 FunctionElement fn = member; | 416 FunctionElement fn = member; |
| 417 functionType = fn.type; | 417 functionType = fn.type; |
| 418 } else if (member.isGetter) { | 418 } else if (member.isGetter) { |
| 419 if (_compiler.trustTypeAnnotations) { | 419 if (_compiler.trustTypeAnnotations) { |
| 420 GetterElement getter = member; | 420 GetterElement getter = member; |
| 421 DartType returnType = getter.type.returnType; | 421 DartType returnType = getter.type.returnType; |
| 422 if (returnType.isFunctionType) { | 422 if (returnType.isFunctionType) { |
| 423 functionType = returnType; | 423 functionType = returnType; |
| 424 } else if (returnType.treatAsDynamic || | 424 } else if (returnType.treatAsDynamic || |
| 425 _compiler.types.isSubtype(returnType, | 425 _compiler.types.isSubtype(returnType, |
| 426 backend.coreTypes.functionType)) { | 426 backend.resolution.coreTypes.functionType)) { |
| 427 if (returnType.isTypedef) { | 427 if (returnType.isTypedef) { |
| 428 TypedefType typedef = returnType; | 428 TypedefType typedef = returnType; |
| 429 // TODO(jacobr): can we just use typdef.unaliased instead? | 429 // TODO(jacobr): can we just use typdef.unaliased instead? |
| 430 functionType = typedef.element.functionSignature.type; | 430 functionType = typedef.element.functionSignature.type; |
| 431 } else { | 431 } else { |
| 432 // Other misc function type such as coreTypes.Function. | 432 // Other misc function type such as coreTypes.Function. |
| 433 // Allow any number of arguments. | 433 // Allow any number of arguments. |
| 434 isFunctionLike = true; | 434 isFunctionLike = true; |
| 435 } | 435 } |
| 436 } | 436 } |
| (...skipping 574 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1011 Constant constant = new Constant(name, holder, constantValue); | 1011 Constant constant = new Constant(name, holder, constantValue); |
| 1012 _constants[constantValue] = constant; | 1012 _constants[constantValue] = constant; |
| 1013 } | 1013 } |
| 1014 } | 1014 } |
| 1015 | 1015 |
| 1016 Holder _registerStaticStateHolder() { | 1016 Holder _registerStaticStateHolder() { |
| 1017 return _registry.registerHolder( | 1017 return _registry.registerHolder( |
| 1018 namer.staticStateHolder, isStaticStateHolder: true); | 1018 namer.staticStateHolder, isStaticStateHolder: true); |
| 1019 } | 1019 } |
| 1020 } | 1020 } |
| OLD | NEW |