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

Unified Diff: pkg/compiler/lib/src/tree/nodes.dart

Issue 2876813002: Implement generalized function types. (Closed)
Patch Set: Address comments. Created 3 years, 7 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
Index: pkg/compiler/lib/src/tree/nodes.dart
diff --git a/pkg/compiler/lib/src/tree/nodes.dart b/pkg/compiler/lib/src/tree/nodes.dart
index c4dd6f21b2b9dcbe22f4543cd9c66e3ab0c9939c..14888c1a4afe555689cbbf04f19a6ebd22a046bb 100644
--- a/pkg/compiler/lib/src/tree/nodes.dart
+++ b/pkg/compiler/lib/src/tree/nodes.dart
@@ -1977,6 +1977,7 @@ class Modifiers extends Node {
static const int FLAG_CONST = FLAG_VAR << 1;
static const int FLAG_FACTORY = FLAG_CONST << 1;
static const int FLAG_EXTERNAL = FLAG_FACTORY << 1;
+ static const int FLAG_COVARIANT = FLAG_EXTERNAL << 1;
Modifiers(NodeList nodes) : this.withFlags(nodes, computeFlags(nodes.nodes));
@@ -2000,6 +2001,8 @@ class Modifiers extends Node {
flags |= FLAG_FACTORY;
else if (identical(value, 'external'))
flags |= FLAG_EXTERNAL;
+ else if (identical(value, 'covariant'))
+ flags |= FLAG_COVARIANT;
else
throw 'internal error: ${nodes.head}';
}
@@ -2036,6 +2039,7 @@ class Modifiers extends Node {
bool get isConst => (flags & FLAG_CONST) != 0;
bool get isFactory => (flags & FLAG_FACTORY) != 0;
bool get isExternal => (flags & FLAG_EXTERNAL) != 0;
+ bool get isCovariant => (flags & FLAG_COVARIANT) != 0;
Node getStatic() => findModifier('static');
@@ -2053,7 +2057,8 @@ class Modifiers extends Node {
isVar: isVar,
isConst: isConst,
isFactory: isFactory,
- isExternal: isExternal);
+ isExternal: isExternal,
+ isCovariant: isCovariant);
}
}
« no previous file with comments | « pkg/compiler/lib/src/serialization/resolved_ast_serialization.dart ('k') | pkg/compiler/lib/src/util/util.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698