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

Side by Side Diff: pkg/analyzer/tool/summary/idl.dart

Issue 1624853002: Store the result of type inference in summaries. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 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
OLDNEW
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 /** 5 /**
6 * This file is an "idl" style description of the summary format. It is not 6 * This file is an "idl" style description of the summary format. It is not
7 * executed directly; instead it is parsed and transformed into code that 7 * executed directly; instead it is parsed and transformed into code that
8 * implements the summary format. 8 * implements the summary format.
9 * 9 *
10 * The code generation process introduces the following non-typical semantics: 10 * The code generation process introduces the following non-typical semantics:
(...skipping 901 matching lines...) Expand 10 before | Expand all | Expand 10 after
912 912
913 /** 913 /**
914 * Indicates whether the executable is declared using the `factory` keyword. 914 * Indicates whether the executable is declared using the `factory` keyword.
915 */ 915 */
916 bool isFactory; 916 bool isFactory;
917 917
918 /** 918 /**
919 * Indicates whether the executable is declared using the `external` keyword. 919 * Indicates whether the executable is declared using the `external` keyword.
920 */ 920 */
921 bool isExternal; 921 bool isExternal;
922
923 /**
924 * If this executable's return type is inferrable, nonzero slot id
925 * identifying which entry in [LinkedLibrary.types] contains the inferred
926 * return type. If there is no matching entry in [LinkedLibrary.types], then
927 * no return type was inferred for this variable, so its static type is
928 * `dynamic`.
929 */
930 int inferredReturnTypeSlot;
922 } 931 }
923 932
924 /** 933 /**
925 * Enum used to indicate the kind of an executable. 934 * Enum used to indicate the kind of an executable.
926 */ 935 */
927 enum UnlinkedExecutableKind { 936 enum UnlinkedExecutableKind {
928 /** 937 /**
929 * Executable is a function or method. 938 * Executable is a function or method.
930 */ 939 */
931 functionOrMethod, 940 functionOrMethod,
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
1084 /** 1093 /**
1085 * Indicates whether this is a function-typed parameter. 1094 * Indicates whether this is a function-typed parameter.
1086 */ 1095 */
1087 bool isFunctionTyped; 1096 bool isFunctionTyped;
1088 1097
1089 /** 1098 /**
1090 * Indicates whether this is an initializing formal parameter (i.e. it is 1099 * Indicates whether this is an initializing formal parameter (i.e. it is
1091 * declared using `this.` syntax). 1100 * declared using `this.` syntax).
1092 */ 1101 */
1093 bool isInitializingFormal; 1102 bool isInitializingFormal;
1103
1104 /**
1105 * If this parameter's type is inferrable, nonzero slot id identifying which
1106 * entry in [LinkedLibrary.types] contains the inferred type. If there is no
1107 * matching entry in [LinkedLibrary.types], then no type was inferred for
1108 * this variable, so its static type is `dynamic`.
1109 *
1110 * Note that although strong mode considers initializing formals to be
1111 * inferrable, they are not marked as such in the summary; if their type is
1112 * not specified, they always inherit the static type of the corresponding
1113 * field.
1114 */
1115 int inferredTypeSlot;
1094 } 1116 }
1095 1117
1096 /** 1118 /**
1097 * Enum used to indicate the kind of a parameter. 1119 * Enum used to indicate the kind of a parameter.
1098 */ 1120 */
1099 enum UnlinkedParamKind { 1121 enum UnlinkedParamKind {
1100 /** 1122 /**
1101 * Parameter is required. 1123 * Parameter is required.
1102 */ 1124 */
1103 required, 1125 required,
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
1414 1436
1415 /** 1437 /**
1416 * If this variable is propagable, nonzero slot id identifying which entry in 1438 * If this variable is propagable, nonzero slot id identifying which entry in
1417 * [LinkedLibrary.types] contains the propagated type for this variable. If 1439 * [LinkedLibrary.types] contains the propagated type for this variable. If
1418 * there is no matching entry in [LinkedLibrary.types], then this variable's 1440 * there is no matching entry in [LinkedLibrary.types], then this variable's
1419 * propagated type is the same as its declared type. 1441 * propagated type is the same as its declared type.
1420 * 1442 *
1421 * Non-propagable variables have a [propagatedTypeSlot] of zero. 1443 * Non-propagable variables have a [propagatedTypeSlot] of zero.
1422 */ 1444 */
1423 int propagatedTypeSlot; 1445 int propagatedTypeSlot;
1446
1447 /**
1448 * If this variable is inferrable, nonzero slot id identifying which entry in
1449 * [LinkedLibrary.types] contains the inferred type for this variable. If
1450 * there is no matching entry in [LinkedLibrary.types], then no type was
1451 * inferred for this variable, so its static type is `dynamic`.
1452 */
1453 int inferredTypeSlot;
1424 } 1454 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698