| 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 /** | 5 /** |
| 6 * Represents a meta-value for code generation. | 6 * Represents a meta-value for code generation. |
| 7 */ | 7 */ |
| 8 class Value { | 8 class Value { |
| 9 /** The [Type] of the [Value]. */ | 9 /** The [Type] of the [Value]. */ |
| 10 Type type; | 10 Type type; |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 } else { | 170 } else { |
| 171 world.warning(message, node.span); | 171 world.warning(message, node.span); |
| 172 } | 172 } |
| 173 } | 173 } |
| 174 } | 174 } |
| 175 | 175 |
| 176 // Fall back to a dynamic operation for instance members | 176 // Fall back to a dynamic operation for instance members |
| 177 if (member == null && !isSuper && !isType) { | 177 if (member == null && !isSuper && !isType) { |
| 178 member = context.findMembers(name); | 178 member = context.findMembers(name); |
| 179 if (member == null && !isDynamic) { | 179 if (member == null && !isDynamic) { |
| 180 world.warning('$name is not defined anywhere in the world.', | 180 var where = 'the world'; |
| 181 if (name.startsWith('_')) { |
| 182 where = 'library "${context.library.name}"'; |
| 183 } |
| 184 world.warning('$name is not defined anywhere in $where.', |
| 181 node.span); | 185 node.span); |
| 182 } | 186 } |
| 183 } | 187 } |
| 184 | 188 |
| 185 return member; | 189 return member; |
| 186 } | 190 } |
| 187 | 191 |
| 188 checkFirstClass(SourceSpan span) { | 192 checkFirstClass(SourceSpan span) { |
| 189 if (isType) { | 193 if (isType) { |
| 190 world.error('Types are not first class', span); | 194 world.error('Types are not first class', span); |
| (...skipping 517 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 708 // Then look for members in my library. | 712 // Then look for members in my library. |
| 709 member = home.library.lookup(name, span); | 713 member = home.library.lookup(name, span); |
| 710 if (member != null) { | 714 if (member != null) { |
| 711 return member; | 715 return member; |
| 712 } | 716 } |
| 713 | 717 |
| 714 _ensureCode(); | 718 _ensureCode(); |
| 715 return null; | 719 return null; |
| 716 } | 720 } |
| 717 } | 721 } |
| OLD | NEW |