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

Side by Side Diff: runtime/vm/intermediate_language_arm64.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_arm.cc ('k') | runtime/vm/intermediate_language_ia32.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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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_ARM64. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM64.
6 #if defined(TARGET_ARCH_ARM64) 6 #if defined(TARGET_ARCH_ARM64)
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 621 matching lines...) Expand 10 before | Expand all | Expand 10 after
632 return locs; 632 return locs;
633 } 633 }
634 634
635 635
636 Condition TestCidsInstr::EmitComparisonCode(FlowGraphCompiler* compiler, 636 Condition TestCidsInstr::EmitComparisonCode(FlowGraphCompiler* compiler,
637 BranchLabels labels) { 637 BranchLabels labels) {
638 ASSERT((kind() == Token::kIS) || (kind() == Token::kISNOT)); 638 ASSERT((kind() == Token::kIS) || (kind() == Token::kISNOT));
639 const Register val_reg = locs()->in(0).reg(); 639 const Register val_reg = locs()->in(0).reg();
640 const Register cid_reg = locs()->temp(0).reg(); 640 const Register cid_reg = locs()->temp(0).reg();
641 641
642 Label* deopt = CanDeoptimize() ? 642 Label* deopt = CanDeoptimize()
643 compiler->AddDeoptStub(deopt_id(), ICData::kDeoptTestCids) : NULL; 643 ? compiler->AddDeoptStub(deopt_id(),
644 ICData::kDeoptTestCids,
645 licm_hoisted_ ? ICData::kHoisted : 0)
646 : NULL;
644 647
645 const intptr_t true_result = (kind() == Token::kIS) ? 1 : 0; 648 const intptr_t true_result = (kind() == Token::kIS) ? 1 : 0;
646 const ZoneGrowableArray<intptr_t>& data = cid_results(); 649 const ZoneGrowableArray<intptr_t>& data = cid_results();
647 ASSERT(data[0] == kSmiCid); 650 ASSERT(data[0] == kSmiCid);
648 bool result = data[1] == true_result; 651 bool result = data[1] == true_result;
649 __ tsti(val_reg, Immediate(kSmiTagMask)); 652 __ tsti(val_reg, Immediate(kSmiTagMask));
650 __ b(result ? labels.true_label : labels.false_label, EQ); 653 __ b(result ? labels.true_label : labels.false_label, EQ);
651 __ LoadClassId(cid_reg, val_reg); 654 __ LoadClassId(cid_reg, val_reg);
652 655
653 for (intptr_t i = 2; i < data.length(); i += 2) { 656 for (intptr_t i = 2; i < data.length(); i += 2) {
(...skipping 5058 matching lines...) Expand 10 before | Expand all | Expand 10 after
5712 1, 5715 1,
5713 locs()); 5716 locs());
5714 __ Drop(1); 5717 __ Drop(1);
5715 __ Pop(result); 5718 __ Pop(result);
5716 } 5719 }
5717 5720
5718 5721
5719 } // namespace dart 5722 } // namespace dart
5720 5723
5721 #endif // defined TARGET_ARCH_ARM64 5724 #endif // defined TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language_arm.cc ('k') | runtime/vm/intermediate_language_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698