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

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

Issue 1859493002: Replace 'length' with more generic 'extractProperty' operation. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 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 6 * This file is an "idl" style description of the summary format. It
7 * contains abstract classes which declare the interface for reading data from 7 * contains abstract classes which declare the interface for reading data from
8 * summaries. It is parsed and transformed into code that implements the 8 * summaries. It is parsed and transformed into code that implements the
9 * summary format. 9 * summary format.
10 * 10 *
(...skipping 700 matching lines...) Expand 10 before | Expand all | Expand 10 after
711 * class. 711 * class.
712 */ 712 */
713 propertyAccessor, 713 propertyAccessor,
714 714
715 /** 715 /**
716 * The entity is a method. 716 * The entity is a method.
717 */ 717 */
718 method, 718 method,
719 719
720 /** 720 /**
721 * The `length` property access.
722 */
723 length,
724
725 /**
726 * The entity is a typedef. 721 * The entity is a typedef.
727 */ 722 */
728 typedef, 723 typedef,
729 724
730 /** 725 /**
731 * The entity is a local function. 726 * The entity is a local function.
732 */ 727 */
733 function, 728 function,
734 729
735 /** 730 /**
(...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after
1122 * - A qualified reference to a static constant variable (e.g. `C.v`, where 1117 * - A qualified reference to a static constant variable (e.g. `C.v`, where
1123 * C is a class and `v` is a constant static variable in `C`). 1118 * C is a class and `v` is a constant static variable in `C`).
1124 * - An identifier expression referring to a constant variable. 1119 * - An identifier expression referring to a constant variable.
1125 * - A simple or qualified identifier denoting a class or type alias. 1120 * - A simple or qualified identifier denoting a class or type alias.
1126 * - A simple or qualified identifier denoting a top-level function or a 1121 * - A simple or qualified identifier denoting a top-level function or a
1127 * static method. 1122 * static method.
1128 */ 1123 */
1129 pushReference, 1124 pushReference,
1130 1125
1131 /** 1126 /**
1127 * Pop the top value from the stack, extract the value of the property with
1128 * the name obtained from [UnlinkedConst.strings], and push the result back
1129 * onto the stack.
1130 */
1131 extractProperty,
1132
1133 /**
1132 * Pop the top `n` values from the stack (where `n` is obtained from 1134 * Pop the top `n` values from the stack (where `n` is obtained from
1133 * [UnlinkedConst.ints]) into a list (filled from the end) and take the next 1135 * [UnlinkedConst.ints]) into a list (filled from the end) and take the next
1134 * `n` values from [UnlinkedConst.strings] and use the lists of names and 1136 * `n` values from [UnlinkedConst.strings] and use the lists of names and
1135 * values to create named arguments. Then pop the top `m` values from the 1137 * values to create named arguments. Then pop the top `m` values from the
1136 * stack (where `m` is obtained from [UnlinkedConst.ints]) into a list (filled 1138 * stack (where `m` is obtained from [UnlinkedConst.ints]) into a list (filled
1137 * from the end) and use them as positional arguments. Use the lists of 1139 * from the end) and use them as positional arguments. Use the lists of
1138 * positional and names arguments to invoke a constant constructor obtained 1140 * positional and names arguments to invoke a constant constructor obtained
1139 * from [UnlinkedConst.references], and push the resulting value back onto the 1141 * from [UnlinkedConst.references], and push the resulting value back onto the
1140 * stack. 1142 * stack.
1141 * 1143 *
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
1315 * Pop the top 2 values from the stack, compute `v1 % v2`, and push the 1317 * Pop the top 2 values from the stack, compute `v1 % v2`, and push the
1316 * result back onto the stack. 1318 * result back onto the stack.
1317 */ 1319 */
1318 modulo, 1320 modulo,
1319 1321
1320 /** 1322 /**
1321 * Pop the top 3 values from the stack, compute `v1 ? v2 : v3`, and push the 1323 * Pop the top 3 values from the stack, compute `v1 ? v2 : v3`, and push the
1322 * result back onto the stack. 1324 * result back onto the stack.
1323 */ 1325 */
1324 conditional, 1326 conditional,
1325
1326 /**
1327 * Pop the top value from the stack, evaluate `v.length`, and push the result
1328 * back onto the stack.
1329 */
1330 length,
1331 } 1327 }
1332 1328
1333 /** 1329 /**
1334 * Unlinked summary information about a constructor initializer. 1330 * Unlinked summary information about a constructor initializer.
1335 */ 1331 */
1336 abstract class UnlinkedConstructorInitializer extends base.SummaryClass { 1332 abstract class UnlinkedConstructorInitializer extends base.SummaryClass {
1337 /** 1333 /**
1338 * If [kind] is `thisInvocation` or `superInvocation`, the arguments of the 1334 * If [kind] is `thisInvocation` or `superInvocation`, the arguments of the
1339 * invocation. Otherwise empty. 1335 * invocation. Otherwise empty.
1340 */ 1336 */
(...skipping 1120 matching lines...) Expand 10 before | Expand all | Expand 10 after
2461 */ 2457 */
2462 @Id(11) 2458 @Id(11)
2463 int get visibleLength; 2459 int get visibleLength;
2464 2460
2465 /** 2461 /**
2466 * If a local variable, the beginning of the visible range; zero otherwise. 2462 * If a local variable, the beginning of the visible range; zero otherwise.
2467 */ 2463 */
2468 @Id(12) 2464 @Id(12)
2469 int get visibleOffset; 2465 int get visibleOffset;
2470 } 2466 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698