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

Side by Side Diff: pkg/analyzer/tool/summary/idl.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, 10 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 560 matching lines...) Expand 10 before | Expand all | Expand 10 after
571 */ 571 */
572 pushReference, 572 pushReference,
573 573
574 /** 574 /**
575 * Pop the top `n` values from the stack (where `n` is obtained from 575 * Pop the top `n` values from the stack (where `n` is obtained from
576 * [UnlinkedConst.ints]) into a list (filled from the end) and take the next 576 * [UnlinkedConst.ints]) into a list (filled from the end) and take the next
577 * `n` values from [UnlinkedConst.strings] and use the lists of names and 577 * `n` values from [UnlinkedConst.strings] and use the lists of names and
578 * values to create named arguments. Then pop the top `m` values from the 578 * values to create named arguments. Then pop the top `m` values from the
579 * stack (where `m` is obtained from [UnlinkedConst.ints]) into a list (filled 579 * stack (where `m` is obtained from [UnlinkedConst.ints]) into a list (filled
580 * from the end) and use them as positional arguments. Use the lists of 580 * from the end) and use them as positional arguments. Use the lists of
581 * positional and names arguments to invoke a constant constructor whose name 581 * positional and names arguments to invoke a constant constructor obtained
582 * is obtained from [UnlinkedConst.strings], and whose class is obtained from 582 * from [UnlinkedConst.references], and push the resulting value back onto the
583 * [UnlinkedConst.references], and push the resulting value back onto the
584 * stack. 583 * stack.
585 * 584 *
586 * Note that for an invocation of the form `const a.b(...)` (where no type 585 * Note that for an invocation of the form `const a.b(...)` (where no type
587 * arguments are specified), it is impossible to tell from the unresolved AST 586 * arguments are specified), it is impossible to tell from the unresolved AST
588 * alone whether `a` is a class name and `b` is a constructor name, or `a` is 587 * alone whether `a` is a class name and `b` is a constructor name, or `a` is
589 * a prefix name and `b` is a class name. In this case it is presumed that 588 * a prefix name and `b` is a class name. For consistency between AST based
590 * `a` is a prefix name and `b` is a class name. 589 * and elements based summaries, references to default constructors are always
591 * 590 * recorded as references to corresponding classes.
592 * TODO(paulberry): figure out how to resolve this ambiguity in the
593 * "prelinked" part of the summary.
594 */ 591 */
595 invokeConstructor, 592 invokeConstructor,
596 593
597 /** 594 /**
598 * Pop the top n values from the stack (where n is obtained from 595 * Pop the top n values from the stack (where n is obtained from
599 * [UnlinkedConst.ints]), place them in a [List], and push the result back 596 * [UnlinkedConst.ints]), place them in a [List], and push the result back
600 * onto the stack. The type parameter for the [List] is implicitly `dynamic`. 597 * onto the stack. The type parameter for the [List] is implicitly `dynamic`.
601 */ 598 */
602 makeUntypedList, 599 makeUntypedList,
603 600
(...skipping 854 matching lines...) Expand 10 before | Expand all | Expand 10 after
1458 int propagatedTypeSlot; 1455 int propagatedTypeSlot;
1459 1456
1460 /** 1457 /**
1461 * If this variable is inferrable, nonzero slot id identifying which entry in 1458 * If this variable is inferrable, nonzero slot id identifying which entry in
1462 * [LinkedLibrary.types] contains the inferred type for this variable. If 1459 * [LinkedLibrary.types] contains the inferred type for this variable. If
1463 * there is no matching entry in [LinkedLibrary.types], then no type was 1460 * there is no matching entry in [LinkedLibrary.types], then no type was
1464 * inferred for this variable, so its static type is `dynamic`. 1461 * inferred for this variable, so its static type is `dynamic`.
1465 */ 1462 */
1466 int inferredTypeSlot; 1463 int inferredTypeSlot;
1467 } 1464 }
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