| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |