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

Unified Diff: pkg/compiler/lib/src/ssa/codegen_helpers.dart

Issue 2439653002: Fix generateAtUseSite for complex HIs checks (Closed)
Patch Set: rebase Created 4 years, 1 month 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/ssa/codegen_helpers.dart
diff --git a/pkg/compiler/lib/src/ssa/codegen_helpers.dart b/pkg/compiler/lib/src/ssa/codegen_helpers.dart
index c3e2bb6a3dd9840d421e1418265a07bc5dfb598d..34d156b292898108a4e11f060c93f6c951c8e543 100644
--- a/pkg/compiler/lib/src/ssa/codegen_helpers.dart
+++ b/pkg/compiler/lib/src/ssa/codegen_helpers.dart
@@ -440,11 +440,18 @@ class SsaInstructionMerger extends HBaseVisitor {
void visitIs(HIs instruction) {
// In the general case the input might be used multple multiple times, so it
- // must not be set generate at use site. If the code will generate
- // 'instanceof' then we can generate at use site.
+ // must not be set generate at use site.
+
+ // If the code will generate 'instanceof' then we can generate at use site.
if (instruction.useInstanceOf) {
analyzeInputs(instruction, 0);
}
+
+ // Compound and variable checks use a separate instruction to compute the
+ // result.
+ if (instruction.isCompoundCheck || instruction.isVariableCheck) {
+ analyzeInputs(instruction, 0);
+ }
}
// A bounds check method must not have its first input generated at use site,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698