OLD | NEW |
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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.semantics_visitor.resolver; | 5 library dart2js.semantics_visitor.resolver; |
6 | 6 |
| 7 import '../common.dart'; |
7 import '../constants/expressions.dart'; | 8 import '../constants/expressions.dart'; |
8 import '../dart_types.dart'; | 9 import '../dart_types.dart'; |
9 import '../diagnostics/messages.dart' show | |
10 MessageKind; | |
11 import '../diagnostics/spannable.dart' show | |
12 Spannable, | |
13 SpannableAssertionFailure; | |
14 import '../elements/elements.dart'; | 10 import '../elements/elements.dart'; |
15 import '../tree/tree.dart'; | 11 import '../tree/tree.dart'; |
16 import '../universe/call_structure.dart' show | 12 import '../universe/call_structure.dart' show |
17 CallStructure; | 13 CallStructure; |
18 import '../universe/selector.dart' show | 14 import '../universe/selector.dart' show |
19 Selector; | 15 Selector; |
20 | 16 |
21 import 'access_semantics.dart'; | 17 import 'access_semantics.dart'; |
22 import 'semantic_visitor.dart'; | 18 import 'semantic_visitor.dart'; |
23 import 'send_structure.dart'; | 19 import 'send_structure.dart'; |
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
472 return internalError(node, "Unexpected variable $element."); | 468 return internalError(node, "Unexpected variable $element."); |
473 } | 469 } |
474 if (element.isConst) { | 470 if (element.isConst) { |
475 ConstantExpression constant = elements.getConstant(element.initializer); | 471 ConstantExpression constant = elements.getConstant(element.initializer); |
476 return new ConstantVariableStructure(kind, node, element, constant); | 472 return new ConstantVariableStructure(kind, node, element, constant); |
477 } else { | 473 } else { |
478 return new NonConstantVariableStructure(kind, node, element); | 474 return new NonConstantVariableStructure(kind, node, element); |
479 } | 475 } |
480 } | 476 } |
481 } | 477 } |
OLD | NEW |