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

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

Issue 2912903002: Reapply "Fix misoptimization of 'is' test"" (Closed)
Patch Set: Remove change to TestCidsInstr::Canonicalize and improve printer 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.cc ('k') | runtime/vm/intermediate_language_arm64.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 1
2 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 2 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
3 // for details. All rights reserved. Use of this source code is governed by a 3 // for details. All rights reserved. Use of this source code is governed by a
4 // BSD-style license that can be found in the LICENSE file. 4 // BSD-style license that can be found in the LICENSE file.
5 5
6 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM. 6 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM.
7 #if defined(TARGET_ARCH_ARM) 7 #if defined(TARGET_ARCH_ARM)
8 8
9 #include "vm/intermediate_language.h" 9 #include "vm/intermediate_language.h"
10 10
(...skipping 797 matching lines...) Expand 10 before | Expand all | Expand 10 after
808 __ b(result ? labels.true_label : labels.false_label, EQ); 808 __ b(result ? labels.true_label : labels.false_label, EQ);
809 __ LoadClassId(cid_reg, val_reg); 809 __ LoadClassId(cid_reg, val_reg);
810 810
811 for (intptr_t i = 2; i < data.length(); i += 2) { 811 for (intptr_t i = 2; i < data.length(); i += 2) {
812 const intptr_t test_cid = data[i]; 812 const intptr_t test_cid = data[i];
813 ASSERT(test_cid != kSmiCid); 813 ASSERT(test_cid != kSmiCid);
814 result = data[i + 1] == true_result; 814 result = data[i + 1] == true_result;
815 __ CompareImmediate(cid_reg, test_cid); 815 __ CompareImmediate(cid_reg, test_cid);
816 __ b(result ? labels.true_label : labels.false_label, EQ); 816 __ b(result ? labels.true_label : labels.false_label, EQ);
817 } 817 }
818 // No match found, deoptimize or false. 818 // No match found, deoptimize or default action.
819 if (deopt == NULL) { 819 if (deopt == NULL) {
820 // If the cid is not in the list, jump to the opposite label from the cids
821 // that are in the list. These must be all the same (see asserts in the
822 // constructor).
820 Label* target = result ? labels.false_label : labels.true_label; 823 Label* target = result ? labels.false_label : labels.true_label;
821 if (target != labels.fall_through) { 824 if (target != labels.fall_through) {
822 __ b(target); 825 __ b(target);
823 } 826 }
824 } else { 827 } else {
825 __ b(deopt); 828 __ b(deopt);
826 } 829 }
827 // Dummy result as the last instruction is a jump, any conditional 830 // Dummy result as the last instruction is a jump, any conditional
828 // branch using the result will therefore be skipped. 831 // branch using the result will therefore be skipped.
829 return EQ; 832 return EQ;
(...skipping 6424 matching lines...) Expand 10 before | Expand all | Expand 10 after
7254 compiler->GenerateRuntimeCall(TokenPosition::kNoSource, deopt_id(), 7257 compiler->GenerateRuntimeCall(TokenPosition::kNoSource, deopt_id(),
7255 kGrowRegExpStackRuntimeEntry, 1, locs()); 7258 kGrowRegExpStackRuntimeEntry, 1, locs());
7256 __ Drop(1); 7259 __ Drop(1);
7257 __ Pop(result); 7260 __ Pop(result);
7258 } 7261 }
7259 7262
7260 7263
7261 } // namespace dart 7264 } // namespace dart
7262 7265
7263 #endif // defined TARGET_ARCH_ARM 7266 #endif // defined TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language.cc ('k') | runtime/vm/intermediate_language_arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698