| 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 summary_resynthesizer; | 5 library summary_resynthesizer; |
| 6 | 6 |
| 7 import 'dart:collection'; | 7 import 'dart:collection'; |
| 8 | 8 |
| 9 import 'package:analyzer/dart/ast/ast.dart'; | 9 import 'package:analyzer/dart/ast/ast.dart'; |
| 10 import 'package:analyzer/dart/ast/token.dart'; | 10 import 'package:analyzer/dart/ast/token.dart'; |
| (...skipping 1907 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1918 serializedExecutable.kind == UnlinkedExecutableKind.setter; | 1918 serializedExecutable.kind == UnlinkedExecutableKind.setter; |
| 1919 executableElement.returnType = | 1919 executableElement.returnType = |
| 1920 buildLinkedType(serializedExecutable.inferredReturnTypeSlot) ?? | 1920 buildLinkedType(serializedExecutable.inferredReturnTypeSlot) ?? |
| 1921 buildType(serializedExecutable.returnType, | 1921 buildType(serializedExecutable.returnType, |
| 1922 defaultVoid: isSetter && summaryResynthesizer.strongMode); | 1922 defaultVoid: isSetter && summaryResynthesizer.strongMode); |
| 1923 executableElement.hasImplicitReturnType = | 1923 executableElement.hasImplicitReturnType = |
| 1924 serializedExecutable.returnType == null; | 1924 serializedExecutable.returnType == null; |
| 1925 } | 1925 } |
| 1926 executableElement.type = new FunctionTypeImpl.elementWithNameAndArgs( | 1926 executableElement.type = new FunctionTypeImpl.elementWithNameAndArgs( |
| 1927 executableElement, null, getCurrentTypeArguments(skipLevels: 1), false); | 1927 executableElement, null, getCurrentTypeArguments(skipLevels: 1), false); |
| 1928 executableElement.asynchronous = serializedExecutable.isAsynchronous; |
| 1928 executableElement.external = serializedExecutable.isExternal; | 1929 executableElement.external = serializedExecutable.isExternal; |
| 1930 executableElement.generator = serializedExecutable.isGenerator; |
| 1929 buildDocumentation( | 1931 buildDocumentation( |
| 1930 executableElement, serializedExecutable.documentationComment); | 1932 executableElement, serializedExecutable.documentationComment); |
| 1931 buildAnnotations(executableElement, serializedExecutable.annotations); | 1933 buildAnnotations(executableElement, serializedExecutable.annotations); |
| 1932 buildCodeRange(executableElement, serializedExecutable.codeRange); | 1934 buildCodeRange(executableElement, serializedExecutable.codeRange); |
| 1933 executableElement.functions = | 1935 executableElement.functions = |
| 1934 serializedExecutable.localFunctions.map(buildLocalFunction).toList(); | 1936 serializedExecutable.localFunctions.map(buildLocalFunction).toList(); |
| 1935 executableElement.labels = | 1937 executableElement.labels = |
| 1936 serializedExecutable.localLabels.map(buildLocalLabel).toList(); | 1938 serializedExecutable.localLabels.map(buildLocalLabel).toList(); |
| 1937 executableElement.localVariables = | 1939 executableElement.localVariables = |
| 1938 serializedExecutable.localVariables.map(buildLocalVariable).toList(); | 1940 serializedExecutable.localVariables.map(buildLocalVariable).toList(); |
| (...skipping 705 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2644 static String _getElementIdentifier(String name, ReferenceKind kind) { | 2646 static String _getElementIdentifier(String name, ReferenceKind kind) { |
| 2645 if (kind == ReferenceKind.topLevelPropertyAccessor || | 2647 if (kind == ReferenceKind.topLevelPropertyAccessor || |
| 2646 kind == ReferenceKind.propertyAccessor) { | 2648 kind == ReferenceKind.propertyAccessor) { |
| 2647 if (!name.endsWith('=')) { | 2649 if (!name.endsWith('=')) { |
| 2648 return name + '?'; | 2650 return name + '?'; |
| 2649 } | 2651 } |
| 2650 } | 2652 } |
| 2651 return name; | 2653 return name; |
| 2652 } | 2654 } |
| 2653 } | 2655 } |
| OLD | NEW |