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

Unified Diff: pkg/analyzer/lib/src/summary/idl.dart

Issue 1859723002: Support for serializing prefix/postfix increment/decrement. (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/analyzer/lib/src/summary/format.fbs ('k') | pkg/analyzer/lib/src/summary/resynthesize.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/summary/idl.dart
diff --git a/pkg/analyzer/lib/src/summary/idl.dart b/pkg/analyzer/lib/src/summary/idl.dart
index 23c4520e33ba08bad39d20ee082948ebe5e3ced5..ccec8ba86bf180433d9ef7c93d727801bfccd2e7 100644
--- a/pkg/analyzer/lib/src/summary/idl.dart
+++ b/pkg/analyzer/lib/src/summary/idl.dart
@@ -1340,6 +1340,11 @@ enum UnlinkedConstOperation {
* variable; or `a` is an object and `b` is the name of a property. Perform
* `reference op= value` where `op` is the next assignment operator from
* [UnlinkedConst.assignmentOperators]. Push `value` back into the stack.
+ *
+ * If the assignment operator is a prefix/postfix increment/decrement, then
+ * `value` is not present in the stack, so it should not be popped and the
+ * corresponding value of the `target` after/before update is pushed into the
+ * stack instead.
*/
assignToRef,
@@ -1351,6 +1356,11 @@ enum UnlinkedConstOperation {
* Perform `target.property op= value` where `op` is the next assignment
* operator from [UnlinkedConst.assignmentOperators]. Push `value` back into
* the stack.
+ *
+ * If the assignment operator is a prefix/postfix increment/decrement, then
+ * `value` is not present in the stack, so it should not be popped and the
+ * corresponding value of the `target` after/before update is pushed into the
+ * stack instead.
*/
assignToProperty,
@@ -1358,6 +1368,11 @@ enum UnlinkedConstOperation {
* Pop from the stack `value`, `index` and `target`. Perform
* `target[index] op= value` where `op` is the next assignment operator from
* [UnlinkedConst.assignmentOperators]. Push `value` back into the stack.
+ *
+ * If the assignment operator is a prefix/postfix increment/decrement, then
+ * `value` is not present in the stack, so it should not be popped and the
+ * corresponding value of the `target` after/before update is pushed into the
+ * stack instead.
*/
assignToIndex,
@@ -1876,7 +1891,27 @@ enum UnlinkedExprAssignOperator {
/**
* Perform `target |= operand`.
*/
- bitOr
+ bitOr,
+
+ /**
+ * Perform `++target`.
+ */
+ prefixIncrement,
+
+ /**
+ * Perform `--target`.
+ */
+ prefixDecrement,
+
+ /**
+ * Perform `target++`.
+ */
+ postfixIncrement,
+
+ /**
+ * Perform `target++`.
+ */
+ postfixDecrement,
}
/**
« no previous file with comments | « pkg/analyzer/lib/src/summary/format.fbs ('k') | pkg/analyzer/lib/src/summary/resynthesize.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698