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

Side by Side Diff: runtime/vm/intermediate_language_mips.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_ia32.cc ('k') | runtime/vm/intermediate_language_x64.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_MIPS. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_MIPS.
6 #if defined(TARGET_ARCH_MIPS) 6 #if defined(TARGET_ARCH_MIPS)
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 876 matching lines...) Expand 10 before | Expand all | Expand 10 after
887 __ beq(CMPRES1, ZR, result ? labels.true_label : labels.false_label); 887 __ beq(CMPRES1, ZR, result ? labels.true_label : labels.false_label);
888 888
889 __ LoadClassId(cid_reg, val_reg); 889 __ LoadClassId(cid_reg, val_reg);
890 for (intptr_t i = 2; i < data.length(); i += 2) { 890 for (intptr_t i = 2; i < data.length(); i += 2) {
891 const intptr_t test_cid = data[i]; 891 const intptr_t test_cid = data[i];
892 ASSERT(test_cid != kSmiCid); 892 ASSERT(test_cid != kSmiCid);
893 result = data[i + 1] == true_result; 893 result = data[i + 1] == true_result;
894 __ BranchEqual(cid_reg, Immediate(test_cid), 894 __ BranchEqual(cid_reg, Immediate(test_cid),
895 result ? labels.true_label : labels.false_label); 895 result ? labels.true_label : labels.false_label);
896 } 896 }
897 // No match found, deoptimize or false. 897 // No match found, deoptimize or default action.
898 if (deopt == NULL) { 898 if (deopt == NULL) {
899 // If the cid is not in the list, jump to the opposite label from the cids
900 // that are in the list. These must be all the same (see asserts in the
901 // constructor).
899 Label* target = result ? labels.false_label : labels.true_label; 902 Label* target = result ? labels.false_label : labels.true_label;
900 if (target != labels.fall_through) { 903 if (target != labels.fall_through) {
901 __ b(target); 904 __ b(target);
902 } 905 }
903 } else { 906 } else {
904 __ b(deopt); 907 __ b(deopt);
905 } 908 }
906 // Dummy result as the last instruction is a jump or fall through. 909 // Dummy result as the last instruction is a jump or fall through.
907 return Condition(CMPRES1, ZR, AL); 910 return Condition(CMPRES1, ZR, AL);
908 } 911 }
(...skipping 5170 matching lines...) Expand 10 before | Expand all | Expand 10 after
6079 compiler->GenerateRuntimeCall(TokenPosition::kNoSource, deopt_id(), 6082 compiler->GenerateRuntimeCall(TokenPosition::kNoSource, deopt_id(),
6080 kGrowRegExpStackRuntimeEntry, 1, locs()); 6083 kGrowRegExpStackRuntimeEntry, 1, locs());
6081 __ lw(result, Address(SP, 1 * kWordSize)); 6084 __ lw(result, Address(SP, 1 * kWordSize));
6082 __ addiu(SP, SP, Immediate(2 * kWordSize)); 6085 __ addiu(SP, SP, Immediate(2 * kWordSize));
6083 } 6086 }
6084 6087
6085 6088
6086 } // namespace dart 6089 } // namespace dart
6087 6090
6088 #endif // defined TARGET_ARCH_MIPS 6091 #endif // defined TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language_ia32.cc ('k') | runtime/vm/intermediate_language_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698