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

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

Issue 1633863002: Support for constructor references in constant serializer and prelinker. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Record default constructor references as class references 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
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/summary/prelink.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) 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 // This file has been automatically generated. Please do not edit it manually. 5 // This file has been automatically generated. Please do not edit it manually.
6 // To regenerate the file, use the script "pkg/analyzer/tool/generate_files". 6 // To regenerate the file, use the script "pkg/analyzer/tool/generate_files".
7 7
8 library analyzer.src.summary.format; 8 library analyzer.src.summary.format;
9 9
10 import 'base.dart' as base; 10 import 'base.dart' as base;
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 */ 157 */
158 pushReference, 158 pushReference,
159 159
160 /** 160 /**
161 * Pop the top `n` values from the stack (where `n` is obtained from 161 * Pop the top `n` values from the stack (where `n` is obtained from
162 * [UnlinkedConst.ints]) into a list (filled from the end) and take the next 162 * [UnlinkedConst.ints]) into a list (filled from the end) and take the next
163 * `n` values from [UnlinkedConst.strings] and use the lists of names and 163 * `n` values from [UnlinkedConst.strings] and use the lists of names and
164 * values to create named arguments. Then pop the top `m` values from the 164 * values to create named arguments. Then pop the top `m` values from the
165 * stack (where `m` is obtained from [UnlinkedConst.ints]) into a list (filled 165 * stack (where `m` is obtained from [UnlinkedConst.ints]) into a list (filled
166 * from the end) and use them as positional arguments. Use the lists of 166 * from the end) and use them as positional arguments. Use the lists of
167 * positional and names arguments to invoke a constant constructor whose name 167 * positional and names arguments to invoke a constant constructor obtained
168 * is obtained from [UnlinkedConst.strings], and whose class is obtained from 168 * from [UnlinkedConst.references], and push the resulting value back onto the
169 * [UnlinkedConst.references], and push the resulting value back onto the
170 * stack. 169 * stack.
171 * 170 *
172 * Note that for an invocation of the form `const a.b(...)` (where no type 171 * Note that for an invocation of the form `const a.b(...)` (where no type
173 * arguments are specified), it is impossible to tell from the unresolved AST 172 * arguments are specified), it is impossible to tell from the unresolved AST
174 * alone whether `a` is a class name and `b` is a constructor name, or `a` is 173 * alone whether `a` is a class name and `b` is a constructor name, or `a` is
175 * a prefix name and `b` is a class name. In this case it is presumed that 174 * a prefix name and `b` is a class name. For consistency between AST based
176 * `a` is a prefix name and `b` is a class name. 175 * and elements based summaries, references to default constructors are always
177 * 176 * recorded as references to corresponding classes.
178 * TODO(paulberry): figure out how to resolve this ambiguity in the
179 * "prelinked" part of the summary.
180 */ 177 */
181 invokeConstructor, 178 invokeConstructor,
182 179
183 /** 180 /**
184 * Pop the top n values from the stack (where n is obtained from 181 * Pop the top n values from the stack (where n is obtained from
185 * [UnlinkedConst.ints]), place them in a [List], and push the result back 182 * [UnlinkedConst.ints]), place them in a [List], and push the result back
186 * onto the stack. The type parameter for the [List] is implicitly `dynamic`. 183 * onto the stack. The type parameter for the [List] is implicitly `dynamic`.
187 */ 184 */
188 makeUntypedList, 185 makeUntypedList,
189 186
(...skipping 5907 matching lines...) Expand 10 before | Expand all | Expand 10 after
6097 "type": type, 6094 "type": type,
6098 "constExpr": constExpr, 6095 "constExpr": constExpr,
6099 "isStatic": isStatic, 6096 "isStatic": isStatic,
6100 "isFinal": isFinal, 6097 "isFinal": isFinal,
6101 "isConst": isConst, 6098 "isConst": isConst,
6102 "propagatedTypeSlot": propagatedTypeSlot, 6099 "propagatedTypeSlot": propagatedTypeSlot,
6103 "inferredTypeSlot": inferredTypeSlot, 6100 "inferredTypeSlot": inferredTypeSlot,
6104 }; 6101 };
6105 } 6102 }
6106 6103
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/summary/prelink.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698