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

Side by Side Diff: runtime/vm/intermediate_language_arm.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.h ('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 // 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_ARM. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM.
6 #if defined(TARGET_ARCH_ARM) 6 #if defined(TARGET_ARCH_ARM)
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 745 matching lines...) Expand 10 before | Expand all | Expand 10 after
756 return locs; 756 return locs;
757 } 757 }
758 758
759 759
760 Condition TestCidsInstr::EmitComparisonCode(FlowGraphCompiler* compiler, 760 Condition TestCidsInstr::EmitComparisonCode(FlowGraphCompiler* compiler,
761 BranchLabels labels) { 761 BranchLabels labels) {
762 ASSERT((kind() == Token::kIS) || (kind() == Token::kISNOT)); 762 ASSERT((kind() == Token::kIS) || (kind() == Token::kISNOT));
763 const Register val_reg = locs()->in(0).reg(); 763 const Register val_reg = locs()->in(0).reg();
764 const Register cid_reg = locs()->temp(0).reg(); 764 const Register cid_reg = locs()->temp(0).reg();
765 765
766 Label* deopt = CanDeoptimize() ? 766 Label* deopt = CanDeoptimize()
767 compiler->AddDeoptStub(deopt_id(), ICData::kDeoptTestCids) : NULL; 767 ? compiler->AddDeoptStub(deopt_id(),
768 ICData::kDeoptTestCids,
769 licm_hoisted_ ? ICData::kHoisted : 0)
770 : NULL;
768 771
769 const intptr_t true_result = (kind() == Token::kIS) ? 1 : 0; 772 const intptr_t true_result = (kind() == Token::kIS) ? 1 : 0;
770 const ZoneGrowableArray<intptr_t>& data = cid_results(); 773 const ZoneGrowableArray<intptr_t>& data = cid_results();
771 ASSERT(data[0] == kSmiCid); 774 ASSERT(data[0] == kSmiCid);
772 bool result = data[1] == true_result; 775 bool result = data[1] == true_result;
773 __ tst(val_reg, Operand(kSmiTagMask)); 776 __ tst(val_reg, Operand(kSmiTagMask));
774 __ b(result ? labels.true_label : labels.false_label, EQ); 777 __ b(result ? labels.true_label : labels.false_label, EQ);
775 __ LoadClassId(cid_reg, val_reg); 778 __ LoadClassId(cid_reg, val_reg);
776 779
777 for (intptr_t i = 2; i < data.length(); i += 2) { 780 for (intptr_t i = 2; i < data.length(); i += 2) {
(...skipping 6173 matching lines...) Expand 10 before | Expand all | Expand 10 after
6951 1, 6954 1,
6952 locs()); 6955 locs());
6953 __ Drop(1); 6956 __ Drop(1);
6954 __ Pop(result); 6957 __ Pop(result);
6955 } 6958 }
6956 6959
6957 6960
6958 } // namespace dart 6961 } // namespace dart
6959 6962
6960 #endif // defined TARGET_ARCH_ARM 6963 #endif // defined TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language.h ('k') | runtime/vm/intermediate_language_arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698