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

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

Issue 1616023002: Add named arguments support into constant ASTs. (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
« no previous file with comments | « pkg/analyzer/test/src/summary/summary_common.dart ('k') | no next file » | 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 /** 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 547 matching lines...) Expand 10 before | Expand all | Expand 10 after
558 * - A qualified reference to a static constant variable (e.g. `C.v`, where 558 * - A qualified reference to a static constant variable (e.g. `C.v`, where
559 * C is a class and `v` is a constant static variable in `C`). 559 * C is a class and `v` is a constant static variable in `C`).
560 * - An identifier expression referring to a constant variable. 560 * - An identifier expression referring to a constant variable.
561 * - A simple or qualified identifier denoting a class or type alias. 561 * - A simple or qualified identifier denoting a class or type alias.
562 * - A simple or qualified identifier denoting a top-level function or a 562 * - A simple or qualified identifier denoting a top-level function or a
563 * static method. 563 * static method.
564 */ 564 */
565 pushReference, 565 pushReference,
566 566
567 /** 567 /**
568 * Pop the top n values from the stack (where n is obtained from 568 * Pop the top `n` values from the stack (where `n` is obtained from
569 * [UnlinkedConst.ints]), use them to invoke a constant constructor whose 569 * [UnlinkedConst.ints]) into a list (filled from the end) and take the next
570 * name is obtained from [UnlinkedConst.strings], and whose class is obtained 570 * `n` values from [UnlinkedConst.strings] and use the lists of names and
571 * from [UnlinkedConst.references], and push the resulting value back onto 571 * values to create named arguments. Then pop the top `m` values from the
572 * the stack. 572 * stack (where `m` is obtained from [UnlinkedConst.ints]) into a list (filled
573 * from the end) and use them as positional arguments. Use the lists of
574 * positional and names arguments to invoke a constant constructor whose name
575 * is obtained from [UnlinkedConst.strings], and whose class is obtained from
576 * [UnlinkedConst.references], and push the resulting value back onto the
577 * stack.
573 * 578 *
574 * Note that for an invocation of the form `const a.b(...)` (where no type 579 * Note that for an invocation of the form `const a.b(...)` (where no type
575 * arguments are specified), it is impossible to tell from the unresolved AST 580 * arguments are specified), it is impossible to tell from the unresolved AST
576 * alone whether `a` is a class name and `b` is a constructor name, or `a` is 581 * alone whether `a` is a class name and `b` is a constructor name, or `a` is
577 * a prefix name and `b` is a class name. In this case it is presumed that 582 * a prefix name and `b` is a class name. In this case it is presumed that
578 * `a` is a prefix name and `b` is a class name. 583 * `a` is a prefix name and `b` is a class name.
579 * 584 *
580 * TODO(paulberry): figure out how to resolve this ambiguity in the 585 * TODO(paulberry): figure out how to resolve this ambiguity in the
581 * "prelinked" part of the summary. 586 * "prelinked" part of the summary.
582 */ 587 */
(...skipping 834 matching lines...) Expand 10 before | Expand all | Expand 10 after
1417 /** 1422 /**
1418 * If this variable is propagable, nonzero slot id identifying which entry in 1423 * If this variable is propagable, nonzero slot id identifying which entry in
1419 * [LinkedLibrary.types] contains the propagated type for this variable. If 1424 * [LinkedLibrary.types] contains the propagated type for this variable. If
1420 * there is no matching entry in [LinkedLibrary.types], then this variable's 1425 * there is no matching entry in [LinkedLibrary.types], then this variable's
1421 * propagated type is the same as its declared type. 1426 * propagated type is the same as its declared type.
1422 * 1427 *
1423 * Non-propagable variables have a [propagatedTypeSlot] of zero. 1428 * Non-propagable variables have a [propagatedTypeSlot] of zero.
1424 */ 1429 */
1425 int propagatedTypeSlot; 1430 int propagatedTypeSlot;
1426 } 1431 }
OLDNEW
« no previous file with comments | « pkg/analyzer/test/src/summary/summary_common.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698