Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 engine.resolver; | 5 library engine.resolver; |
| 6 | 6 |
| 7 import "dart:math" as math; | 7 import "dart:math" as math; |
| 8 import 'dart:collection'; | 8 import 'dart:collection'; |
| 9 | 9 |
| 10 import 'package:analyzer/src/generated/utilities_collection.dart'; | 10 import 'package:analyzer/src/generated/utilities_collection.dart'; |
| (...skipping 2975 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2986 getter.labels = holder.labels; | 2986 getter.labels = holder.labels; |
| 2987 getter.localVariables = holder.localVariables; | 2987 getter.localVariables = holder.localVariables; |
| 2988 if (body.isAsynchronous) { | 2988 if (body.isAsynchronous) { |
| 2989 getter.asynchronous = true; | 2989 getter.asynchronous = true; |
| 2990 } | 2990 } |
| 2991 if (body.isGenerator) { | 2991 if (body.isGenerator) { |
| 2992 getter.generator = true; | 2992 getter.generator = true; |
| 2993 } | 2993 } |
| 2994 getter.variable = field; | 2994 getter.variable = field; |
| 2995 getter.abstract = | 2995 getter.abstract = |
| 2996 body is EmptyFunctionBody && node.externalKeyword == null; | 2996 body is EmptyFunctionBody && !body.semicolon.isSynthetic && node.e xternalKeyword == null; |
|
scheglov
2015/02/28 02:47:31
Looks like a duplicate code. Fix https://coderevie
Paul Berry
2015/03/02 19:09:46
Thanks.
| |
| 2997 getter.getter = true; | 2997 getter.getter = true; |
| 2998 getter.static = isStatic; | 2998 getter.static = isStatic; |
| 2999 field.getter = getter; | 2999 field.getter = getter; |
| 3000 _currentHolder.addAccessor(getter); | 3000 _currentHolder.addAccessor(getter); |
| 3001 propertyNameNode.staticElement = getter; | 3001 propertyNameNode.staticElement = getter; |
| 3002 } else { | 3002 } else { |
| 3003 PropertyAccessorElementImpl setter = | 3003 PropertyAccessorElementImpl setter = |
| 3004 new PropertyAccessorElementImpl.forNode(propertyNameNode); | 3004 new PropertyAccessorElementImpl.forNode(propertyNameNode); |
| 3005 setter.functions = holder.functions; | 3005 setter.functions = holder.functions; |
| 3006 setter.labels = holder.labels; | 3006 setter.labels = holder.labels; |
| 3007 setter.localVariables = holder.localVariables; | 3007 setter.localVariables = holder.localVariables; |
| 3008 setter.parameters = holder.parameters; | 3008 setter.parameters = holder.parameters; |
| 3009 if (body.isAsynchronous) { | 3009 if (body.isAsynchronous) { |
| 3010 setter.asynchronous = true; | 3010 setter.asynchronous = true; |
| 3011 } | 3011 } |
| 3012 if (body.isGenerator) { | 3012 if (body.isGenerator) { |
| 3013 setter.generator = true; | 3013 setter.generator = true; |
| 3014 } | 3014 } |
| 3015 setter.variable = field; | 3015 setter.variable = field; |
| 3016 setter.abstract = body is EmptyFunctionBody && | 3016 setter.abstract = body is EmptyFunctionBody && !body.semicolon.isSynth etic && |
| 3017 !_matches(node.externalKeyword, sc.Keyword.EXTERNAL); | 3017 !_matches(node.externalKeyword, sc.Keyword.EXTERNAL); |
| 3018 setter.setter = true; | 3018 setter.setter = true; |
| 3019 setter.static = isStatic; | 3019 setter.static = isStatic; |
| 3020 field.setter = setter; | 3020 field.setter = setter; |
| 3021 field.final2 = false; | 3021 field.final2 = false; |
| 3022 _currentHolder.addAccessor(setter); | 3022 _currentHolder.addAccessor(setter); |
| 3023 propertyNameNode.staticElement = setter; | 3023 propertyNameNode.staticElement = setter; |
| 3024 } | 3024 } |
| 3025 } | 3025 } |
| 3026 holder.validate(); | 3026 holder.validate(); |
| (...skipping 12643 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 15670 * library. | 15670 * library. |
| 15671 */ | 15671 */ |
| 15672 final HashSet<String> members = new HashSet<String>(); | 15672 final HashSet<String> members = new HashSet<String>(); |
| 15673 | 15673 |
| 15674 /** | 15674 /** |
| 15675 * Names of resolved or unresolved class members that are read in the | 15675 * Names of resolved or unresolved class members that are read in the |
| 15676 * library. | 15676 * library. |
| 15677 */ | 15677 */ |
| 15678 final HashSet<String> readMembers = new HashSet<String>(); | 15678 final HashSet<String> readMembers = new HashSet<String>(); |
| 15679 } | 15679 } |
| OLD | NEW |