Descriptiondart2js: Insert HTypeKnown refinement nodes on dominated edges of HPhi nodes.
Consider:
value ??= "";
We fail to infer in SSA type progagation that value is non-null.
At CFG level this looks like
if (value == null) {
value = "";
} else {
// There is always an empty else-block.
}
value1 = phi("", value);
Previously we considered the phi use of 'value' to be outside the
region dominated by the condition 'value != null', leaving nowhere to
attach the type refinement. Now we consider it inside the region,
allowing:
if (value == null) {
value = "";
} else {
value1 = HTypeKnown(not-null, value);
}
value2 = phi("", value1);
Type propagation now determines value2 is non-null.
R=efortuna@google.com
Committed: https://github.com/dart-lang/sdk/commit/49e78d7e32dd26b25fb7def5b62f26fde1870675
Patch Set 1 #
Total comments: 3
Patch Set 2 : rebase #
Messages
Total messages: 14 (9 generated)
|