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

Side by Side Diff: runtime/vm/intermediate_language_ia32.cc

Issue 2914483002: Revert "Fix misoptimization of 'is' test" (Closed)
Patch Set: Created 3 years, 6 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 unified diff | Download patch
« no previous file with comments | « runtime/vm/intermediate_language_dbc.cc ('k') | runtime/vm/intermediate_language_mips.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_IA32. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_IA32.
6 #if defined(TARGET_ARCH_IA32) 6 #if defined(TARGET_ARCH_IA32)
7 7
8 #include "vm/intermediate_language.h" 8 #include "vm/intermediate_language.h"
9 9
10 #include "vm/compiler.h" 10 #include "vm/compiler.h"
(...skipping 693 matching lines...) Expand 10 before | Expand all | Expand 10 after
704 __ testl(val_reg, Immediate(kSmiTagMask)); 704 __ testl(val_reg, Immediate(kSmiTagMask));
705 __ j(ZERO, result ? labels.true_label : labels.false_label); 705 __ j(ZERO, result ? labels.true_label : labels.false_label);
706 __ LoadClassId(cid_reg, val_reg); 706 __ LoadClassId(cid_reg, val_reg);
707 for (intptr_t i = 2; i < data.length(); i += 2) { 707 for (intptr_t i = 2; i < data.length(); i += 2) {
708 const intptr_t test_cid = data[i]; 708 const intptr_t test_cid = data[i];
709 ASSERT(test_cid != kSmiCid); 709 ASSERT(test_cid != kSmiCid);
710 result = data[i + 1] == true_result; 710 result = data[i + 1] == true_result;
711 __ cmpl(cid_reg, Immediate(test_cid)); 711 __ cmpl(cid_reg, Immediate(test_cid));
712 __ j(EQUAL, result ? labels.true_label : labels.false_label); 712 __ j(EQUAL, result ? labels.true_label : labels.false_label);
713 } 713 }
714 // No match found, deoptimize or default action. 714 // No match found, deoptimize or false.
715 if (deopt == NULL) { 715 if (deopt == NULL) {
716 // If the cid is not in the list, jump to the opposite label from the cids
717 // that are in the list. These must be all the same (see asserts in the
718 // constructor).
719 Label* target = result ? labels.false_label : labels.true_label; 716 Label* target = result ? labels.false_label : labels.true_label;
720 if (target != labels.fall_through) { 717 if (target != labels.fall_through) {
721 __ jmp(target); 718 __ jmp(target);
722 } 719 }
723 } else { 720 } else {
724 __ jmp(deopt); 721 __ jmp(deopt);
725 } 722 }
726 // Dummy result as the last instruction is a jump, any conditional 723 // Dummy result as the last instruction is a jump, any conditional
727 // branch using the result will therefore be skipped. 724 // branch using the result will therefore be skipped.
728 return ZERO; 725 return ZERO;
(...skipping 6190 matching lines...) Expand 10 before | Expand all | Expand 10 after
6919 __ Drop(1); 6916 __ Drop(1);
6920 __ popl(result); 6917 __ popl(result);
6921 } 6918 }
6922 6919
6923 6920
6924 } // namespace dart 6921 } // namespace dart
6925 6922
6926 #undef __ 6923 #undef __
6927 6924
6928 #endif // defined TARGET_ARCH_IA32 6925 #endif // defined TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language_dbc.cc ('k') | runtime/vm/intermediate_language_mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698