Skip to content

Commit

Permalink
[dart2js] new-rti: Fix generator header-body merge optimization
Browse files Browse the repository at this point in the history
Change-Id: Id4f038415990f5379c1a01637b53c398f5325449
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/112270
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
  • Loading branch information
rakudrama authored and commit-bot@chromium.org committed Aug 7, 2019
1 parent 59c6313 commit 01a679b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions pkg/compiler/lib/src/ssa/builder_kernel.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1426,6 +1426,7 @@ class KernelSsaGraphBuilder extends ir.Visitor {
if (block.id != 1) return false;
for (HInstruction node = block.first; node != null; node = node.next) {
if (node is HGoto) continue;
if (node is HLoadType) continue; // Orphaned if check is redundant.
return false;
}
return true;
Expand Down
3 changes: 3 additions & 0 deletions pkg/compiler/lib/src/ssa/type_builder.dart
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@ abstract class TypeBuilder {
if (other is HTypeConversion && other.isRedundant(builder.closedWorld)) {
return original;
}
if (other is HAsCheck && other.isRedundant(builder.closedWorld)) {
return original;
}
return other;
}

Expand Down

0 comments on commit 01a679b

Please sign in to comment.