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

Unified Diff: runtime/vm/intermediate_language_x64.cc

Issue 2912903002: Reapply "Fix misoptimization of 'is' test"" (Closed)
Patch Set: Remove change to TestCidsInstr::Canonicalize and improve printer Created 3 years, 7 months 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 | « runtime/vm/intermediate_language_mips.cc ('k') | runtime/vm/jit_optimizer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intermediate_language_x64.cc
diff --git a/runtime/vm/intermediate_language_x64.cc b/runtime/vm/intermediate_language_x64.cc
index 8f22f334899c7eff30a60b316c5d44a5b68c12b0..112cdc6b971192080ad12cbcbcfd2bfa357717e3 100644
--- a/runtime/vm/intermediate_language_x64.cc
+++ b/runtime/vm/intermediate_language_x64.cc
@@ -684,8 +684,11 @@ Condition TestCidsInstr::EmitComparisonCode(FlowGraphCompiler* compiler,
__ cmpq(cid_reg, Immediate(test_cid));
__ j(EQUAL, result ? labels.true_label : labels.false_label);
}
- // No match found, deoptimize or false.
+ // No match found, deoptimize or default action.
if (deopt == NULL) {
+ // If the cid is not in the list, jump to the opposite label from the cids
+ // that are in the list. These must be all the same (see asserts in the
+ // constructor).
Label* target = result ? labels.false_label : labels.true_label;
if (target != labels.fall_through) {
__ jmp(target);
« no previous file with comments | « runtime/vm/intermediate_language_mips.cc ('k') | runtime/vm/jit_optimizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698