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

Unified Diff: pkg/compiler/lib/src/cps_ir/type_mask_system.dart

Issue 1381493003: Revert "dart2js cps_ir: Seed type_propagation with constant bools from inference." (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 3 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 | « no previous file | pkg/compiler/lib/src/cps_ir/type_propagation.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/cps_ir/type_mask_system.dart
diff --git a/pkg/compiler/lib/src/cps_ir/type_mask_system.dart b/pkg/compiler/lib/src/cps_ir/type_mask_system.dart
index 8aa987c192e97376a7a39d7ddb445634171e6ab9..c911b5f6279930e47aa841f36c6fb7180ba4c889 100644
--- a/pkg/compiler/lib/src/cps_ir/type_mask_system.dart
+++ b/pkg/compiler/lib/src/cps_ir/type_mask_system.dart
@@ -127,19 +127,6 @@ class TypeMaskSystem {
return computeTypeMask(inferrer.compiler, constant);
}
- // Returns the constant value if a TypeMask represents a single value.
- // Returns `null` if [mask] is not a constant.
- ConstantValue getConstantOf(TypeMask mask) {
- if (!mask.isValue) return null;
- ValueTypeMask valueMask = mask;
- var value = valueMask.value;
- // TODO(sra): Why is ValueTypeMask.value not a ConstantValue?
- if (value == false) return new FalseConstantValue();
- if (value == true) return new TrueConstantValue();
- // TODO(sra): Consider other values. Be careful with large strings.
- return null;
- }
-
TypeMask nonNullExact(ClassElement element) {
// The class world does not know about classes created by
// closure conversion, so just treat those as a subtypes of Function.
« no previous file with comments | « no previous file | pkg/compiler/lib/src/cps_ir/type_propagation.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698