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

Side by Side Diff: pkg/compiler/lib/src/universe/feature.dart

Issue 2896393003: Remove factory body in *.fromEnvironment, and implement this same behavior (Closed)
Patch Set: turn warning into a hint Created 3 years, 6 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 // TODO(sigmund): rename universe => world 1 // TODO(sigmund): rename universe => world
2 /// Describes individual features that may be seen in a program. Most features 2 /// Describes individual features that may be seen in a program. Most features
3 /// can be described only by name using the [Feature] enum, some features are 3 /// can be described only by name using the [Feature] enum, some features are
4 /// expressed including details on how they are used. For example, whether a 4 /// expressed including details on how they are used. For example, whether a
5 /// list literal was constant or empty. 5 /// list literal was constant or empty.
6 /// 6 ///
7 /// The use of these features is typically discovered in an early phase of the 7 /// The use of these features is typically discovered in an early phase of the
8 /// compilation pipeline, for example during resolution. 8 /// compilation pipeline, for example during resolution.
9 library compiler.universe.feature; 9 library compiler.universe.feature;
10 10
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 /// A method with a `sync*` body modifier. 71 /// A method with a `sync*` body modifier.
72 SYNC_STAR, 72 SYNC_STAR,
73 73
74 /// A throw expression. 74 /// A throw expression.
75 THROW_EXPRESSION, 75 THROW_EXPRESSION,
76 76
77 /// An implicit throw of a `NoSuchMethodError`, like calling an unresolved 77 /// An implicit throw of a `NoSuchMethodError`, like calling an unresolved
78 /// static method. 78 /// static method.
79 THROW_NO_SUCH_METHOD, 79 THROW_NO_SUCH_METHOD,
80 80
81 /// An implicit throw of a runtime error, like 81 /// An implicit throw of a runtime error, like in a runtime type check.
82 THROW_RUNTIME_ERROR, 82 THROW_RUNTIME_ERROR,
83 83
84 /// An implicit throw of a `UnsupportedError`, like calling `new
85 /// bool.fromEnvironment`.
86 THROW_UNSUPPORTED_ERROR,
87
84 /// The need for a type variable bound check, like instantiation of a generic 88 /// The need for a type variable bound check, like instantiation of a generic
85 /// type whose type variable have non-trivial bounds. 89 /// type whose type variable have non-trivial bounds.
86 TYPE_VARIABLE_BOUNDS_CHECK, 90 TYPE_VARIABLE_BOUNDS_CHECK,
87 } 91 }
88 92
89 /// Describes a use of a map literal in the program. 93 /// Describes a use of a map literal in the program.
90 class MapLiteralUse { 94 class MapLiteralUse {
91 final InterfaceType type; 95 final InterfaceType type;
92 final bool isConstant; 96 final bool isConstant;
93 final bool isEmpty; 97 final bool isEmpty;
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 if (other is! ListLiteralUse) return false; 136 if (other is! ListLiteralUse) return false;
133 return type == other.type && 137 return type == other.type &&
134 isConstant == other.isConstant && 138 isConstant == other.isConstant &&
135 isEmpty == other.isEmpty; 139 isEmpty == other.isEmpty;
136 } 140 }
137 141
138 String toString() { 142 String toString() {
139 return 'ListLiteralUse($type,isConstant:$isConstant,isEmpty:$isEmpty)'; 143 return 'ListLiteralUse($type,isConstant:$isConstant,isEmpty:$isEmpty)';
140 } 144 }
141 } 145 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/ssa/kernel_impact.dart ('k') | sdk/lib/_internal/js_runtime/lib/core_patch.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698