| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |