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

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

Issue 1999043002: VM: Fix bug that can causes infinite opt/deopt loop. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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 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 814 matching lines...) Expand 10 before | Expand all | Expand 10 after
825 return locs; 825 return locs;
826 } 826 }
827 827
828 828
829 Condition TestCidsInstr::EmitComparisonCode(FlowGraphCompiler* compiler, 829 Condition TestCidsInstr::EmitComparisonCode(FlowGraphCompiler* compiler,
830 BranchLabels labels) { 830 BranchLabels labels) {
831 ASSERT((kind() == Token::kIS) || (kind() == Token::kISNOT)); 831 ASSERT((kind() == Token::kIS) || (kind() == Token::kISNOT));
832 Register val_reg = locs()->in(0).reg(); 832 Register val_reg = locs()->in(0).reg();
833 Register cid_reg = locs()->temp(0).reg(); 833 Register cid_reg = locs()->temp(0).reg();
834 834
835 Label* deopt = CanDeoptimize() ? 835 Label* deopt = CanDeoptimize()
836 compiler->AddDeoptStub(deopt_id(), ICData::kDeoptTestCids) : NULL; 836 ? compiler->AddDeoptStub(deopt_id(),
837 ICData::kDeoptTestCids,
838 licm_hoisted_ ? ICData::kHoisted : 0)
839 : NULL;
837 840
838 const intptr_t true_result = (kind() == Token::kIS) ? 1 : 0; 841 const intptr_t true_result = (kind() == Token::kIS) ? 1 : 0;
839 const ZoneGrowableArray<intptr_t>& data = cid_results(); 842 const ZoneGrowableArray<intptr_t>& data = cid_results();
840 ASSERT(data[0] == kSmiCid); 843 ASSERT(data[0] == kSmiCid);
841 bool result = data[1] == true_result; 844 bool result = data[1] == true_result;
842 __ andi(CMPRES1, val_reg, Immediate(kSmiTagMask)); 845 __ andi(CMPRES1, val_reg, Immediate(kSmiTagMask));
843 __ beq(CMPRES1, ZR, result ? labels.true_label : labels.false_label); 846 __ beq(CMPRES1, ZR, result ? labels.true_label : labels.false_label);
844 847
845 __ LoadClassId(cid_reg, val_reg); 848 __ LoadClassId(cid_reg, val_reg);
846 for (intptr_t i = 2; i < data.length(); i += 2) { 849 for (intptr_t i = 2; i < data.length(); i += 2) {
(...skipping 4877 matching lines...) Expand 10 before | Expand all | Expand 10 after
5724 1, 5727 1,
5725 locs()); 5728 locs());
5726 __ lw(result, Address(SP, 1 * kWordSize)); 5729 __ lw(result, Address(SP, 1 * kWordSize));
5727 __ addiu(SP, SP, Immediate(2 * kWordSize)); 5730 __ addiu(SP, SP, Immediate(2 * kWordSize));
5728 } 5731 }
5729 5732
5730 5733
5731 } // namespace dart 5734 } // namespace dart
5732 5735
5733 #endif // defined TARGET_ARCH_MIPS 5736 #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