| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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 library kernel.analyzer.ast_from_analyzer; | 4 library kernel.analyzer.ast_from_analyzer; |
| 5 | 5 |
| 6 import '../ast.dart' as ast; | 6 import '../ast.dart' as ast; |
| 7 import '../frontend/accessors.dart'; | 7 import '../frontend/accessors.dart'; |
| 8 import '../frontend/super_initializers.dart'; | 8 import '../frontend/super_initializers.dart'; |
| 9 import '../log.dart'; | 9 import '../log.dart'; |
| 10 import '../type_algebra.dart'; | 10 import '../type_algebra.dart'; |
| (...skipping 2822 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2833 field.initializer = scope.buildTopLevelExpression(node.initializer) | 2833 field.initializer = scope.buildTopLevelExpression(node.initializer) |
| 2834 ..parent = field; | 2834 ..parent = field; |
| 2835 } else if (field.isStatic) { | 2835 } else if (field.isStatic) { |
| 2836 // Add null initializer to static fields without an initializer. | 2836 // Add null initializer to static fields without an initializer. |
| 2837 // For instance fields, this is handled when building the class. | 2837 // For instance fields, this is handled when building the class. |
| 2838 field.initializer = new ast.NullLiteral()..parent = field; | 2838 field.initializer = new ast.NullLiteral()..parent = field; |
| 2839 } | 2839 } |
| 2840 } | 2840 } |
| 2841 | 2841 |
| 2842 visitFunctionDeclaration(FunctionDeclaration node) { | 2842 visitFunctionDeclaration(FunctionDeclaration node) { |
| 2843 addAnnotations(node.metadata); |
| 2843 var function = node.functionExpression; | 2844 var function = node.functionExpression; |
| 2844 ast.Procedure procedure = currentMember; | 2845 ast.Procedure procedure = currentMember; |
| 2845 procedure.function = scope.buildFunctionNode( | 2846 procedure.function = scope.buildFunctionNode( |
| 2846 function.parameters, function.body, | 2847 function.parameters, function.body, |
| 2847 returnType: node.returnType, | 2848 returnType: node.returnType, |
| 2848 typeParameters: scope.buildOptionalTypeParameterList( | 2849 typeParameters: scope.buildOptionalTypeParameterList( |
| 2849 function.typeParameters, | 2850 function.typeParameters, |
| 2850 strongModeOnly: true))..parent = procedure; | 2851 strongModeOnly: true))..parent = procedure; |
| 2851 handleNativeBody(function.body); | 2852 handleNativeBody(function.body); |
| 2852 } | 2853 } |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2964 if (list[i - 1].compareTo(item) == 0) { | 2965 if (list[i - 1].compareTo(item) == 0) { |
| 2965 ++deleted; | 2966 ++deleted; |
| 2966 } else if (deleted > 0) { | 2967 } else if (deleted > 0) { |
| 2967 list[i - deleted] = item; | 2968 list[i - deleted] = item; |
| 2968 } | 2969 } |
| 2969 } | 2970 } |
| 2970 if (deleted > 0) { | 2971 if (deleted > 0) { |
| 2971 list.length -= deleted; | 2972 list.length -= deleted; |
| 2972 } | 2973 } |
| 2973 } | 2974 } |
| OLD | NEW |