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

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

Issue 1250473004: dart2js cps: Cleanup type annotations in type propagation and remove code to handle null continuati… (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 5 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/cps_ir_tracer.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 60e9c4c185f60c70905403a260a5bc70aeb3a00b..2169b16a61b60ac0fe036aada13209b9e15d6386 100644
--- a/pkg/compiler/lib/src/cps_ir/type_propagation.dart
+++ b/pkg/compiler/lib/src/cps_ir/type_propagation.dart
@@ -1668,7 +1668,7 @@ class TypePropagationVisitor implements Visitor {
/// Returns the lattice value corresponding to [node], defaulting to nothing.
///
/// Never returns null.
- AbstractValue getValue(Node node) {
+ AbstractValue getValue(Definition node) {
AbstractValue value = values[node];
return (value == null) ? nothing : value;
}
@@ -1676,7 +1676,7 @@ class TypePropagationVisitor implements Visitor {
/// Joins the passed lattice [updateValue] to the current value of [node],
/// and adds it to the definition work set if it has changed and [node] is
/// a definition.
- void setValue(Node node, AbstractValue updateValue) {
+ void setValue(Definition node, AbstractValue updateValue) {
AbstractValue oldValue = getValue(node);
AbstractValue newValue = lattice.join(oldValue, updateValue);
if (oldValue == newValue) {
@@ -1687,9 +1687,7 @@ class TypePropagationVisitor implements Visitor {
assert(newValue.kind >= oldValue.kind);
values[node] = newValue;
- if (node is Definition) {
- defWorkset.add(node);
- }
+ defWorkset.add(node);
}
// -------------------------- Visitor overrides ------------------------------
« no previous file with comments | « pkg/compiler/lib/src/cps_ir/cps_ir_tracer.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698