| 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 '../common.dart'; |
| 8 import '../constants/expressions.dart'; | 8 import '../constants/expressions.dart'; |
| 9 import '../dart_types.dart'; | 9 import '../dart_types.dart'; |
| 10 import '../elements/elements.dart'; | 10 import '../elements/elements.dart'; |
| 11 import '../tree/tree.dart'; | 11 import '../tree/tree.dart'; |
| 12 | |
| 13 import 'semantic_visitor.dart'; | 12 import 'semantic_visitor.dart'; |
| 14 import 'send_structure.dart'; | 13 import 'send_structure.dart'; |
| 15 import 'tree_elements.dart'; | 14 import 'tree_elements.dart'; |
| 16 | 15 |
| 17 abstract class DeclStructure<R, A> { | 16 abstract class DeclStructure<R, A> { |
| 18 final FunctionElement element; | 17 final FunctionElement element; |
| 19 | 18 |
| 20 DeclStructure(this.element); | 19 DeclStructure(this.element); |
| 21 | 20 |
| 22 /// Calls the matching visit method on [visitor] with [node] and [arg]. | 21 /// Calls the matching visit method on [visitor] with [node] and [arg]. |
| (...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 329 return internalError(node, "Unexpected variable $element."); | 328 return internalError(node, "Unexpected variable $element."); |
| 330 } | 329 } |
| 331 if (element.isConst) { | 330 if (element.isConst) { |
| 332 ConstantExpression constant = elements.getConstant(element.initializer); | 331 ConstantExpression constant = elements.getConstant(element.initializer); |
| 333 return new ConstantVariableStructure(kind, node, element, constant); | 332 return new ConstantVariableStructure(kind, node, element, constant); |
| 334 } else { | 333 } else { |
| 335 return new NonConstantVariableStructure(kind, node, element); | 334 return new NonConstantVariableStructure(kind, node, element); |
| 336 } | 335 } |
| 337 } | 336 } |
| 338 } | 337 } |
| OLD | NEW |