Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(239)

Side by Side Diff: pkg/analyzer/lib/src/summary/link.dart

Issue 2802473002: Include 'invokeMethodRef' reference as a linking dependency. (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | pkg/analyzer/test/src/summary/linker_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 4
5 /** 5 /**
6 * This library is capable of producing linked summaries from unlinked 6 * This library is capable of producing linked summaries from unlinked
7 * ones (or prelinked ones). It functions by building a miniature 7 * ones (or prelinked ones). It functions by building a miniature
8 * element model to represent the contents of the summaries, and then 8 * element model to represent the contents of the summaries, and then
9 * scanning the element model to gather linked information and adding 9 * scanning the element model to gather linked information and adding
10 * it to the summary data structures. 10 * it to the summary data structures.
(...skipping 4867 matching lines...) Expand 10 before | Expand all | Expand 10 after
4878 case UnlinkedExprOperation.makeTypedMap: 4878 case UnlinkedExprOperation.makeTypedMap:
4879 refPtr += 2; 4879 refPtr += 2;
4880 intPtr++; 4880 intPtr++;
4881 break; 4881 break;
4882 case UnlinkedExprOperation.assignToRef: 4882 case UnlinkedExprOperation.assignToRef:
4883 // TODO(paulberry): if this reference refers to a variable, should it 4883 // TODO(paulberry): if this reference refers to a variable, should it
4884 // be considered a type inference dependency? 4884 // be considered a type inference dependency?
4885 refPtr++; 4885 refPtr++;
4886 break; 4886 break;
4887 case UnlinkedExprOperation.invokeMethodRef: 4887 case UnlinkedExprOperation.invokeMethodRef:
4888 // TODO(paulberry): if this reference refers to a variable, should it 4888 // TODO(paulberry): if this reference refers to a variable, should it
Paul Berry 2017/04/04 21:31:48 We can get rid of this TODO now.
4889 // be considered a type inference dependency? 4889 // be considered a type inference dependency?
4890 refPtr++; 4890 EntityRef ref = unlinkedConst.references[refPtr++];
4891 TypeInferenceNode dependency =
4892 compilationUnit.resolveRef(ref.reference).asTypeInferenceNode;
4893 if (dependency != null) {
4894 dependencies.add(dependency);
4895 }
4891 intPtr += 2; 4896 intPtr += 2;
4892 int numTypeArguments = unlinkedConst.ints[intPtr++]; 4897 int numTypeArguments = unlinkedConst.ints[intPtr++];
4893 refPtr += numTypeArguments; 4898 refPtr += numTypeArguments;
4894 break; 4899 break;
4895 case UnlinkedExprOperation.invokeMethod: 4900 case UnlinkedExprOperation.invokeMethod:
4896 intPtr += 2; 4901 intPtr += 2;
4897 int numTypeArguments = unlinkedConst.ints[intPtr++]; 4902 int numTypeArguments = unlinkedConst.ints[intPtr++];
4898 refPtr += numTypeArguments; 4903 refPtr += numTypeArguments;
4899 break; 4904 break;
4900 case UnlinkedExprOperation.typeCast: 4905 case UnlinkedExprOperation.typeCast:
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after
5296 } 5301 }
5297 5302
5298 /** 5303 /**
5299 * This exception is thrown when [ExprTypeComputer] cannot inference the type. 5304 * This exception is thrown when [ExprTypeComputer] cannot inference the type.
5300 */ 5305 */
5301 class _InferenceFailedError { 5306 class _InferenceFailedError {
5302 final String message; 5307 final String message;
5303 5308
5304 _InferenceFailedError(this.message); 5309 _InferenceFailedError(this.message);
5305 } 5310 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/test/src/summary/linker_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698