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

Side by Side Diff: runtime/vm/intermediate_language_ia32.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_arm64.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 640 matching lines...) Expand 10 before | Expand all | Expand 10 after
651 return locs; 651 return locs;
652 } 652 }
653 653
654 654
655 Condition TestCidsInstr::EmitComparisonCode(FlowGraphCompiler* compiler, 655 Condition TestCidsInstr::EmitComparisonCode(FlowGraphCompiler* compiler,
656 BranchLabels labels) { 656 BranchLabels labels) {
657 ASSERT((kind() == Token::kIS) || (kind() == Token::kISNOT)); 657 ASSERT((kind() == Token::kIS) || (kind() == Token::kISNOT));
658 Register val_reg = locs()->in(0).reg(); 658 Register val_reg = locs()->in(0).reg();
659 Register cid_reg = locs()->temp(0).reg(); 659 Register cid_reg = locs()->temp(0).reg();
660 660
661 Label* deopt = CanDeoptimize() ? 661 Label* deopt = CanDeoptimize()
662 compiler->AddDeoptStub(deopt_id(), ICData::kDeoptTestCids) : NULL; 662 ? compiler->AddDeoptStub(deopt_id(),
663 ICData::kDeoptTestCids,
664 licm_hoisted_ ? ICData::kHoisted : 0)
665 : NULL;
663 666
664 const intptr_t true_result = (kind() == Token::kIS) ? 1 : 0; 667 const intptr_t true_result = (kind() == Token::kIS) ? 1 : 0;
665 const ZoneGrowableArray<intptr_t>& data = cid_results(); 668 const ZoneGrowableArray<intptr_t>& data = cid_results();
666 ASSERT(data[0] == kSmiCid); 669 ASSERT(data[0] == kSmiCid);
667 bool result = data[1] == true_result; 670 bool result = data[1] == true_result;
668 __ testl(val_reg, Immediate(kSmiTagMask)); 671 __ testl(val_reg, Immediate(kSmiTagMask));
669 __ j(ZERO, result ? labels.true_label : labels.false_label); 672 __ j(ZERO, result ? labels.true_label : labels.false_label);
670 __ LoadClassId(cid_reg, val_reg); 673 __ LoadClassId(cid_reg, val_reg);
671 for (intptr_t i = 2; i < data.length(); i += 2) { 674 for (intptr_t i = 2; i < data.length(); i += 2) {
672 const intptr_t test_cid = data[i]; 675 const intptr_t test_cid = data[i];
(...skipping 6200 matching lines...) Expand 10 before | Expand all | Expand 10 after
6873 __ Drop(1); 6876 __ Drop(1);
6874 __ popl(result); 6877 __ popl(result);
6875 } 6878 }
6876 6879
6877 6880
6878 } // namespace dart 6881 } // namespace dart
6879 6882
6880 #undef __ 6883 #undef __
6881 6884
6882 #endif // defined TARGET_ARCH_IA32 6885 #endif // defined TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language_arm64.cc ('k') | runtime/vm/intermediate_language_mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698