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

Unified Diff: pkg/compiler/lib/src/cps_ir/type_propagation.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 | « pkg/compiler/lib/src/cps_ir/type_mask_system.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/cps_ir/type_propagation.dart
diff --git a/pkg/compiler/lib/src/cps_ir/type_propagation.dart b/pkg/compiler/lib/src/cps_ir/type_propagation.dart
index 383b39fb68ce20471bb7b6a76aadfcea68172dd6..8c37b3ac201a5800178f8ce0a506e976b0d70912 100644
--- a/pkg/compiler/lib/src/cps_ir/type_propagation.dart
+++ b/pkg/compiler/lib/src/cps_ir/type_propagation.dart
@@ -321,13 +321,7 @@ class ConstantPropagationLattice {
/// [typedSelector]. If the given selector is not a [TypedSelector], any
/// reachable method matching the selector may be targeted.
AbstractValue getInvokeReturnType(Selector selector, TypeMask mask) {
- return fromMask(typeSystem.getInvokeReturnType(selector, mask));
- }
-
- AbstractValue fromMask(TypeMask mask) {
- ConstantValue constantValue = typeSystem.getConstantOf(mask);
- if (constantValue != null) return constant(constantValue, mask);
- return nonConstant(mask);
+ return nonConstant(typeSystem.getInvokeReturnType(selector, mask));
}
}
@@ -2072,7 +2066,7 @@ class TypePropagationVisitor implements Visitor {
TypeMask type = param.hint is ParameterElement
? typeSystem.getParameterType(param.hint)
: typeSystem.dynamicType;
- setValue(param, lattice.fromMask(type));
+ setValue(param, nonConstant(type));
}
push(node.body);
}
@@ -2119,7 +2113,7 @@ class TypePropagationVisitor implements Visitor {
}
TypeMask returnType = typeSystem.getReturnType(node.target);
- setResult(node, lattice.fromMask(returnType));
+ setResult(node, nonConstant(returnType));
}
void visitInvokeContinuation(InvokeContinuation node) {
« no previous file with comments | « pkg/compiler/lib/src/cps_ir/type_mask_system.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698