| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 /** A formal parameter to a [Method]. */ | 5 /** A formal parameter to a [Method]. */ |
| 6 class Parameter { | 6 class Parameter { |
| 7 FormalNode definition; | 7 FormalNode definition; |
| 8 Member method; | 8 Member method; |
| 9 | 9 |
| 10 String name; | 10 String name; |
| (...skipping 958 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 969 } | 969 } |
| 970 } else if (name == 'isEmpty') { | 970 } else if (name == 'isEmpty') { |
| 971 if (target is ConstListValue || target is ConstMapValue) { | 971 if (target is ConstListValue || target is ConstMapValue) { |
| 972 code = '${target.dynamic.values.isEmpty()}'; | 972 code = '${target.dynamic.values.isEmpty()}'; |
| 973 } | 973 } |
| 974 } | 974 } |
| 975 } | 975 } |
| 976 | 976 |
| 977 // TODO(jmesserly): factor this better | 977 // TODO(jmesserly): factor this better |
| 978 if (name == 'get\$typeName' && declaringType.library == world.dom) { | 978 if (name == 'get\$typeName' && declaringType.library == world.dom) { |
| 979 world.gen.corejs.useTypeNameOf = true; | 979 world.gen.corejs.ensureTypeNameOf(); |
| 980 } | 980 } |
| 981 | 981 |
| 982 return new Value(inferredResult, code, node.span); | 982 return new Value(inferredResult, code, node.span); |
| 983 } | 983 } |
| 984 | 984 |
| 985 Value _invokeConstructor(MethodGenerator context, Node node, | 985 Value _invokeConstructor(MethodGenerator context, Node node, |
| 986 Value target, Arguments args, argsString) { | 986 Value target, Arguments args, argsString) { |
| 987 declaringType.markUsed(); | 987 declaringType.markUsed(); |
| 988 | 988 |
| 989 if (!target.isType) { | 989 if (!target.isType) { |
| (...skipping 692 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1682 } | 1682 } |
| 1683 | 1683 |
| 1684 void forEach(void f(Member member)) { | 1684 void forEach(void f(Member member)) { |
| 1685 factories.forEach((_, Map constructors) { | 1685 factories.forEach((_, Map constructors) { |
| 1686 constructors.forEach((_, Member member) { | 1686 constructors.forEach((_, Member member) { |
| 1687 f(member); | 1687 f(member); |
| 1688 }); | 1688 }); |
| 1689 }); | 1689 }); |
| 1690 } | 1690 } |
| 1691 } | 1691 } |
| OLD | NEW |