Index: pkg/kernel/lib/type_propagation/type_propagation.dart |
diff --git a/pkg/kernel/lib/type_propagation/type_propagation.dart b/pkg/kernel/lib/type_propagation/type_propagation.dart |
index de5f329f25490cad8ec2bfaf2a04428dcb43d9bf..35e3bfa19b3c349d87f3f6bc8525b27a0aaa7f91 100644 |
--- a/pkg/kernel/lib/type_propagation/type_propagation.dart |
+++ b/pkg/kernel/lib/type_propagation/type_propagation.dart |
@@ -64,7 +64,7 @@ enum BaseClassKind { |
/// its base class and its bitmask. The InferredValue object represents the |
/// intersection of these two value sets. |
class InferredValue extends Node { |
- final Class baseClass; |
+ final LinkedNodeBox baseClassBox; |
final BaseClassKind baseClassKind; |
/// A bitmask of the flags defined in [ValueBit], refining the set of values. |
@@ -79,12 +79,17 @@ class InferredValue extends Node { |
/// class could be found. |
final int valueBits; |
- InferredValue(this.baseClass, this.baseClassKind, |
- [this.valueBits = ValueBit.all]) { |
+ InferredValue(Class baseClass, BaseClassKind baseClassKind, |
+ [int valueBits = ValueBit.all]) |
+ : this.byBox(baseClass?.box, baseClassKind, valueBits); |
+ |
+ InferredValue.byBox(this.baseClassBox, this.baseClassKind, this.valueBits) { |
assert(baseClass != null || baseClassKind == BaseClassKind.None); |
assert(baseClass == null || baseClassKind != BaseClassKind.None); |
} |
+ Class get baseClass => baseClassBox?.asClass; |
+ |
InferredValue withBitmask(int newBitmask) { |
if (newBitmask == valueBits) return this; |
return new InferredValue(this.baseClass, this.baseClassKind, newBitmask); |