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

Unified Diff: pkg/compiler/lib/src/elements/elements.dart

Issue 1888393002: Fix some issues in element serialization. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Fix comment. 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/compiler/lib/src/elements/common.dart ('k') | pkg/compiler/lib/src/elements/modelx.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/elements/elements.dart
diff --git a/pkg/compiler/lib/src/elements/elements.dart b/pkg/compiler/lib/src/elements/elements.dart
index 79151eb29aa5264724b20341b76901ea3c884ddc..af9a44931f0933dadb7d24c9bd797f6348c82212 100644
--- a/pkg/compiler/lib/src/elements/elements.dart
+++ b/pkg/compiler/lib/src/elements/elements.dart
@@ -1106,7 +1106,6 @@ abstract class FunctionSignature {
int get requiredParameterCount;
int get optionalParameterCount;
bool get optionalParametersAreNamed;
- FormalElement get firstOptionalParameter;
bool get hasOptionalParameters;
int get parameterCount;
@@ -1196,6 +1195,18 @@ class AsyncMarker {
String toString() {
return '${isAsync ? 'async' : 'sync'}${isYielding ? '*' : ''}';
}
+
+ /// Canonical list of marker values.
+ ///
+ /// Added to make [AsyncMarker] enum-like.
+ static const List<AsyncMarker> values =
+ const <AsyncMarker>[SYNC, SYNC_STAR, ASYNC, ASYNC_STAR];
+
+
+ /// Index to this marker within [values].
+ ///
+ /// Added to make [AsyncMarker] enum-like.
+ int get index => values.indexOf(this);
}
/// A top level, static or instance function.
« no previous file with comments | « pkg/compiler/lib/src/elements/common.dart ('k') | pkg/compiler/lib/src/elements/modelx.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698