Skip to content

Commit 01a679b

Browse files
rakudramacommit-bot@chromium.org
authored andcommitted
[dart2js] new-rti: Fix generator header-body merge optimization
Change-Id: Id4f038415990f5379c1a01637b53c398f5325449 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/112270 Reviewed-by: Mayank Patke <[email protected]> Commit-Queue: Stephen Adams <[email protected]>
1 parent 59c6313 commit 01a679b

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

pkg/compiler/lib/src/ssa/builder_kernel.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1426,6 +1426,7 @@ class KernelSsaGraphBuilder extends ir.Visitor {
14261426
if (block.id != 1) return false;
14271427
for (HInstruction node = block.first; node != null; node = node.next) {
14281428
if (node is HGoto) continue;
1429+
if (node is HLoadType) continue; // Orphaned if check is redundant.
14291430
return false;
14301431
}
14311432
return true;

pkg/compiler/lib/src/ssa/type_builder.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,9 @@ abstract class TypeBuilder {
8585
if (other is HTypeConversion && other.isRedundant(builder.closedWorld)) {
8686
return original;
8787
}
88+
if (other is HAsCheck && other.isRedundant(builder.closedWorld)) {
89+
return original;
90+
}
8891
return other;
8992
}
9093

0 commit comments

Comments
 (0)